Skip to content

Commit 07247d0

Browse files
PALoizeaukarabowi
authored andcommitted
In Tuto4 plot, add check on DevY + print all Mean and Dev
(cherry picked from commit 936dc57)
1 parent 28d5a49 commit 07247d0

File tree

1 file changed

+10
-4
lines changed
  • examples/simulation/Tutorial4/macros

1 file changed

+10
-4
lines changed

examples/simulation/Tutorial4/macros/plots.C

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,13 @@ int plots(Int_t nEvents = 1000, Int_t iout = 1, TString mcEngine = "align_TGeant
128128
} // event loop end
129129

130130
auto pullx_Ent = pullx->GetEntries();
131+
auto pullx_Mea = pullx->GetMean();
132+
auto pully_Mea = pully->GetMean();
133+
auto pullz_Mea = pullz->GetMean();
131134
auto pullx_Dev = pullx->GetStdDev();
135+
auto pully_Dev = pully->GetStdDev();
136+
auto pullz_Dev = pullz->GetStdDev();
137+
cout << "Mean (" << pullx_Mea << ", " << pully_Mea << ", " << pullz_Mea << ") " << endl;
132138

133139
// save histos to file
134140
// TFile *fHist = TFile::Open("data/auaumbias.hst.root","RECREATE");
@@ -164,13 +170,13 @@ int plots(Int_t nEvents = 1000, Int_t iout = 1, TString mcEngine = "align_TGeant
164170
cout << "Parameter file is " << ParFile << endl;
165171
cout << "Real time " << rtime << " s, CPU time " << ctime << "s" << endl << endl;
166172

167-
if (nevent >= 10 && pullx_Ent > nevent * 35 && abs(pullx_Dev - 0.1) < 0.03)
173+
if (nevent >= 10 && pullx_Ent > nevent * 35 && abs(pullx_Dev - 0.1) < 0.03 && abs(pully_Dev - 0.1) < 0.04)
168174
cout << "Macro finished successfully. Number of events (" << nevent << "), hist entries (" << pullx_Ent
169-
<< ") and deviation (" << pullx_Dev << ") inside limits." << endl;
175+
<< ") and deviation (" << pullx_Dev << ", " << pully_Dev << ", " << pullz_Dev << ") inside limits."
176+
<< endl;
170177
else
171178
cout << "Macro failed. Number of events (" << nevent << "), hist entries (" << pullx_Ent << ") or deviation ("
172-
<< pullx_Dev << ") too far off." << endl;
173-
179+
<< pullx_Dev << ", " << pully_Dev << ", " << pullz_Dev << ") too far off." << endl;
174180
// ------------------------------------------------------------------------
175181

176182
return 0;

0 commit comments

Comments
 (0)