diff --git a/NPLib/Detectors/Exogam/TExogamPhysics.cxx b/NPLib/Detectors/Exogam/TExogamPhysics.cxx index 602bbed1432ac582970e90c4fc8a444442dd35db..ed0f8f2a2e2ec6f588aa43c5d5c00b1fb1b66db8 100644 --- a/NPLib/Detectors/Exogam/TExogamPhysics.cxx +++ b/NPLib/Detectors/Exogam/TExogamPhysics.cxx @@ -578,6 +578,7 @@ void TExogamPhysics::InitializeRootInputPhysics() { // Option to use the standard npanalysis else{ TChain* inputChain = RootInput::getInstance()->GetChain(); + inputChain->SetBranchStatus("Exogam" , true ); inputChain->SetBranchStatus("EventMultiplicty", true); inputChain->SetBranchStatus("ECC_Multiplicity", true); inputChain->SetBranchStatus("GOCCE_Multiplicity", true); diff --git a/NPLib/Detectors/TAC/TTACPhysics.cxx b/NPLib/Detectors/TAC/TTACPhysics.cxx index 130eeb8c42f25f69cefac672bb03d703a0e0fb8d..a97891ef2b33ae722a60e21c0b747f9f4c14acdc 100644 --- a/NPLib/Detectors/TAC/TTACPhysics.cxx +++ b/NPLib/Detectors/TAC/TTACPhysics.cxx @@ -214,6 +214,7 @@ void TTACPhysics::InitializeRootInputPhysics() { // Option to use the standard npanalysis else{ TChain* inputChain = RootInput::getInstance()->GetChain(); + inputChain->SetBranchStatus("TAC", true ); inputChain->SetBranchAddress("TAC", &m_EventPhysics); } } diff --git a/NPLib/Detectors/ZDD/TZDDPhysics.cxx b/NPLib/Detectors/ZDD/TZDDPhysics.cxx index ff4b080edf1a754eb6bd6f3fb6d0319252d00e56..e16f6a397d1425b70ef434446f606b19710d936a 100644 --- a/NPLib/Detectors/ZDD/TZDDPhysics.cxx +++ b/NPLib/Detectors/ZDD/TZDDPhysics.cxx @@ -79,7 +79,7 @@ void TZDDPhysics::BuildPhysicalEvent() { PreTreat(); // match energy and time together - Match_IC(); + Match_IC1(); if(IC_Nbr.size() > 0) Match_PL(); // Treat_DC(); @@ -518,6 +518,7 @@ void TZDDPhysics::InitializeRootInputPhysics() { } // Option to use the standard npanalysis else{ + inputChain->SetBranchStatus("ZDD", true ); inputChain->SetBranchAddress("ZDD", &m_EventPhysics); } } diff --git a/NPLib/Utility/npreader.cxx b/NPLib/Utility/npreader.cxx index 5f2642ea91d8d921640656c03ef7ddf42e04dbad..11a318e7a305a288e204e45d9a45401da7cad06b 100644 --- a/NPLib/Utility/npreader.cxx +++ b/NPLib/Utility/npreader.cxx @@ -27,7 +27,8 @@ int main(int argc , char** argv){ // command line parsing NPOptionManager* myOptionManager = NPOptionManager::getInstance(argc,argv); myOptionManager->SetIsAnalysis(); - myOptionManager->SetReader(true); + if(!myOptionManager->GetInputPhysicalTreeOption()) + myOptionManager->SetReader(true); std::string inputfilename = myOptionManager->GetRunToReadFile(); // if input files are not given, use those from TAsciiFile if (myOptionManager->IsDefault("DetectorConfiguration")) { diff --git a/Projects/E805/Analysis.cxx b/Projects/E805/Analysis.cxx index 99509e6ab26e829ff764b8d9c6dec2c6709dbd20..8fd78683ab6304ea79bfc0d219c8fc1e2c08f5f1 100755 --- a/Projects/E805/Analysis.cxx +++ b/Projects/E805/Analysis.cxx @@ -98,14 +98,16 @@ bool Analysis::FillOutputCondition(){ void Analysis::TreatEvent(){ ReInit(); + // std::cout << "TEST " << GATCONFMASTER.size() << std::endl; //////////////////// MUST2 Part //////////////////// - //TreatCATS(); - bCATS = true; + TreatCATS(); + if(bCATS){ + TreatMUST2(); + } //if(bCATS){ // TreatZDD(); // TreatTAC(); - TreatMUST2(); // TreatEXO(); //} /*//for(unsigned int countMust2 = 0 ; countMust2 < M2->Si_E.size() ; countMust2++){ @@ -132,13 +134,17 @@ void Analysis::TreatEvent(){ } void Analysis::TreatCATS(){ - BeamImpact = TVector3(CATS->PositionOnTargetX,CATS->PositionOnTargetY,0); + if(CATS->PositionOnTargetX > -1000 && CATS->PositionOnTargetY > -1000){ + BeamImpact = TVector3(CATS->PositionOnTargetX,CATS->PositionOnTargetY,0); + BeamDirection = TVector3(CATS->PositionX[0] - CATS->PositionX[1],CATS->PositionY[0] - CATS->PositionY[1],CATS->PositionZ[0] - CATS->PositionZ[1]); + bCATS = true; + } + else bCATS = false; + // BeamImpact = TVector3(0,0,0); // std::cout << "Position On target : " << CATS->PositionOnTargetX << " " << CATS->PositionOnTargetY << std::endl; - BeamDirection = TVector3(CATS->PositionX[0] - CATS->PositionX[1],CATS->PositionY[0] - CATS->PositionY[1],CATS->PositionZ[0] - CATS->PositionZ[1]); // BeamDirection = TVector3(0,0,1); // std::cout << "Position XY " << CATS->PositionX[1] - CATS->PositionX[0] << " " << CATS->PositionY[1] - CATS->PositionY[0] << " " << CATS->PositionZ[1] - CATS->PositionZ[0] << std::endl; - bCATS = true; } void Analysis::TreatZDD(){ @@ -150,7 +156,7 @@ void Analysis::TreatTAC(){ } void Analysis::TreatMUST2(){ - + int M2_size = M2->Si_E.size(); for(unsigned int countMust2 = 0 ; countMust2 < M2_size ; countMust2++){ M2_TelescopeM++; @@ -160,8 +166,12 @@ void Analysis::TreatMUST2(){ ThetaM2Surface = 0; ThetaNormalTarget = 0; - TVector3 HitDirection = M2 -> GetPositionOfInteraction(countMust2) - BeamImpact ; + BeamImpact = TVector3(0,0,0); + BeamDirection = TVector3(0,0,1); + TVector3 HitDirection = M2 -> GetPositionOfInteraction(countMust2) - BeamImpact; M2_ThetaLab.push_back(HitDirection.Angle( BeamDirection )); + //std::cout << BeamImpact.X() << " " << BeamImpact.Y() << " " << BeamImpact.Z() << std::endl; + //std::cout << BeamDirection.X() << " " << BeamDirection.Y() << " " << BeamDirection.Z() << std::endl << std::endl;; M2_X.push_back(M2 -> GetPositionOfInteraction(countMust2).X()); M2_Y.push_back(M2 -> GetPositionOfInteraction(countMust2).Y()); @@ -180,10 +190,10 @@ void Analysis::TreatMUST2(){ Energy[ParticleType[i]] = 0; CsI_Energy[ParticleType[i]] = 0; - if(CsI_E_M2>8192 ){ + if(M2->CsI_E_Raw[countMust2] > 8192){ // The energy in CsI is calculate form dE/dx Table because std::string name = "MUST2/"+ParticleType[i]+"_T"+NPL::itoa(TelescopeNumber)+"_CsI"+NPL::itoa(CristalNb)+"_E"; - CsI_Energy[ParticleType[i]] = Cal->ApplyCalibration(name,CsI_E_M2); + CsI_Energy[ParticleType[i]] = Cal->ApplyCalibration(name,M2->CsI_E_Raw[countMust2]); Energy[ParticleType[i]] = CsI_Energy[ParticleType[i]]; } @@ -356,9 +366,17 @@ void Analysis::UnallocateVariables(){ void Analysis::InitInputBranch(){ - TTreeReader* inputTreeReader = RootInput::getInstance()->GetTreeReader(); - GATCONFMASTER_ = new TTreeReaderValue<vector<unsigned int>>(*inputTreeReader,"GATCONF"); - GATCONFMASTERTS_ = new TTreeReaderValue<vector<unsigned long long>>(*inputTreeReader,"GATCONFTS"); + if(!NPOptionManager::getInstance()->GetInputPhysicalTreeOption()){ + TTreeReader* inputTreeReader = RootInput::getInstance()->GetTreeReader(); + GATCONFMASTER_ = new TTreeReaderValue<vector<unsigned int>>(*inputTreeReader,"GATCONF"); + GATCONFMASTERTS_ = new TTreeReaderValue<vector<unsigned long long>>(*inputTreeReader,"GATCONFTS"); + + } + // else{ + // RootInput::getInstance()->GetChain()->SetBranchAddress("GATCONF",&GATCONFMASTER); + // RootInput::getInstance()->GetChain()->SetBranchAddress("GATCONFTS",&GATCONFMASTERTS); + // } + //DATATRIG_CATS_ = new TTreeReaderValue<unsigned short>(*inputTreeReader,"DATATRIG_CATS"); /*PlasticRaw_ = new TTreeReaderArray<UShort_t>(*inputTreeReader,"PlasticRaw"); PlasticRaw_TS_ = new TTreeReaderArray<ULong64_t>(*inputTreeReader,"PlasticRawTS"); diff --git a/Projects/E805/configs/ConfigMust2.dat b/Projects/E805/configs/ConfigMust2.dat index 4e4f4dce69640bbf5f17521fd64daec0fbeab842..a23f6a3248e3d827113a539679d79634f276fa52 100644 --- a/Projects/E805/configs/ConfigMust2.dat +++ b/Projects/E805/configs/ConfigMust2.dat @@ -67,3 +67,71 @@ ConfigMust2 DISABLE_CHANNEL MM4STRY1 DISABLE_CHANNEL MM4STRY2 DISABLE_CHANNEL MM4STRY3 + + DISABLE_CHANNEL MM1SILI1 + DISABLE_CHANNEL MM1SILI2 + DISABLE_CHANNEL MM1SILI3 + DISABLE_CHANNEL MM1SILI4 + DISABLE_CHANNEL MM1SILI5 + DISABLE_CHANNEL MM1SILI6 + DISABLE_CHANNEL MM1SILI7 + DISABLE_CHANNEL MM1SILI8 + DISABLE_CHANNEL MM1SILI9 + DISABLE_CHANNEL MM1SILI10 + DISABLE_CHANNEL MM1SILI11 + DISABLE_CHANNEL MM1SILI12 + DISABLE_CHANNEL MM1SILI13 + DISABLE_CHANNEL MM1SILI14 + DISABLE_CHANNEL MM1SILI15 + DISABLE_CHANNEL MM1SILI16 + + DISABLE_CHANNEL MM2SILI1 + DISABLE_CHANNEL MM2SILI2 + DISABLE_CHANNEL MM2SILI3 + DISABLE_CHANNEL MM2SILI4 + DISABLE_CHANNEL MM2SILI5 + DISABLE_CHANNEL MM2SILI6 + DISABLE_CHANNEL MM2SILI7 + DISABLE_CHANNEL MM2SILI8 + DISABLE_CHANNEL MM2SILI9 + DISABLE_CHANNEL MM2SILI10 + DISABLE_CHANNEL MM2SILI11 + DISABLE_CHANNEL MM2SILI12 + DISABLE_CHANNEL MM2SILI13 + DISABLE_CHANNEL MM2SILI14 + DISABLE_CHANNEL MM2SILI15 + DISABLE_CHANNEL MM2SILI16 + + DISABLE_CHANNEL MM3SILI1 + DISABLE_CHANNEL MM3SILI2 + DISABLE_CHANNEL MM3SILI3 + DISABLE_CHANNEL MM3SILI4 + DISABLE_CHANNEL MM3SILI5 + DISABLE_CHANNEL MM3SILI6 + DISABLE_CHANNEL MM3SILI7 + DISABLE_CHANNEL MM3SILI8 + DISABLE_CHANNEL MM3SILI9 + DISABLE_CHANNEL MM3SILI10 + DISABLE_CHANNEL MM3SILI11 + DISABLE_CHANNEL MM3SILI12 + DISABLE_CHANNEL MM3SILI13 + DISABLE_CHANNEL MM3SILI14 + DISABLE_CHANNEL MM3SILI15 + DISABLE_CHANNEL MM3SILI16 + + DISABLE_CHANNEL MM4SILI1 + DISABLE_CHANNEL MM4SILI2 + DISABLE_CHANNEL MM4SILI3 + DISABLE_CHANNEL MM4SILI4 + DISABLE_CHANNEL MM4SILI5 + DISABLE_CHANNEL MM4SILI6 + DISABLE_CHANNEL MM4SILI7 + DISABLE_CHANNEL MM4SILI8 + DISABLE_CHANNEL MM4SILI9 + DISABLE_CHANNEL MM4SILI10 + DISABLE_CHANNEL MM4SILI11 + DISABLE_CHANNEL MM4SILI12 + DISABLE_CHANNEL MM4SILI13 + DISABLE_CHANNEL MM4SILI14 + DISABLE_CHANNEL MM4SILI15 + DISABLE_CHANNEL MM4SILI16 \ No newline at end of file diff --git a/Projects/E805/project.config b/Projects/E805/project.config new file mode 100644 index 0000000000000000000000000000000000000000..f4d49abf59994412aa11998b16b6959b5abd9a3e --- /dev/null +++ b/Projects/E805/project.config @@ -0,0 +1,8 @@ +Project E805 + AnalysisOutput= ./data/NPRoot/Analysis/ + SimulationOutput= ./data/NPRoot/Simulation/ + EnergyLoss= ../../Inputs/EnergyLoss/ + CalibrationOutput= ./data/NPRoot/Calibration/ + Cuts= ./data/NPRoot/Cuts/ + +