diff --git a/Inputs/DetectorConfiguration/e530.detector b/Inputs/DetectorConfiguration/e530.detector index c2afc60588e09b07ca87a7bd7e6a061063481d1a..429498fbbf60399cb8f5d41f76c4aeb14b9a4e0c 100644 --- a/Inputs/DetectorConfiguration/e530.detector +++ b/Inputs/DetectorConfiguration/e530.detector @@ -19,7 +19,7 @@ GeneralTarget %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Target - THICKNESS= 21.51 + THICKNESS= 1.0755 RADIUS= 1.25 MATERIAL= CD2 ANGLE= 0 diff --git a/Inputs/EventGenerator/60Fe.reaction b/Inputs/EventGenerator/60Fe.reaction index 92f87dfaa4c8cf1ff78e94b9d0f21feeca32902c..37a54d2618bf1ecf16e6b16685e14b6e9d55c704 100644 --- a/Inputs/EventGenerator/60Fe.reaction +++ b/Inputs/EventGenerator/60Fe.reaction @@ -10,7 +10,7 @@ Transfert ExcitationEnergyHeavy= 0.0 ExcitationEnergyLight= 0.0 BeamEnergy= 1628.41 - BeamEnergySpread= 0 + BeamEnergySpread= 8.14 SigmaX= 0 SigmaY= 0 SigmaThetaX= 0 diff --git a/NPAnalysis/macros/ControlSimu.C b/NPAnalysis/macros/ControlSimu.C index 1f0ddf4420eb5edfb961e3ba1c323e6d81bb43ce..cbc92a913c7fb5789ec6008f0a34cff0b0634ba4 100644 --- a/NPAnalysis/macros/ControlSimu.C +++ b/NPAnalysis/macros/ControlSimu.C @@ -48,6 +48,7 @@ void ControlSimu(const char * fname = "myResult") TString inFileName = fname; if (!inFileName.Contains("root")) inFileName += ".root"; TFile *inFile = new TFile(path + inFileName); + if (!inFile->IsOpen()) exit(1); TTree *tree = (TTree*) inFile->Get("SimulatedTree"); // Connect the branches of the TTree and activate then if necessary @@ -80,9 +81,22 @@ void ControlSimu(const char * fname = "myResult") // Read the TTree Int_t nentries = tree->GetEntries(); - cout << "TTree contains " << nentries << " events" << endl; + cout <<endl << " TTree contains " << nentries << " events" << endl; + clock_t begin=clock(); + clock_t end=begin; for (Int_t i = 0; i < nentries; i++) { - if (i%10000 == 0) cout << "Entry " << i << endl; + if (i%10000 == 0 && i!=0) { + cout.precision(5); + end = clock(); + double TimeElapsed = (end-begin) / CLOCKS_PER_SEC; + double percent = (double)i/nentries ; + double TimeToWait = (TimeElapsed/percent) - TimeElapsed; + cout << "\r Progression:" << percent*100 << " % \t | \t Remaining time : ~" << TimeToWait <<"s"<< flush; + } + else if (i==nentries-1) cout << "\r Progression:" << " 100% " <<endl; + +// if (i%10000 == 0) cout << "Entry " << i << endl; + // Get entry tree->GetEntry(i); // Fill histos diff --git a/NPAnalysis/must2/RunToTreat.txt b/NPAnalysis/must2/RunToTreat.txt index 698f27aa2f5d83de671b3370b1ef6ccf2a561d21..31a1ddd57b537e0328034e64181a88eef66bc51e 100644 --- a/NPAnalysis/must2/RunToTreat.txt +++ b/NPAnalysis/must2/RunToTreat.txt @@ -1,4 +1,5 @@ TTreeName SimulatedTree RootFileName - ../../Outputs/Simulation/myResult.root +% ../../Outputs/Simulation/myResult.root + ../../Outputs/Simulation/fe60dp_100ug.root diff --git a/NPAnalysis/must2/src/Analysis.cc b/NPAnalysis/must2/src/Analysis.cc index 1cefa90e30428e969a44f82fb98b459d7b169f4b..8e030f477f61fdcc461792bd1670004fe360cdbf 100644 --- a/NPAnalysis/must2/src/Analysis.cc +++ b/NPAnalysis/must2/src/Analysis.cc @@ -84,7 +84,7 @@ int main(int argc,char** argv) TH2F* Position_M2 = new TH2F("Must2Positions", "Must2Positions", 2000, -200, 200, 2000, -200, 200); TH2F* Position_M2_tot = new TH2F("Must2Positions_tot", "Must2Positions_tot", 130, -1, 129, 130, -1, 130); - cout << " ///////// Starting Analysis ///////// "<< endl << endl ; + cout << endl << "///////// Starting Analysis ///////// "<< endl; int N = Chain -> GetEntries(); cout << " Number of Event to be treated : " << N << endl ; clock_t begin=clock();