@@ -39,6 +39,7 @@ namespace pid_studies
3939{
4040DECLARE_SOA_COLUMN (MassK0, massK0, float ); // ! Candidate mass
4141DECLARE_SOA_COLUMN (MassLambda, massLambda, float ); // ! Candidate mass
42+ DECLARE_SOA_COLUMN (MassOmega, massOmega, float ); // ! Candidate mass
4243DECLARE_SOA_COLUMN (PtPos, ptPos, float ); // ! Transverse momentum of positive track (GeV/c)
4344DECLARE_SOA_COLUMN (PtNeg, ptNeg, float ); // ! Transverse momentum of negative track (GeV/c)
4445DECLARE_SOA_COLUMN (Radius, radius, float ); // ! Radius
@@ -91,23 +92,42 @@ DECLARE_SOA_TABLE(pidV0s, "AOD", "PIDV0S", //! Table with PID information
9192 pid_studies::CentralityFT0M,
9293 pid_studies::CandFlag
9394 );
95+
96+ DECLARE_SOA_TABLE (pidCascades, " AOD" , " PIDCASCADES" , // ! Table with PID information
97+ // pid_studies::MassOmega,
98+ // pid_studies::PtPos,
99+ // pid_studies::PtNeg,
100+ // pid_studies::Radius,
101+ // pid_studies::Cpa,
102+ // pid_studies::NSigmaTpcPosKa,
103+ // pid_studies::NSigmaTpcNegKa,
104+ pid_studies::OccupancyFt0c,
105+ pid_studies::OccupancyIts,
106+ pid_studies::CentralityFT0C,
107+ pid_studies::CentralityFT0M,
108+ pid_studies::CandFlag
109+ );
94110} // namespace o2::aod
95111
96112
97113struct pidStudies {
98114 Produces <o2::aod::pidV0s> pidV0;
115+ Produces <o2::aod::pidCascades> pidCascade;
99116 HistogramRegistry registry{" registry" , {}};
100117
101118 using PIDTracks = soa::Join<aod::Tracks, aod::TracksExtra,
102119 aod::pidTPCFullPi, aod::pidTPCFullKa, aod::pidTPCFullPr,
103120 aod::pidTOFFullPi, aod::pidTOFFullKa, aod::pidTOFFullPr>;
104121 using CollSels = soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs, aod::CentFT0Ms>;
105122 using V0sMCRec = soa::Join<aod::V0Datas, aod::V0CoreMCLabels>;
123+ using CascsMCRec = soa::Join<aod::CascDatas, aod::CascCoreMCLabels>;
106124
107125 Configurable<float > massK0Min{" massK0Min" , 0.4 , " Minimum mass for K0" };
108126 Configurable<float > massK0Max{" massK0Max" , 0.6 , " Maximum mass for K0" };
109127 Configurable<float > massLambdaMin{" massLambdaMin" , 1.0 , " Minimum mass for lambda" };
110128 Configurable<float > massLambdaMax{" massLambdaMax" , 1.3 , " Maximum mass for lambda" };
129+ Configurable<float > massOmegaMin{" massOmegaMin" , 1.5 , " Minimum mass for omega" };
130+ Configurable<float > massOmegaMax{" massOmegaMax" , 1.8 , " Maximum mass for omega" };
111131
112132 void init (InitContext&)
113133 {
@@ -116,35 +136,54 @@ struct pidStudies {
116136 template <typename Cand>
117137 void fillTree (Cand const & candidate, const int & flag)
118138 {
119- const auto & posTrack = candidate.template posTrack_as <PIDTracks>();
120- const auto & negTrack = candidate.template negTrack_as <PIDTracks>();
121- pidV0 (
122- candidate.mK0Short (),
123- candidate.mLambda (),
124- posTrack.pt (),
125- negTrack.pt (),
126- candidate.v0radius (),
127- candidate.v0cosPA (),
128- posTrack.tofNSigmaPi (),
129- negTrack.tofNSigmaPi (),
130- posTrack.tofNSigmaKa (),
131- negTrack.tofNSigmaKa (),
132- posTrack.tofNSigmaPr (),
133- negTrack.tofNSigmaPr (),
134- posTrack.tpcNSigmaPi (),
135- negTrack.tpcNSigmaPi (),
136- posTrack.tpcNSigmaKa (),
137- negTrack.tpcNSigmaKa (),
138- posTrack.tpcNSigmaPr (),
139- negTrack.tpcNSigmaPr (),
140- candidate.alpha (),
141- candidate.qtarm (),
142- candidate.template collision_as <CollSels>().ft0cOccupancyInTimeRange (),
143- candidate.template collision_as <CollSels>().trackOccupancyInTimeRange (),
144- candidate.template collision_as <CollSels>().centFT0C (),
145- candidate.template collision_as <CollSels>().centFT0M (),
146- flag
147- );
139+ if constexpr (std::is_same<Cand, V0sMCRec::iterator>::value) {
140+ const auto & posTrack = candidate.template posTrack_as <PIDTracks>();
141+ const auto & negTrack = candidate.template negTrack_as <PIDTracks>();
142+ pidV0 (
143+ candidate.mK0Short (),
144+ candidate.mLambda (),
145+ posTrack.pt (),
146+ negTrack.pt (),
147+ candidate.v0radius (),
148+ candidate.v0cosPA (),
149+ posTrack.tofNSigmaPi (),
150+ negTrack.tofNSigmaPi (),
151+ posTrack.tofNSigmaKa (),
152+ negTrack.tofNSigmaKa (),
153+ posTrack.tofNSigmaPr (),
154+ negTrack.tofNSigmaPr (),
155+ posTrack.tpcNSigmaPi (),
156+ negTrack.tpcNSigmaPi (),
157+ posTrack.tpcNSigmaKa (),
158+ negTrack.tpcNSigmaKa (),
159+ posTrack.tpcNSigmaPr (),
160+ negTrack.tpcNSigmaPr (),
161+ candidate.alpha (),
162+ candidate.qtarm (),
163+ candidate.template collision_as <CollSels>().ft0cOccupancyInTimeRange (),
164+ candidate.template collision_as <CollSels>().trackOccupancyInTimeRange (),
165+ candidate.template collision_as <CollSels>().centFT0C (),
166+ candidate.template collision_as <CollSels>().centFT0M (),
167+ flag
168+ );
169+ } else {
170+ // const auto& posTrack = candidate.template posTrack_as<PIDTracks>();
171+ // const auto& negTrack = candidate.template negTrack_as<PIDTracks>();
172+ pidCascades (
173+ // candidate.mOmega(),
174+ // posTrack.pt(),
175+ // negTrack.pt(),
176+ // candidate.v0radius(),
177+ // candidate.v0cosPA(),
178+ // posTrack.tpcNSigmaKa(),
179+ // negTrack.tpcNSigmaKa(),
180+ candidate.template collision_as <CollSels>().ft0cOccupancyInTimeRange (),
181+ candidate.template collision_as <CollSels>().trackOccupancyInTimeRange (),
182+ candidate.template collision_as <CollSels>().centFT0C (),
183+ candidate.template collision_as <CollSels>().centFT0M (),
184+ flag
185+ );
186+ }
148187 }
149188
150189 template <typename T1>
@@ -154,32 +193,81 @@ struct pidStudies {
154193 if (!cand.has_v0MCCore ())
155194 return matched;
156195 auto v0MC = cand.template v0MCCore_as <aod::V0MCCores>();
157- int sign = 1 ;
158- if (v0MC.pdgCode () < 0 ) sign=-1 ;
159- if (v0MC.pdgCode () == sign*3122 && v0MC.pdgCodeNegative () == -sign*211
160- && v0MC.pdgCodePositive () == sign*2212 ) {
161- matched = sign*1 ;
196+ // LOG(info) << "v0MC.pdgCode() " << v0MC.pdgCode();
197+ // LOG(info) << "v0MC.pdgCodeNegative() " << v0MC.pdgCodeNegative();
198+ // LOG(info) << "v0MC.pdgCodePositive() " << v0MC.pdgCodePositive();
199+ if (v0MC.pdgCode () == 3122 && v0MC.pdgCodeNegative () == -211
200+ && v0MC.pdgCodePositive () == 2212 ) {
201+ matched = 1 ;
202+ }
203+ if (v0MC.pdgCode () == -3122 && v0MC.pdgCodeNegative () == -2212
204+ && v0MC.pdgCodePositive () == 211 ) {
205+ matched = -1 ;
162206 }
163- if (v0MC.pdgCode () == sign*310 && v0MC.pdgCodeNegative () == -sign*211
164- && v0MC.pdgCodePositive () == sign*211 ) {
165- matched = sign*2 ;
207+ if (v0MC.pdgCode () == 310 && v0MC.pdgCodeNegative () == -211
208+ && v0MC.pdgCodePositive () == 211 ) {
209+ matched = 2 ;
210+ }
211+ if (v0MC.pdgCode () == -310 && v0MC.pdgCodeNegative () == -211
212+ && v0MC.pdgCodePositive () == 211 ) {
213+ matched = -2 ;
214+ }
215+ }
216+ if constexpr (std::is_same<T1, CascsMCRec::iterator>::value) {
217+ if (!cand.has_cascMCCore ())
218+ return matched;
219+ LOG (info) << " Inside checker" ;
220+ auto cascMC = cand.template cascMCCore_as <aod::CascMCCores>();
221+ // LOG(info) << "cascMC.pdgCode() " << cascMC.pdgCode();
222+ // LOG(info) << "cascMC.pdgCodeBachelor() " << cascMC.pdgCodeBachelor();
223+ // LOG(info) << "cascMC.pdgCodeV0() " << cascMC.pdgCodeV0();
224+ // LOG(info) << "cascMC.pdgCodePositive() " << cascMC.pdgCodePositive();
225+ // LOG(info) << "cascMC.pdgCodeNegative() " << cascMC.pdgCodeNegative();
226+ if (cascMC.pdgCode () > 0 ) {
227+ if (cascMC.pdgCode () == 3334 &&
228+ cascMC.pdgCodeBachelor () == -321 &&
229+ cascMC.pdgCodeV0 () == 3122 &&
230+ cascMC.pdgCodePositive () == 2212 &&
231+ cascMC.pdgCodeNegative () == -211 ) {
232+ matched = 3 ;
233+ }
234+ } else {
235+ if (cascMC.pdgCode () == -3334 &&
236+ cascMC.pdgCodeBachelor () == 321 &&
237+ cascMC.pdgCodeV0 () == -3122 &&
238+ cascMC.pdgCodePositive () == 211 &&
239+ cascMC.pdgCodeNegative () == -2212 ) {
240+ matched = -3 ;
241+ }
166242 }
167243 }
168244 return matched;
169245 }
170246
171- void processMC (V0sMCRec const & V0s, aod::V0MCCores const & V0sMC, CollSels const &, PIDTracks const &)
172- {
247+ void processMC (V0sMCRec const & V0s, aod::V0MCCores const & V0sMC, CascsMCRec const & cascs,
248+ aod::CascMCCores const & cascsMC, CollSels const &, PIDTracks const &) {
173249 for (const auto & v0 : V0s) {
174250 if (v0.mK0Short () > massK0Min && v0.mK0Short () < massK0Max ||
175- v0.mLambda () > massLambdaMin && v0.mLambda () < massLambdaMax ||
176- v0.mAntiLambda () > massLambdaMin && v0.mAntiLambda () < massLambdaMax) {
177- int matched = isMatched (v0);
251+ v0.mLambda () > massLambdaMin && v0.mLambda () < massLambdaMax ||
252+ v0.mAntiLambda () > massLambdaMin && v0.mAntiLambda () < massLambdaMax) {
253+ int matched = isMatched (v0);
178254 if (matched != 0 ) {
179255 fillTree (v0, matched);
180256 }
181257 }
182258 }
259+ for (const auto & casc : cascs) {
260+ LOG (info) << " checking omega" ;
261+ if (casc.mOmega () > massOmegaMin && casc.mOmega () < massOmegaMax) {
262+ LOG (info) << " mass passed" ;
263+ int matched = isMatched (casc);
264+ if (matched != 0 ) {
265+ LOG (info) << " Matched omega" ;
266+ // fillTree(casc, matched);
267+ }
268+ }
269+ }
270+
183271 }
184272 PROCESS_SWITCH (pidStudies, processMC, " process MC" , true );
185273
0 commit comments