diff --git a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx index 8f420a48c7fecaaddeecb553679d5b0e9e7404b3..378cc86c366585002f2eb2f46a23d75d9fe1a201 100644 --- a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx +++ b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx @@ -99,7 +99,7 @@ void TFPDTamuPhysics::BuildPhysicalEvent() { unsigned int mysizeT = m_PreTreatedData->Get_Micro_Time_Mult(); for (UShort_t t = 0; t< mysizeT ; t++) { - MicroTime.push_back(m_EventData->Get_Micro_Time(t)); + MicroTimeOR.push_back(m_EventData->Get_Micro_Time(t)); } //AWire @@ -203,6 +203,23 @@ void TFPDTamuPhysics::BuildPhysicalEvent() { //m_PreTreatedData->Dump(); //cin.get(); } + + //separate Left and right detectors + vector<double> PlastRightTime, PlastLeftTime; + mysizeT = m_PreTreatedData->Get_Plast_Time_Mult(); + for (UShort_t t = 0; t < mysizeT ; t++) { + //collect info + int side = m_PreTreatedData->Get_Plast_T_DetectorSide(t); + double time = m_PreTreatedData->Get_Plast_Time(t); + // skip values lower than a certain threshold + if (time<0) continue; + //redistribute + if (side==1) + PlastRightTime.push_back(time); + else + PlastLeftTime.push_back(time); + } + /* //model // match energy and time together @@ -494,7 +511,7 @@ void TFPDTamuPhysics::Clear() { MicroPositionZ.clear(); MicroCharge.clear(); MicroEnergy.clear(); - MicroTime.clear(); + MicroTimeOR.clear(); //Avalanche wire AWireDetNumber.clear(); AWireLeftCharge.clear(); @@ -504,11 +521,11 @@ void TFPDTamuPhysics::Clear() { //Plastic scintillator PlastLeftCharge.clear(); PlastRightCharge.clear(); + PlastTimeLeft.clear(); + PlastTimeRight.clear(); PlastCharge.clear(); PlastPositionX.clear(); PlastPositionZ.clear(); - PlastTime.clear(); - //Calculated PlastPositionX_AW = -99 ; //from AWire and Plastic Z IonDirection.SetXYZ(0,0,0); // from AWire @@ -1138,6 +1155,8 @@ void TFPDTamuPhysics::InitializeRootInputPhysics() { //Plastic scintillator inputChain->SetBranchStatus( "PlastLeftCharge" , true ); inputChain->SetBranchStatus( "PlastRightCharge" , true ); + inputChain->SetBranchStatus( "PlastLeftTime" , true ); + inputChain->SetBranchStatus( "PlastRightTime" , true ); inputChain->SetBranchStatus( "PlastCharge" , true ); inputChain->SetBranchStatus( "PlastPositionX" , true ); inputChain->SetBranchStatus( "PlastPositionZ" , true ); diff --git a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h index d7e34f0b8bdad144dfe6febf6f0b94619a083b46..7306c39e4583494c770da2b01eda8f41de4f3fd7 100644 --- a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h +++ b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h @@ -77,7 +77,7 @@ class TFPDTamuPhysics : public TObject, public NPL::VDetector { vector<double> MicroPositionZ; vector<double> MicroCharge; vector<double> MicroEnergy; - vector<double> MicroTime; + vector<double> MicroTimeOR; //Avalanche wire vector<int> AWireDetNumber; vector<double> AWireLeftCharge; @@ -87,10 +87,11 @@ class TFPDTamuPhysics : public TObject, public NPL::VDetector { //Plastic scintillator vector<double> PlastLeftCharge; vector<double> PlastRightCharge; + vector<double> PlastTimeLeft; + vector<double> PlastTimeRight; vector<double> PlastCharge; vector<double> PlastPositionX; vector<double> PlastPositionZ; - vector<double> PlastTime; //Calculated AWire and Plastic double PlastPositionX_AW; diff --git a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx index 09cb38f8ad981046a0d645d2ea9f2e8c46981a56..bfa8421d05a332a57a74c34ddc0f8a7b40c7f1d2 100644 --- a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx +++ b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx @@ -97,6 +97,11 @@ void TGeTAMUPhysics::BuildPhysicalEvent(){ AddBack_Crystal.push_back(clv_crystal[clv]); AddBack_Segment.push_back(clv_segment[clv]); } + +//Fill the time OR +for (unsigned i = 0 ; i < m_PreTreatedData->GetMultiplicityCoreT(); i++) + GeTimeOR.push_back(m_PreTreatedData->GetCoreTime(i)); + } ///////////////////////////////////////////////// @@ -108,6 +113,7 @@ void TGeTAMUPhysics::PreTreat(){ double Eraw,Energy; double Traw,Time; int clover, crystal, segment; + for(unsigned int i = 0 ; i < mysizeE ; i++){ Eraw = m_EventData->GetCoreEnergy(i); if(Eraw>0){ @@ -118,6 +124,7 @@ void TGeTAMUPhysics::PreTreat(){ m_PreTreatedData->SetCoreE(clover,crystal,Energy); } } + for(unsigned int i = 0 ; i < mysizeT ; i++){ Traw = m_EventData->GetCoreTime(i); if(Traw>0){ @@ -140,6 +147,7 @@ void TGeTAMUPhysics::PreTreat(){ m_PreTreatedData->SetSegmentE(clover,crystal,Energy); } } + mysizeT = m_EventData->GetMultiplicitySegmentT(); for(unsigned int i = 0 ; i < mysizeT ; i++){ Traw = m_EventData->GetSegmentTime(i); @@ -151,6 +159,7 @@ void TGeTAMUPhysics::PreTreat(){ m_PreTreatedData->SetSegmentT(clover,crystal,Time); } } + } ///////////////////////////////////////////////// @@ -374,6 +383,8 @@ void TGeTAMUPhysics::Clear() { AddBack_Clover.clear(); AddBack_Crystal.clear(); AddBack_Segment.clear(); + AddBack_T.clear(); + GeTimeOR.clear(); } /////////////////////////////////////////////////////////////////////////// void TGeTAMUPhysics::ClearEventData() { diff --git a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h index fd4157ef41a0f4190bf2a6c866bdd2230c33e8e1..e2e9a7748aefa9b5239ea8602cbe7b4c32c644de 100644 --- a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h +++ b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h @@ -95,6 +95,7 @@ class TGeTAMUPhysics : public TObject, public NPL::VDetector{ vector<int> AddBack_Clover; vector<int> AddBack_Crystal; vector<int> AddBack_Segment; + vector<double> GeTimeOR; // OR of all time signals, can be used for array or or clover only private: // use for anlysis