Skip to content

Commit bc2cbb3

Browse files
authored
Please consider the following formatting changes (#429)
1 parent 8edba32 commit bc2cbb3

File tree

2 files changed

+36
-37
lines changed

2 files changed

+36
-37
lines changed

Common/TableProducer/eventSelectionService.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct eventselectionRun2 {
7171
// this: a stopgap solution to avoid spawning yet another device
7272
std::vector<o2::common::eventselection::bcselEntry> bcselsbuffer;
7373

74-
// auxiliary
74+
// auxiliary
7575
Partition<FullTracks> tracklets = (aod::track::trackType == static_cast<uint8_t>(o2::aod::track::TrackTypeEnum::Run2Tracklet));
7676
Preslice<FullTracks> perCollision = aod::track::collisionId;
7777

@@ -126,7 +126,7 @@ struct eventselectionRun3 {
126126
// this: a stopgap solution to avoid spawning yet another device
127127
std::vector<o2::common::eventselection::bcselEntry> bcselsbuffer;
128128

129-
// auxiliary
129+
// auxiliary
130130
Partition<FullTracksIU> pvTracks = ((aod::track::flags & static_cast<uint32_t>(o2::aod::track::PVContributor)) == static_cast<uint32_t>(o2::aod::track::PVContributor));
131131
Preslice<FullTracksIU> perCollisionIU = aod::track::collisionId;
132132

@@ -143,7 +143,7 @@ struct eventselectionRun3 {
143143
lumimodule.init(histos);
144144
}
145145

146-
void process(aod::Collisions const& collisions,
146+
void process(aod::Collisions const& collisions,
147147
BCsWithRun3Matchings const& bcs,
148148
aod::Zdcs const&,
149149
aod::FV0As const&,
@@ -171,16 +171,16 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
171171
}
172172

173173
LOGF(info, "Event selection autoconfiguring from metadata. Availability of info for Run 2/3 is %i", hasRunInfo);
174-
if(!hasRunInfo){
174+
if (!hasRunInfo) {
175175
LOGF(info, "Metadata info missing or incomplete. Make sure --aod-file is provided at the end of the last workflow and that the AO2D has metadata stored.");
176176
LOGF(info, "Initializing with Run 3 data as default. Please note you will not be able to change settings manually.");
177177
LOGF(info, "You should instead make sure the metadata is read in correctly.");
178178
return WorkflowSpec{adaptAnalysisTask<eventselectionRun3>(cfgc)};
179-
}else{
179+
} else {
180180
LOGF(info, "Metadata successfully read in. Is this Run 3? %i - will self-configure.", isRun3);
181-
if(isRun3){
181+
if (isRun3) {
182182
return WorkflowSpec{adaptAnalysisTask<eventselectionRun3>(cfgc)};
183-
}else{
183+
} else {
184184
return WorkflowSpec{adaptAnalysisTask<eventselectionRun2>(cfgc)};
185185
}
186186
}

Common/Tools/EventSelectionTools.h

Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// or submit itself to any jurisdiction.
1111

1212
/// \file EventSelectionModule.h
13-
/// \brief
13+
/// \brief
1414
/// \author ALICE
1515

1616
#ifndef COMMON_TOOLS_EVENTSELECTIONTOOLS_H_
@@ -348,30 +348,30 @@ class BcSelectionModule
348348
// }
349349

350350
uint32_t rct = 0;
351-
351+
352352
// initialize properties
353353
o2::common::eventselection::bcselEntry entry;
354-
entry.alias = alias;
355-
entry.selection = selection;
356-
entry.rct = rct;
354+
entry.alias = alias;
355+
entry.selection = selection;
356+
entry.rct = rct;
357357
entry.foundFT0Id = foundFT0;
358358
entry.foundFV0Id = foundFV0;
359-
entry.foundFDDId = foundFDD;
359+
entry.foundFDDId = foundFDD;
360360
entry.foundZDCId = foundZDC;
361361
bcselEntries.push_back(entry);
362362

363363
// Fill bc selection columns
364364
bcsel(alias, selection, rct, foundFT0, foundFV0, foundFDD, foundZDC);
365365
} // end bc loop
366366
return bcselEntries;
367-
} // end processRun2
367+
} // end processRun2
368368

369369
//__________________________________________________
370370
template <typename TCCDB, typename THistoRegistry, typename TBCs, typename TBcSelBuffer, typename TBcSelCursor>
371371
std::vector<o2::common::eventselection::bcselEntry> processRun3(TCCDB const& ccdb, THistoRegistry& histos, TBCs const& bcs, TBcSelBuffer const& bcselbuffer, TBcSelCursor& bcsel)
372372
{
373373
std::vector<o2::common::eventselection::bcselEntry> bcselEntries;
374-
if(!configure(ccdb, bcs))
374+
if (!configure(ccdb, bcs))
375375
return bcselEntries; // don't do anything in case configuration reported not ok
376376

377377
int run = bcs.iteratorAt(0).runNumber();
@@ -382,7 +382,7 @@ class BcSelectionModule
382382
}
383383

384384
int triggerBcShift = bcselOpts.confTriggerBcShift;
385-
if (bcselOpts.confTriggerBcShift == 999) { // o2-linter: disable=magic-number (special shift for early 2022 data)
385+
if (bcselOpts.confTriggerBcShift == 999) { // o2-linter: disable=magic-number (special shift for early 2022 data)
386386
triggerBcShift = (run <= 526766 || (run >= 526886 && run <= 527237) || (run >= 527259 && run <= 527518) || run == 527523 || run == 527734 || run >= 534091) ? 0 : 294; // o2-linter: disable=magic-number (magic list of runs)
387387
}
388388

@@ -533,12 +533,12 @@ class BcSelectionModule
533533

534534
// initialize properties
535535
o2::common::eventselection::bcselEntry entry;
536-
entry.alias = alias;
537-
entry.selection = selection;
538-
entry.rct = rct;
536+
entry.alias = alias;
537+
entry.selection = selection;
538+
entry.rct = rct;
539539
entry.foundFT0Id = foundFT0;
540540
entry.foundFV0Id = foundFV0;
541-
entry.foundFDDId = foundFDD;
541+
entry.foundFDDId = foundFDD;
542542
entry.foundZDCId = foundZDC;
543543
bcselEntries.push_back(entry);
544544

@@ -659,7 +659,7 @@ class EventSelectionModule
659659
nBCsPerTF = evselOpts.confNumberOfOrbitsPerTF < 0 ? runInfo.orbitsPerTF * nBCsPerOrbit : evselOpts.confNumberOfOrbitsPerTF * nBCsPerOrbit;
660660
// colliding bc pattern
661661
int64_t ts = bcs.iteratorAt(0).timestamp();
662-
// getForTimeStamp replaced with getSpecific to set metadata to zero
662+
// getForTimeStamp replaced with getSpecific to set metadata to zero
663663
// avoids crash related to specific run number
664664
auto grplhcif = ccdb->template getSpecific<o2::parameters::GRPLHCIFData>("GLO/Config/GRPLHCIF", ts);
665665
bcPatternB = grplhcif->getBunchFilling().getBCPattern();
@@ -751,13 +751,13 @@ class EventSelectionModule
751751
}
752752
} // end processRun2
753753

754-
//__________________________________________________
754+
//__________________________________________________
755755
template <typename TCCDB, typename THistoRegistry, typename TBCs, typename TCollisions, typename TPVTracks, typename TFT0s, typename TSlicecache, typename TBcSelBuffer, typename TEvselCursor>
756756
void processRun3(TCCDB const& ccdb, THistoRegistry& histos, TBCs const& bcs, TCollisions const& cols, TPVTracks const& pvTracks, TFT0s const& ft0s, TSlicecache& cache, TBcSelBuffer const& bcselbuffer, TEvselCursor& evsel)
757757
{
758-
if(!configure(ccdb, bcs))
758+
if (!configure(ccdb, bcs))
759759
return; // don't do anything in case configuration reported not ok
760-
760+
761761
int run = bcs.iteratorAt(0).runNumber();
762762
// create maps from globalBC to bc index for TVX-fired bcs
763763
// to be used for closest TVX searches
@@ -791,15 +791,15 @@ class EventSelectionModule
791791
}
792792
return;
793793
}
794-
std::vector<int> vTracksITS567perColl(cols.size(), 0); // counter of tracks per collision for occupancy studies
795-
std::vector<float> vAmpFT0CperColl(cols.size(), 0); // amplitude FT0C per collision
796-
std::vector<float> vCollVz(cols.size(), 0); // vector with vZ positions for each collision
797-
std::vector<bool> vIsFullInfoForOccupancy(cols.size(), 0); // info for occupancy in +/- windows is available (i.e. a given coll is not too close to the TF borders)
794+
std::vector<int> vTracksITS567perColl(cols.size(), 0); // counter of tracks per collision for occupancy studies
795+
std::vector<float> vAmpFT0CperColl(cols.size(), 0); // amplitude FT0C per collision
796+
std::vector<float> vCollVz(cols.size(), 0); // vector with vZ positions for each collision
797+
std::vector<bool> vIsFullInfoForOccupancy(cols.size(), 0); // info for occupancy in +/- windows is available (i.e. a given coll is not too close to the TF borders)
798798
const float timeWinOccupancyCalcMinNS = evselOpts.confTimeIntervalForOccupancyCalculationMin * 1e3; // ns
799799
const float timeWinOccupancyCalcMaxNS = evselOpts.confTimeIntervalForOccupancyCalculationMax * 1e3; // ns
800-
std::vector<bool> vIsVertexITSTPC(cols.size(), 0); // at least one of vertex contributors is ITS-TPC track
801-
std::vector<bool> vIsVertexTOFmatched(cols.size(), 0); // at least one of vertex contributors is matched to TOF
802-
std::vector<bool> vIsVertexTRDmatched(cols.size(), 0); // at least one of vertex contributors is matched to TRD
800+
std::vector<bool> vIsVertexITSTPC(cols.size(), 0); // at least one of vertex contributors is ITS-TPC track
801+
std::vector<bool> vIsVertexTOFmatched(cols.size(), 0); // at least one of vertex contributors is matched to TOF
802+
std::vector<bool> vIsVertexTRDmatched(cols.size(), 0); // at least one of vertex contributors is matched to TRD
803803

804804
std::vector<int> vCollisionsPerBc(bcs.size(), 0); // counter of collisions per found bc for pileup checks
805805
std::vector<int> vFoundBCindex(cols.size(), -1); // indices of found bcs
@@ -941,12 +941,11 @@ class EventSelectionModule
941941
int32_t colIndex = col.globalIndex();
942942
int64_t foundGlobalBC = vFoundGlobalBC[colIndex];
943943
auto bcselEntr = bcselbuffer[vFoundBCindex[colIndex]];
944-
if (bcselEntr.foundFT0Id>-1){
944+
if (bcselEntr.foundFT0Id > -1) {
945945
// required: explicit ft0s table
946946
auto foundFT0 = ft0s.rawIteratorAt(bcselEntr.foundFT0Id);
947947
vAmpFT0CperColl[colIndex] = foundFT0.sumAmpC();
948948
}
949-
950949

951950
int64_t tfId = (foundGlobalBC - bcSOR) / nBCsPerTF;
952951
int64_t rofId = (foundGlobalBC + nBCsPerOrbit - rofOffset) / rofLength;
@@ -1165,7 +1164,7 @@ class EventSelectionModule
11651164

11661165
// compare zVtx from FT0 and from PV
11671166
bool isGoodZvtxFT0vsPV = 0;
1168-
if(bcselEntry.foundFT0Id>-1){
1167+
if (bcselEntry.foundFT0Id > -1) {
11691168
auto foundFT0 = ft0s.rawIteratorAt(bcselEntry.foundFT0Id);
11701169
isGoodZvtxFT0vsPV = std::fabs(foundFT0.posZ() - col.posZ()) < evselOpts.maxDiffZvtxFT0vsPV;
11711170
}
@@ -1204,7 +1203,7 @@ class EventSelectionModule
12041203

12051204
// fill counters
12061205
histos.template get<TH1>(HIST("eventselection/hColCounterAll"))->Fill(Form("%d", bc.runNumber()), 1);
1207-
if (bitcheck64(bcselEntry.selection,aod::evsel::kIsTriggerTVX)) {
1206+
if (bitcheck64(bcselEntry.selection, aod::evsel::kIsTriggerTVX)) {
12081207
histos.template get<TH1>(HIST("eventselection/hColCounterTVX"))->Fill(Form("%d", bc.runNumber()), 1);
12091208
}
12101209
if (sel8) {
@@ -1430,14 +1429,14 @@ class LumiModule
14301429
mPileupCorrectionZNC.push_back(mPileupCorrectionZNC.back());
14311430
mPileupCorrectionZEM.push_back(mPileupCorrectionZEM.back());
14321431
} // access ccdb once per run
1433-
return true; // carry on, please
1432+
return true; // carry on, please
14341433
}
14351434

14361435
//__________________________________________________
14371436
template <typename TCCDB, typename THistoRegistry, typename TBCs, typename TBcSelBuffer>
14381437
void process(TCCDB& ccdb, THistoRegistry& histos, TBCs const& bcs, TBcSelBuffer const& bcselBuffer)
14391438
{
1440-
if(!configure(ccdb, bcs))
1439+
if (!configure(ccdb, bcs))
14411440
return; // don't do anything in case configuration reported not ok
14421441

14431442
int run = bcs.iteratorAt(0).runNumber();

0 commit comments

Comments
 (0)