Commit ce134d88 authored by Adrien Matta's avatar Adrien Matta
Browse files

* Fixing strasse positionning in analysis

parent 02db1001
......@@ -118,7 +118,6 @@ void TStrassePhysics::AddInnerDetector(double R, double Z, double Phi, double Sh
// Vector C position of detector face center
TVector3 C(Shift,R,Z);// center of the whole detector, including PCB
C.RotateZ(-Phi);
C+=Ref;
// Vector W normal to detector face (pointing to the back)
TVector3 W(0,1,0);
......@@ -156,7 +155,7 @@ void TStrassePhysics::AddInnerDetector(double R, double Z, double Phi, double Sh
lineY.clear();
lineZ.clear();
for(int j=0; j<Inner_Wafer_LongitudinalStrips; j++){
P = P_1_1 + i*U*TransversePitch + j*V*LongitudinalPitch;
P = P_1_1 + Ref + i*U*TransversePitch + j*V*LongitudinalPitch;
lineX.push_back(P.X());
lineY.push_back(P.Y());
lineZ.push_back(P.Z());
......@@ -189,7 +188,7 @@ void TStrassePhysics::AddInnerDetector(double R, double Z, double Phi, double Sh
lineZ.clear();
for(int j=0; j<Inner_Wafer_LongitudinalStrips; j++){
P = P_1_1 + i*U*TransversePitch + j*V*LongitudinalPitch;
P = P_1_1 + Ref + i*U*TransversePitch + j*V*LongitudinalPitch;
lineX.push_back(P.X());
lineY.push_back(P.Y());
lineZ.push_back(P.Z());
......@@ -215,7 +214,6 @@ void TStrassePhysics::AddOuterDetector(double R, double Z, double Phi, double Sh
// Vector C position of detector face center
TVector3 C(Shift,R,Z);// center of the whole detector, including PCB
C.RotateZ(-Phi);
C+=Ref;
// Vector W normal to detector face (pointing to the back)
TVector3 W(0,1,0);
......@@ -253,7 +251,7 @@ void TStrassePhysics::AddOuterDetector(double R, double Z, double Phi, double Sh
lineY.clear();
lineZ.clear();
for(int j=0; j<Outer_Wafer_LongitudinalStrips; j++){
P = P_1_1 + i*U*TransversePitch + j*V*LongitudinalPitch;
P = P_1_1 + Ref + i*U*TransversePitch + j*V*LongitudinalPitch;
lineX.push_back(P.X());
lineY.push_back(P.Y());
lineZ.push_back(P.Z());
......@@ -286,7 +284,7 @@ void TStrassePhysics::AddOuterDetector(double R, double Z, double Phi, double Sh
lineZ.clear();
for(int j=0; j<Outer_Wafer_LongitudinalStrips; j++){
P = P_1_1 + i*U*TransversePitch + j*V*LongitudinalPitch;
P = P_1_1 + Ref + i*U*TransversePitch + j*V*LongitudinalPitch;
lineX.push_back(P.X());
lineY.push_back(P.Y());
lineZ.push_back(P.Z());
......@@ -763,7 +761,7 @@ void TStrassePhysics::ReadConfiguration(NPL::InputParser parser) {
double Z= blocks_outer[i]->GetDouble("Z","mm");
double Phi = blocks_outer[i]->GetDouble("Phi","deg");
double Shift = blocks_outer[i]->GetDouble("Shift","mm");
TVector3 Ref = blocks_inner[i]->GetTVector3("Ref","mm");
TVector3 Ref = blocks_outer[i]->GetTVector3("Ref","mm");
AddOuterDetector(R,Z,Phi,Shift,Ref);
}
else{
......
......@@ -30,14 +30,14 @@ void Control(){
cVertex->Divide(2,2);
cond = "VertexX!=-1000";
cVertex->cd(1);
PhysicsTree->Draw("VertexX-fRC_Vertex_Position_X>>hx(500,-1,1)",cond.c_str(),"col") ;
PhysicsTree->Draw("VertexX-fRC_Vertex_Position_X>>hx(500,-2,2)",cond.c_str(),"col") ;
cVertex->cd(2);
PhysicsTree->Draw("VertexY-fRC_Vertex_Position_Y>>hy(500,-1,1)",cond.c_str(),"col") ;
PhysicsTree->Draw("VertexY-fRC_Vertex_Position_Y>>hy(500,-2,2)",cond.c_str(),"col") ;
cVertex->cd(3);
PhysicsTree->Draw("VertexZ-fRC_Vertex_Position_Z>>hz(500,-1,1)",cond.c_str(),"col") ;
PhysicsTree->Draw("VertexZ-fRC_Vertex_Position_Z>>hz(5000,-20,20)",cond.c_str(),"col") ;
cVertex->cd(4);
PhysicsTree->Draw("Distance>>hd(500,0,2)", cond.c_str(),"");
PhysicsTree->Draw("Distance>>hd(500,0,80)", cond.c_str(),"");
//PhysicsTree->Draw("VertexY:VertexX:VertexZ", cond.c_str(),"");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment