Skip to content

Commit 7194b19

Browse files
authored
Please consider the following formatting changes (#510)
1 parent af381b3 commit 7194b19

3 files changed

Lines changed: 35 additions & 35 deletions

File tree

Common/Tasks/centralityStudypp.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ struct centralityStudypp {
475475
getHist(TH1, histPath + "hFT0M_Collisions")->Fill((multFT0A + multFT0C));
476476
getHist(TH1, histPath + "hFDDA_Collisions")->Fill(multFDDA);
477477
getHist(TH1, histPath + "hFDDC_Collisions")->Fill(multFDDC);
478-
getHist(TH1, histPath + "hFDDM_Collisions")->Fill(multFDDA+multFDDC);
478+
getHist(TH1, histPath + "hFDDM_Collisions")->Fill(multFDDA + multFDDC);
479479
getHist(TH1, histPath + "hFV0A_Collisions")->Fill(multFV0A);
480480
getHist(TH1, histPath + "hNGlobalTracks")->Fill(multNTracksGlobal);
481481
getHist(TH1, histPath + "hNMFTTracks")->Fill(mftNtracks);

Common/Tools/Multiplicity/multCalibrator.cxx

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,15 @@ void multCalibrator::SetRun3AdaptiveBoundaries()
236236
// Function to set standard adaptive boundaries
237237
// Run 3 exclusive: goes to 0.00001% binning for highest multiplicity
238238
// Warning: this setting requires well filled input histograms
239-
//
240-
// -> at 0.00001%, one needs 10 million events to get a single one in the highest
241-
// category. In Run 3, at 500 kHz, this corresponds to 20 seconds of dataking;
242-
// any run lasting over 5 minutes should have enough to calibrate to the highest
243-
// boundary.
244-
//
245-
// QA when using hyperfine binning is still advised:
246-
// Selecting very fine percentages may select on spurious situations
247-
// such as beam-background, pileup, etc.
239+
//
240+
// -> at 0.00001%, one needs 10 million events to get a single one in the highest
241+
// category. In Run 3, at 500 kHz, this corresponds to 20 seconds of dataking;
242+
// any run lasting over 5 minutes should have enough to calibrate to the highest
243+
// boundary.
244+
//
245+
// QA when using hyperfine binning is still advised:
246+
// Selecting very fine percentages may select on spurious situations
247+
// such as beam-background, pileup, etc.
248248

249249
lNDesiredBoundaries = 0;
250250
lDesiredBoundaries = new Double_t[1100];
@@ -293,28 +293,28 @@ void multCalibrator::SetStandardOnePercentBoundaries()
293293
}
294294

295295
//________________________________________________________________
296-
bool multCalibrator::IsBinningSane(TH1 *histogram)
296+
bool multCalibrator::IsBinningSane(TH1* histogram)
297297
{
298298
// check if binning that will be attempted is too fine for this histogram
299-
double minimumBinWidth = 1000.0f;
300-
for(int ib = 0; ib<lNDesiredBoundaries-1; ib++){
301-
if(std::abs(lDesiredBoundaries[ib+1]-lDesiredBoundaries[ib])<minimumBinWidth){
302-
minimumBinWidth = std::abs(lDesiredBoundaries[ib+1]-lDesiredBoundaries[ib]);
299+
double minimumBinWidth = 1000.0f;
300+
for (int ib = 0; ib < lNDesiredBoundaries - 1; ib++) {
301+
if (std::abs(lDesiredBoundaries[ib + 1] - lDesiredBoundaries[ib]) < minimumBinWidth) {
302+
minimumBinWidth = std::abs(lDesiredBoundaries[ib + 1] - lDesiredBoundaries[ib]);
303303
}
304304
}
305-
if(minimumBinWidth<1e-9){
306-
cout << "Excessively fine binning requested: minimum bin width registers as "<< minimumBinWidth << endl;
307-
return false; // not reasonable
305+
if (minimumBinWidth < 1e-9) {
306+
cout << "Excessively fine binning requested: minimum bin width registers as " << minimumBinWidth << endl;
307+
return false; // not reasonable
308308
}
309-
if(histogram->GetEntries() < 1000.0/minimumBinWidth){
310-
cout << "Histogram "<<histogram->GetName()<<" does not have enough entries ("<<histogram->GetEntries()<<") to calibrate!" << endl;
311-
return false;
309+
if (histogram->GetEntries() < 1000.0 / minimumBinWidth) {
310+
cout << "Histogram " << histogram->GetName() << " does not have enough entries (" << histogram->GetEntries() << ") to calibrate!" << endl;
311+
return false;
312312
}
313-
if(std::abs(histogram->GetMean())<1e-9){
314-
cout << "Histogram "<<histogram->GetName()<<" has suspicious mean: "<<histogram->GetMean()<<endl;
315-
return false;
313+
if (std::abs(histogram->GetMean()) < 1e-9) {
314+
cout << "Histogram " << histogram->GetName() << " has suspicious mean: " << histogram->GetMean() << endl;
315+
return false;
316316
}
317-
cout << "Sanity check: " << histogram->GetName() << ", entries = " << histogram->GetEntries() << ", 1/(min bin width) = " <<100.0/minimumBinWidth << " -> OK ! " << endl;
317+
cout << "Sanity check: " << histogram->GetName() << ", entries = " << histogram->GetEntries() << ", 1/(min bin width) = " << 100.0 / minimumBinWidth << " -> OK ! " << endl;
318318
return true;
319319
}
320320

@@ -334,13 +334,13 @@ TH1F* multCalibrator::GetCalibrationHistogram(TH1* histoRaw, TString lHistoName)
334334
cout << "Last boundary: " << lDesiredBoundaries[0] << endl;
335335
}
336336

337-
// binning check
338-
if(!IsBinningSane(histoRaw)){
339-
cout << "Requested binning is not viable for input histogram named "<<histoRaw->GetName()<<"! Will return 100.5 for all requests." <<endl;
340-
Double_t lDummyBounds[2];
337+
// binning check
338+
if (!IsBinningSane(histoRaw)) {
339+
cout << "Requested binning is not viable for input histogram named " << histoRaw->GetName() << "! Will return 100.5 for all requests." << endl;
340+
Double_t lDummyBounds[2];
341341
lDummyBounds[0] = 0;
342342
lDummyBounds[1] = 1.0;
343-
TH1F *hCalib = new TH1F(lHistoName.Data(), "", 1, lDummyBounds);
343+
TH1F* hCalib = new TH1F(lHistoName.Data(), "", 1, lDummyBounds);
344344
hCalib->SetBinContent(0, 100.5);
345345
hCalib->SetBinContent(1, 100.5);
346346
hCalib->SetBinContent(2, 100.5);
@@ -369,16 +369,16 @@ TH1F* multCalibrator::GetCalibrationHistogram(TH1* histoRaw, TString lHistoName)
369369
TString lPrecisionString = "(Precision OK)";
370370
if (ii != 0 && ii != lNDesiredBoundaries - 1) {
371371
// check precision, please
372-
if ((lPrecision[ii] / TMath::Abs(lDesiredBoundaries[ii + 1] - lDesiredBoundaries[ii])) > fkPrecisionWarningThreshold){
372+
if ((lPrecision[ii] / TMath::Abs(lDesiredBoundaries[ii + 1] - lDesiredBoundaries[ii])) > fkPrecisionWarningThreshold) {
373373
lPrecisionString = "(WARNING: BINNING MAY LEAD TO IMPRECISION!)";
374374
warnUser = true;
375375
}
376-
if ((lPrecision[ii] / TMath::Abs(lDesiredBoundaries[ii - 1] - lDesiredBoundaries[ii])) > fkPrecisionWarningThreshold){
376+
if ((lPrecision[ii] / TMath::Abs(lDesiredBoundaries[ii - 1] - lDesiredBoundaries[ii])) > fkPrecisionWarningThreshold) {
377377
lPrecisionString = "(WARNING: BINNING MAY LEAD TO IMPRECISION!)";
378378
warnUser = true;
379379
}
380380
}
381-
if(warnUser){
381+
if (warnUser) {
382382
cout << histoRaw->GetName() << " boundaries, percentile: " << lDesiredBoundaries[ii] << "%\t Signal value = " << lBounds[lDisplacedii] << "\tprecision = " << lPrecision[ii] << "% " << lPrecisionString.Data() << endl;
383383
}
384384
}

Common/Tools/Multiplicity/multCalibrator.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ class multCalibrator : public TNamed
6262
void SetStandardAdaptiveBoundaries(); // standard adaptive (pp-like)
6363
void SetRun3AdaptiveBoundaries(); // Run 3 adaptive (down to 0.00001%)
6464
void SetStandardOnePercentBoundaries(); // standard 1% (Pb-Pb like)
65-
bool IsBinningSane(TH1 *histogram); // for safety
66-
65+
bool IsBinningSane(TH1* histogram); // for safety
66+
6767
// Master Function in this Class: To be called once filenames are set
6868
Bool_t Calibrate();
6969

0 commit comments

Comments
 (0)