Skip to content

Commit 1003041

Browse files
committed
Tuning TOF PID for strangeness tasks
1 parent b246336 commit 1003041

File tree

3 files changed

+481
-89
lines changed

3 files changed

+481
-89
lines changed

PWGLF/DataModel/LFStrangenessPIDTables.h

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,45 @@ DECLARE_SOA_COLUMN(TOFNSigmaALaPi, tofNSigmaALaPi, float); //! positive
7979
DECLARE_SOA_COLUMN(TOFNSigmaK0PiPlus, tofNSigmaK0PiPlus, float); //! positive track NSigma from pion <- k0short expectation
8080
DECLARE_SOA_COLUMN(TOFNSigmaK0PiMinus, tofNSigmaK0PiMinus, float); //! negative track NSigma from pion <- k0short expectation
8181

82+
// dynamics based on n-sigmas with use-only-if-tof-present logic
83+
DECLARE_SOA_DYNAMIC_COLUMN(TofLambdaCompatibility, tofLambdaCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas
84+
[](float tofNSigmaLaPr, float tofNSigmaLaPi, float nsigma) -> float {
85+
bool compatible = true;
86+
if(std::abs(tofNSigmaLaPr+1000.0f)>1e-3 && std::abs(tofNSigmaLaPr)>nsigma){
87+
compatible = false; // reject only if info present and incompatible
88+
}
89+
if(std::abs(tofNSigmaLaPi+1000.0f)>1e-3 && std::abs(tofNSigmaLaPi)>nsigma){
90+
compatible = false; // reject only if info present and incompatible
91+
}
92+
return compatible;
93+
});
94+
95+
// dynamics based on n-sigmas with use-only-if-tof-present logic
96+
DECLARE_SOA_DYNAMIC_COLUMN(TofAntiLambdaCompatibility, tofAntiLambdaCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas
97+
[](float tofNSigmaALaPr, float tofNSigmaALaPi, float nsigma) -> float {
98+
bool compatible = true;
99+
if(std::abs(tofNSigmaALaPr+1000.0f)>1e-3 && std::abs(tofNSigmaALaPr)>nsigma){
100+
compatible = false; // reject only if info present and incompatible
101+
}
102+
if(std::abs(tofNSigmaALaPi+1000.0f)>1e-3 && std::abs(tofNSigmaALaPi)>nsigma){
103+
compatible = false; // reject only if info present and incompatible
104+
}
105+
return compatible;
106+
});
107+
108+
// dynamics based on n-sigmas with use-only-if-tof-present logic
109+
DECLARE_SOA_DYNAMIC_COLUMN(TofK0ShortCompatibility, tofK0ShortCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas
110+
[](float tofNSigmaK0PiPlus, float tofNSigmaK0PiMinus, float nsigma) -> float {
111+
bool compatible = true;
112+
if(std::abs(tofNSigmaK0PiPlus+1000.0f)>1e-3 && std::abs(tofNSigmaK0PiPlus)>nsigma){
113+
compatible = false; // reject only if info present and incompatible
114+
}
115+
if(std::abs(tofNSigmaK0PiMinus+1000.0f)>1e-3 && std::abs(tofNSigmaK0PiMinus)>nsigma){
116+
compatible = false; // reject only if info present and incompatible
117+
}
118+
return compatible;
119+
});
120+
82121
// beta values
83122
DECLARE_SOA_COLUMN(TofBetaLambda, tofBetaLambda, float); //! beta value with Lambda hypothesis
84123
DECLARE_SOA_COLUMN(TofBetaAntiLambda, tofBetaAntiLambda, float); //! beta value with AntiLambda hypothesis
@@ -120,7 +159,10 @@ DECLARE_SOA_TABLE(V0TOFBetas, "AOD", "V0TOFBETA", // processed info table (for a
120159
DECLARE_SOA_TABLE(V0TOFNSigmas, "AOD", "V0TOFNSIGMA", // processed NSigma table (for analysis)
121160
v0data::TOFNSigmaLaPr, v0data::TOFNSigmaLaPi,
122161
v0data::TOFNSigmaALaPr, v0data::TOFNSigmaALaPi,
123-
v0data::TOFNSigmaK0PiPlus, v0data::TOFNSigmaK0PiMinus);
162+
v0data::TOFNSigmaK0PiPlus, v0data::TOFNSigmaK0PiMinus,
163+
v0data::TofLambdaCompatibility<v0data::TOFNSigmaLaPr, v0data::TOFNSigmaLaPi>,
164+
v0data::TofAntiLambdaCompatibility<v0data::TOFNSigmaALaPr, v0data::TOFNSigmaALaPi>,
165+
v0data::TofK0ShortCompatibility<v0data::TOFNSigmaK0PiPlus, v0data::TOFNSigmaK0PiMinus>);
124166

125167
namespace cascdata
126168
{
@@ -154,6 +196,39 @@ DECLARE_SOA_COLUMN(TOFNSigmaXiPi, tofNSigmaXiPi, float); //! bachelor track
154196
DECLARE_SOA_COLUMN(TOFNSigmaOmLaPi, tofNSigmaOmLaPi, float); //! meson track NSigma from pion <- lambda <- om expectation
155197
DECLARE_SOA_COLUMN(TOFNSigmaOmLaPr, tofNSigmaOmLaPr, float); //! baryon track NSigma from proton <- lambda <- om expectation
156198
DECLARE_SOA_COLUMN(TOFNSigmaOmKa, tofNSigmaOmKa, float); //! bachelor track NSigma from kaon <- om expectation
199+
200+
// dynamics based on n-sigmas with use-only-if-tof-present logic
201+
DECLARE_SOA_DYNAMIC_COLUMN(TofXiCompatibility, tofXiCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas
202+
[](float tofNSigmaXiLaPr, float tofNSigmaXiLaPi, float tofNSigmaXiPi, float nsigma) -> float {
203+
bool compatible = true;
204+
if(std::abs(tofNSigmaXiLaPr+1000.0f)>1e-3 && std::abs(tofNSigmaXiLaPr)>nsigma){
205+
compatible = false; // reject only if info present and incompatible
206+
}
207+
if(std::abs(tofNSigmaXiLaPi+1000.0f)>1e-3 && std::abs(tofNSigmaXiLaPi)>nsigma){
208+
compatible = false; // reject only if info present and incompatible
209+
}
210+
if(std::abs(tofNSigmaXiPi+1000.0f)>1e-3 && std::abs(tofNSigmaXiPi)>nsigma){
211+
compatible = false; // reject only if info present and incompatible
212+
}
213+
return compatible;
214+
});
215+
216+
DECLARE_SOA_DYNAMIC_COLUMN(TofOmCompatibility, tofOmCompatibility, //! compatibility with being lambda, checked only if TOF present. Argument: number of sigmas
217+
[](float tofNSigmaOmLaPr, float tofNSigmaOmLaPi, float tofNSigmaOmKa, float nsigma) -> float {
218+
bool compatible = true;
219+
if(std::abs(tofNSigmaOmLaPr+1000.0f)>1e-3 && std::abs(tofNSigmaOmLaPr)>nsigma){
220+
compatible = false; // reject only if info present and incompatible
221+
}
222+
if(std::abs(tofNSigmaOmLaPi+1000.0f)>1e-3 && std::abs(tofNSigmaOmLaPi)>nsigma){
223+
compatible = false; // reject only if info present and incompatible
224+
}
225+
if(std::abs(tofNSigmaOmKa+1000.0f)>1e-3 && std::abs(tofNSigmaOmKa)>nsigma){
226+
compatible = false; // reject only if info present and incompatible
227+
}
228+
return compatible;
229+
});
230+
231+
157232
} // namespace cascdata
158233

159234
// /-|-\-|-/-|-\-|-/-|-\-|-/-|-\-|-/-|-\-|-/-|-\-|-/-|-\-|-/-|-\-|-/-|-\-|-/-|-\-|-/
@@ -173,7 +248,9 @@ DECLARE_SOA_TABLE(CascTOFPIDs, "AOD", "CASCTOFPID", // processed information for
173248
cascdata::BachTOFDeltaTOmKa);
174249
DECLARE_SOA_TABLE(CascTOFNSigmas, "AOD", "CascTOFNSigmas", // Nsigmas for cascades
175250
cascdata::TOFNSigmaXiLaPi, cascdata::TOFNSigmaXiLaPr, cascdata::TOFNSigmaXiPi,
176-
cascdata::TOFNSigmaOmLaPi, cascdata::TOFNSigmaOmLaPr, cascdata::TOFNSigmaOmKa);
251+
cascdata::TOFNSigmaOmLaPi, cascdata::TOFNSigmaOmLaPr, cascdata::TOFNSigmaOmKa,
252+
cascdata::TofXiCompatibility<cascdata::TOFNSigmaXiLaPr, cascdata::TOFNSigmaXiLaPi, cascdata::TOFNSigmaXiPi>,
253+
cascdata::TofOmCompatibility<cascdata::TOFNSigmaOmLaPr, cascdata::TOFNSigmaOmLaPi, cascdata::TOFNSigmaOmKa>);
177254
} // namespace o2::aod
178255

179256
#endif // PWGLF_DATAMODEL_LFSTRANGENESSPIDTABLES_H_

PWGLF/TableProducer/Strangeness/CMakeLists.txt

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ o2physics_add_dpl_workflow(cascademcfinder
3636
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
3737
COMPONENT_NAME Analysis)
3838

39-
o2physics_add_dpl_workflow(cascadepid
40-
SOURCES cascadepid.cxx
39+
o2physics_add_dpl_workflow(strangenesstofpid
40+
SOURCES strangenesstofpid.cxx
4141
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsBase
4242
COMPONENT_NAME Analysis)
4343

@@ -81,11 +81,6 @@ o2physics_add_dpl_workflow(lambdakzeromcfinder
8181
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
8282
COMPONENT_NAME Analysis)
8383

84-
o2physics_add_dpl_workflow(lambdakzeropid
85-
SOURCES lambdakzeropid.cxx
86-
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DetectorsBase
87-
COMPONENT_NAME Analysis)
88-
8984
o2physics_add_dpl_workflow(lambdakzerospawner
9085
SOURCES lambdakzerospawner.cxx
9186
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore

0 commit comments

Comments
 (0)