34 #include "TDirectory.h"
35 #include "TDirectoryFile.h"
41 #include "TGraphErrors.h"
42 #include "TMultiGraph.h"
59 ret =
par[0] * 0.1 * (1. -
exp(-(
x[0] - 1400.) * (
x[0] - 1400.) / (1000. *
par[1])) +
par[2] * 0.0001 * sqrt(
x[0]));
65 int lr = (
tot <= 6. ? 0 : 5);
79 double num =
par[0] + chrg * (
par[1] + chrg * (
par[2] + chrg *
par[3]));
103 int iblCalib(
const std::string& InDir,
const std::string& THRscan,
const std::string&
scan,
const std::string& scanLowCharge)
108 const bool run3 =
true;
109 const float badRDfracCut = 0.2;
113 const int finerToT = 1;
114 constexpr
bool moreFE =
false;
115 constexpr
int npsFEs = moreFE ? 8 : 2;
117 gStyle->SetOptFit(1100);
119 #if defined(DEMOXCHECK)
121 std::cout <<
" DEMOXCHECK will run ... " << std::endl;
124 int XcheckCharge[2] = {13, 14}, XcheckToT = 10;
125 int XcheckPhi[2] = {57, 63}, XcheckEta[2] = {23, 29};
126 TString XcheckModule =
"LI_S11_A_M3_A6";
129 int ToTfill = 3 * finerToT, CHRGfill = 3;
134 Double_t tmpRCf_H[4] = {0.868295, 0.67523, 0.732279, 0.678458};
135 Double_t tmpRCf_T[4] = {1.02844, 1.10788, 1.07204, 1.11015};
136 Double_t reverseCF_H[4], reverseCF_T[4];
137 for (
int t = 0;
t < 4;
t++)
139 reverseCF_H[
t] = tmpRCf_H[
t];
140 reverseCF_T[
t] = tmpRCf_T[
t];
143 Double_t RDentries[33] = {0, 10494.8, 14605.6, 62952.6, 8663.57, 17320.2, 20417, 49508.9,
144 21646.8, 31503.9, 14955.6, 16290.7, 11617.5, 16461.2, 11980.5, 17210.5,
145 12773.7, 18574, 13930.9, 19777, 14629.4, 20619.5, 15191.6, 20883,
146 15411.1, 19198, 12097.4, 12109.7, 8881.96, 17235.1, 20802.3, 11265.8,
149 std::vector<int> reversedModules = {182, 211, 213, 229, 223, 231, 246, 280, 295, 350, 357, 360, 371, 403, 416, 423};
152 TString Outdir =
"./";
155 #if defined(DEMOXCHECK)
156 spec +=
"DEMOXCHECK_";
159 TString StrFileName =
spec.c_str() +
scan;
160 TString rootFileName = Outdir +
"/TotChargeCalib_" + StrFileName +
".root";
161 TString logFileName = Outdir +
"/ChargeCalib_" + StrFileName +
".log";
162 TString dbFileName = Outdir +
"/ChargeCalib_" + StrFileName +
".TXT";
165 rootFileName = Outdir +
"/TotChargeCalib_run2_" + StrFileName +
".root";
166 logFileName = Outdir +
"/ChargeCalib_run2_" + StrFileName +
".log";
167 dbFileName = Outdir +
"/ChargeCalib_run2_" + StrFileName +
".TXT";
171 ofstream logout(logFileName);
172 ofstream txtDB(dbFileName);
174 TString inThrFile =
"";
175 TString inTotFile =
"";
176 TString rodPath =
"";
177 TString inTotFileAux =
"";
178 TString rodPathAux =
"";
180 std::cout <<
" Running IBL calibration analysis ... " << endl;
182 inThrFile = InDir + THRscan +
".root";
183 inTotFile = InDir +
scan +
".root";
184 rodPath = inTotFile +
":/" +
scan.substr(
scan.find(
"_")+1);
185 inTotFileAux = InDir + scanLowCharge +
".root";
186 rodPathAux = inTotFileAux +
":/" + scanLowCharge.substr(scanLowCharge.find(
"_")+1);
191 inThrFile =
"calib2018/IBL/THR_SCAN_S000083686.root";
192 inTotFile =
"calib2018/IBL/TOT_SCAN_S000083690.root";
193 rodPath = inTotFile +
":/S000083690";
197 int nrow = 336, ncol = 160;
199 const Int_t numChrgs = 22;
200 Double_t IBLchrgs[numChrgs] = {1400., 1500., 1750., 2000., 2500., 3000., 3500., 4000., 5000., 6000., 8000., 10000.,
201 12000., 14000., 16000., 18000., 20000., 22000., 24000., 26000., 28000., 30000.};
203 const Int_t nchargeIBL = (
run3 ? 22 : 19);
205 int skip = numChrgs - nchargeIBL;
206 Double_t chrgAbaciIBL[nchargeIBL], chargeErrArrIBL[nchargeIBL];
207 for (
int c = 0;
c < nchargeIBL;
c++)
209 chrgAbaciIBL[
c] = IBLchrgs[
c +
skip];
210 chargeErrArrIBL[
c] = 0.;
213 Double_t chrgsbins[nchargeIBL + 1];
214 for (
int c = 1;
c < nchargeIBL;
c++)
215 chrgsbins[
c] = 0.5 * (chrgAbaciIBL[
c - 1] + chrgAbaciIBL[
c]);
217 chrgsbins[0] = chrgAbaciIBL[0] - 0.5 * (chrgAbaciIBL[1] - chrgAbaciIBL[0]);
218 chrgsbins[nchargeIBL] = chrgAbaciIBL[nchargeIBL - 1] + 0.5 * (chrgAbaciIBL[nchargeIBL - 1] - chrgAbaciIBL[nchargeIBL - 2]);
221 const Int_t nToTibl = 16 * finerToT + 1;
223 Double_t totAbaci[nToTibl], totbins[nToTibl + 1];
229 for (
int t = 2;
t < nToTibl;
t++)
231 totAbaci[
t] = totAbaci[1] + (
t - 1) / (1. * finerToT);
232 totbins[
t] = 0.5 * (totAbaci[
t] + totAbaci[
t - 1]);
234 totbins[nToTibl] = totAbaci[nToTibl - 1] + 0.5 * (totbins[nToTibl - 1] - totbins[nToTibl - 2]);
236 Double_t totErrArr[nToTibl];
237 for (
int t = 0;
t < nToTibl;
t++)
240 #if defined(DEMOXCHECK)
241 for (
int t = 0;
t < nToTibl;
t++)
242 logout <<
" totAbaci : " <<
t <<
" " << totbins[
t] <<
" < " << totAbaci[
t] <<
" > " << totbins[
t + 1] << endl;
246 for (
int t = 1;
t < nToTibl;
t++)
248 RDentries[
t] = RDentries[2 *
t - 1] + RDentries[2 *
t];
249 logout <<
" finer RDentries : " <<
t <<
" " << 2 *
t - 1 <<
" " << 2 *
t <<
" " << RDentries[
t] << endl;
254 map<string, map<string, map<string, float>>> pcdMap;
256 TFile roFile(rootFileName,
"RECREATE");
257 TDirectory *roThrDir = roFile.mkdir(
"Threshold");
258 TDirectory *roTotDir = roFile.mkdir(
"ToT");
262 Double_t THR_avg[2][npsFEs], ThrSig_avg[2][npsFEs];
263 array<std::unique_ptr<TH2D> , npsFEs> h2_Thr{};
264 array<std::unique_ptr<TH2D> , npsFEs> h2_ThrSig{};
266 std::multimap<float, TString, std::greater<float>> badThr_Order;
268 for (
int sfe = 0; sfe < npsFEs; sfe++)
273 string knowModule =
"LI_S06_C_M1_C1";
274 string idx =
"I" +
ss.str();
276 pcdMap[knowModule][
idx][
"ThrNorm"] = -42.;
277 pcdMap[knowModule][
idx][
"ThrRmsNorm"] = -42.;
278 pcdMap[knowModule][
idx][
"ThrSigNorm"] = -42.;
279 pcdMap[knowModule][
idx][
"ThrLong"] = -42.;
280 pcdMap[knowModule][
idx][
"ThrRmsLong"] = -42.;
281 pcdMap[knowModule][
idx][
"ThrSigLong"] = -42.;
283 for (
int nl = 0; nl < 2; nl++)
284 THR_avg[nl][sfe] = ThrSig_avg[nl][sfe] = -99.;
286 idx =
"Threshold" +
ss.str();
287 h2_Thr[sfe] = std::make_unique<TH2D>(
idx.c_str(),
" ", 2, 0, 2, 200, 0, 5000);
288 idx =
"ThresholdSig" +
ss.str();
289 h2_ThrSig[sfe] = std::make_unique<TH2D>(
idx.c_str(),
" ", 2, 0, 2, 200, 0, 500);
292 if (inThrFile.Length() > 0)
295 <<
"INFO =>> [IBL] threshold scan analysis..." << endl;
297 TFile riThrFile(inThrFile,
"READ");
298 TString chi2HistName =
"SCURVE_CHI2";
299 TString thrHistName =
"SCURVE_MEAN";
300 TString sigHistName =
"SCURVE_SIGMA";
302 std::unique_ptr<TH1F> h1dChi2 = std::make_unique<TH1F>(
"h1dChi2",
"", 200, 0, 1);
303 std::unique_ptr<TH1F> h1dThr = std::make_unique<TH1F>(
"h1dThr" ,
"", 200, 0, 5000);
304 std::unique_ptr<TH1F> h1dSig = std::make_unique<TH1F>(
"h1dSig" ,
"", 200, 0, 500);
306 TDirectoryFile *
scanDir = (TDirectoryFile *)((TKey *)riThrFile.GetListOfKeys()->First())->ReadObj();
307 TList *rodKeyList = (TList *)
scanDir->GetListOfKeys();
308 TIter rodItr(rodKeyList);
311 while ((rodKey = (TKey *)rodItr()))
313 TString rodName(rodKey->GetName());
314 TDirectoryFile *rodDir = (TDirectoryFile *)rodKey->ReadObj();
315 TList *modKeyList = (TList *)rodDir->GetListOfKeys();
316 TIter modItr(modKeyList);
319 while ((modKey = (TKey *)modItr()))
321 TString
modName(modKey->GetName());
322 string modStr(modKey->GetName());
324 TString chi2HistDirPath =
modName +
"/" + chi2HistName +
"/A0/B0";
326 TDirectory *chi2HistDir = (TDirectory *)rodDir->Get(chi2HistDirPath);
327 if (chi2HistDir == NULL)
329 cout <<
" Warning : NULL dir " << endl;
333 std::unique_ptr<TH2D> h2dChi2 (
static_cast<TH2D*
>(
static_cast<TKey*
>(chi2HistDir->GetListOfKeys()->First())->ReadObj()));
336 cout <<
" Warning : NULL dir " << endl;
339 TString thrHistDirPath =
modName +
"/" + thrHistName +
"/A0/B0";
340 TDirectoryFile *thrHistDir = (TDirectoryFile *)rodDir->Get(thrHistDirPath);
341 std::unique_ptr<TH2D> h2dThr(
static_cast<TH2D*
>(
static_cast<TKey*
>(thrHistDir->GetListOfKeys()->First())->ReadObj()));
342 TString sigHistDirPath =
modName +
"/" + sigHistName +
"/A0/B0";
344 TDirectoryFile *sigHistDir = (TDirectoryFile *)rodDir->Get(sigHistDirPath);
345 std::unique_ptr<TH2D> h2dSig (
static_cast<TH2D*
>(
static_cast<TKey*
>(sigHistDir->GetListOfKeys()->First())->ReadObj()));
347 array<std::unique_ptr<TH1F>, npsFEs> h1_ThrNorm{};
348 array<std::unique_ptr<TH1F>, npsFEs> h1_ThrSigNorm{};
349 array<std::unique_ptr<TH1F>, npsFEs> h1_ThrLong{};
350 array<std::unique_ptr<TH1F>, npsFEs> h1_ThrSigLong{};
351 array<float, npsFEs> IlledThr{};
353 for (
int sfe = 0; sfe < npsFEs; sfe++)
358 string hname = modStr +
"ThrNorm" +
ss.str();
359 h1_ThrNorm[sfe] = std::make_unique<TH1F>(
hname.c_str(),
"", 200, 0, 5000);
360 hname = modStr +
"ThrSigNorm" +
ss.str();
361 h1_ThrSigNorm[sfe] = std::make_unique<TH1F>(
hname.c_str(),
"", 200, 0, 500);
362 hname = modStr +
"ThrLong" +
ss.str();
363 h1_ThrLong[sfe] = std::make_unique<TH1F>(
hname.c_str(),
"", 200, 0, 5000);
364 hname = modStr +
"ThrSigLong" +
ss.str();
365 h1_ThrSigLong[sfe] = std::make_unique<TH1F>(
hname.c_str(),
"", 200, 0, 500);
372 float chi2 = h2dChi2->GetBinContent(
col,
row);
373 float thr = h2dThr->GetBinContent(
col,
row);
374 float sig = h2dSig->GetBinContent(
col,
row);
381 if (thr == 0 || thr > 10000 ||
sig == 0 ||
sig > 1000 ||
chi2 > 0.5 ||
chi2 <= 0)
388 if (
col == 1 ||
col == ncol / 2 ||
col == ncol / 2 + 1 ||
col == ncol)
406 h1_ThrLong[circ]->Fill(thr);
407 h1_ThrSigLong[circ]->Fill(
sig);
427 h1_ThrNorm[circ]->Fill(thr);
428 h1_ThrSigNorm[circ]->Fill(
sig);
442 for (
int sfe = 0; sfe < npsFEs; sfe++)
446 string feName =
"I" +
ss.str();
448 float THRnorm = h1_ThrNorm[sfe]->GetMean();
449 bool valid = THRnorm > 100.;
450 pcdMap[modStr][feName][
"ThrNorm"] = THRnorm;
451 pcdMap[modStr][feName][
"ThrRmsNorm"] = h1_ThrNorm[sfe]->GetRMS();
452 float THRnormSig = h1_ThrSigNorm[sfe]->GetMean();
453 pcdMap[modStr][feName][
"ThrSigNorm"] = THRnormSig;
454 float THRlong = h1_ThrLong[sfe]->GetMean();
455 pcdMap[modStr][feName][
"ThrLong"] = THRlong;
456 pcdMap[modStr][feName][
"ThrRmsLong"] = h1_ThrLong[sfe]->GetRMS();
457 float THRlongSig = h1_ThrSigLong[sfe]->GetMean();
458 pcdMap[modStr][feName][
"ThrSigLong"] = THRlongSig;
460 float blank = 100. * IlledThr[sfe] * npsFEs / (1. * ncol * nrow);
463 badThr_Order.insert(std::pair<float, TString>(blank, (TString)(
modName +
" : " + blank)));
467 h2_Thr[sfe]->Fill(0.5, THRnorm, 1);
468 h2_Thr[sfe]->Fill(1.5, THRlong, 1);
469 h2_ThrSig[sfe]->Fill(0.5, THRnormSig, 1);
470 h2_ThrSig[sfe]->Fill(1.5, THRlongSig, 1);
472 h1_ThrNorm[sfe].reset();
473 h1_ThrSigNorm[sfe].reset();
474 h1_ThrLong[sfe].reset();
475 h1_ThrSigLong[sfe].reset();
479 roThrDir->WriteTObject(h1dChi2.get());
481 roThrDir->WriteTObject(h1dThr.get());
483 roThrDir->WriteTObject(h1dSig.get());
487 for (
int sfe = 0; sfe < npsFEs; sfe++)
491 string hName =
"thrNorm" +
ss.str();
492 THR_avg[0][sfe] = h2_Thr[sfe]->ProjectionY(hName.c_str(), 1, 1)->
GetMean();
493 hName =
"thrLong" +
ss.str();
494 THR_avg[1][sfe] = h2_Thr[sfe]->ProjectionY(hName.c_str(), 2, 2)->
GetMean();
495 hName =
"thrSigNorm" +
ss.str();
496 ThrSig_avg[0][sfe] = h2_ThrSig[sfe]->ProjectionY(hName.c_str(), 1, 1)->
GetMean();
497 hName =
"thrSigLong" +
ss.str();
498 ThrSig_avg[1][sfe] = h2_ThrSig[sfe]->ProjectionY(hName.c_str(), 2, 2)->
GetMean();
500 h2_ThrSig[sfe].reset();
508 if (inTotFile.Length() == 0 || inTotFileAux.Length() == 0)
510 logout <<
" Missing ToT file from calib scan as input " << endl;
515 <<
"INFO =>> [IBL] tot calib analysis..." << endl;
517 TFile riTotFile(inTotFile,
"READ");
518 TFile riTotFileAux(inTotFileAux,
"READ");
520 TString totHistName =
"TOT_MEAN";
521 TString totSigHistName =
"TOT_SIGMA";
523 TDirectoryFile *
scanDir = (TDirectoryFile *)((TKey *)riTotFile.GetListOfKeys()->First())->ReadObj();
524 TList *rodKeyList = (TList *)
scanDir->GetListOfKeys();
525 TIter rodItr(rodKeyList);
528 std::map<float, std::pair<vector<TString>, vector<Double_t>>> ModuDataToPrint;
530 #if defined(DEMOXCHECK)
531 vector<TH1F *> h1_ChrgEntry;
532 h1_ChrgEntry.reserve(nToTibl);
534 vector<TH1F *> h1d_totSprdAll;
535 h1d_totSprdAll.reserve(nToTibl - 1);
537 for (
int t = 0;
t < nToTibl;
t++)
542 string hname =
"ChrgEntries_ToT_" +
tt.str();
543 h1_ChrgEntry[
t] =
new TH1F(
hname.c_str(),
"RD entries ", 100, 0., 100000);
545 hname =
"totSprdsFll_ToT_" +
tt.str();
547 h1d_totSprdAll[
t] =
new TH1F(
hname.c_str(),
"ToT spread ", 36, 0.2, 1.1);
551 const Int_t totFE = 14 * 16 * npsFEs;
552 Double_t TotArray[totFE][nchargeIBL], TotErrArray[totFE][nchargeIBL];
553 Double_t TotSigArray[totFE][nchargeIBL], TotSigErrArray[totFE][nchargeIBL];
554 Double_t ChrgArray[totFE][nToTibl], ChrgErrArray[totFE][nToTibl];
556 gRandom =
new TRandom3(2203);
558 float occuPhiEta[nchargeIBL][totFE];
561 std::map<float, TString> devChrg_Order;
562 std::map<float, TString> devToT_Order;
564 std::multimap<float, TString, std::greater<float>> badModules_Order;
565 std::multimap<float, TString, std::greater<float>> badModules_Order_detailed;
567 while ((rodKey = (TKey *)rodItr()))
569 TString rodName(rodKey->GetName());
570 string rodStr(rodKey->GetName());
571 TDirectoryFile *rodDir = (TDirectoryFile *)rodKey->ReadObj();
573 TString
path = rodDir->GetPath();
574 TString pathAux =
path.ReplaceAll(rodPath, rodPathAux);
576 TDirectoryFile *rodDirAux = (TDirectoryFile *)riTotFileAux.Get(pathAux);
577 if (rodDirAux == NULL)
579 std::cout<<
" Fail to get the rodPath in Aux: "<< pathAux << endl;
580 logout <<
" Fail to get the rodPath in Aux " << endl;
584 TDirectory *dirRod = roTotDir->mkdir(rodName);
586 TList *modKeyList = (TList *)rodDir->GetListOfKeys();
587 TIter modItr(modKeyList);
592 string modNames[16 * npsFEs];
594 float occuChrgs[nToTibl][16 * npsFEs];
596 #if defined(DEMOXCHECK)
597 TString feName_maxDevChrg =
"", feName_maxDevToT =
"";
598 float maxDevChrg = -9., maxDevToT = -9., avgDevChrg = 0., avgDevToT = 0.;
600 vector<TH1F *> h1d_totSprd;
601 h1d_totSprd.reserve(nToTibl - 1);
603 for (
int t = 0;
t < nToTibl - 1;
t++)
608 string prfmodname =
"ToT_Sprd_" +
tt.str();
609 h1d_totSprd[
t] =
new TH1F(prfmodname.c_str(),
"ToT spread ", 28, 0.3, 1.0);
610 prfmodname = rodStr +
"ToT spread @ ToT_" +
tt.str();
611 h1d_totSprd[
t]->SetTitle(prfmodname.c_str());
615 while ((modKey = (TKey *)modItr()))
617 TString
modName(modKey->GetName());
618 string modStr(modKey->GetName());
620 TDirectory *dirMod = dirRod->mkdir(
modName);
621 bool ibl3Dfe0 =
false, ibl3Dfe1 =
false;
623 int hashID = -1, hashIDL = -1, hashIDR = -1;
628 int eta_moduleL = -1, eta_moduleR = -1;
629 pixmap.
mapping(modStr, &hashID, &
bec, &
layer, &phi_module, &eta_module);
632 pixmap.
mapping(modStr +
"_1", &hashID, &
bec, &
layer, &phi_module, &eta_module);
637 eta_moduleL = eta_module;
640 pixmap.
mapping(modStr +
"_2", &hashID, &
bec, &
layer, &phi_module, &eta_module);
645 eta_moduleR = eta_module;
649 std::cout<<
"negative hash ID\n";
654 if (pcdMap.find(modStr) == pcdMap.end()){
655 std::cout<<
"MOD not found "<< modStr <<
"\n";
661 array<std::unique_ptr<TH2D>, npsFEs> h2d_XchrgYtot{};
662 array<std::unique_ptr<TH2D>, npsFEs> h2d_XchrgYToTSig{};
664 for (
int sfe = 0; sfe < npsFEs; sfe++)
669 modNames[cntMod * npsFEs + sfe] = modStr +
"-" +
ss.str();
671 string prfmodname = modStr +
"ToTvsChrg_FE" +
ss.str();
672 h2d_XchrgYtot[sfe] = std::make_unique<TH2D>(prfmodname.c_str(),
"ToT vs Charge", nchargeIBL, chrgsbins, nToTibl, totbins);
674 prfmodname = modStr +
"ToT_Sig_vsChrg_FE" +
ss.str();
675 h2d_XchrgYToTSig[sfe] = std::make_unique<TH2D>(prfmodname.c_str(),
"ToT Sig vs Charge", nchargeIBL, chrgsbins, 100, 0., 1.);
679 for (
int c = 0;
c < nchargeIBL;
c++)
681 TString totHistDirPath =
modName +
"/" + totHistName +
"/A0/B0/C";
684 TDirectoryFile* totHistDir(
static_cast<TDirectoryFile*
> (rodDir->Get(totHistDirPath)));
686 std::cout<<
" Missing totHistDir in : " << totHistDirPath << endl;
689 std::unique_ptr<TH2F> h2dTot(
static_cast<TH2F*
> ((
static_cast<TKey*
>(totHistDir->GetListOfKeys()->First()))->ReadObj()));
690 h2dTot->SetDirectory(0);
692 TDirectoryFile* totHistDirAux(
static_cast<TDirectoryFile*
>(rodDirAux->Get(totHistDirPath)));
695 std::cout<<
" Missing totHistDir in : " << totHistDirPath << endl;
696 logout <<
" Missing totHistDir in : " << totHistDirPath << endl;
699 unique_ptr<TH2F> h2dTotAux (
static_cast<TH2F*
> ((
static_cast<TKey*
>(totHistDirAux->GetListOfKeys()->First())->ReadObj())));
700 h2dTotAux->SetDirectory(0);
703 TString totSigHistDirPath =
modName +
"/" + totSigHistName +
"/A0/B0/C";
705 TDirectoryFile* totSigHistDir (
static_cast<TDirectoryFile*
>(rodDir->Get(totSigHistDirPath)));
706 unique_ptr<TH2F> h2dTotSig (
static_cast<TH2F*
> ((
static_cast<TKey*
>(totSigHistDir->GetListOfKeys()->First()))->ReadObj()));
707 h2dTotSig->SetDirectory(0);
710 for (
int ieta = 0; ieta < ncol; ieta++)
712 for (
int iphi = 0; iphi < nrow; iphi++)
719 circ = (
int)(iphi / 84.);
733 float tot = h2dTot->GetBinContent(ieta + 1, iphi + 1) + HDCshift;
734 float totAux = h2dTotAux->GetBinContent(ieta + 1, iphi + 1);
742 if (
tot <= 5 ||
c <= 5)
744 if ((
c == 0 &&
tot - totAux > 0.8) || (
c >= 1 &&
c <= 3 &&
tot - totAux > 0.5) || (
c > 4 &&
tot - totAux > 0.3))
747 filltot = 0.5 * (totAux +
tot);
748 if (
c == 0 && totAux > 2.)
753 filltot = 0.5 * (totAux +
tot + 2.);
756 h2d_XchrgYtot[circ]->Fill(chrgAbaciIBL[
c], filltot, 1.);
760 float err = h2dTotSig->GetBinContent(ieta + 1, iphi + 1);
761 h2d_XchrgYToTSig[circ]->Fill(chrgAbaciIBL[
c],
err, 1.);
765 #if defined(DEMOXCHECK)
766 if (
modName == XcheckModule && (iphi >= XcheckPhi[0] && iphi <= XcheckPhi[1]) && (ieta >= XcheckEta[0] && ieta <= XcheckEta[1]) && (
c == XcheckCharge[0] ||
c == XcheckCharge[1] || (
int)(
tot + 0.5) == XcheckToT || (
int)(totAux + 0.5) == XcheckToT))
767 logout <<
" tot = " <<
tot <<
", totAux = " << totAux <<
" @injection " << chrgAbaciIBL[
c] <<
" " <<
err << endl;
778 if (!(ibl3Dfe0 || ibl3Dfe1))
783 array<TDirectory *, npsFEs> dirFE;
785 Int_t idxMod = cntRod * 16 * npsFEs + cntMod * npsFEs;
787 for (
int sfe = 0; sfe < npsFEs; sfe++)
792 if (ibl3Dfe0 && sfe < npsFEs / 2)
796 else if (ibl3Dfe1 && sfe >= npsFEs / 2)
801 modHash += (sfe < npsFEs / 2 ? 0 : 1) * 0.8;
803 string prfmodname =
"DirFE_" +
ss.str();
804 dirFE[sfe] = dirMod->mkdir(prfmodname.c_str());
807 prfmodname = modStr +
"_profile_Tot_FE" +
ss.str();
808 std::unique_ptr<TProfile> prfl_TotsFE(h2d_XchrgYtot[sfe]->ProfileX(prfmodname.c_str(), 1, -1,
"s"));
809 prfl_TotsFE->SetTitle(prfmodname.c_str());
810 prfmodname = modStr +
"_profile_Chrg_FE" +
ss.str();
812 std::unique_ptr<TProfile> prfl_ChrgsFE(h2d_XchrgYtot[sfe]->ProfileY(prfmodname.c_str(), 1, -1,
"s"));
813 prfl_ChrgsFE->SetTitle(prfmodname.c_str());
815 Double_t TotArr[nchargeIBL], TotErrArr[nchargeIBL];
816 Double_t ChrgArr[nToTibl], ChrgErrArr[nToTibl];
818 Int_t idxFE = idxMod + sfe;
821 for (
int c = 0;
c < nchargeIBL;
c++)
823 TotArr[
c] = TotArray[idxFE][
c] = prfl_TotsFE->GetBinContent(
c + 1);
824 TotErrArr[
c] = TotErrArray[idxFE][
c] = prfl_TotsFE->GetBinError(
c + 1);
826 occuPhiEta[
c][idxFE] = prfl_TotsFE->GetBinEntries(
c + 1) * npsFEs / (1. * ncol * nrow);
828 if ((1. - occuPhiEta[
c][idxFE]) > badRDfracCut)
833 prfmodname = modStr +
"_ToTsig_FE" +
ss.str() +
"Chrg" +
sc.str();
835 std::unique_ptr<TH1D> h_ToTsig(h2d_XchrgYToTSig[sfe]->ProjectionY(prfmodname.c_str(),
c + 1,
c + 1));
836 TotSigArray[idxFE][
c] = TMath::Sqrt(h_ToTsig->GetMean() * h_ToTsig->GetMean() + h_ToTsig->GetRMS() * h_ToTsig->GetRMS());
837 TotSigErrArray[idxFE][
c] = TMath::Sqrt(h_ToTsig->GetMeanError() * h_ToTsig->GetMeanError() + h_ToTsig->GetRMSError() * h_ToTsig->GetRMSError());
845 for (
int c = 0;
c < nchargeIBL;
c++)
847 TotArr[
c] = TotArray[idxFE][
c] = 0.5 * (TotArray[idxFE - 1][
c] + TotArray[idxFE - 2][
c]);
848 TotErrArr[
c] = TotErrArray[idxFE][
c] = 0.5 * (TotErrArray[idxFE - 1][
c] + TotErrArray[idxFE - 2][
c]);
850 TotSigArray[idxFE][
c] = 0.5 * (TotSigArray[idxFE - 1][
c] + TotSigArray[idxFE - 2][
c]);
851 TotSigErrArray[idxFE][
c] = 0.5 * (TotSigErrArray[idxFE - 1][
c] + TotSigErrArray[idxFE - 2][
c]);
856 Double_t errToT_overChrg[nToTibl];
857 for (
int t = 0;
t < nToTibl;
t++)
859 ChrgArr[
t] = ChrgArray[idxFE][
t] = prfl_ChrgsFE->GetBinContent(
t + 1);
860 ChrgErrArr[
t] = ChrgErrArray[idxFE][
t] = prfl_ChrgsFE->GetBinError(
t + 1);
862 occuChrgs[
t][cntMod * npsFEs + sfe] = prfl_ChrgsFE->GetBinEntries(
t + 1) / RDentries[
t];
866 prfmodname = modStr +
"_Chrg_FE" +
ss.str() +
"ToT" + st.str();
867 std::unique_ptr<TH1D> h_chrg(h2d_XchrgYtot[sfe]->ProjectionX(prfmodname.c_str(),
t + 1,
t + 1));
870 prfmodname = modStr +
" Charge_FE" +
ss.str() +
" @ ToT : " + st.str();
871 h_chrg->SetTitle(prfmodname.c_str());
873 Double_t scl = h_chrg->Integral();
874 errToT_overChrg[
t] = 0.;
876 for (
int b = 0;
b < nchargeIBL;
b++)
878 errToT_overChrg[
t] += TotErrArr[
b] * (h_chrg->GetBinContent(
b + 1)) / scl;
880 if (errToT_overChrg[
t] == 0.)
881 errToT_overChrg[
t] = 1.1;
885 prfl_ChrgsFE.reset();
886 #if defined(DEMOXCHECK)
887 for (
int b = 1;
b < nToTibl;
b++)
889 double err = errToT_overChrg[
b];
890 h1d_totSprd[
b - 1]->Fill(
err);
891 h1d_totSprdAll[
b - 1]->Fill(
err);
898 for (
int t = 0;
t < nToTibl;
t++)
900 ChrgArr[
t] = ChrgArray[idxFE][
t] = 0.5 * (ChrgArray[idxFE - 1][
t] + ChrgArray[idxFE - 2][
t]);
901 ChrgErrArr[
t] = ChrgErrArray[idxFE][
t] = 0.5 * (ChrgErrArray[idxFE - 1][
t] + ChrgErrArray[idxFE - 2][
t]);
904 bool xoticMod =
std::find(reversedModules.begin(), reversedModules.end(),
int(modHash)) != reversedModules.end();
907 bool reverseH =
false, reverseT =
false;
908 for (
int t = 4;
t >= 1;
t--)
909 if (ChrgArr[
t] > ChrgArr[
t + 1])
914 for (
int t = 4;
t >= 1;
t--)
916 int tl = nToTibl -
t;
917 if (ChrgArr[
tl] < ChrgArr[
tl - 1])
926 #if defined(DEMOXCHECK)
927 logout <<
" Head reversed : " <<
int(modHash) <<
" " <<
modName <<
" " << sfe <<
" " << ChrgArr[1] <<
" "
928 << ChrgArr[2] <<
" " << ChrgArr[3] <<
" " << ChrgArr[4] <<
" " << ChrgArr[5] << std::endl;
931 for (
int t = 4;
t >= 1;
t--)
932 if (ChrgArr[
t] > ChrgArr[
t + 1] && (occuChrgs[
t][cntMod * npsFEs + sfe] < 0.5 || xoticMod))
933 ChrgArr[
t] = ChrgArray[idxFE][
t] = reverseCF_H[
t - 1] * ChrgArr[
t + 1];
937 for (
int t = 4;
t >= 1;
t--)
938 if (ChrgArr[
t + 1] != 0.)
939 reverseCF_H[
t - 1] = (reverseCF_H[
t - 1] == tmpRCf_H[
t - 1] ? ChrgArr[
t] / ChrgArr[
t + 1] : 0.5 * (reverseCF_H[
t - 1] + ChrgArr[
t] / ChrgArr[
t + 1]));
944 #if defined(DEMOXCHECK)
945 logout <<
" Tail reversed : " <<
int(modHash) <<
" " <<
modName <<
" " << sfe <<
" " << ChrgArr[nToTibl - 5] <<
" "
946 << ChrgArr[nToTibl - 4] <<
" " << ChrgArr[nToTibl - 3] <<
" " << ChrgArr[nToTibl - 2] <<
" " << ChrgArr[nToTibl - 1] << std::endl;
949 for (
int t = 4;
t >= 1;
t--)
951 int tl = nToTibl -
t;
952 if (ChrgArr[
tl] < ChrgArr[
tl - 1] && (occuChrgs[
tl][cntMod * npsFEs + sfe] < 0.5 || xoticMod))
953 ChrgArr[
tl] = ChrgArray[idxFE][
tl] = reverseCF_T[
t - 1] * ChrgArr[
tl - 1];
958 for (
int t = 4;
t >= 1;
t--)
960 int tl = nToTibl -
t;
961 if (ChrgArr[
tl - 1] != 0.)
962 reverseCF_T[
t - 1] = (reverseCF_T[
t - 1] == tmpRCf_T[
t - 1] ? ChrgArr[
tl] / ChrgArr[
tl - 1] : 0.5 * (reverseCF_T[
t - 1] + ChrgArr[
tl] / ChrgArr[
tl - 1]));
966 string gername = modStr +
"_grToTsig_FE_" +
ss.str();
967 std::unique_ptr<TGraphErrors> grTotSig = std::make_unique<TGraphErrors>(nchargeIBL, chrgAbaciIBL, TotSigArray[sfe], chargeErrArrIBL, TotSigErrArray[sfe]);
968 grTotSig->SetTitle(gername.c_str());
969 grTotSig->SetName(gername.c_str());
971 std::unique_ptr<TGraph> grTotSprd = std::make_unique<TGraph>(nToTibl, totAbaci, errToT_overChrg);
973 grTotSprd->SetName(gername.c_str());
974 gername = modStr +
" ToT spread over FrontEnd @ FE " +
ss.str();
975 grTotSprd->SetTitle(gername.c_str());
976 grTotSprd->SetLineColor(4);
977 grTotSprd->SetMarkerStyle(4);
978 grTotSprd->SetMarkerSize(1.);
979 grTotSprd->SetMaximum(0.9);
982 ToTres.SetParameter(1,13.);
983 ToTres.SetParameter(2,0.65);
984 ToTres.SetParLimits(1, 10., 16.);
985 ToTres.SetParLimits(2, 0.3, 1.0);
987 grTotSprd->Fit(&ToTres,
"MRQ");
988 Double_t parP0 = ToTres.GetParameter(0);
989 Double_t parP1 = ToTres.GetParameter(1);
991 dirFE[sfe]->WriteTObject(grTotSprd.get());
1016 gername = modStr +
"_grToT_FE_" +
ss.str();
1017 std::unique_ptr<TGraphErrors> grTot = std::make_unique<TGraphErrors>(nchargeIBL, chrgAbaciIBL, TotArr, chargeErrArrIBL, TotErrArr);
1018 grTot->SetTitle(gername.c_str());
1019 grTot->SetName(gername.c_str());
1020 TF1 *f1ToTfromCharge =
new TF1(
"ToTfromCharge",
funcRation5, chrgAbaciIBL[0] - 100., chrgAbaciIBL[nchargeIBL - 1] + 300., 5);
1022 grTot->Fit(f1ToTfromCharge,
"MRQ");
1024 std::unique_ptr<TGraphErrors> grChrg = std::make_unique<TGraphErrors>(nToTibl, totAbaci, ChrgArr, totErrArr, ChrgErrArr);
1026 gername = modStr +
"_grChrg_FE_" +
ss.str();
1027 grChrg->SetName(gername.c_str());
1028 grChrg->SetTitle(gername.c_str());
1029 grChrg->SetLineColor(3);
1030 grChrg->SetLineWidth(3);
1032 TF1 *f1ChargefromToTLeft =
new TF1(
"ChargefromToTL",
funcRation5, 1., 7.5, 5);
1033 f1ChargefromToTLeft->SetLineColor(2);
1034 grChrg->Fit(f1ChargefromToTLeft,
"MRQ");
1035 if (f1ChargefromToTLeft->GetChisquare() / 4. > 2.){
1036 logout <<
"bad fit Left... " << std::endl;
1039 TF1 *f1ChargefromToTRight =
new TF1(
"ChargefromToTR",
funcRation5, 5.5, 16., 5);
1040 f1ChargefromToTRight->SetLineColor(4);
1041 grChrg->Fit(f1ChargefromToTRight,
"MRQ+");
1043 dirFE[sfe]->WriteTObject(grTot.get());
1044 dirFE[sfe]->WriteTObject(grTotSig.get());
1045 dirFE[sfe]->WriteTObject(h2d_XchrgYtot[sfe].
get());
1047 h2d_XchrgYtot[sfe].reset();
1048 h2d_XchrgYToTSig[sfe].reset();
1054 string Idx =
"I" +
ss.str();
1055 vector<TString> modName2prt;
1056 modName2prt.push_back(
modName);
1057 modName2prt.push_back((TString)(Idx));
1060 std::vector<Double_t> prtAux;
1061 prtAux.reserve(5 + 4 + nToTibl - 1 + 3);
1063 prtAux.push_back(modHash);
1064 prtAux.push_back(
bec);
1065 prtAux.push_back(
layer);
1066 prtAux.push_back(phi_module);
1067 prtAux.push_back(eta_module);
1069 modName2prt[0] = (modStr +
"_" +
ss.str()).c_str();
1070 if (ibl3Dfe0 && sfe < npsFEs / 2)
1073 modName2prt[0] =
modName +
"_0";
1074 prtAux[0] = hashIDL;
1075 prtAux[4] = eta_moduleL;
1077 if (ibl3Dfe1 && sfe >= npsFEs / 2)
1080 modName2prt[0] =
modName +
"_1";
1081 prtAux[0] = hashIDR;
1082 prtAux[4] = eta_moduleR;
1086 float ThrNorm = pcdMap[modStr][Idx][
"ThrNorm"];
1087 if (ThrNorm == 0. || ThrNorm == -42.)
1090 prtAux.push_back(THR_avg[0][sfe]);
1091 prtAux.push_back(ThrSig_avg[0][sfe]);
1092 prtAux.push_back(THR_avg[1][sfe]);
1093 prtAux.push_back(ThrSig_avg[1][sfe]);
1097 prtAux.push_back(pcdMap[modStr][Idx][
"ThrNorm"]);
1098 prtAux.push_back(pcdMap[modStr][Idx][
"ThrSigNorm"]);
1099 prtAux.push_back(pcdMap[modStr][Idx][
"ThrLong"]);
1100 prtAux.push_back(pcdMap[modStr][Idx][
"ThrSigLong"]);
1104 for (
int t = 1;
t < nToTibl;
t++)
1105 prtAux.push_back(ChrgArr[
t]);
1108 prtAux.push_back(parP0);
1109 prtAux.push_back(parP1);
1111 std::pair<vector<TString>, vector<Double_t>> payloadDB = std::pair<vector<TString>, vector<Double_t>>(modName2prt, prtAux);
1112 ModuDataToPrint.insert(std::pair<
float, std::pair<vector<TString>, vector<Double_t>>>(modHash, payloadDB));
1118 #if defined(DEMOXCHECK)
1120 TDirectory *dirToTSprd = dirRod->mkdir(
"ToT_Spreads");
1121 for (
int b = 0;
b < nToTibl - 1;
b++)
1123 Int_t
upper = h1d_totSprd[
b]->FindLastBinAbove(1, 1);
1124 h1d_totSprd[
b]->SetAxisRange(h1d_totSprd[
b]->GetBinLowEdge(
1125 h1d_totSprd[
b]->FindFirstBinAbove(1, 1)),
1126 h1d_totSprd[
b]->GetBinLowEdge(
upper) + h1d_totSprd[
b]->GetBinWidth(
upper),
"X");
1128 dirToTSprd->WriteTObject(h1d_totSprd[
b]);
1129 delete h1d_totSprd[
b];
1131 h1d_totSprd.clear();
1135 TH2F *h2_badChrgs =
new TH2F(rodName +
"ChargeOccupancy",
"Occupancy ", nchargeIBL, 0, nchargeIBL, 16 * npsFEs, 0, 16 * npsFEs);
1136 hn =
"Occupancy along charges @ " + rodName;
1137 h2_badChrgs->SetTitle(hn);
1139 TH2F *h2_badToT =
new TH2F(rodName +
"ToTOccupancy",
"Occupancy ", nToTibl - 1, 0.5, nToTibl - 0.5, 16 * npsFEs, 0, 16 * npsFEs);
1140 hn =
"Occupancy along ToT @ " + rodName;
1141 h2_badToT->SetTitle(hn);
1143 bool fillChrg =
false, fillToT =
false;
1145 for (
int sfe = 0; sfe < 16 * npsFEs; sfe++)
1148 for (
int c = 0;
c < nchargeIBL;
c++)
1150 float occu = occuPhiEta[
c][cntRod * 16 * npsFEs + sfe];
1151 float nt = 10. - floor(10. * occu + 0.5);
1153 TString modchrg = (TString)(modNames[sfe] +
"_Chrg_" +
c);
1155 badModules_Order_detailed.insert(std::pair<float, TString>(1. - occu, modchrg));
1161 h2_badChrgs->SetBinContent(
c + 1, sfe + 1,
nt);
1164 PhiEta /= nchargeIBL;
1166 badModules_Order.insert(std::pair<float, TString>(PhiEta,
1167 (TString)(modNames[sfe])));
1169 for (
int t = 1;
t < nToTibl;
t++)
1171 float nt = floor(10. * occuChrgs[
t][sfe] + 0.5);
1174 h2_badToT->SetBinContent(
t + 1, sfe + 1,
nt);
1178 TString
shortName = modNames[sfe].substr(9, 13).c_str();
1179 h2_badChrgs->GetYaxis()->SetBinLabel(sfe + 1,
shortName);
1180 h2_badToT->GetYaxis()->SetBinLabel(sfe + 1,
shortName);
1181 h2_badChrgs->SetStats(kFALSE);
1182 h2_badToT->SetStats(kFALSE);
1183 h2_badChrgs->SetTickLength(0.01,
"Y");
1184 h2_badToT->SetTickLength(0.01,
"Y");
1187 h2_badChrgs->SetOption(
"TEXT");
1188 h2_badToT->SetOption(
"TEXT");
1192 dirRod->WriteTObject(h2_badChrgs,
"",
"Overwrite");
1197 dirRod->WriteTObject(h2_badToT,
"",
"WriteDelete");
1208 #if defined(DEMOXCHECK)
1210 for (
int t = 0;
t < 4;
t++)
1213 logout <<
" correction factors for reversed charges : ";
1214 logout << reverseCF_H[
t] <<
", ";
1218 for (
int t = 0;
t < 4;
t++)
1221 logout <<
" correction factors for reversed charges : ";
1222 logout << reverseCF_T[
t] <<
", ";
1227 for (
int t = 0;
t < nToTibl;
t++)
1230 logout <<
"RD Entries per ToT bin ";
1231 logout << h1_ChrgEntry[
t]->GetMean() <<
", ";
1232 if (
t == nToTibl - 1)
1233 logout << std::endl;
1234 roTotDir->WriteTObject(h1_ChrgEntry[
t]);
1235 delete h1_ChrgEntry[
t];
1237 h1_ChrgEntry.clear();
1239 for (std::map<float, TString>::const_iterator itr = devChrg_Order.begin();
1240 itr != devChrg_Order.end(); ++itr)
1241 logout <<
" Charge dev order : " << itr->second <<
" : " << itr->first << endl;
1243 for (std::map<float, TString>::const_iterator itr = devToT_Order.begin();
1244 itr != devToT_Order.end(); ++itr)
1245 logout <<
" ToT dev order : " << itr->second <<
" : " << itr->first << endl;
1247 logout <<
"ToTRes (spread) & its RMS @ ToT from 1 to 16 : " << endl;
1248 for (
int t = 0;
t < nToTibl - 1;
t++)
1252 logout <<
"[ " << h1d_totSprdAll[
t]->GetMean() <<
" , " << h1d_totSprdAll[
t]->GetStdDev() <<
" ] ";
1253 if (
t < nToTibl - 2)
1254 logout <<
" , " << endl;
1255 if (
t == nToTibl - 2)
1256 logout <<
" ] " << endl;
1257 delete h1d_totSprdAll[
t];
1259 h1d_totSprdAll.clear();
1262 logout <<
" goto print " << std::endl;
1275 for (std::map<
float, std::pair<vector<TString>, vector<Double_t>>>::const_iterator itr = ModuDataToPrint.begin();
1276 itr != ModuDataToPrint.end(); ++itr)
1278 int hash = floor(itr->first);
1279 std::pair<vector<TString>, vector<Double_t>>
payload = itr->second;
1280 vector<Double_t> fe =
payload.second;
1282 txtDB <<
hash <<
" ";
1284 for (
unsigned int t = 5;
t < fe.size();
t++)
1286 if (
t < fe.size() - 2)
1288 txtDB << (
int)(fe[
t]) <<
" ";
1289 #if defined(DEMOXCHECK)
1290 if (fe[
t] > fe[
t + 1] &&
t >= 9 &&
t <= 23)
1291 logout <<
" Reversed charge ! " <<
t - 5 <<
" " << fe[
t] <<
" " << fe[
t + 1] << std::endl;
1296 float p01 = abs(fe[
t]);
1297 if (
t < fe.size() - 1)
1298 txtDB << 0.001 * (
int)(p01 * 1000.) <<
" ";
1300 txtDB << 0.000000001 * (
int)(p01 * 1000000000.) <<
" ";
1309 std::cout <<
" Please find the file : " << dbFileName <<
" for dataBase payload " << endl;
1312 logout <<
" modules lacking in RD during Threshold scan : " << std::endl;
1313 for (std::multimap<
float, TString, std::greater<float>>::const_iterator itr = badThr_Order.begin(); itr != badThr_Order.end(); ++itr)
1314 logout <<
" " << itr->second <<
" " << (itr->first) * 100. <<
"%" << endl;
1316 logout <<
" modules lacking in RD during ToT scan : " << std::endl;
1317 for (std::multimap<
float, TString, std::greater<float>>::const_iterator itr = badModules_Order.begin(); itr != badModules_Order.end(); ++itr)
1318 logout <<
" " << itr->second <<
" " << (itr->first) * 100. <<
"%" << endl;
1320 logout <<
" modules lacking in RD at certain charges during ToT scan : " << std::endl;
1321 for (std::multimap<
float, TString, std::greater<float>>::const_iterator itr = badModules_Order_detailed.begin();
1322 itr != badModules_Order_detailed.end(); ++itr)
1323 logout <<
" " << itr->second <<
" " << (itr->first) * 100. <<
"%" << endl;
1333 printf(
"ERROR - Argument not expected or wrongly set:\n\n");
1334 printf(
"Valid format is: ./IBLCalibration THR=SCAN_Sxxxxxxxxx TOT_HISDIS=SCAN_Sxxxxxxxxx TOT_LOWQ=SCAN_Sxxxxxxxxx directory_path=path/to/file/\n");
1335 printf(
"\n\t i.e: ./IBLCalibration THR=SCAN_S000087719 TOT_HISDIS=SCAN_S000087717 TOT_LOWQ=SCAN_S000087710 directory_path=/eos/user/x/xxxx/\n");
1340 bool saveInfo =
false;
1341 std::string THR =
"THR";
1342 std::string TOT_HISDIS =
"TOT_HISDIS";
1343 std::string TOT_LOWQ =
"TOT_LOWQ";
1344 std::string dpath =
"directory_path";
1347 std::string aux(
argv[
i]);
1348 if (THR.compare(aux.substr(0,aux.find(
"="))) == 0) THR = aux.substr(aux.find(
"=")+1);
1349 else if(TOT_HISDIS.compare(aux.substr(0,aux.find(
"="))) == 0) TOT_HISDIS = aux.substr(aux.find(
"=")+1);
1350 else if(TOT_LOWQ.compare(aux.substr(0,aux.find(
"="))) == 0) TOT_LOWQ = aux.substr(aux.find(
"=")+1);
1351 else if(dpath.compare(aux.substr(0,aux.find(
"="))) == 0) dpath = aux.substr(aux.find(
"=")+1);
1352 else if(aux.compare(
"saveInfo") == 0) saveInfo =
true;
1359 printf(
"%-14s = %s\n",
"Directory path",dpath.c_str());
1360 printf(
"%-14s = %s.root\n",
"THR",THR.c_str());
1361 printf(
"%-14s = %s.root\n",
"TOT_HISDIS",TOT_HISDIS.c_str());
1362 printf(
"%-14s = %s.root\n",
"TOT_LOWQ",TOT_LOWQ.c_str());
1363 printf(
"%-14s = %s\n\n\n" ,
"Save root file",saveInfo ?
"True" :
"False" );
1365 bool correctArgc = (THR.compare(
"THR") == 0) or (TOT_HISDIS.compare(
"TOT_HISDIS") == 0) or (TOT_LOWQ.compare(
"TOT_LOWQ") == 0) or (dpath.compare(
"directory_path") == 0);
1368 printf(
"Cannot continue, one arguments is incorrect or not filled correctly...\n");
1369 printf(
"Helper below:\n**********************\n\n");
1374 iblCalib(dpath, THR, TOT_HISDIS, TOT_LOWQ);