Skip to content

Commit 70dcaa6

Browse files
committed
add a rejection function for UPC and avoid run2 case
1 parent bcd8921 commit 70dcaa6

20 files changed

+2049
-2140
lines changed

PWGHF/D2H/TableProducer/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,17 @@ o2physics_add_dpl_workflow(candidate-selector-lb-to-lc-pi-reduced
6767

6868
o2physics_add_dpl_workflow(data-creator-charm-had-pi-reduced
6969
SOURCES dataCreatorCharmHadPiReduced.cxx
70-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
70+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils
7171
COMPONENT_NAME Analysis)
7272

7373
o2physics_add_dpl_workflow(data-creator-charm-reso-reduced
7474
SOURCES dataCreatorCharmResoReduced.cxx
75-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
75+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
7676
COMPONENT_NAME Analysis)
7777

7878
o2physics_add_dpl_workflow(data-creator-jpsi-had-reduced
7979
SOURCES dataCreatorJpsiHadReduced.cxx
80-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
80+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
8181
COMPONENT_NAME Analysis)
8282

8383
# Converters

PWGHF/D2H/TableProducer/dataCreatorCharmHadPiReduced.cxx

Lines changed: 1486 additions & 1647 deletions
Large diffs are not rendered by default.

PWGHF/D2H/TableProducer/dataCreatorCharmResoReduced.cxx

Lines changed: 44 additions & 40 deletions
Large diffs are not rendered by default.

PWGHF/D2H/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ o2physics_add_dpl_workflow(task-dstar-to-d0-pi
8686

8787
o2physics_add_dpl_workflow(task-flow-charm-hadrons
8888
SOURCES taskFlowCharmHadrons.cxx
89-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
89+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
9090
COMPONENT_NAME Analysis)
9191

9292
o2physics_add_dpl_workflow(task-lb

PWGHF/D2H/Tasks/taskFlowCharmHadrons.cxx

Lines changed: 54 additions & 130 deletions
Large diffs are not rendered by default.

PWGHF/D2H/Utils/utilsRedDataFormat.h

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@
1616
#ifndef PWGHF_D2H_UTILS_UTILSREDDATAFORMAT_H_
1717
#define PWGHF_D2H_UTILS_UTILSREDDATAFORMAT_H_
1818

19-
#include "PWGHF/Core/CentralityEstimation.h"
20-
#include "PWGHF/Utils/utilsEvSelHf.h"
19+
#include <cmath>
20+
21+
#include <Rtypes.h>
2122

2223
#include "CCDB/BasicCCDBManager.h"
2324
#include "Framework/AnalysisHelpers.h"
2425
#include "Framework/HistogramRegistry.h"
2526

26-
#include <Rtypes.h>
27-
28-
#include <cmath>
27+
#include "PWGHF/Core/CentralityEstimation.h"
28+
#include "PWGHF/Utils/utilsEvSelHf.h"
2929

3030
namespace o2::hf_evsel
3131
{
@@ -37,7 +37,7 @@ template <bool useEvSel, o2::hf_centrality::CentralityEstimator centEstimator, t
3737
void checkEvSel(Coll const& collision, o2::hf_evsel::HfEventSelection& hfEvSel, int& zvtxColl, int& sel8Coll, int& zvtxAndSel8Coll, int& zvtxAndSel8CollAndSoftTrig, int& allSelColl, o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, o2::framework::HistogramRegistry& registry)
3838
{
3939
float centrality{-1.f};
40-
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<useEvSel, o2::hf_centrality::CentralityEstimator::None, BCs>(collision, centrality, ccdb, registry, nullptr);
40+
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<useEvSel, o2::hf_centrality::CentralityEstimator::None, BCs>(collision, centrality, ccdb, registry);
4141
if (!TESTBIT(rejectionMask, o2::hf_evsel::EventRejection::Trigger)) {
4242
sel8Coll++;
4343
}
@@ -81,31 +81,6 @@ float getTpcTofNSigmaPi1(const T1& prong1)
8181
}
8282
return defaultNSigma;
8383
}
84-
85-
/// Helper function to retrive PID information of bachelor kaon from b-hadron decay
86-
/// \param prong1 kaon track from reduced data format, aod::HfRedBachProng0Tracks
87-
/// \return the combined TPC and TOF n-sigma for kaon
88-
template <typename T1>
89-
float getTpcTofNSigmaKa1(const T1& prong1)
90-
{
91-
float defaultNSigma = -999.f; // -999.f is the default value set in TPCPIDResponse.h and PIDTOF.h
92-
93-
bool hasTpc = prong1.hasTPC();
94-
bool hasTof = prong1.hasTOF();
95-
96-
if (hasTpc && hasTof) {
97-
float tpcNSigma = prong1.tpcNSigmaKa();
98-
float tofNSigma = prong1.tofNSigmaKa();
99-
return std::sqrt(.5f * tpcNSigma * tpcNSigma + .5f * tofNSigma * tofNSigma);
100-
}
101-
if (hasTpc) {
102-
return std::abs(prong1.tpcNSigmaKa());
103-
}
104-
if (hasTof) {
105-
return std::abs(prong1.tofNSigmaKa());
106-
}
107-
return defaultNSigma;
108-
}
10984
} // namespace o2::pid_tpc_tof_utils
11085

11186
#endif // PWGHF_D2H_UTILS_UTILSREDDATAFORMAT_H_

PWGHF/HFC/TableProducer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ o2physics_add_dpl_workflow(correlator-lc-sc-hadrons
7171

7272
o2physics_add_dpl_workflow(femto-dream-producer
7373
SOURCES femtoDreamProducer.cxx
74-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils O2Physics::MLCore O2Physics::SGCutParHolder
74+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils O2Physics::MLCore
7575
COMPONENT_NAME Analysis)

PWGHF/HFC/TableProducer/femtoDreamProducer.cxx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,36 +14,39 @@
1414
/// \author Ravindra Singh, GSI, ravindra.singh@cern.ch
1515
/// \author Biao Zhang, Heidelberg University, biao.zhang@cern.ch
1616

17-
#include "PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h"
18-
#include "PWGCF/FemtoDream/Core/femtoDreamTrackSelection.h"
19-
#include "PWGCF/FemtoDream/Core/femtoDreamUtils.h"
20-
#include "PWGHF/Core/CentralityEstimation.h"
21-
#include "PWGHF/Core/HfHelper.h"
22-
#include "PWGHF/Core/HfMlResponseLcToPKPi.h"
23-
#include "PWGHF/Core/SelectorCuts.h"
24-
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
25-
#include "PWGHF/DataModel/CandidateSelectionTables.h"
26-
#include "PWGHF/Utils/utilsBfieldCCDB.h"
27-
#include "PWGHF/Utils/utilsEvSelHf.h"
17+
#include <string>
18+
#include <vector>
19+
20+
#include "TMCProcess.h"
21+
22+
#include "CCDB/BasicCCDBManager.h"
2823

2924
#include "Common/Core/trackUtilities.h"
30-
#include "Common/DataModel/Centrality.h"
3125
#include "Common/DataModel/EventSelection.h"
3226
#include "Common/DataModel/Multiplicity.h"
27+
#include "Common/DataModel/Centrality.h"
3328

34-
#include "CCDB/BasicCCDBManager.h"
3529
#include "DataFormatsParameters/GRPMagField.h"
3630
#include "DataFormatsParameters/GRPObject.h"
3731
#include "DetectorsBase/Propagator.h"
32+
3833
#include "Framework/ASoAHelpers.h"
3934
#include "Framework/AnalysisTask.h"
4035
#include "Framework/HistogramRegistry.h"
4136
#include "Framework/runDataProcessing.h"
4237

43-
#include "TMCProcess.h"
38+
#include "PWGCF/FemtoDream/Core/femtoDreamCollisionSelection.h"
39+
#include "PWGCF/FemtoDream/Core/femtoDreamTrackSelection.h"
40+
#include "PWGCF/FemtoDream/Core/femtoDreamUtils.h"
4441

45-
#include <string>
46-
#include <vector>
42+
#include "PWGHF/Core/HfHelper.h"
43+
#include "PWGHF/Core/HfMlResponseLcToPKPi.h"
44+
#include "PWGHF/DataModel/CandidateReconstructionTables.h"
45+
#include "PWGHF/DataModel/CandidateSelectionTables.h"
46+
#include "PWGHF/Utils/utilsBfieldCCDB.h"
47+
#include "PWGHF/Utils/utilsEvSelHf.h"
48+
#include "PWGHF/Core/CentralityEstimation.h"
49+
#include "PWGHF/Core/SelectorCuts.h"
4750

4851
using namespace o2;
4952
using namespace o2::framework;
@@ -407,7 +410,7 @@ struct HfFemtoDreamProducer {
407410
multNtr = col.multTracklets();
408411
}
409412

410-
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCFullInfos>(col, mult, ccdb, qaRegistry, nullptr);
413+
const auto rejectionMask = hfEvSel.getHfCollisionRejectionMask<true, CentralityEstimator::None, aod::BCsWithTimestamps>(col, mult, ccdb, qaRegistry);
411414

412415
qaRegistry.fill(HIST("hEventQA"), 1 + Event::All);
413416

PWGHF/TableProducer/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ o2physics_add_dpl_workflow(candidate-creator-bs
6262

6363
o2physics_add_dpl_workflow(candidate-creator-cascade
6464
SOURCES candidateCreatorCascade.cxx
65-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
65+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils
6666
COMPONENT_NAME Analysis)
6767

6868
o2physics_add_dpl_workflow(candidate-creator-dstar
6969
SOURCES candidateCreatorDstar.cxx
70-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
70+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
7171
COMPONENT_NAME Analysis)
7272

7373
o2physics_add_dpl_workflow(candidate-creator-lb
@@ -87,12 +87,12 @@ o2physics_add_dpl_workflow(candidate-creator-sigmac0plusplus-cascade
8787

8888
o2physics_add_dpl_workflow(candidate-creator-xic0-omegac0
8989
SOURCES candidateCreatorXic0Omegac0.cxx
90-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils KFParticle::KFParticle O2Physics::SGCutParHolder
90+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils KFParticle::KFParticle
9191
COMPONENT_NAME Analysis)
9292

9393
o2physics_add_dpl_workflow(candidate-creator-xic-to-xi-pi-pi
9494
SOURCES candidateCreatorXicToXiPiPi.cxx
95-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::EventFilteringUtils O2Physics::SGCutParHolder
95+
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter KFParticle::KFParticle O2Physics::EventFilteringUtils
9696
COMPONENT_NAME Analysis)
9797

9898
o2physics_add_dpl_workflow(candidate-creator-xicc

0 commit comments

Comments
 (0)