diff --git a/NPLib/Detectors/Strasse/TStrassePhysics.cxx b/NPLib/Detectors/Strasse/TStrassePhysics.cxx index 0262a70c32f2019cc6b9c862eebd8fe30759f3d2..dcb5ddd6cf499e46035b977c11a20a60fddf7625 100644 --- a/NPLib/Detectors/Strasse/TStrassePhysics.cxx +++ b/NPLib/Detectors/Strasse/TStrassePhysics.cxx @@ -107,7 +107,7 @@ ClassImp(TStrassePhysics) } /////////////////////////////////////////////////////////////////////////// -void TStrassePhysics::AddInnerDetector(double R, double Z, double Phi, double Shift){ +void TStrassePhysics::AddInnerDetector(double R, double Z, double Phi, double Shift, TVector3 Ref){ m_NumberOfInnerDetectors++; double ActiveWidth = Inner_Wafer_Width-2.*Inner_Wafer_GuardRing; double ActiveLength = Inner_Wafer_Length-Inner_Wafer_PADExternal-Inner_Wafer_PADInternal-2*Inner_Wafer_GuardRing; @@ -118,6 +118,7 @@ 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); @@ -203,7 +204,7 @@ void TStrassePhysics::AddInnerDetector(double R, double Z, double Phi, double Sh } /////////////////////////////////////////////////////////////////////////// -void TStrassePhysics::AddOuterDetector(double R, double Z, double Phi, double Shift){ +void TStrassePhysics::AddOuterDetector(double R, double Z, double Phi, double Shift, TVector3 Ref){ m_NumberOfOuterDetectors++; double ActiveWidth = Outer_Wafer_Width-2.*Outer_Wafer_GuardRing; double ActiveLength = Outer_Wafer_Length-Outer_Wafer_PADExternal-Outer_Wafer_PADInternal-2*Outer_Wafer_GuardRing; @@ -214,6 +215,7 @@ 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); @@ -738,7 +740,8 @@ void TStrassePhysics::ReadConfiguration(NPL::InputParser parser) { double Z= blocks_inner[i]->GetDouble("Z","mm"); double Phi = blocks_inner[i]->GetDouble("Phi","deg"); double Shift = blocks_inner[i]->GetDouble("Shift","mm"); - AddInnerDetector(R,Z,Phi,Shift); + TVector3 Ref = blocks_inner[i]->GetTVector3("Ref","mm"); + AddInnerDetector(R,Z,Phi,Shift,Ref); } else{ cout << "ERROR: check your input file formatting on " << i+1 << " inner block " <<endl; @@ -760,7 +763,8 @@ 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"); - AddOuterDetector(R,Z,Phi,Shift); + TVector3 Ref = blocks_inner[i]->GetTVector3("Ref","mm"); + AddOuterDetector(R,Z,Phi,Shift,Ref); } else{ diff --git a/NPLib/Detectors/Strasse/TStrassePhysics.h b/NPLib/Detectors/Strasse/TStrassePhysics.h index fb0f349026c52c5987bc3cd111b319a45bd03e87..a50c24a59b4f0f1d49a566f9ed90c778ce19e033 100644 --- a/NPLib/Detectors/Strasse/TStrassePhysics.h +++ b/NPLib/Detectors/Strasse/TStrassePhysics.h @@ -92,8 +92,8 @@ class TStrassePhysics : public TObject, public NPL::VDetector { void ReadConfiguration(NPL::InputParser); /// A usefull method to bundle all operation to add a detector - void AddInnerDetector(double R, double Z, double Phi,double Shift); - void AddOuterDetector(double R, double Z, double Phi,double Shift); + void AddInnerDetector(double R, double Z, double Phi,double Shift,TVector3 Ref); + void AddOuterDetector(double R, double Z, double Phi,double Shift,TVector3 Ref); // add parameters to the CalibrationManger void AddParameterToCalibrationManager(); diff --git a/Projects/Strasse/Analysis.cxx b/Projects/Strasse/Analysis.cxx index 39d571973c43584206b49115b827a2601aca6509..9dce0cfd7423acf563f22ae08898a4fcda182e83 100644 --- a/Projects/Strasse/Analysis.cxx +++ b/Projects/Strasse/Analysis.cxx @@ -70,7 +70,6 @@ void Analysis::TreatEvent(){ double deltaPhi = abs(Proton1.Phi()/deg-Proton2.Phi()/deg); double sumTheta = Proton1.Theta()/deg+Proton2.Theta()/deg; double OpeningAngle = Proton1.Angle(Proton2)/deg; - cout << OpeningAngle << endl; // reject event that make no physical sense if(deltaPhi<170 && sumTheta<80){ return;