@@ -54,8 +54,6 @@ using namespace o2;
5454using namespace o2 ::framework;
5555using namespace o2 ::framework::expressions;
5656using std::array;
57- using std::cout;
58- using std::endl;
5957using dauTracks = soa::Join<aod::DauTrackExtras, aod::DauTrackTPCPIDs>;
6058using V0DerivedMCDatas = soa::Join<aod::V0Cores, aod::V0CollRefs, aod::V0Extras, aod::V0MCDatas>;
6159using V0MLDerivedDatas = soa::Join<aod::V0Cores, aod::V0CollRefs, aod::V0Extras, aod::V0LambdaMLScores, aod::V0GammaMLScores, aod::V0AntiLambdaMLScores>;
@@ -86,54 +84,93 @@ struct sigma0builder {
8684
8785 // For standard approach:
8886 // // Lambda criteria:
89- Configurable<float > LambdaDauPseudoRap{" LambdaDauPseudoRap" , 1.0 , " Max pseudorapidity of daughter tracks" };
90- Configurable<float > LambdaMinDCANegToPv{" LambdaMinDCANegToPv" , . 01 , " min DCA Neg To PV (cm)" };
91- Configurable<float > LambdaMinDCAPosToPv{" LambdaMinDCAPosToPv" , . 01 , " min DCA Pos To PV (cm)" };
87+ Configurable<float > LambdaDauPseudoRap{" LambdaDauPseudoRap" , 1.5 , " Max pseudorapidity of daughter tracks" };
88+ Configurable<float > LambdaMinDCANegToPv{" LambdaMinDCANegToPv" , 0.0 , " min DCA Neg To PV (cm)" };
89+ Configurable<float > LambdaMinDCAPosToPv{" LambdaMinDCAPosToPv" , 0.0 , " min DCA Pos To PV (cm)" };
9290 Configurable<float > LambdaMaxDCAV0Dau{" LambdaMaxDCAV0Dau" , 3.5 , " Max DCA V0 Daughters (cm)" };
93- Configurable<float > LambdaMinv0radius{" LambdaMinv0radius" , 0.1 , " Min V0 radius (cm)" };
94- Configurable<float > LambdaMaxv0radius{" LambdaMaxv0radius" , 200 , " Max V0 radius (cm)" };
95- Configurable<float > LambdaWindow{" LambdaWindow" , 0.01 , " Mass window around expected (in GeV/c2)" };
91+ Configurable<float > LambdaMinv0radius{" LambdaMinv0radius" , 0.0 , " Min V0 radius (cm)" };
92+ Configurable<float > LambdaMaxv0radius{" LambdaMaxv0radius" , 60 , " Max V0 radius (cm)" };
93+ Configurable<float > LambdaWindow{" LambdaWindow" , 0.05 , " Mass window around expected (in GeV/c2)" };
9694
9795 // // Photon criteria:
98- Configurable<float > PhotonMaxDauPseudoRap{" PhotonMaxDauPseudoRap" , 1.0 , " Max pseudorapidity of daughter tracks" };
99- Configurable<float > PhotonMinDCAToPv{" PhotonMinDCAToPv" , 0.001 , " Min DCA daughter To PV (cm)" };
100- Configurable<float > PhotonMaxDCAV0Dau{" PhotonMaxDCAV0Dau" , 3.0 , " Max DCA V0 Daughters (cm)" };
101- Configurable<float > PhotonMinRadius{" PhotonMinRadius" , 0.5 , " Min photon conversion radius (cm)" };
102- Configurable<float > PhotonMaxRadius{" PhotonMaxRadius" , 250 , " Max photon conversion radius (cm)" };
96+ Configurable<float > PhotonMaxDauPseudoRap{" PhotonMaxDauPseudoRap" , 1.5 , " Max pseudorapidity of daughter tracks" };
97+ Configurable<float > PhotonMinDCAToPv{" PhotonMinDCAToPv" , 0.0 , " Min DCA daughter To PV (cm)" };
98+ Configurable<float > PhotonMaxDCAV0Dau{" PhotonMaxDCAV0Dau" , 3.5 , " Max DCA V0 Daughters (cm)" };
99+ Configurable<float > PhotonMinRadius{" PhotonMinRadius" , 0.0 , " Min photon conversion radius (cm)" };
100+ Configurable<float > PhotonMaxRadius{" PhotonMaxRadius" , 240 , " Max photon conversion radius (cm)" };
103101 Configurable<float > PhotonMaxMass{" PhotonMaxMass" , 0.3 , " Max photon mass (GeV/c^{2})" };
104102
105103 // // Sigma0 criteria:
106- Configurable<float > Sigma0Window{" Sigma0Window" , 0.05 , " Mass window around expected (in GeV/c2)" };
107- Configurable<float > SigmaMaxRap{" SigmaMaxRap" , 0.5 , " Max sigma0 rapidity" };
104+ Configurable<float > Sigma0Window{" Sigma0Window" , 0.1 , " Mass window around expected (in GeV/c2)" };
105+ Configurable<float > SigmaMaxRap{" SigmaMaxRap" , 0.8 , " Max sigma0 rapidity" };
108106
109107 // Axis
110108 // base properties
111109 ConfigurableAxis vertexZ{" vertexZ" , {30 , -15 .0f , 15 .0f }, " " };
112110 ConfigurableAxis axisPt{" axisPt" , {VARIABLE_WIDTH, 0 .0f , 0 .1f , 0 .2f , 0 .3f , 0 .4f , 0 .5f , 0 .6f , 0 .7f , 0 .8f , 0 .9f , 1 .0f , 1 .1f , 1 .2f , 1 .3f , 1 .4f , 1 .5f , 1 .6f , 1 .7f , 1 .8f , 1 .9f , 2 .0f , 2 .2f , 2 .4f , 2 .6f , 2 .8f , 3 .0f , 3 .2f , 3 .4f , 3 .6f , 3 .8f , 4 .0f , 4 .4f , 4 .8f , 5 .2f , 5 .6f , 6 .0f , 6 .5f , 7 .0f , 7 .5f , 8 .0f , 9 .0f , 10 .0f , 11 .0f , 12 .0f , 13 .0f , 14 .0f , 15 .0f , 17 .0f , 19 .0f , 21 .0f , 23 .0f , 25 .0f , 30 .0f , 35 .0f , 40 .0f , 50 .0f }, " pt axis for analysis" };
113111 ConfigurableAxis axisCentrality{" axisCentrality" , {VARIABLE_WIDTH, 0 .0f , 5 .0f , 10 .0f , 20 .0f , 30 .0f , 40 .0f , 50 .0f , 60 .0f , 70 .0f , 80 .0f , 90 .0f , 100 .0f , 110 .0f }, " Centrality" };
114- ConfigurableAxis axisSigmaMass{" axisSigmaMass" , {200 , 1 .16f , 1 .23f }, " M_{#Sigma^{0}} (GeV/c^{2})" };
115112 ConfigurableAxis axisDeltaPt{" axisDeltaPt" , {100 , -1.0 , +1.0 }, " #Delta(p_{T})" };
116113
114+ // Invariant Mass
115+ ConfigurableAxis axisSigmaMass{" axisSigmaMass" , {1000 , 1 .10f , 1 .30f }, " M_{#Sigma^{0}} (GeV/c^{2})" };
116+ ConfigurableAxis axisLambdaMass{" axisLambdaMass" , {200 , 1 .05f , 1 .151f }, " M_{#Lambda} (GeV/c^{2})" };
117+ ConfigurableAxis axisPhotonMass{" axisPhotonMass" , {600 , -0 .1f , 0 .5f }, " M_{#Gamma}" };
118+
119+ // AP plot axes
120+ ConfigurableAxis axisAPAlpha{" axisAPAlpha" , {220 , -1 .1f , 1 .1f }, " V0 AP alpha" };
121+ ConfigurableAxis axisAPQt{" axisAPQt" , {220 , 0 .0f , 0 .5f }, " V0 AP alpha" };
122+
123+ // Track quality axes
124+ ConfigurableAxis axisTPCrows{" axisTPCrows" , {160 , 0 .0f , 160 .0f }, " N TPC rows" };
125+
126+ // topological variable QA axes
127+ ConfigurableAxis axisDCAtoPV{" axisDCAtoPV" , {500 , 0 .0f , 50 .0f }, " DCA (cm)" };
128+ ConfigurableAxis axisDCAdau{" axisDCAdau" , {50 , 0 .0f , 5 .0f }, " DCA (cm)" };
129+ ConfigurableAxis axisRadius{" axisRadius" , {240 , 0 .0f , 120 .0f }, " V0 radius (cm)" };
130+ ConfigurableAxis axisRapidity{" axisRapidity" , {100 , -2 .0f , 2 .0f }, " Rapidity" };
131+ ConfigurableAxis axisCandSel{" axisCandSel" , {13 , 0 .5f , +13 .5f }, " Candidate Selection" };
132+
117133 int nSigmaCandidates = 0 ;
118134 void init (InitContext const &)
119135 {
120136 // Event counter
121137 histos.add (" hEventVertexZ" , " hEventVertexZ" , kTH1F , {vertexZ});
122- histos.add (" hEventCentrality" , " hEventCentrality" , kTH1F , {{20 , -100 .0f , 100 .0f }});
123- histos.add (" hCandidateBuilderSelection" , " hCandidateBuilderSelection" , kTH1F , {{11 , -0 .5f , +11 .5f }});
124- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (1 , " Photon Mass Cut" );
125- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (2 , " Photon DauEta Cut" );
126- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (3 , " Photon DCAToPV Cut" );
127- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (4 , " Photon DCADau Cut" );
128- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (5 , " Photon Radius Cut" );
129- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (6 , " Lambda Mass Cut" );
130- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (7 , " Lambda DauEta Cut" );
131- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (8 , " Lambda DCAToPV Cut" );
132- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (9 , " Lambda Radius Cut" );
133- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (10 , " Lambda DCADau Cut" );
134- histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (11 , " Sigma Window" );
138+ histos.add (" hEventCentrality" , " hEventCentrality" , kTH1F , {axisCentrality});
139+ histos.add (" hCandidateBuilderSelection" , " hCandidateBuilderSelection" , kTH1F , {axisCandSel});
140+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (1 , " No Sel" );
141+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (2 , " Photon Mass Cut" );
142+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (3 , " Photon DauEta Cut" );
143+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (4 , " Photon DCAToPV Cut" );
144+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (5 , " Photon DCADau Cut" );
145+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (6 , " Photon Radius Cut" );
146+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (7 , " Lambda Mass Cut" );
147+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (8 , " Lambda DauEta Cut" );
148+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (9 , " Lambda DCAToPV Cut" );
149+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (10 , " Lambda Radius Cut" );
150+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (11 , " Lambda DCADau Cut" );
151+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (12 , " Sigma Mass Window" );
152+ histos.get <TH1>(HIST (" hCandidateBuilderSelection" ))->GetXaxis ()->SetBinLabel (13 , " Sigma Y Window" );
135153
136154 // For efficiency calculation (and QA):
155+ histos.add (" GeneralQA/hPhotonMass" , " hPhotonMass" , kTH1F , {axisPhotonMass});
156+ histos.add (" GeneralQA/hPhotonNegEta" , " hPhotonNegEta" , kTH1F , {axisRapidity});
157+ histos.add (" GeneralQA/hPhotonPosEta" , " hPhotonPosEta" , kTH1F , {axisRapidity});
158+ histos.add (" GeneralQA/hPhotonDCANegToPV" , " hPhotonDCANegToPV" , kTH1F , {axisDCAtoPV});
159+ histos.add (" GeneralQA/hPhotonDCAPosToPV" , " hPhotonDCAPosToPV" , kTH1F , {axisDCAtoPV});
160+ histos.add (" GeneralQA/hPhotonDCADau" , " hPhotonDCADau" , kTH1F , {axisDCAdau});
161+ histos.add (" GeneralQA/hPhotonRadius" , " hPhotonRadius" , kTH1F , {axisRadius});
162+ histos.add (" GeneralQA/hLambdaMass" , " hLambdaMass" , kTH1F , {axisLambdaMass});
163+ histos.add (" GeneralQA/hAntiLambdaMass" , " hAntiLambdaMass" , kTH1F , {axisLambdaMass});
164+ histos.add (" GeneralQA/hLambdaNegEta" , " hLambdaNegEta" , kTH1F , {axisRapidity});
165+ histos.add (" GeneralQA/hLambdaPosEta" , " hLambdaPosEta" , kTH1F , {axisRapidity});
166+ histos.add (" GeneralQA/hLambdaDCANegToPV" , " hLambdaDCANegToPV" , kTH1F , {axisDCAtoPV});
167+ histos.add (" GeneralQA/hLambdaDCAPosToPV" , " hLambdaDCAPosToPV" , kTH1F , {axisDCAtoPV});
168+ histos.add (" GeneralQA/hLambdaDCADau" , " hLambdaDCADau" , kTH1F , {axisDCAdau});
169+ histos.add (" GeneralQA/hLambdaRadius" , " hLambdaRadius" , kTH1F , {axisRadius});
170+ histos.add (" GeneralQA/hSigmaMass" , " hSigmaMass" , kTH1F , {axisSigmaMass});
171+ histos.add (" GeneralQA/hSigmaMassWindow" , " hSigmaMassWindow" , kTH1F , {{1000 , -0 .09f , 0 .11f }});
172+ histos.add (" GeneralQA/hSigmaY" , " hSigmaY" , kTH1F , {axisRapidity});
173+
137174 histos.add (" Efficiency/h2dPtVsCentrality_GammaAll" , " h2dPtVsCentrality_GammaAll" , kTH2D , {axisCentrality, axisPt});
138175 histos.add (" Efficiency/h2dPtVsCentrality_LambdaAll" , " h2dPtVsCentrality_LambdaAll" , kTH2D , {axisCentrality, axisPt});
139176 histos.add (" Efficiency/h2dPtVsCentrality_AntiLambdaAll" , " h2dPtVsCentrality_AntiLambdaAll" , kTH2D , {axisCentrality, axisPt});
@@ -180,38 +217,54 @@ struct sigma0builder {
180217 } else {
181218 // Standard selection
182219 // Gamma basic selection criteria:
183- if (TMath::Abs (gamma.mGamma ()) > PhotonMaxMass)
220+ histos.fill (HIST (" hCandidateBuilderSelection" ), 1 .);
221+ histos.fill (HIST (" GeneralQA/hPhotonMass" ), gamma.mGamma ());
222+ if ((gamma.mGamma () < 0 ) || (gamma.mGamma () > PhotonMaxMass))
184223 return false ;
185- histos.fill (HIST (" hCandidateBuilderSelection" ), 0 .);
224+ histos.fill (HIST (" GeneralQA/hPhotonNegEta" ), gamma.negativeeta ());
225+ histos.fill (HIST (" GeneralQA/hPhotonPosEta" ), gamma.positiveeta ());
226+ histos.fill (HIST (" hCandidateBuilderSelection" ), 2 .);
186227 if ((TMath::Abs (gamma.negativeeta ()) > PhotonMaxDauPseudoRap) || (TMath::Abs (gamma.positiveeta ()) > PhotonMaxDauPseudoRap))
187228 return false ;
188- histos.fill (HIST (" hCandidateBuilderSelection" ), 1 .);
229+ histos.fill (HIST (" GeneralQA/hPhotonDCANegToPV" ), TMath::Abs (gamma.dcanegtopv ()));
230+ histos.fill (HIST (" GeneralQA/hPhotonDCAPosToPV" ), TMath::Abs (gamma.dcapostopv ()));
231+ histos.fill (HIST (" hCandidateBuilderSelection" ), 3 .);
189232 if ((TMath::Abs (gamma.dcapostopv ()) < PhotonMinDCAToPv) || (TMath::Abs (gamma.dcanegtopv ()) < PhotonMinDCAToPv))
190233 return false ;
191- histos.fill (HIST (" hCandidateBuilderSelection" ), 2 .);
234+ histos.fill (HIST (" GeneralQA/hPhotonDCADau" ), TMath::Abs (gamma.dcaV0daughters ()));
235+ histos.fill (HIST (" hCandidateBuilderSelection" ), 4 .);
192236 if (TMath::Abs (gamma.dcaV0daughters ()) > PhotonMaxDCAV0Dau)
193237 return false ;
194- histos.fill (HIST (" hCandidateBuilderSelection" ), 3 .);
238+ histos.fill (HIST (" GeneralQA/hPhotonRadius" ), gamma.v0radius ());
239+ histos.fill (HIST (" hCandidateBuilderSelection" ), 5 .);
195240 if ((gamma.v0radius () < PhotonMinRadius) || (gamma.v0radius () > PhotonMaxRadius))
196241 return false ;
197- histos.fill (HIST (" hCandidateBuilderSelection" ), 4 .);
198242
243+ histos.fill (HIST (" hCandidateBuilderSelection" ), 6 .);
244+ histos.fill (HIST (" GeneralQA/hLambdaMass" ), lambda.mLambda ());
245+ histos.fill (HIST (" GeneralQA/hAntiLambdaMass" ), lambda.mAntiLambda ());
199246 // Lambda basic selection criteria:
200247 if ((TMath::Abs (lambda.mLambda () - 1.115683 ) > LambdaWindow) && (TMath::Abs (lambda.mAntiLambda () - 1.115683 ) > LambdaWindow))
201248 return false ;
202- histos.fill (HIST (" hCandidateBuilderSelection" ), 5 .);
249+ histos.fill (HIST (" GeneralQA/hLambdaNegEta" ), lambda.negativeeta ());
250+ histos.fill (HIST (" GeneralQA/hLambdaPosEta" ), lambda.positiveeta ());
251+ histos.fill (HIST (" hCandidateBuilderSelection" ), 7 .);
203252 if ((TMath::Abs (lambda.negativeeta ()) > LambdaDauPseudoRap) || (TMath::Abs (lambda.positiveeta ()) > LambdaDauPseudoRap))
204253 return false ;
205- histos.fill (HIST (" hCandidateBuilderSelection" ), 6 .);
254+ histos.fill (HIST (" GeneralQA/hLambdaDCANegToPV" ), lambda.dcanegtopv ());
255+ histos.fill (HIST (" GeneralQA/hLambdaDCAPosToPV" ), lambda.dcapostopv ());
256+ histos.fill (HIST (" hCandidateBuilderSelection" ), 8 .);
206257 if ((TMath::Abs (lambda.dcapostopv ()) < LambdaMinDCAPosToPv) || (TMath::Abs (lambda.dcanegtopv ()) < LambdaMinDCANegToPv))
207258 return false ;
208- histos.fill (HIST (" hCandidateBuilderSelection" ), 7 .);
259+ histos.fill (HIST (" GeneralQA/hLambdaRadius" ), lambda.v0radius ());
260+ histos.fill (HIST (" hCandidateBuilderSelection" ), 9 .);
209261 if ((lambda.v0radius () < LambdaMinv0radius) || (lambda.v0radius () > LambdaMaxv0radius))
210262 return false ;
211- histos.fill (HIST (" hCandidateBuilderSelection" ), 8 .);
263+ histos.fill (HIST (" GeneralQA/hLambdaDCADau" ), lambda.dcaV0daughters ());
264+ histos.fill (HIST (" hCandidateBuilderSelection" ), 10 .);
212265 if (TMath::Abs (lambda.dcaV0daughters ()) > LambdaMaxDCAV0Dau)
213266 return false ;
214- histos.fill (HIST (" hCandidateBuilderSelection" ), 9 .);
267+ histos.fill (HIST (" hCandidateBuilderSelection" ), 11 .);
215268 }
216269 // Sigma0 candidate properties
217270 std::array<float , 3 > pVecPhotons{gamma.px (), gamma.py (), gamma.pz ()};
@@ -220,13 +273,19 @@ struct sigma0builder {
220273 float sigmamass = RecoDecay::m (arrMom, std::array{o2::constants::physics::MassPhoton, o2::constants::physics::MassLambda0});
221274 float sigmarap = RecoDecay::y (std::array{gamma.px () + lambda.px (), gamma.py () + lambda.py (), gamma.pz () + lambda.pz ()}, o2::constants::physics::MassSigma0);
222275
276+ histos.fill (HIST (" GeneralQA/hSigmaMass" ), sigmamass);
277+ histos.fill (HIST (" GeneralQA/hSigmaMassWindow" ), sigmamass - 1.192642 );
278+
223279 if (TMath::Abs (sigmamass - 1.192642 ) > Sigma0Window)
224280 return false ;
225281
282+ histos.fill (HIST (" hCandidateBuilderSelection" ), 12 .);
283+ histos.fill (HIST (" GeneralQA/hSigmaY" ), sigmarap);
284+
226285 if (TMath::Abs (sigmarap) > SigmaMaxRap)
227286 return false ;
228287
229- histos.fill (HIST (" hCandidateBuilderSelection" ), 10 .);
288+ histos.fill (HIST (" hCandidateBuilderSelection" ), 13 .);
230289
231290 return true ;
232291 }
0 commit comments