3737#include " Common/DataModel/PIDResponseTPC.h"
3838#include " Common/DataModel/TrackSelectionTables.h"
3939
40- #include " Framework/RunningWorkflowInfo.h"
4140#include < CCDB/BasicCCDBManager.h>
4241#include < CCDB/CcdbApi.h>
4342#include < CommonConstants/PhysicsConstants.h>
5150#include < Framework/AnalysisTask.h>
5251#include < Framework/Array2D.h>
5352#include < Framework/Configurable.h>
53+ #include < Framework/DeviceSpec.h>
5454#include < Framework/HistogramRegistry.h>
5555#include < Framework/HistogramSpec.h>
5656#include < Framework/InitContext.h>
57+ #include < Framework/RunningWorkflowInfo.h>
5758#include < Framework/runDataProcessing.h>
5859#include < ReconstructionDataFormats/Track.h>
5960
6061#include < TH1.h>
6162#include < TH2.h>
62- #include < TJAlienCredentials.h>
6363#include < TRandom3.h>
6464#include < TString.h>
6565
@@ -157,10 +157,7 @@ struct HfFilter { // Main struct for HF triggers
157157 Configurable<bool > acceptBdtBkgOnly{" acceptBdtBkgOnly" , true , " Enable / disable selection based on BDT bkg score only" };
158158
159159 // CCDB configuration
160- o2::ccdb::CcdbApi ccdbApi;
161- Service<o2::ccdb::BasicCCDBManager> ccdb;
162160 Configurable<std::string> url{" ccdb-url" , " http://alice-ccdb.cern.ch" , " url of the ccdb repository" };
163- int currentRun{0 }; // needed to detect if the run changed and trigger update of calibrations etc.
164161
165162 // TPC PID calibrations
166163 Configurable<int > setTPCCalib{" setTPCCalib" , 0 , " 0 is not use re-calibrations, 1 is compute TPC post-calibrated n-sigmas, 2 is using TPC Spline" };
@@ -170,7 +167,7 @@ struct HfFilter { // Main struct for HF triggers
170167 Configurable<std::string> ccdbBBAntiPion{" ccdbBBAntiPion" , " Users/l/lserksny/PIDAntiPion" , " Path to the CCDB ocject for antiPion BB param" };
171168 Configurable<std::string> ccdbBBKaon{" ccdbBBKaon" , " Users/l/lserksny/PIDPion" , " Path to the CCDB ocject for Kaon BB param" };
172169 Configurable<std::string> ccdbBBAntiKaon{" ccdbBBAntiKaon" , " Users/l/lserksny/PIDAntiPion" , " Path to the CCDB ocject for antiKaon BB param" };
173- Configurable<string> ccdbPathTPC{" ccdbPathTPC" , " Users/i/iarsene/Calib/TPCpostCalib" , " base path to the CCDB object" };
170+ Configurable<std:: string> ccdbPathTPC{" ccdbPathTPC" , " Users/i/iarsene/Calib/TPCpostCalib" , " base path to the CCDB object" };
174171
175172 // parameter for Optimisation Tree
176173 Configurable<bool > applyOptimisation{" applyOptimisation" , false , " Flag to enable or disable optimisation" };
@@ -179,6 +176,27 @@ struct HfFilter { // Main struct for HF triggers
179176 Configurable<bool > applyDownscale{" applyDownscale" , false , " Flag to enable or disable the application of downscale factors" };
180177 Configurable<LabeledArray<double >> downscaleFactors{" downscaleFactors" , {defDownscaleFactors[0 ], kNtriggersHF , 1 , hfTriggerNames, labelsDownscaleFactor}, " Downscale factors for each trigger (from 0 to 1)" };
181178
179+ Service<o2::ccdb::BasicCCDBManager> ccdb;
180+
181+ using BigTracksMCPID = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullDe, aod::pidTOFFullDe, aod::McTrackLabels>;
182+ using BigTracksPID = soa::Join<aod::Tracks, aod::TracksWCovDcaExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullDe, aod::pidTOFFullDe>;
183+ using TracksIUPID = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullPi, aod::pidTOFFullPi>;
184+ using CollsWithEvSel = soa::Join<aod::Collisions, aod::EvSels>;
185+
186+ using Hf2ProngsWithMl = soa::Join<aod::Hf2Prongs, aod::Hf2ProngMlProbs>;
187+ using Hf3ProngsWithMl = soa::Join<aod::Hf3Prongs, aod::Hf3ProngMlProbs>;
188+
189+ Preslice<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;
190+ Preslice<aod::V0s> v0sPerCollision = aod::v0::collisionId;
191+ Preslice<Hf2ProngsWithMl> hf2ProngPerCollision = aod::track_association::collisionId;
192+ Preslice<Hf3ProngsWithMl> hf3ProngPerCollision = aod::track_association::collisionId;
193+ Preslice<aod::Cascades> cascPerCollision = aod::cascade::collisionId;
194+ Preslice<aod::V0PhotonsKF> photonsPerCollision = aod::v0photonkf::collisionId;
195+ PresliceUnsorted<aod::AssignedTrackedCascades> trackedCascadesPerCollision = aod::track::collisionId;
196+
197+ o2::ccdb::CcdbApi ccdbApi;
198+ int currentRun{0 }; // needed to detect if the run changed and trigger update of calibrations etc.
199+
182200 // array of BDT thresholds
183201 std::array<LabeledArray<double >, kNCharmParticles > thresholdBDTScores;
184202
@@ -189,7 +207,6 @@ struct HfFilter { // Main struct for HF triggers
189207 o2::vertexing::DCAFitterN<3 > dfBtoDstar; // fitter for Beauty Hadron to D* vertex (3-prong vertex fitter)
190208 o2::vertexing::DCAFitterN<2 > dfStrangeness; // fitter for V0s and cascades (2-prong vertex fitter)
191209
192- HistogramRegistry registry{" registry" };
193210 std::shared_ptr<TH1> hProcessedEvents;
194211
195212 // QA histos
@@ -218,6 +235,8 @@ struct HfFilter { // Main struct for HF triggers
218235 // helper object
219236 HfFilterHelper helper;
220237
238+ HistogramRegistry registry{" registry" };
239+
221240 void init (InitContext& initContext)
222241 {
223242 helper.setHighPtTriggerThresholds (ptThresholds->get (0u , 0u ), ptThresholds->get (0u , 1u ));
@@ -404,22 +423,6 @@ struct HfFilter { // Main struct for HF triggers
404423 thresholdBDTScores = {thresholdBDTScoreD0ToKPi, thresholdBDTScoreDPlusToPiKPi, thresholdBDTScoreDSToPiKK, thresholdBDTScoreLcToPiKP, thresholdBDTScoreXicToPiKP};
405424 }
406425
407- using BigTracksMCPID = soa::Join<aod::Tracks, aod::TracksExtra, aod::TracksDCA, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullDe, aod::pidTOFFullDe, aod::McTrackLabels>;
408- using BigTracksPID = soa::Join<aod::Tracks, aod::TracksWCovDcaExtra, aod::TracksDCA, aod::TrackSelection, aod::pidTPCFullPi, aod::pidTOFFullPi, aod::pidTPCFullKa, aod::pidTOFFullKa, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullDe, aod::pidTOFFullDe>;
409- using TracksIUPID = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::pidTPCFullPr, aod::pidTOFFullPr, aod::pidTPCFullPi, aod::pidTOFFullPi>;
410- using CollsWithEvSel = soa::Join<aod::Collisions, aod::EvSels>;
411-
412- using Hf2ProngsWithMl = soa::Join<aod::Hf2Prongs, aod::Hf2ProngMlProbs>;
413- using Hf3ProngsWithMl = soa::Join<aod::Hf3Prongs, aod::Hf3ProngMlProbs>;
414-
415- Preslice<aod::TrackAssoc> trackIndicesPerCollision = aod::track_association::collisionId;
416- Preslice<aod::V0s> v0sPerCollision = aod::v0::collisionId;
417- Preslice<Hf2ProngsWithMl> hf2ProngPerCollision = aod::track_association::collisionId;
418- Preslice<Hf3ProngsWithMl> hf3ProngPerCollision = aod::track_association::collisionId;
419- Preslice<aod::Cascades> cascPerCollision = aod::cascade::collisionId;
420- Preslice<aod::V0PhotonsKF> photonsPerCollision = aod::v0photonkf::collisionId;
421- PresliceUnsorted<aod::AssignedTrackedCascades> trackedCascadesPerCollision = aod::track::collisionId;
422-
423426 void process (CollsWithEvSel const & collisions,
424427 aod::BCsWithTimestamps const &,
425428 aod::V0s const & v0s,
0 commit comments