Skip to content

Commit 7d50efe

Browse files
authored
Merge branch 'master' into localtest
2 parents 4981245 + fa99334 commit 7d50efe

259 files changed

Lines changed: 4523 additions & 1973 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.

ALICE3/TableProducer/OTF/onTheFlyRICHPID.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ struct OnTheFlyRichPid {
208208
}
209209
}
210210

211-
void init(o2::framework::InitContext& initContext)
211+
void init(o2::framework::InitContext&)
212212
{
213213
pRandomNumberGenerator.SetSeed(0); // fully randomize
214214

ALICE3/TableProducer/OTF/onTheFlyTOFPID.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ struct OnTheFlyTOFPID {
105105
// for handling basic QA histograms if requested
106106
HistogramRegistry histos{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject};
107107

108-
void init(o2::framework::InitContext& initContext)
108+
void init(o2::framework::InitContext&)
109109
{
110110
pRandomNumberGenerator.SetSeed(0); // fully randomize
111111

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ struct OnTheFlyTracker {
135135
o2::steer::InteractionSampler irSampler;
136136
o2::vertexing::PVertexer vertexer;
137137

138-
void init(o2::framework::InitContext& initContext)
138+
void init(o2::framework::InitContext&)
139139
{
140140
if (enableLUT) {
141141
std::map<int, const char*> mapPdgLut;

ALICE3/TableProducer/alice3-decayfinder.cxx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ using namespace o2::framework::expressions;
5353
using std::array;
5454

5555
// simple checkers
56-
#define biton(var, nbit) ((var) |= (static_cast<uint32_t>(1) << (nbit)))
56+
// #define biton(var, nbit) ((var) |= (static_cast<uint32_t>(1) << (nbit)))
5757
#define bitoff(var, nbit) ((var) &= ~(static_cast<uint32_t>(1) << (nbit))) //((a) &= ~(1ULL<<(b)))
58-
#define bitcheck(var, nbit) ((var) & (static_cast<uint32_t>(1) << (nbit)))
58+
// #define bitcheck(var, nbit) ((var) & (static_cast<uint32_t>(1) << (nbit)))
5959

6060
using FullTracksExt = soa::Join<aod::Tracks, aod::TracksCov>;
6161

@@ -100,7 +100,7 @@ struct alice3decayPreselector {
100100
}
101101
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
102102

103-
void init(InitContext& context)
103+
void init(InitContext&)
104104
{
105105
// future dev if needed
106106
}
@@ -130,7 +130,7 @@ struct alice3decayPreselector {
130130
initializeMasks(tracks.size());
131131
}
132132
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
133-
void processFilterInnerTOF(tofTracks const& tracks)
133+
void processFilterInnerTOF(tofTracks const&)
134134
{
135135
for (auto const& track : pInnerTOFPi)
136136
bitoff(selectionMap[track.globalIndex()], kInnerTOFPion);
@@ -140,7 +140,7 @@ struct alice3decayPreselector {
140140
bitoff(selectionMap[track.globalIndex()], kInnerTOFProton);
141141
}
142142
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
143-
void processFilterOuterTOF(tofTracks const& tracks)
143+
void processFilterOuterTOF(tofTracks const&)
144144
{
145145
for (auto const& track : pOuterTOFPi)
146146
bitoff(selectionMap[track.globalIndex()], kOuterTOFPion);
@@ -150,7 +150,7 @@ struct alice3decayPreselector {
150150
bitoff(selectionMap[track.globalIndex()], kOuterTOFProton);
151151
}
152152
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
153-
void processFilterRICH(richTracks const& tracks)
153+
void processFilterRICH(richTracks const&)
154154
{
155155
for (auto const& track : pRICHPi)
156156
bitoff(selectionMap[track.globalIndex()], kRICHPion);
@@ -399,7 +399,7 @@ struct alice3decayFinder {
399399
return returnValue;
400400
}
401401

402-
void init(InitContext& context)
402+
void init(InitContext&)
403403
{
404404
// initialize O2 2-prong fitter (only once)
405405
fitter.setPropagateToPCA(true);
@@ -461,7 +461,7 @@ struct alice3decayFinder {
461461
}
462462

463463
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
464-
void processGenerated(aod::McParticles const& mcParticles)
464+
void processGenerated(aod::McParticles const&)
465465
{
466466
// no grouping for MC particles -> as intended
467467
if (doprocessFindDmesons) {
@@ -479,7 +479,7 @@ struct alice3decayFinder {
479479
}
480480

481481
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
482-
void processFindDmesons(aod::Collision const& collision, alice3tracks const& tracks, aod::McParticles const& mcParticles)
482+
void processFindDmesons(aod::Collision const& collision, alice3tracks const&, aod::McParticles const&)
483483
{
484484
// group with this collision
485485
auto tracksPiPlusFromDgrouped = tracksPiPlusFromD->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);
@@ -524,7 +524,7 @@ struct alice3decayFinder {
524524
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
525525

526526
//*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*+-+*
527-
void processFindLcBaryons(aod::Collision const& collision, alice3tracks const& tracks, aod::McParticles const& mcParticles)
527+
void processFindLcBaryons(aod::Collision const& collision, alice3tracks const&, aod::McParticles const&)
528528
{
529529
// group with this collision
530530
auto tracksPiPlusFromLcgrouped = tracksPiPlusFromLc->sliceByCached(aod::track::collisionId, collision.globalIndex(), cache);

ALICE3/TableProducer/alice3-pidTOF.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ struct ALICE3pidTOFTaskQA {
186186
Configurable<int> minMult{"minMult", 1, "Minimum track multiplicity with TOF"};
187187

188188
template <uint8_t i>
189-
void addParticleHistos(const AxisSpec& pAxis, const AxisSpec& ptAxis)
189+
void addParticleHistos(const AxisSpec& pAxis, const AxisSpec& /*ptAxis*/)
190190
{
191191
// Exp signal
192192
const AxisSpec expAxis{1000, 0, 2e6, Form("t_{exp}(%s)", pT[i])};

ALICE3/Tasks/ECALqa.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ struct ecalQaMc {
7373

7474
using Trks = soa::Join<aod::Tracks, aod::ECALTracksIndex, aod::TracksExtra>;
7575
void process(const soa::Join<aod::McParticles, aod::ECALMcPartIndex>& mcParticles,
76-
const Trks& tracks,
77-
const aod::McTrackLabels& labels,
78-
const aod::ECALs& ecals,
79-
const aod::Collisions& colls)
76+
const Trks&,
77+
const aod::McTrackLabels&,
78+
const aod::ECALs&,
79+
const aod::Collisions&)
8080
{
8181
for (auto& particle : mcParticles) {
8282
if (!particle.has_ecal())

ALICE3/Tasks/alice3-cdeuteron.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ struct Alice3CDeuteron {
175175
Preslice<aod::McParticles_000> perMcCollision = aod::mcparticle::mcCollisionId;
176176

177177
void process(const soa::Join<o2::aod::Collisions, o2::aod::McCollisionLabels>::iterator& coll,
178-
const o2::aod::McCollisions& Mccoll,
178+
const o2::aod::McCollisions&,
179179
const soa::Join<o2::aod::Tracks, o2::aod::McTrackLabels, o2::aod::TracksExtra, o2::aod::TracksCov,
180180
aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullDe>& tracks,
181181
const aod::McParticles_000& mcParticles)

ALICE3/Tasks/alice3-dilepton.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ struct Alice3Dilepton {
548548
void processRec(
549549
const o2::aod::Collisions& collisions,
550550
MyFilteredTracksMC const& tracks,
551-
const o2::aod::McCollisions& mccollisions,
551+
const o2::aod::McCollisions&,
552552
const aod::McParticles& mcParticles)
553553
{
554554
for (const auto& collision : collisions) {

ALICE3/Tasks/pidFTOFqa.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ struct ftofPidQaMC {
9696
void process(const Trks& tracks,
9797
const aod::McTrackLabels& labels,
9898
const aod::FTOFs&,
99-
const aod::McParticles_000& mcParticles,
99+
const aod::McParticles_000&,
100100
const aod::Collisions& colls)
101101
{
102102
for (const auto& col : colls) {

Common/TableProducer/PID/pidTPC.cxx

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ struct tpcPid {
102102
Configurable<int> pidTr{"pid-tr", -1, {"Produce PID information for the Triton mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)"}};
103103
Configurable<int> pidHe{"pid-he", -1, {"Produce PID information for the Helium3 mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)"}};
104104
Configurable<int> pidAl{"pid-al", -1, {"Produce PID information for the Alpha mass hypothesis, overrides the automatic setup: the corresponding table can be set off (0) or on (1)"}};
105+
Configurable<int> useNetworkEl{"useNetworkEl", 1, {"Switch for applying neural network on the electron mass hypothesis (if network enabled) (set to 0 to disable)"}};
106+
Configurable<int> useNetworkMu{"useNetworkMu", 1, {"Switch for applying neural network on the muon mass hypothesis (if network enabled) (set to 0 to disable)"}};
107+
Configurable<int> useNetworkPi{"useNetworkPi", 1, {"Switch for applying neural network on the pion mass hypothesis (if network enabled) (set to 0 to disable)"}};
108+
Configurable<int> useNetworkKa{"useNetworkKa", 1, {"Switch for applying neural network on the kaon mass hypothesis (if network enabled) (set to 0 to disable)"}};
109+
Configurable<int> useNetworkPr{"useNetworkPr", 1, {"Switch for applying neural network on the proton mass hypothesis (if network enabled) (set to 0 to disable)"}};
110+
Configurable<int> useNetworkDe{"useNetworkDe", 1, {"Switch for applying neural network on the deuteron mass hypothesis (if network enabled) (set to 0 to disable)"}};
111+
Configurable<int> useNetworkTr{"useNetworkTr", 1, {"Switch for applying neural network on the triton mass hypothesis (if network enabled) (set to 0 to disable)"}};
112+
Configurable<int> useNetworkHe{"useNetworkHe", 1, {"Switch for applying neural network on the helium3 mass hypothesis (if network enabled) (set to 0 to disable)"}};
113+
Configurable<int> useNetworkAl{"useNetworkAl", 1, {"Switch for applying neural network on the alpha mass hypothesis (if network enabled) (set to 0 to disable)"}};
114+
Configurable<float> networkBetaGammaCutoff{"networkBetaGammaCutoff", 0.45, {"Lower value of beta-gamma to override the NN application"}};
105115

106116
// Paramatrization configuration
107117
bool useCCDBParam = false;
@@ -202,11 +212,11 @@ struct tpcPid {
202212
}
203213
}
204214

205-
Partition<Trks> notTPCStandaloneTracks = ((aod::track::itsClusterSizes > (uint32_t)0) || (aod::track::trdPattern > (uint8_t)0) || (aod::track::tofExpMom > 0.f && aod::track::tofChi2 > 0.f)); // To count number of tracks for use in NN array
215+
Partition<Trks> notTPCStandaloneTracks = (aod::track::tpcNClsFindable > (uint8_t)0) && ((aod::track::itsClusterSizes > (uint32_t)0) || (aod::track::trdPattern > (uint8_t)0) || (aod::track::tofExpMom > 0.f && aod::track::tofChi2 > 0.f)); // To count number of tracks for use in NN array
206216
Partition<Trks> tracksWithTPC = (aod::track::tpcNClsFindable > (uint8_t)0);
207217

208218
void process(Coll const& collisions, Trks const& tracks,
209-
aod::BCsWithTimestamps const&)
219+
aod::BCsWithTimestamps const& bcs)
210220
{
211221

212222
const uint64_t outTable_size = tracks.size();
@@ -233,7 +243,7 @@ struct tpcPid {
233243
if (useNetworkCorrection) {
234244
auto start_network_total = std::chrono::high_resolution_clock::now();
235245
if (autofetchNetworks) {
236-
auto bc = collisions.iteratorAt(0).bc_as<aod::BCsWithTimestamps>();
246+
auto bc = bcs.begin();
237247
// Initialise correct TPC response object before NN setup (for NCl normalisation)
238248
if (useCCDBParam && ccdbTimestamp.value == 0 && !ccdb->isCachedObjectValid(ccdbPath.value, bc.timestamp())) { // Updating parametrisation only if the initial timestamp is 0
239249
if (recoPass.value == "") {
@@ -297,7 +307,7 @@ struct tpcPid {
297307
track_properties[counter_track_props + 1] = trk.tgl();
298308
track_properties[counter_track_props + 2] = trk.signed1Pt();
299309
track_properties[counter_track_props + 3] = o2::track::pid_constants::sMasses[i];
300-
track_properties[counter_track_props + 4] = collisions.iteratorAt(trk.collisionId()).multTPC() / 11000.;
310+
track_properties[counter_track_props + 4] = trk.has_collision() ? collisions.iteratorAt(trk.collisionId()).multTPC() / 11000. : 1.; // Dummy value in case no associated collision
301311
track_properties[counter_track_props + 5] = std::sqrt(nNclNormalization / trk.tpcNClsFound());
302312
counter_track_props += input_dimensions;
303313
}
@@ -346,7 +356,7 @@ struct tpcPid {
346356
}
347357
}
348358
// Check and fill enabled tables
349-
auto makeTable = [&trk, &collisions, &network_prediction, &count_tracks, &tracksForNet_size, this](const Configurable<int>& flag, auto& table, const o2::track::PID::ID pid) {
359+
auto makeTable = [&trk, &collisions, &network_prediction, &count_tracks, &tracksForNet_size, this](const Configurable<int>& flag, auto& table, const o2::track::PID::ID pid, bool speciesApplicationFlag) {
350360
if (flag.value != 1) {
351361
return;
352362
}
@@ -361,13 +371,14 @@ struct tpcPid {
361371
}
362372
}
363373
auto expSignal = response->GetExpectedSignal(trk, pid);
364-
auto expSigma = response->GetExpectedSigma(collisions.iteratorAt(trk.collisionId()), trk, pid);
365-
if (expSignal < 0. || expSigma < 0.) { // skip if expected signal invalid
374+
auto expSigma = trk.has_collision() ? response->GetExpectedSigma(collisions.iteratorAt(trk.collisionId()), trk, pid) : 0.07 * expSignal; // use default sigma value of 7% if no collision information to estimate resolution
375+
if (expSignal < 0. || expSigma < 0.) { // skip if expected signal invalid
366376
table(aod::pidtpc_tiny::binning::underflowBin);
367377
return;
368378
}
379+
float bg = trk.tpcInnerParam() / o2::track::pid_constants::sMasses[pid]; // estimated beta-gamma for network cutoff
369380

370-
if (useNetworkCorrection) {
381+
if (useNetworkCorrection && speciesApplicationFlag && trk.has_collision() && bg > networkBetaGammaCutoff) {
371382

372383
// Here comes the application of the network. The output--dimensions of the network dtermine the application: 1: mean, 2: sigma, 3: sigma asymmetric
373384
// For now only the option 2: sigma will be used. The other options are kept if there would be demand later on
@@ -389,15 +400,15 @@ struct tpcPid {
389400
}
390401
};
391402

392-
makeTable(pidEl, tablePIDEl, o2::track::PID::Electron);
393-
makeTable(pidMu, tablePIDMu, o2::track::PID::Muon);
394-
makeTable(pidPi, tablePIDPi, o2::track::PID::Pion);
395-
makeTable(pidKa, tablePIDKa, o2::track::PID::Kaon);
396-
makeTable(pidPr, tablePIDPr, o2::track::PID::Proton);
397-
makeTable(pidDe, tablePIDDe, o2::track::PID::Deuteron);
398-
makeTable(pidTr, tablePIDTr, o2::track::PID::Triton);
399-
makeTable(pidHe, tablePIDHe, o2::track::PID::Helium3);
400-
makeTable(pidAl, tablePIDAl, o2::track::PID::Alpha);
403+
makeTable(pidEl, tablePIDEl, o2::track::PID::Electron, useNetworkEl);
404+
makeTable(pidMu, tablePIDMu, o2::track::PID::Muon, useNetworkMu);
405+
makeTable(pidPi, tablePIDPi, o2::track::PID::Pion, useNetworkPi);
406+
makeTable(pidKa, tablePIDKa, o2::track::PID::Kaon, useNetworkKa);
407+
makeTable(pidPr, tablePIDPr, o2::track::PID::Proton, useNetworkPr);
408+
makeTable(pidDe, tablePIDDe, o2::track::PID::Deuteron, useNetworkDe);
409+
makeTable(pidTr, tablePIDTr, o2::track::PID::Triton, useNetworkTr);
410+
makeTable(pidHe, tablePIDHe, o2::track::PID::Helium3, useNetworkHe);
411+
makeTable(pidAl, tablePIDAl, o2::track::PID::Alpha, useNetworkAl);
401412

402413
if (trk.hasTPC() && (!skipTPCOnly || trk.hasITS() || trk.hasTRD() || trk.hasTOF())) {
403414
count_tracks++; // Increment network track counter only if (not skipping TPConly) or (is not TPConly)

0 commit comments

Comments
 (0)