Skip to content

Commit 18527be

Browse files
authored
Merge branch 'master' into OptimisationTree
2 parents dee7b09 + 57da445 commit 18527be

47 files changed

Lines changed: 3436 additions & 725 deletions

Some content is hidden

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

ALICE3/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ o2physics_add_dpl_workflow(alice3-qa-singleparticle
2121

2222
o2physics_add_dpl_workflow(alice3-lutmaker
2323
SOURCES alice3-lutmaker.cxx
24-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
24+
PUBLIC_LINK_LIBRARIES O2::Framework FairRoot::Base O2Physics::AnalysisCore
2525
COMPONENT_NAME Analysis)
2626

2727
o2physics_add_dpl_workflow(alice3-pid-rich-qa

ALICE3/Tools/handleParamTOFResoALICE3.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "CCDB/CcdbApi.h"
2020
#include <boost/program_options.hpp>
21-
#include <FairLogger.h>
21+
#include "Framework/Logger.h"
2222
#include "TFile.h"
2323
#include "ALICE3/Core/TOFResoALICE3.h"
2424

Common/Core/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ o2physics_add_library(AnalysisCore
1414
OrbitRange.cxx
1515
PID/ParamBase.cxx
1616
TrackSelectionDefaults.cxx
17-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore)
17+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore ROOT::EG O2::CCDB ROOT::Physics)
1818

1919
o2physics_target_root_dictionary(AnalysisCore
2020
HEADERS TrackSelection.h
@@ -30,4 +30,4 @@ o2physics_target_root_dictionary(AnalysisCore
3030
o2physics_add_executable(merger
3131
COMPONENT_NAME aod
3232
SOURCES aodMerger.cxx
33-
PUBLIC_LINK_LIBRARIES ROOT::Hist ROOT::Core ROOT::Net)
33+
PUBLIC_LINK_LIBRARIES ROOT::Hist ROOT::Core ROOT::Net)

Common/TableProducer/multiplicityTable.cxx

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
using namespace o2;
1414
using namespace o2::framework;
1515

16-
// custom configurable for switching between run2 and run3 selection types
17-
void customize(std::vector<ConfigParamSpec>& workflowOptions)
18-
{
19-
workflowOptions.push_back(ConfigParamSpec{"selection-run", VariantType::Int, 2, {"selection type: 2 - run 2, 3 - run 3"}});
20-
}
21-
2216
#include "Framework/runDataProcessing.h"
2317
#include "Framework/AnalysisTask.h"
2418
#include "Framework/AnalysisDataModel.h"
@@ -41,7 +35,6 @@ struct MultiplicityTableTaskIndexed {
4135

4236
//Configurable
4337
Configurable<int> doVertexZeq{"doVertexZeq", 1, "if 1: do vertex Z eq mult table"};
44-
Configurable<int> doDummyZeq{"doDummyZeq", 0, "if 1: do dummy Z vertex Eq (will make non-eq equal to eq)"};
4538

4639
int mRunNumber;
4740
bool lCalibLoaded;
@@ -154,7 +147,7 @@ struct MultiplicityTableTaskIndexed {
154147

155148
/* check the previous run number */
156149
auto bc = collision.bc_as<soa::Join<aod::BCs, aod::Timestamps>>();
157-
if (doVertexZeq > 0 && doDummyZeq < 1) {
150+
if (doVertexZeq > 0) {
158151
if (bc.runNumber() != mRunNumber) {
159152
mRunNumber = bc.runNumber(); //mark this run as at least tried
160153
lCalibObjects = ccdb->getForTimeStamp<TList>("Centrality/Calibration", bc.timestamp());
@@ -168,9 +161,12 @@ struct MultiplicityTableTaskIndexed {
168161
lCalibLoaded = true;
169162
//Capture error
170163
if (!hVtxZFV0A || !hVtxZFT0A || !hVtxZFT0C || !hVtxZFDDA || !hVtxZFDDC || !hVtxZNTracks) {
171-
LOGF(info, "Problem loading CCDB objects! Please check");
164+
LOGF(error, "Problem loading CCDB objects! Please check");
172165
lCalibLoaded = false;
173166
}
167+
} else {
168+
LOGF(error, "Problem loading CCDB object! Please check");
169+
lCalibLoaded = false;
174170
}
175171
}
176172
}
@@ -209,14 +205,6 @@ struct MultiplicityTableTaskIndexed {
209205
multZeqFDDC = hVtxZFDDC->Interpolate(0.0) * multFDDC / hVtxZFDDC->Interpolate(collision.posZ());
210206
multZeqNContribs = hVtxZNTracks->Interpolate(0.0) * multNContribs / hVtxZNTracks->Interpolate(collision.posZ());
211207
}
212-
if (doDummyZeq) {
213-
multZeqFV0A = multFV0A;
214-
multZeqFT0A = multFT0A;
215-
multZeqFT0C = multFT0C;
216-
multZeqFDDA = multFDDA;
217-
multZeqFDDC = multFDDC;
218-
multZeqNContribs = multNContribs;
219-
}
220208

221209
LOGF(debug, "multFV0A=%5.0f multFV0C=%5.0f multFT0A=%5.0f multFT0C=%5.0f multFDDA=%5.0f multFDDC=%5.0f multZNA=%6.0f multZNC=%6.0f multTracklets=%i multTPC=%i", multFV0A, multFV0C, multFT0A, multFT0C, multFDDA, multFDDC, multZNA, multZNC, multTracklets, multTPC);
222210
mult(multFV0A, multFV0C, multFT0A, multFT0C, multFDDA, multFDDC, multZNA, multZNC, multTracklets, multTPC, multNContribs, multNContribsEta1);

Common/Tools/handleParamBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "CCDB/CcdbApi.h"
2020
#include <boost/program_options.hpp>
21-
#include <FairLogger.h>
21+
#include "Framework/Logger.h"
2222
#include "TFile.h"
2323

2424
// Global executable arguments

DPG/Tasks/AOTTrack/qaK0sTrackingEfficiency.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct qaK0sTrackingEfficiency {
3434

3535
void init(InitContext const&)
3636
{
37-
const AxisSpec RAxis{100, 0.f, 10.f, "#it{R} (cm)"};
37+
const AxisSpec RAxis{500, 0.f, 50.f, "#it{R} (cm)"};
3838
const AxisSpec pTAxis{200, 0.f, 10.f, "#it{p}_{T} (GeV/#it{c})"};
3939
const AxisSpec mAxis{200, 0.4f, 0.6f, "#it{m} (GeV/#it{c}^{2})"};
4040
const AxisSpec statusAxis{2, -0.5f, 1.5f, ""};

EventFiltering/PWGCF/CFFilter.cxx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ struct CFFilter {
147147
registry.add("fZvtxBefore", "Zvtx of all processed events", HistType::kTH1F, {{1000, -15, 15}});
148148
registry.add("fZvtxAfter", "Zvtx of events which passed ppp trigger", HistType::kTH1F, {{1000, -15, 15}});
149149

150+
registry.add("fPtBeforePPP", "Transverse momentum of all processed tracks", HistType::kTH1F, {{1000, 0, 10}});
151+
registry.add("fPtAfterPPP", "Transverse momentum of processed tracks which passed selections", HistType::kTH1F, {{1000, 0, 10}});
152+
registry.add("fPtBeforeAntiPPP", "Transverse momentum of all processed antitracks", HistType::kTH1F, {{1000, 0, 10}});
153+
registry.add("fPtAfterAntiPPP", "Transverse momentum of processed antitracks passed selection", HistType::kTH1F, {{1000, 0, 10}});
154+
150155
if (Q3Trigger == 0 || Q3Trigger == 11 || Q3Trigger == 1111) {
151156
registry.add("fSameEventPartPPP", "CF - same event ppp distribution for particles;;events", HistType::kTH1F, {{8000, 0, 8}});
152157
registry.add("fSameEventAntiPartPPP", "CF - same event ppp distribution for antiparticles;;events", HistType::kTH1F, {{8000, 0, 8}});
153-
154-
registry.add("fPtBeforePPP", "Transverse momentum of all processed tracks", HistType::kTH1F, {{1000, 0, 10}});
155-
registry.add("fPtAfterPPP", "Transverse momentum of processed tracks which passed selections", HistType::kTH1F, {{1000, 0, 10}});
156-
registry.add("fPtBeforeAntiPPP", "Transverse momentum of all processed antitracks", HistType::kTH1F, {{1000, 0, 10}});
157-
registry.add("fPtAfterAntiPPP", "Transverse momentum of processed antitracks passed selection", HistType::kTH1F, {{1000, 0, 10}});
158158
}
159159
if (Q3Trigger == 1 || Q3Trigger == 11 || Q3Trigger == 1111) {
160160
registry.add("fSameEventPartPPL", "CF - same event ppL distribution for particles;;events", HistType::kTH1F, {{8000, 0, 8}});

EventFiltering/PWGHF/HFFilter.cxx

Lines changed: 93 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@
3838
// ML application
3939
#include <onnxruntime/core/session/experimental_onnxruntime_cxx_api.h>
4040

41+
//CCDB
42+
#include <CCDB/BasicCCDBManager.h>
43+
#include "CCDB/CcdbApi.h"
44+
4145
using namespace o2;
4246
using namespace o2::framework;
4347
using namespace o2::framework::expressions;
@@ -366,7 +370,7 @@ struct HfFilter { // Main struct for HF triggers
366370
Configurable<bool> applyML{"applyML", false, "Flag to enable or disable ML application"};
367371
Configurable<std::vector<double>> pTBinsBDT{"pTBinsBDT", std::vector<double>{hf_cuts_bdt_multiclass::pTBinsVec}, "track pT bin limits for BDT cut"};
368372

369-
Configurable<std::string> onnxFileD0ToKPiConf{"onnxFileD0ToKPiConf", "/cvmfs/alice.cern.ch/data/analysis/2022/vAN-20220124/PWGHF/o2/trigger/XGBoostModel.onnx", "ONNX file for ML model for D0 candidates"};
373+
Configurable<std::string> onnxFileD0ToKPiConf{"onnxFileD0ToKPiConf", "XGBoostModel.onnx", "ONNX file for ML model for D0 candidates"};
370374
Configurable<LabeledArray<double>> thresholdBDTScoreD0ToKPi{"thresholdBDTScoreD0ToKPi", {hf_cuts_bdt_multiclass::cutsBDT[0], hf_cuts_bdt_multiclass::npTBins, hf_cuts_bdt_multiclass::nCutBDTScores, hf_cuts_bdt_multiclass::pTBinLabels, hf_cuts_bdt_multiclass::cutBDTLabels}, "Threshold values for BDT output scores of D0 candidates"};
371375

372376
Configurable<std::string> onnxFileDPlusToPiKPiConf{"onnxFileDPlusToPiKPiConf", "", "ONNX file for ML model for D+ candidates"};
@@ -383,6 +387,12 @@ struct HfFilter { // Main struct for HF triggers
383387

384388
// parameter for Optimisation Tree
385389
Configurable<bool> applyOptimisation{"applyOptimisation", false, "Flag to enable or disable optimisation"};
390+
//CCDB configuration
391+
o2::ccdb::CcdbApi ccdbApi;
392+
Service<o2::ccdb::BasicCCDBManager> ccdb;
393+
Configurable<std::string> url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
394+
Configurable<std::string> mlModelPathCCDB{"mlModelPathCCDB", "Analysis/PWGHF/ML/HFTrigger/", "Path on CCDB"};
395+
Configurable<long> ccdbTimestamp{"ccdb-timestamp", 0, "timestamp of the ONNX file for ML model used to query in CCDB. Exceptions: > 0 for the specific timestamp, 0 gets the run dependent timestamp"};
386396

387397
// array of ONNX config and BDT thresholds
388398
std::array<std::string, kNCharmParticles> onnxFiles;
@@ -449,46 +459,64 @@ struct HfFilter { // Main struct for HF triggers
449459
hProtonTOFPID = registry.add<TH2>("fProtonTOFPID", "#it{N}_{#sigma}^{TOF} vs. #it{p} for selected protons;#it{p} (GeV/#it{c});#it{N}_{#sigma}^{TOF}", HistType::kTH2F, {{100, 0., 10.}, {200, -10., 10.}});
450460
}
451461

462+
ccdb->setURL(url.value);
463+
ccdb->setCaching(true);
464+
ccdb->setLocalObjectValidityChecking();
465+
ccdb->setCreatedNotAfter(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count());
466+
ccdbApi.init(url);
467+
468+
thresholdBDTScores = {
469+
thresholdBDTScoreD0ToKPi,
470+
thresholdBDFScoreDPlusToPiKPi,
471+
thresholdBDFScoreDSToPiKK,
472+
thresholdBDFScoreLcToPiKP,
473+
thresholdBDFScoreXicToPiKP};
474+
475+
onnxFiles = {
476+
onnxFileD0ToKPiConf,
477+
onnxFileDPlusToPiKPiConf,
478+
onnxFileDSToPiKKConf,
479+
onnxFileLcToPiKPConf,
480+
onnxFileXicToPiKPConf};
481+
452482
// init ONNX runtime session
453-
if (applyML) {
454-
thresholdBDTScores = {
455-
thresholdBDTScoreD0ToKPi,
456-
thresholdBDFScoreDPlusToPiKPi,
457-
thresholdBDFScoreDSToPiKK,
458-
thresholdBDFScoreLcToPiKP,
459-
thresholdBDFScoreXicToPiKP};
460-
461-
onnxFiles = {
462-
onnxFileD0ToKPiConf,
463-
onnxFileDPlusToPiKPiConf,
464-
onnxFileDSToPiKKConf,
465-
onnxFileLcToPiKPConf,
466-
onnxFileXicToPiKPConf};
483+
if (applyML && ccdbTimestamp != 0) {
467484

485+
/// specific timestamp for models
486+
LOG(info) << "specific timestamp for models: " << ccdbTimestamp.value;
468487
for (auto iCharmPart{0}; iCharmPart < kNCharmParticles; ++iCharmPart) {
469488
if (onnxFiles[iCharmPart] != "") {
470489
if (singleThreadInference) {
471490
sessionOptions[iCharmPart].SetIntraOpNumThreads(1);
472491
sessionOptions[iCharmPart].SetInterOpNumThreads(1);
473492
}
474-
sessionML[iCharmPart].reset(new Ort::Experimental::Session{env[iCharmPart], onnxFiles[iCharmPart], sessionOptions[iCharmPart]});
475-
inputNamesML[iCharmPart] = sessionML[iCharmPart]->GetInputNames();
476-
inputShapesML[iCharmPart] = sessionML[iCharmPart]->GetInputShapes();
477-
if (inputShapesML[iCharmPart][0][0] < 0) {
478-
LOGF(warning, Form("Model for %s with negative input shape likely because converted with ummingbird, setting it to 1.", charmParticleNames[iCharmPart].data()));
479-
inputShapesML[iCharmPart][0][0] = 1;
493+
std::map<std::string, std::string> metadata;
494+
std::string tmp = mlModelPathCCDB.value + charmParticleNames[iCharmPart];
495+
bool retrieve_success = true;
496+
if (onnxFiles[iCharmPart].find("cvmfs") == std::string::npos) {
497+
retrieve_success = ccdbApi.retrieveBlob(tmp, ".", metadata, ccdbTimestamp.value, false, onnxFiles[iCharmPart]);
480498
}
481-
outputNamesML[iCharmPart] = sessionML[iCharmPart]->GetOutputNames();
482-
outputShapesML[iCharmPart] = sessionML[iCharmPart]->GetOutputShapes();
499+
if (retrieve_success) {
500+
sessionML[iCharmPart].reset(new Ort::Experimental::Session{env[iCharmPart], onnxFiles[iCharmPart], sessionOptions[iCharmPart]});
501+
inputNamesML[iCharmPart] = sessionML[iCharmPart]->GetInputNames();
502+
inputShapesML[iCharmPart] = sessionML[iCharmPart]->GetInputShapes();
503+
if (inputShapesML[iCharmPart][0][0] < 0) {
504+
LOGF(warning, Form("Model for %s with negative input shape likely because converted with ummingbird, setting it to 1.", charmParticleNames[iCharmPart].data()));
505+
inputShapesML[iCharmPart][0][0] = 1;
506+
}
507+
outputNamesML[iCharmPart] = sessionML[iCharmPart]->GetOutputNames();
508+
outputShapesML[iCharmPart] = sessionML[iCharmPart]->GetOutputShapes();
483509

484-
Ort::TypeInfo typeInfo = sessionML[iCharmPart]->GetInputTypeInfo(0);
485-
auto tensorInfo = typeInfo.GetTensorTypeAndShapeInfo();
486-
dataTypeML[iCharmPart] = tensorInfo.GetElementType();
510+
Ort::TypeInfo typeInfo = sessionML[iCharmPart]->GetInputTypeInfo(0);
511+
auto tensorInfo = typeInfo.GetTensorTypeAndShapeInfo();
512+
dataTypeML[iCharmPart] = tensorInfo.GetElementType();
513+
} else {
514+
LOG(fatal) << "Error encountered while fetching/loading the network from CCDB! Maybe the network doesn't exist yet for this runnumber/timestamp?";
515+
}
487516
}
488517
}
489518
}
490519
}
491-
492520
/// Single-track cuts for bachelor track of beauty candidates
493521
/// \param track is a track
494522
/// \param candType candidate type (3-prong or 4-prong beauty candidate)
@@ -823,10 +851,48 @@ struct HfFilter { // Main struct for HF triggers
823851
using BigTracksWithProtonPID = soa::Filtered<soa::Join<aod::BigTracksExtended, aod::TrackSelection, aod::pidTPCFullPr, aod::pidTOFFullPr>>;
824852

825853
void process(aod::Collision const& collision,
854+
aod::BCsWithTimestamps const&,
826855
HfTrackIndexProng2withColl const& cand2Prongs,
827856
HfTrackIndexProng3withColl const& cand3Prongs,
828857
BigTracksWithProtonPID const& tracks)
829858
{
859+
860+
if (applyML && ccdbTimestamp == 0 && onnxFiles[kD0].find("cvmfs") == std::string::npos && inputNamesML[kD0].size() == 0) {
861+
862+
auto bc = collision.bc_as<o2::aod::BCsWithTimestamps>();
863+
LOG(info) << "Fetching network for timestamp: " << bc.timestamp();
864+
865+
for (auto iCharmPart{0}; iCharmPart < kNCharmParticles; ++iCharmPart) {
866+
if (onnxFiles[iCharmPart] != "") {
867+
if (singleThreadInference) {
868+
sessionOptions[iCharmPart].SetIntraOpNumThreads(1);
869+
sessionOptions[iCharmPart].SetInterOpNumThreads(1);
870+
}
871+
std::map<std::string, std::string> metadata;
872+
std::string tmp = mlModelPathCCDB.value + charmParticleNames[iCharmPart];
873+
bool retrieve_success = ccdbApi.retrieveBlob(tmp, ".", metadata, bc.timestamp(), false, onnxFiles[iCharmPart]);
874+
if (retrieve_success) {
875+
876+
sessionML[iCharmPart].reset(new Ort::Experimental::Session{env[iCharmPart], onnxFiles[iCharmPart], sessionOptions[iCharmPart]});
877+
inputNamesML[iCharmPart] = sessionML[iCharmPart]->GetInputNames();
878+
inputShapesML[iCharmPart] = sessionML[iCharmPart]->GetInputShapes();
879+
if (inputShapesML[iCharmPart][0][0] < 0) {
880+
LOGF(warning, Form("Model for %s with negative input shape likely because converted with ummingbird, setting it to 1.", charmParticleNames[iCharmPart].data()));
881+
inputShapesML[iCharmPart][0][0] = 1;
882+
}
883+
outputNamesML[iCharmPart] = sessionML[iCharmPart]->GetOutputNames();
884+
outputShapesML[iCharmPart] = sessionML[iCharmPart]->GetOutputShapes();
885+
886+
Ort::TypeInfo typeInfo = sessionML[iCharmPart]->GetInputTypeInfo(0);
887+
auto tensorInfo = typeInfo.GetTensorTypeAndShapeInfo();
888+
dataTypeML[iCharmPart] = tensorInfo.GetElementType();
889+
} else {
890+
LOG(fatal) << "Error encountered while fetching/loading the network from CCDB! Maybe the network doesn't exist yet for this runnumber/timestamp?";
891+
}
892+
}
893+
}
894+
}
895+
830896
hProcessedEvents->Fill(0);
831897

832898
// collision process loop

EventFiltering/PWGUD/DGHelpers.h

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ struct DGSelector {
9393
}
9494

9595
// no activity in muon arm
96-
LOGF(debug, "Muons %i", fwdtracks.size());
97-
for (auto& muon : fwdtracks) {
98-
LOGF(debug, " %i / %f / %f / %f", muon.trackType(), muon.eta(), muon.pt(), muon.p());
96+
LOGF(debug, "FwdTracks %i", fwdtracks.size());
97+
for (auto& fwdtrack : fwdtracks) {
98+
LOGF(debug, " %i / %f / %f / %f", fwdtrack.trackType(), fwdtrack.eta(), fwdtrack.pt(), fwdtrack.p());
9999
}
100100
if (fwdtracks.size() > 0) {
101101
return 2;
@@ -178,6 +178,73 @@ struct DGSelector {
178178
return 0;
179179
};
180180

181+
template <typename BCs, typename TCs, typename FWs>
182+
int IsSelected(DGCutparHolder diffCuts, BCs& bc, TCs& tracks, FWs& fwdtracks)
183+
{
184+
// check that there are no FIT signals in bc
185+
// Double Gap (DG) condition
186+
if (!cleanFIT(bc, diffCuts.FITAmpLimits())) {
187+
return 1;
188+
}
189+
190+
// no activity in muon arm
191+
LOGF(debug, "FwdTracks %i", fwdtracks.size());
192+
for (auto& fwdtrack : fwdtracks) {
193+
LOGF(debug, " %i / %f / %f / %f", fwdtrack.trackType(), fwdtrack.eta(), fwdtrack.pt(), fwdtrack.p());
194+
}
195+
if (fwdtracks.size() > 0) {
196+
return 2;
197+
}
198+
199+
// number of tracks
200+
if ((int)tracks.size() < diffCuts.minNTracks() || (int)tracks.size() > diffCuts.maxNTracks()) {
201+
return 6;
202+
}
203+
204+
// PID, pt, and eta of tracks, invariant mass, and net charge
205+
// which particle hypothesis?
206+
auto mass2Use = 0.;
207+
TParticlePDG* pdgparticle = fPDG->GetParticle(diffCuts.pidHypothesis());
208+
if (pdgparticle != nullptr) {
209+
mass2Use = pdgparticle->Mass();
210+
}
211+
212+
auto netCharge = 0;
213+
auto lvtmp = TLorentzVector();
214+
auto ivm = TLorentzVector();
215+
for (auto& track : tracks) {
216+
// PID
217+
if (!hasGoodPID(diffCuts, track)) {
218+
return 7;
219+
}
220+
221+
// pt
222+
lvtmp.SetXYZM(track.px(), track.py(), track.pz(), mass2Use);
223+
if (lvtmp.Perp() < diffCuts.minPt() || lvtmp.Perp() > diffCuts.maxPt()) {
224+
return 8;
225+
}
226+
227+
// eta
228+
if (lvtmp.Eta() < diffCuts.minEta() || lvtmp.Eta() > diffCuts.maxEta()) {
229+
return 9;
230+
}
231+
netCharge += track.sign();
232+
ivm += lvtmp;
233+
}
234+
235+
// net charge
236+
if (netCharge < diffCuts.minNetCharge() || netCharge > diffCuts.maxNetCharge()) {
237+
return 10;
238+
}
239+
// invariant mass
240+
if (ivm.M() < diffCuts.minIVM() || ivm.M() > diffCuts.maxIVM()) {
241+
return 11;
242+
}
243+
244+
// if we arrive here then the event is good!
245+
return 0;
246+
};
247+
181248
private:
182249
TDatabasePDG* fPDG;
183250
};

0 commit comments

Comments
 (0)