diff --git a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx index e69b1d056de217bb9aff0053bf7e048ffda46632..dd1defa8ee854327718810bf69f93f188b55c3db 100644 --- a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx +++ b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx @@ -159,7 +159,9 @@ void TFPDTamuPhysics::BuildPhysicalEvent() { unsigned int mysizeT = m_PreTreatedData->Get_Micro_Time_Mult(); for (UShort_t t = 0; t< mysizeT ; t++) { MicroTimeOR.push_back(m_EventData->Get_Micro_Time(t)); + //by Shuya 170905 - uncomment the second one and comment out the first one if you want to have a MicroMegas_dE Timing data in an appropriate Tree (not PlastLeftTime). MicroTimeRowNumber.push_back(m_EventData->Get_Micro_T_RowNbr(t)); + //MicroTimeDetNumber.push_back(m_EventData->Get_Micro_T_DetNbr(t)); } // cout << " end of Micro " << endl ; @@ -199,6 +201,36 @@ void TFPDTamuPhysics::BuildPhysicalEvent() { AWireRightCharge.push_back(EnergyR); // calculate position in X and Z double wire_length = 2*fabs(AWireLeftPos[det].X())/NPUNITS::cm; + //by Shuya 170811 for (6Li,d) + /////////////////////////////////////////////////////// + //AWirePositionX.push_back(wire_length*(EnergyL-EnergyR)/(EnergyL+EnergyR)); + double a = 0.0; + double b = 0.0; + if(det==0) + { + a = 50.956; + b = -25.295; + } + else if(det==1) + { + a = 51.452; + b = -26.05; + } + else if(det==2) + { + a = 51.83; + b = -26.092; + } + else if(det==3) + { + a = 51.033; + b = -25.66; + } + AWirePositionX.push_back(a*(EnergyL)/(EnergyL+EnergyR)+b); + /////////////////////////////////////////////////////// +//by Shuya 180426. Below is pulled by git pull but ignored. +/* +======= double aWirePositionX_uncalib = wire_length*(EnergyL-EnergyR)/(EnergyL+EnergyR); static string name; name = "FPDTamu/AWire_R"; @@ -208,6 +240,8 @@ void TFPDTamuPhysics::BuildPhysicalEvent() { AWirePositionX.push_back(aWirePositionX_calib); //cout << name << endl; //cout << det << " " << wire_length << " " << AWirePositionX.at(r) << " " << EnergyL << " " << EnergyR << " " << relpos << " "<< aWirePositionX_uncalib << " " << aWirePositionX_calib << endl; +>>>>>>> 309fd4a8c02569cec46ab1b5ff4dd5071242ee65 +*/ AWirePositionZ.push_back(AWireLeftPos[det].Z()/NPUNITS::cm); } } @@ -592,7 +626,9 @@ void TFPDTamuPhysics::Clear() { MicroDetNumber.clear(); MicroRowNumber.clear(); MicroColNumber.clear(); + //by Shuya 170905 - uncomment the second one and comment out the first one if you want to have a MicroMegas_dE Timing data in an appropriate Tree (not PlastLeftTime). MicroTimeRowNumber.clear(); + //MicroTimeDetNumber.clear(); MicroPositionX.clear(); MicroPositionZ.clear(); MicroCharge.clear(); @@ -678,11 +714,17 @@ void TFPDTamuPhysics::Dump() const { for (size_t i = 0 ; i < MicroEnergy.size() ; i++) cout << " " << MicroEnergy[i]; cout<<endl; +//by Shuya 170905 - uncomment the second one and comment out the first one if you want to have a MicroMegas_dE Timing data in an appropriate Tree (not PlastLeftTime). cout << " Row TAC:" << endl; for (size_t i = 0 ; i < MicroTimeRowNumber.size() ; i++) cout << " " << MicroTimeRowNumber[i]; cout<<endl; - +/* + cout << " Row TAC:" << endl; + for (size_t i = 0 ; i < MicroTimeDetNumber.size() ; i++) + cout << " " << MicroTimeDetNumber[i]; + cout<<endl; +*/ cout << " ...oooOOOooo... Plastic Scintillator ...oooOOOooo... " << endl; // Energy cout << " Left Charge:" ; @@ -932,7 +974,9 @@ void TFPDTamuPhysics::InitializeRootInputPhysics() { inputChain->SetBranchStatus( "MicroDetNumber" , true ); inputChain->SetBranchStatus( "MicroRowNumber" , true ); inputChain->SetBranchStatus( "MicroColNumber" , true ); +//by Shuya 170905 - uncomment the second one and comment out the first one if you want to have a MicroMegas_dE Timing data in an appropriate Tree (not PlastLeftTime). inputChain->SetBranchStatus( "MicroTimeRowNumber" , true ); + //inputChain->SetBranchStatus( "MicroTimeDetNumber" , true ); inputChain->SetBranchStatus( "MicroPositionX" , true ); inputChain->SetBranchStatus( "MicroPositionZ" , true ); inputChain->SetBranchStatus( "MicroCharge" , true ); diff --git a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx index e7c866605eca8a84fdc294fd9d7b529550b244b6..dee7964c9b05cecc1775ceb514a38fd9eb95cb3f 100644 --- a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx +++ b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx @@ -357,12 +357,17 @@ unsigned int mysizeT ; double Eraw,Energy; double Traw,Time; int clover, crystal, segment; +//by Shuya 170919 +bool LG_Opt; +bool m_LowGainCryIsOpt = true; +bool m_LowGainSegIsOpt = true; //Crystal energy if(m_LowGainCryIsSet) mysizeE = m_EventData->GetMultiplicityCoreELowGain(); else mysizeE = m_EventData->GetMultiplicityCoreE(); + for(unsigned int i = 0 ; i < mysizeE ; i++){ if(m_LowGainCryIsSet){ clover = m_EventData->GetCoreCloverNbrELowGain(i); @@ -373,12 +378,55 @@ for(unsigned int i = 0 ; i < mysizeE ; i++){ clover = m_EventData->GetCoreCloverNbrE(i); crystal = m_EventData->GetCoreCrystalNbrE(i); Eraw = m_EventData->GetCoreEnergy(i); + +//by Shuya 170919. Use low-gain data if it is available (for high-energy gammas which might be above high-gain data's saturation level). +//*************************************************************************************************** + if(m_LowGainCryIsOpt) + { + LG_Opt = false; + + int m_Cry_E_Raw_Threshold_tmp = 2000; + //try low-gain data if high-gain data is above this threshold. If set 0 -> all low-gain, set above 5000 -> all high gain. + if(Eraw>=m_Cry_E_Raw_Threshold_tmp) + { + unsigned int mysizeE2; + double Eraw_tmp; + int clover_tmp, crystal_tmp; + + mysizeE2 = m_EventData->GetMultiplicityCoreELowGain(); + + for(unsigned int j = 0 ; j < mysizeE2 ; j++) + { + clover_tmp = m_EventData->GetCoreCloverNbrELowGain(j); + crystal_tmp = m_EventData->GetCoreCrystalNbrELowGain(j); + Eraw_tmp = m_EventData->GetCoreEnergyLowGain(j); + + if(clover_tmp == clover && crystal_tmp == crystal && Eraw_tmp>=m_Cry_E_Raw_Threshold) + { + Eraw = Eraw_tmp; + LG_Opt = true; + break; + } + } + } + } +//*************************************************************************************************** } if(Eraw>=m_Cry_E_Raw_Threshold && IsValidChannel(0, clover, crystal)){ name = "GETAMU/D"+ NPL::itoa(clover)+"_CRY"+ NPL::itoa(crystal); if(m_ADCRandomBinIsSet) Eraw += Random->Rndm(); - Energy = cal->ApplyCalibration(name+"_E", Eraw); + //by Shuya 170919 + //Energy = cal->ApplyCalibration(name+"_E_LG", Eraw); + if(m_LowGainCryIsSet) + Energy = cal->ApplyCalibration(name+"_E_LG", Eraw); + else + { + if(m_LowGainCryIsOpt && LG_Opt) + Energy = cal->ApplyCalibration(name+"_E_LG", Eraw); + else + Energy = cal->ApplyCalibration(name+"_E", Eraw); + } if(Energy>=m_Cry_E_Threshold){ Singles_CloverMap_CryEN[clover].push_back(crystal); Singles_CloverMap_CryE[clover].push_back(Energy); @@ -420,12 +468,55 @@ for(unsigned int i = 0 ; i < mysizeE ; i++){ clover = m_EventData->GetSegmentCloverNbrE(i); segment = m_EventData->GetSegmentSegmentNbrE(i); Eraw = m_EventData->GetSegmentEnergy(i); + +//by Shuya 170919. Use low-gain data if it is available (for high-energy gammas which might be above high-gain data's saturation level). +//*************************************************************************************************** + if(m_LowGainCryIsOpt) + { + LG_Opt = false; + + int m_Seg_E_Raw_Threshold_tmp = 2000; + //try low-gain data if high-gain data is above this threshold. If set 0 -> all low-gain, set above 5000 -> all high gain. + if(Eraw>=m_Seg_E_Raw_Threshold_tmp) + { + unsigned int mysizeE2; + double Eraw_tmp; + int clover_tmp, segment_tmp; + + mysizeE2 = m_EventData->GetMultiplicitySegmentELowGain(); + + for(unsigned int j = 0 ; j < mysizeE2 ; j++) + { + clover_tmp = m_EventData->GetSegmentCloverNbrELowGain(j); + segment_tmp = m_EventData->GetSegmentSegmentNbrELowGain(j); + Eraw_tmp = m_EventData->GetSegmentEnergyLowGain(j); + + if(clover_tmp == clover && segment_tmp == segment && Eraw_tmp>=m_Cry_E_Raw_Threshold) + { + Eraw = Eraw_tmp; + LG_Opt = true; + break; + } + } + } + } +//*************************************************************************************************** } if(Eraw>=m_Seg_E_Raw_Threshold && IsValidChannel(1, clover, segment)){ name = "GETAMU/D"+ NPL::itoa(clover)+"_SEG"+ NPL::itoa(segment); if(m_ADCRandomBinIsSet) Eraw += Random->Rndm(); - Energy = cal->ApplyCalibration(name+"_E", Eraw); + //by Shuya 170919 + //Energy = cal->ApplyCalibration(name+"_E", Eraw); + if(m_LowGainCryIsSet) + Energy = cal->ApplyCalibration(name+"_E_LG", Eraw); + else + { + if(m_LowGainSegIsOpt && LG_Opt) + Energy = cal->ApplyCalibration(name+"_E_LG", Eraw); + else + Energy = cal->ApplyCalibration(name+"_E", Eraw); + } if(Energy>=m_Seg_E_Threshold){ Singles_CloverMap_SegEN[clover].push_back(segment); Singles_CloverMap_SegE[clover].push_back(Energy); @@ -816,12 +907,16 @@ void TGeTAMUPhysics::AddParameterToCalibrationManager(){ for(int cry = 0 ; cry < 4 ; cry++){ // 4 crystals Cal->AddParameter("GETAMU", "D"+ NPL::itoa(det+1)+"_CRY"+NPL::itoa(cry+1)+"_E","GETAMU_D"+ NPL::itoa(det+1)+"_CRY"+NPL::itoa(cry+1)+"_E"); + //by Shuya 170919 + Cal->AddParameter("GETAMU", "D"+ NPL::itoa(det+1)+"_CRY"+NPL::itoa(cry+1)+"_E_LG","GETAMU_D"+ NPL::itoa(det+1)+"_CRY"+NPL::itoa(cry+1)+"_E_LG"); //by Shuya 170509 //Cal->AddParameter("GETAMU", "D"+ NPL::itoa(det+1)+"_CRY"+NPL::itoa(cry+1)+"_E","GETAMU_D"+ NPL::itoa(det+1)+"_CRY"+NPL::itoa(cry+1)+"_T"); Cal->AddParameter("GETAMU", "D"+ NPL::itoa(det+1)+"_CRY"+NPL::itoa(cry+1)+"_T","GETAMU_D"+ NPL::itoa(det+1)+"_CRY"+NPL::itoa(cry+1)+"_T"); } for( int seg = 0 ; seg < 3 ; seg++){ // 3 segments Cal->AddParameter("GETAMU", "D"+ NPL::itoa(det+1)+"_SEG"+ NPL::itoa(seg+1)+"_E","GETAMU_D"+ NPL::itoa(det+1)+"_SEG"+NPL::itoa(seg+1)+"_E"); + //by Shuya 170919 + Cal->AddParameter("GETAMU", "D"+ NPL::itoa(det+1)+"_SEG"+ NPL::itoa(seg+1)+"_E_LG","GETAMU_D"+ NPL::itoa(det+1)+"_SEG"+NPL::itoa(seg+1)+"_E_LG"); Cal->AddParameter("GETAMU", "D"+ NPL::itoa(det+1)+"_SEG"+ NPL::itoa(seg+1)+"_T","GETAMU_D"+ NPL::itoa(det+1)+"_SEG"+NPL::itoa(seg+1)+"_T"); } diff --git a/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.cxx b/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.cxx index fde0caa52c07b4f85dd9e45d4e94852f5b3cb85d..733b2cced2409762cc232b6762d337e23a5a335e 100644 --- a/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.cxx +++ b/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.cxx @@ -58,10 +58,12 @@ ClassImp(TTiaraBarrelPhysics) m_Take_E_Strip= true; m_Take_T_Back=true; + m_Strip_E_Threshold = 300*keV; m_Back_E_Threshold = 10*keV; m_Maximum_FrontBack_Difference = 30*keV; m_OuterBack_E_Threshold = 50*keV; + m_Spectra = NULL ; } @@ -174,8 +176,15 @@ void TTiaraBarrelPhysics::PreTreat(){ if(EB > m_Back_E_Threshold) m_mapB[key].push_back(EB); } + for(unsigned int i = 0 ; i < sizeO ; i++){ - double EO = m_EventData->GetOuterEEnergy(i); + //by Shuya 171208 + //double EO = m_EventData->GetOuterEEnergy(i); + double EO = Cal_OuterBarrel_E(i); + //by Shuya 180426. This was pulled by git pull but ignored. + //for(unsigned int i = 0 ; i < sizeO ; i++){ + //double EO = m_EventData->GetOuterEEnergy(i); + int det = m_EventData->GetOuterEDetectorNbr(i); int strip = m_EventData->GetOuterEStripNbr(i); int key = det*10+strip; // key of the map OuterStrip={1,2,3,4} => key @@ -436,6 +445,8 @@ void TTiaraBarrelPhysics::AddParameterToCalibrationManager(){ } Cal->AddParameter("TIARABARREL","B" + NPL::itoa( i+1 ) + "_BACK_E","TIARABARREL_B" + NPL::itoa( i+1 ) + "_BACK_E"); + //by Shuya 171208 + Cal->AddParameter("TIARABARREL","OB" + NPL::itoa( i+1 ) + "_E","TIARABARREL_OB" + NPL::itoa( i+1 ) + "_E"); } return; @@ -636,6 +647,14 @@ double TTiaraBarrelPhysics::Cal_Back_E(const int i){ name+= "_BACK_E"; return CalibrationManager::getInstance()->ApplyCalibration(name, m_EventData->GetBackEEnergy(i)); } +//by Shuya 171208 +/////////////////////////////////////////////////////////////////////////////// +double TTiaraBarrelPhysics::Cal_OuterBarrel_E(const int i){ + static string name; name = "TIARABARREL/OB" ; + name+= NPL::itoa( m_EventData->GetOuterEDetectorNbr(i)); + name+= "_E"; + return CalibrationManager::getInstance()->ApplyCalibration(name, m_EventData->GetOuterEEnergy(i)); +} //////////////////////////////////////////////////////////////////////////// void TTiaraBarrelPhysics::WriteSpectra(){ diff --git a/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.h b/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.h index ba66908d30b94480fdf28dc9a6e08f47a1595281..b3c39b913917bf596ab71b2e665725b2a6ce400d 100644 --- a/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.h +++ b/NPLib/Detectors/Tiara/TTiaraBarrelPhysics.h @@ -216,6 +216,8 @@ class TTiaraBarrelPhysics : public TObject, public NPL::VDetector{ double Cal_Strip_Upstream_E(const int i); double Cal_Strip_Downstream_E(const int i); double Cal_Back_E(const int i); +//by Shuya 171208 + double Cal_OuterBarrel_E(const int i); double Match_Strip_Upstream_E(const int i); double Match_Strip_Downstream_E(const int i); diff --git a/NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx b/NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx index 28ee6f4f26dadec7c1130780cf601ca3e60ff7d5..9923b0fd1ccd6ac53f4c8f7c8b927698349ce5ba 100644 --- a/NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx +++ b/NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx @@ -108,10 +108,13 @@ void TTiaraHyballPhysics::BuildPhysicalEvent(){ int N = m_PreTreatedData->GetRingEDetectorNbr(couple[i].X()) ; int Ring = m_PreTreatedData->GetRingEStripNbr(couple[i].X()) ; int Sector = (couple[i].Y() < 0) ? // GAC - sector couple of -1 (couple[i].Y() < 0) means "sector 9" - k_Num_Sector : m_PreTreatedData->GetSectorEStripNbr(couple[i].Y()) ; + //by Shuya 180329 + //k_Num_Sector : m_PreTreatedData->GetSectorEStripNbr(couple[i].Y()) ; + (k_Num_Sector+1) : m_PreTreatedData->GetSectorEStripNbr(couple[i].Y()) ; double Ring_E = m_PreTreatedData->GetRingEEnergy( couple[i].X() ) ; - double Sector_E = Sector == k_Num_Sector ? // GAC - set sector energy to zero if "sector 9" + //double Sector_E = Sector == k_Num_Sector ? // GAC - set sector energy to zero if "sector 9" + double Sector_E = Sector == (k_Num_Sector+1) ? // By Shuya 180329 0 : m_PreTreatedData->GetSectorEEnergy( couple[i].Y() ) ; // Search for associate Time: @@ -286,6 +289,7 @@ vector < TVector2 > TTiaraHyballPhysics :: Match_Ring_Sector(){ ArrayOfGoodCouple . push_back ( TVector2(i,-1) ) ; } } + // Comment by Shuya 180329. Note if you're thinking to use only sector data (m_Take_E_Sector) without ring-sector matching, this should be a last choice. Because sector without ring is hard to accurately correct for deadlayer and target energy loss (while ring without sector is easier). else{ // Take energy from sector only for(unsigned int j = 0 ; j < sizeS ; j++) { @@ -298,6 +302,7 @@ vector < TVector2 > TTiaraHyballPhysics :: Match_Ring_Sector(){ // Standard case with ring+sector matching // GAC - 02152018 - If no sector match is found for a ring, // set sector number to "sector 9" and take phi at center of wedge + int numberOfRingSectorMatches = 0; // by Shuya 180329 for(unsigned int i = 0 ; i < sizeR ; i++) { int numberOfSectorMatches = 0; for(unsigned int j = 0 ; j < sizeS ; j++){ @@ -308,14 +313,25 @@ vector < TVector2 > TTiaraHyballPhysics :: Match_Ring_Sector(){ < m_StripEnergyMatchingNumberOfSigma*m_StripEnergyMatchingSigma ) { ArrayOfGoodCouple . push_back ( TVector2(i,j) ) ; ++numberOfSectorMatches; + ++numberOfRingSectorMatches; //by Shuya 180329 } } } + /* Commented out by Shuya 180329. if(numberOfSectorMatches == 0){ // No match: take ring only, set sector to "sector 9" ArrayOfGoodCouple.push_back(TVector2(i,-1)); } + */ } + //by Shuya 180329. I think this is probably more appropriate a place. Ring-Sector matched data should be used for ELab and Ex calculations in priority, and only if they don't exist, use Ring-only data. + if(numberOfRingSectorMatches == 0){ + for(unsigned int i = 0 ; i < sizeR ; i++) { + // No match: take ring only, set sector to "sector 9" + ArrayOfGoodCouple.push_back(TVector2(i,-1)); + } + } + // Prevent to treat event with ambiguous matchin beetween X and Y // TODO: should we also treat this like no match??? if( ArrayOfGoodCouple.size() > m_PreTreatedData->GetRingEMult() ) ArrayOfGoodCouple.clear() ; @@ -725,7 +741,9 @@ TVector3 TTiaraHyballPhysics::GetRandomisedPositionOfInteraction(const int i) co double rho_max2 = (rho+3.2)*(rho+3.2) ; double rho_rand = sqrt(Rand->Uniform(rho_min2,rho_max2));// sqrt is necessary for realistic randomise! // GAC - 02142018 - Set Phi randomization over whole wedge if "sector 9" - double phi_half_range = Strip_Sector[i] != k_Num_Sector ? 3.4*deg : 27.2*deg; + //double phi_half_range = Strip_Sector[i] != k_Num_Sector ? 3.4*deg : 27.2*deg; + //by Shuya 180329 + double phi_half_range = Strip_Sector[i] != (k_Num_Sector+1) ? 3.4*deg : 27.2*deg; double phi_rand = phi + Rand->Uniform(-phi_half_range, +phi_half_range); return( TVector3(rho_rand*cos(phi_rand),rho_rand*sin(phi_rand),z) ) ; } diff --git a/NPSimulation/Detectors/Tiara/Tiara.hh b/NPSimulation/Detectors/Tiara/Tiara.hh index 118de13014d80548f3dc74a76ba4c45b651c3525..23c4e4774a87eb596b5972282acda3f2a2337af4 100644 --- a/NPSimulation/Detectors/Tiara/Tiara.hh +++ b/NPSimulation/Detectors/Tiara/Tiara.hh @@ -53,6 +53,7 @@ namespace TIARA{ const G4double ResoEnergyInnerBarrel = 0.050*MeV ;// = 136keV FWHM const G4double ResoEnergyOuterBarrel = 0.050*MeV ;// = 136keV FWHM const G4double ResoEnergyHyball = 0.017*MeV ;// = 70keV FWHM + //const G4double ResoEnergyHyball = 0.000*MeV ;// = 70keV FWHM const G4double EnergyThreshold = 200*keV; diff --git a/Projects/T40/Analysis.cxx b/Projects/T40/Analysis.cxx index 6e0ec09be5eaa0180827be9d96f1517557233482..a421c4e2bcefb989f923ad1ad13d8f3b84dd144a 100644 --- a/Projects/T40/Analysis.cxx +++ b/Projects/T40/Analysis.cxx @@ -203,8 +203,10 @@ void Analysis::Init(){ //Original_ELab=0; //Original_ThetaLab=0; - XTarget =0; - YTarget =0; + XTarget =-1.026126; + YTarget =-2.3589; + //XTarget =0; + //YTarget =0; BeamDirection = TVector3(0,0,1); InitOutputBranch(); InitInputBranch(); @@ -290,7 +292,8 @@ void Analysis::TreatEvent(){ ThetaTHSurface = 0; ThetaNormalTarget = 0; if(XTarget>-1000 && YTarget>-1000){ - TVector3 BeamImpact(XTarget,YTarget,0); + //TVector3 BeamImpact(XTarget,YTarget,0); + TVector3 BeamImpact(XTarget, YTarget, 4.07383); //by Shuya 171218 (because of T40 meeting's discussion) //TVector3 HitDirection = TH -> GetRandomisedPositionOfInteraction(countTiaraHyball) - BeamImpact ; @@ -361,7 +364,8 @@ void Analysis::TreatEvent(){ ThetaTBSurface = 0; ThetaNormalTarget = 0; if(XTarget>-1000 && YTarget>-1000){ - TVector3 BeamImpact(XTarget,YTarget,0); + //TVector3 BeamImpact(XTarget,YTarget,0); + TVector3 BeamImpact(XTarget, YTarget, 4.07383); //by Shuya 171218 (because of T40 meeting's discussion) //TVector3 HitDirection = TB -> GetRandomisedPositionOfInteraction(countTiaraBarrel) - BeamImpact ; @@ -575,6 +579,8 @@ void Analysis::TreatEvent(){ // Fill MDM class with FPD data // Only do this if it's not there already // (e.g. data files, not similation) + //if(RootInput::getInstance()->GetChain()->GetBranch("MDM")) cout << detNumber << endl; + if(MDM && RootInput::getInstance()->GetChain()->GetBranch("MDM") == 0) { MDM->DetectorNumber.push_back(detNumber); MDM->Xpos.push_back(Aw_X[detNumber]);