From ce134d883a595a752f12de4986be64114edbca70 Mon Sep 17 00:00:00 2001 From: adrien matta <matta@lpccaen.in2p3.fr> Date: Fri, 24 Jul 2020 17:03:22 +0200 Subject: [PATCH] * Fixing strasse positionning in analysis --- NPLib/Detectors/Strasse/TStrassePhysics.cxx | 12 +++++------- Projects/Strasse/Control.cxx | 8 ++++---- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/NPLib/Detectors/Strasse/TStrassePhysics.cxx b/NPLib/Detectors/Strasse/TStrassePhysics.cxx index dcb5ddd6c..4f5d7d011 100644 --- a/NPLib/Detectors/Strasse/TStrassePhysics.cxx +++ b/NPLib/Detectors/Strasse/TStrassePhysics.cxx @@ -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{ diff --git a/Projects/Strasse/Control.cxx b/Projects/Strasse/Control.cxx index 53911286b..97c177d30 100644 --- a/Projects/Strasse/Control.cxx +++ b/Projects/Strasse/Control.cxx @@ -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(),""); -- GitLab