diff --git a/NPLib/Detectors/Strasse/TStrassePhysics.cxx b/NPLib/Detectors/Strasse/TStrassePhysics.cxx index dcb5ddd6cf499e46035b977c11a20a60fddf7625..4f5d7d0110c9a78cd92fcae2c52df025a7996bfe 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 53911286b4eee6a66c19ef3b28fb2c77f9016c83..97c177d3070d5ed261deb3fcb605bf9ce8f0f133 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(),"");