Skip to content

Commit 70b2a44

Browse files
authored
Merge branch 'master' into mcfinder
2 parents 6bef19f + 0fb7c18 commit 70b2a44

68 files changed

Lines changed: 5314 additions & 1735 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.mega-linter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ DISABLE_LINTERS:
1818
- YAML_PRETTIER
1919
- REPOSITORY_DEVSKIM
2020
- REPOSITORY_SECRETLINT
21+
- REPOSITORY_TRIVY
2122
DISABLE_ERRORS_LINTERS: # If errors are found by these linters, they will be considered as non blocking.
2223
- PYTHON_BANDIT # The bandit check is overly broad and complains about subprocess usage in Scripts/update_ccdb.py.
2324
SHOW_ELAPSED_TIME: true

Common/TableProducer/PID/pidTOFBase.cxx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ struct tofEventTime {
141141
Configurable<int64_t> timestamp{"ccdb-timestamp", -1, "timestamp of the object"};
142142
Configurable<bool> loadResponseFromCCDB{"loadResponseFromCCDB", false, "Flag to load the response from the CCDB"};
143143
Configurable<bool> fatalOnPassNotAvailable{"fatalOnPassNotAvailable", true, "Flag to throw a fatal if the pass is not available in the retrieved CCDB object"};
144+
Configurable<bool> sel8TOFEvTime{"sel8TOFEvTime", false, "Flag to compute the ev. time only for events that pass the sel8 ev. selection"};
144145

145146
void init(o2::framework::InitContext& initContext)
146147
{
@@ -181,6 +182,9 @@ struct tofEventTime {
181182
LOG(info) << "Table EvTimeTOFOnly enabled!";
182183
}
183184

185+
if (sel8TOFEvTime.value == true) {
186+
LOG(info) << "TOF event time will be computed for collisions that pass the event selection only!";
187+
}
184188
// Getting the parametrization parameters
185189
ccdb->setURL(url.value);
186190
ccdb->setTimestamp(timestamp.value);
@@ -267,8 +271,9 @@ struct tofEventTime {
267271
Preslice<TrksEvTime> perCollision = aod::track::collisionId;
268272
template <o2::track::PID::ID pid>
269273
using ResponseImplementationEvTime = o2::pid::tof::ExpTimes<TrksEvTime::iterator, pid>;
274+
using EvTimeCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::FT0sCorrected>;
270275
void processNoFT0(TrksEvTime const& tracks,
271-
aod::Collisions const&)
276+
EvTimeCollisions const&)
272277
{
273278
if (!enableTable) {
274279
return;
@@ -280,9 +285,9 @@ struct tofEventTime {
280285
tableEvTimeTOFOnly.reserve(tracks.size());
281286
}
282287

283-
int lastCollisionId = -1; // Last collision ID analysed
284-
for (auto const& t : tracks) { // Loop on collisions
285-
if (!t.has_collision()) { // Track was not assigned, cannot compute event time
288+
int lastCollisionId = -1; // Last collision ID analysed
289+
for (auto const& t : tracks) { // Loop on collisions
290+
if (!t.has_collision() || ((sel8TOFEvTime.value == true) && !t.collision_as<EvTimeCollisions>().sel8())) { // Track was not assigned, cannot compute event time or event did not pass the event selection
286291
tableFlags(0);
287292
tableEvTime(0.f, 999.f);
288293
if (enableTableTOFOnly) {
@@ -327,7 +332,6 @@ struct tofEventTime {
327332

328333
///
329334
/// Process function to prepare the event for each track on Run 3 data with the FT0
330-
using EvTimeCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::FT0sCorrected>;
331335
void processFT0(TrksEvTime& tracks,
332336
aod::FT0s const&,
333337
EvTimeCollisions const&)
@@ -342,9 +346,9 @@ struct tofEventTime {
342346
tableEvTimeTOFOnly.reserve(tracks.size());
343347
}
344348

345-
int lastCollisionId = -1; // Last collision ID analysed
346-
for (auto const& t : tracks) { // Loop on collisions
347-
if (!t.has_collision()) { // Track was not assigned, cannot compute event time
349+
int lastCollisionId = -1; // Last collision ID analysed
350+
for (auto const& t : tracks) { // Loop on collisions
351+
if (!t.has_collision() || ((sel8TOFEvTime.value == true) && !t.collision_as<EvTimeCollisions>().sel8())) { // Track was not assigned, cannot compute event time or event did not pass the event selection
348352
tableFlags(0);
349353
tableEvTime(0.f, 999.f);
350354
if (enableTableTOFOnly) {

Common/Tasks/eventSelectionQa.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ struct EventSelectionQaTask {
451451
PROCESS_SWITCH(EventSelectionQaTask, processRun2, "Process Run2 event selection QA", true);
452452

453453
Preslice<FullTracksIU> perCollision = aod::track::collisionId;
454-
Preslice<ColEvSels> perFoundBC = aod::evsel::foundBCId;
454+
// Preslice<ColEvSels> perFoundBC = aod::evsel::foundBCId;
455455

456456
void processRun3(
457457
ColEvSels const& cols,
@@ -1020,7 +1020,7 @@ struct EventSelectionQaTask {
10201020
histos.fill(HIST("hMultZNCacc"), multZNC);
10211021
histos.fill(HIST("hNcontribAcc"), nContributors);
10221022
} // collisions
1023-
1023+
/*
10241024
// pileup checks
10251025
for (auto const& bc : bcs) {
10261026
auto collisionsGrouped = cols.sliceBy(perFoundBC, bc.globalIndex());
@@ -1035,6 +1035,7 @@ struct EventSelectionQaTask {
10351035
}
10361036
histos.fill(HIST("hMultT0Mpup"), multT0M);
10371037
}
1038+
*/
10381039
}
10391040
PROCESS_SWITCH(EventSelectionQaTask, processRun3, "Process Run3 event selection QA", false);
10401041

0 commit comments

Comments
 (0)