@@ -117,99 +117,128 @@ void o2::aod::emphotonhistograms::DefineHistograms(THashList* list, const char*
117117 } // end of V0
118118
119119 if (TString (histClass).Contains (" Dalitz" )) {
120- const int nm = 147 ;
121- double mee[nm] = {0 .f };
122- for (int i = 0 ; i < 40 ; i++) {
123- mee[i] = 0.001 * (i - 0 ) + 0.0 ;
124- }
125- for (int i = 40 ; i < nm; i++) {
126- mee[i] = 0.01 * (i - 40 ) + 0.04 ;
127- }
120+ THnSparseF* hs_dilepton_uls_same = nullptr ;
121+ THnSparseF* hs_dilepton_lspp_same = nullptr ;
122+ THnSparseF* hs_dilepton_lsmm_same = nullptr ;
123+
124+ if (TString (histClass).Contains (" EE" )) {
125+ const int nm = 147 ;
126+ double mee[nm] = {0 .f };
127+ for (int i = 0 ; i < 40 ; i++) {
128+ mee[i] = 0.001 * (i - 0 ) + 0.0 ;
129+ }
130+ for (int i = 40 ; i < nm; i++) {
131+ mee[i] = 0.01 * (i - 40 ) + 0.04 ;
132+ }
128133
129- const int npt = 61 ;
130- double pt[npt] = {0 .f };
131- for (int i = 0 ; i < 50 ; i++) {
132- pt[i] = 0.1 * i;
133- }
134- for (int i = 50 ; i < npt; i++) {
135- pt[i] = 0.5 * (i - 50 ) + 5.0 ;
136- }
134+ const int npt = 61 ;
135+ double pt[npt] = {0 .f };
136+ for (int i = 0 ; i < 50 ; i++) {
137+ pt[i] = 0.1 * i;
138+ }
139+ for (int i = 50 ; i < npt; i++) {
140+ pt[i] = 0.5 * (i - 50 ) + 5.0 ;
141+ }
137142
138- const int ndca = 66 ;
139- double dca[ndca] = {0 .f };
140- for (int i = 0 ; i < 50 ; i++) {
141- dca[i] = 0.1 * i;
142- }
143- for (int i = 50 ; i < ndca; i++) {
144- dca[i] = 1.0 * (i - 50 ) + 5.0 ;
143+ const int ndim = 4 ; // m, pt, dca, phiv
144+ const int nbins[ndim] = {nm - 1 , npt - 1 , 50 , 32 };
145+ const double xmin[ndim] = {0.0 , 0.0 , 0.0 , 0.0 };
146+ const double xmax[ndim] = {1.1 , 10.0 , 5.0 , 3.2 };
147+
148+ hs_dilepton_uls_same = new THnSparseF (" hs_dilepton_uls_same" , " hs_dilepton_uls;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{xy,ee} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
149+ hs_dilepton_uls_same->SetBinEdges (0 , mee);
150+ hs_dilepton_uls_same->SetBinEdges (1 , pt);
151+ hs_dilepton_uls_same->Sumw2 ();
152+ list->Add (hs_dilepton_uls_same);
153+
154+ hs_dilepton_lspp_same = new THnSparseF (" hs_dilepton_lspp_same" , " hs_dilepton_lspp;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{xy,ee} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
155+ hs_dilepton_lspp_same->SetBinEdges (0 , mee);
156+ hs_dilepton_lspp_same->SetBinEdges (1 , pt);
157+ hs_dilepton_lspp_same->Sumw2 ();
158+ list->Add (hs_dilepton_lspp_same);
159+
160+ hs_dilepton_lsmm_same = new THnSparseF (" hs_dilepton_lsmm_same" , " hs_dilepton_lsmm;m_{ee} (GeV/c^{2});p_{T,ee} (GeV/c);DCA_{xy,ee} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
161+ hs_dilepton_lsmm_same->SetBinEdges (0 , mee);
162+ hs_dilepton_lsmm_same->SetBinEdges (1 , pt);
163+ hs_dilepton_lsmm_same->Sumw2 ();
164+ list->Add (hs_dilepton_lsmm_same);
165+
166+ if (TString (subGroup) == " mc" ) {
167+ // create phiv template
168+ list->Add (new TH2F (" hMvsPhiV_Pi0" , " m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})" , 32 , 0 , 3.2 , 100 , 0 .0f , 0 .1f )); // ee from pi0 dalitz decay
169+ list->Add (new TH2F (" hMvsPhiV_Photon" , " m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})" , 32 , 0 , 3.2 , 100 , 0 .0f , 0 .1f )); // ee from photon conversion
170+ } // end of mc
171+ } else if (TString (histClass).Contains (" MuMu" )) {
172+ const int ndim = 4 ; // m, pt, dca, phiv
173+ const int nbins[ndim] = {90 , 20 , 50 , 1 };
174+ const double xmin[ndim] = {0.2 , 0.0 , 0.0 , 0.0 };
175+ const double xmax[ndim] = {1.1 , 2.0 , 5.0 , 3.2 };
176+
177+ hs_dilepton_uls_same = new THnSparseF (" hs_dilepton_uls_same" , " hs_dilepton_uls;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{xy,#mu#mu} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
178+ hs_dilepton_uls_same->Sumw2 ();
179+ list->Add (hs_dilepton_uls_same);
180+
181+ hs_dilepton_lspp_same = new THnSparseF (" hs_dilepton_lspp_same" , " hs_dilepton_lspp;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{xy,#mu#mu} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
182+ hs_dilepton_lspp_same->Sumw2 ();
183+ list->Add (hs_dilepton_lspp_same);
184+
185+ hs_dilepton_lsmm_same = new THnSparseF (" hs_dilepton_lsmm_same" , " hs_dilepton_lsmm;m_{#mu#mu} (GeV/c^{2});p_{T,#mu#mu} (GeV/c);DCA_{xy,#mu#mu} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
186+ hs_dilepton_lsmm_same->Sumw2 ();
187+ list->Add (hs_dilepton_lsmm_same);
188+ } else {
189+ LOGF (info, " EE or MuMu are supported." );
145190 }
146191
147- const int ndim = 4 ; // m, pt, dca, phiv
148- const int nbins[ndim] = {nm - 1 , npt - 1 , ndca - 1 , 32 };
149- const double xmin[ndim] = {0.0 , 0.0 , 0.0 , 0.0 };
150- const double xmax[ndim] = {1.1 , 10.0 , 20.0 , 3.2 };
151-
152- THnSparseF* hs_dilepton_uls = new THnSparseF (" hs_dilepton_uls" , " hs_dilepton_uls;m_{ee} (GeV/c);p_{T,ee} (GeV/c);DCA_{xy,ee} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
153- hs_dilepton_uls->SetBinEdges (0 , mee);
154- hs_dilepton_uls->SetBinEdges (1 , pt);
155- hs_dilepton_uls->SetBinEdges (2 , dca);
156- hs_dilepton_uls->Sumw2 ();
157- list->Add (hs_dilepton_uls);
158-
159- THnSparseF* hs_dilepton_lspp = new THnSparseF (" hs_dilepton_lspp" , " hs_dilepton_lspp;m_{ee} (GeV/c);p_{T,ee} (GeV/c);DCA_{xy,ee} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
160- hs_dilepton_lspp->SetBinEdges (0 , mee);
161- hs_dilepton_lspp->SetBinEdges (1 , pt);
162- hs_dilepton_lspp->SetBinEdges (2 , dca);
163- hs_dilepton_lspp->Sumw2 ();
164- list->Add (hs_dilepton_lspp);
165-
166- THnSparseF* hs_dilepton_lsmm = new THnSparseF (" hs_dilepton_lsmm" , " hs_dilepton_lsmm;m_{ee} (GeV/c);p_{T,ee} (GeV/c);DCA_{xy,ee} (#sigma);#varphi_{V} (rad.);" , ndim, nbins, xmin, xmax);
167- hs_dilepton_lsmm->SetBinEdges (0 , mee);
168- hs_dilepton_lsmm->SetBinEdges (1 , pt);
169- hs_dilepton_lsmm->SetBinEdges (2 , dca);
170- hs_dilepton_lsmm->Sumw2 ();
171- list->Add (hs_dilepton_lsmm);
192+ if (TString (subGroup) == " mix" ) {
193+ THnSparseF* hs_dilepton_uls_mix = reinterpret_cast <THnSparseF*>(hs_dilepton_uls_same->Clone (" hs_dilepton_uls_mix" ));
194+ THnSparseF* hs_dilepton_lspp_mix = reinterpret_cast <THnSparseF*>(hs_dilepton_lspp_same->Clone (" hs_dilepton_lspp_mix" ));
195+ THnSparseF* hs_dilepton_lsmm_mix = reinterpret_cast <THnSparseF*>(hs_dilepton_lsmm_same->Clone (" hs_dilepton_lsmm_mix" ));
196+ list->Add (hs_dilepton_uls_mix);
197+ list->Add (hs_dilepton_lspp_mix);
198+ list->Add (hs_dilepton_lsmm_mix);
199+ }
172200
173201 list->Add (new TH1F (" hNpair_uls" , " Number of ULS pairs per collision" , 101 , -0 .5f , 100 .5f ));
174202 list->Add (new TH1F (" hNpair_lspp" , " Number of LS++ pairs per collision" , 101 , -0 .5f , 100 .5f ));
175203 list->Add (new TH1F (" hNpair_lsmm" , " Number of LS-- pairs per collision" , 101 , -0 .5f , 100 .5f ));
176204
177- if (TString (subGroup) == " mc" ) {
178- list->Add (new TH1F (" hPt_Photon_Primary" , " pT;p_{T} (GeV/c)" , 1000 , 0 .0f , 10 )); // for MC efficiency
179- list->Add (new TH2F (" hEtaPhi_Photon_Primary" , " #eta vs. #varphi;#varphi (rad.);#eta" , 180 , 0 , TMath::TwoPi (), 40 , -2 .0f , 2 .0f )); // for MC efficiency
180-
181- // create phiv template
182- list->Add (new TH2F (" hMvsPhiV_Pi0" , " m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})" , 32 , 0 , 3.2 , 100 , 0 .0f , 0 .1f )); // ee from pi0 dalitz decay
183- list->Add (new TH2F (" hMvsPhiV_Photon" , " m_{ee} vs. #varphi_{V};#varphi_{V} (rad.);m_{ee} (GeV/c^{2})" , 32 , 0 , 3.2 , 100 , 0 .0f , 0 .1f )); // ee from photon conversion
184-
185- } // end of mc
186- } // end of Dalitz
205+ if (TString (histClass) == " Generated" ) {
206+ TH2F* hMvsPt = new TH2F (" hMvsPt" , " m_{ll} vs. p_{T,ll};m_{ll} (GeV/c^{2});p_{T,ll}" , 110 , 0 , 1 .1f , 100 , 0 , 10 .f );
207+ hMvsPt->Sumw2 ();
208+ list->Add (hMvsPt);
209+ }
210+ } // end of Dalitz
187211 if (TString (histClass) == " Track" ) {
188- list->Add (new TH1F (" hPt" , " pT;p_{T} (GeV/c)" , 1000 , 0 .0f , 10 ));
212+ float maxP = 10 .f ;
213+ if (TString (subGroup).Contains (" Mu" )) {
214+ maxP = 1 .f ;
215+ }
216+
217+ list->Add (new TH1F (" hPt" , " pT;p_{T} (GeV/c)" , 1000 , 0 .0f , maxP));
189218 list->Add (new TH1F (" hQoverPt" , " q/pT;q/p_{T} (GeV/c)^{-1}" , 400 , -20 , 20 ));
190219 list->Add (new TH2F (" hEtaPhi" , " #eta vs. #varphi;#varphi (rad.);#eta" , 180 , 0 , TMath::TwoPi (), 40 , -2 .0f , 2 .0f ));
191220 list->Add (new TH2F (" hDCAxyz" , " DCA xy vs. z;DCA_{xy} (cm);DCA_{z} (cm)" , 200 , -1 .0f , 1 .0f , 200 , -1 .0f , 1 .0f ));
192- list->Add (new TH2F (" hDCAxyRes_Pt" , " DCA_{xy} resolution vs. pT;p_{T} (GeV/c);DCA_{xy} resolution (#mum)" , 1000 , 0 , 10 , 100 , 0 ., 1000 ));
193- list->Add (new TH2F (" hDCAzRes_Pt" , " DCA_{z} resolution vs. pT;p_{T} (GeV/c);DCA_{z} resolution (#mum)" , 1000 , 0 , 10 , 100 , 0 ., 1000 ));
221+ list->Add (new TH2F (" hDCAxyRes_Pt" , " DCA_{xy} resolution vs. pT;p_{T} (GeV/c);DCA_{xy} resolution (#mum)" , 1000 , 0 , maxP , 100 , 0 ., 1000 ));
222+ list->Add (new TH2F (" hDCAzRes_Pt" , " DCA_{z} resolution vs. pT;p_{T} (GeV/c);DCA_{z} resolution (#mum)" , 1000 , 0 , maxP , 100 , 0 ., 1000 ));
194223 list->Add (new TH1F (" hNclsTPC" , " number of TPC clusters" , 161 , -0.5 , 160.5 ));
195224 list->Add (new TH1F (" hNcrTPC" , " number of TPC crossed rows" , 161 , -0.5 , 160.5 ));
196225 list->Add (new TH1F (" hChi2TPC" , " chi2/number of TPC clusters" , 100 , 0 , 10 ));
197- list->Add (new TH2F (" hTPCdEdx" , " TPC dE/dx;p_{in} (GeV/c);TPC dE/dx (a.u.)" , 1000 , 0 , 10 , 200 , 0 , 200 ));
198- list->Add (new TH2F (" hTPCNsigmaEl" , " TPC n sigma el;p_{in} (GeV/c);n #sigma_{e}^{TPC}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
199- list->Add (new TH2F (" hTPCNsigmaMu" , " TPC n sigma mu;p_{in} (GeV/c);n #sigma_{#mu}^{TPC}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
200- list->Add (new TH2F (" hTPCNsigmaPi" , " TPC n sigma pi;p_{in} (GeV/c);n #sigma_{#pi}^{TPC}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
201- list->Add (new TH2F (" hTPCNsigmaKa" , " TPC n sigma ka;p_{in} (GeV/c);n #sigma_{K}^{TPC}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
202- list->Add (new TH2F (" hTPCNsigmaPr" , " TPC n sigma pr;p_{in} (GeV/c);n #sigma_{p}^{TPC}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
203- list->Add (new TH2F (" hTOFbeta" , " TOF beta;p_{in} (GeV/c);TOF #beta" , 1000 , 0 , 10 , 600 , 0 , 1.2 ));
204- list->Add (new TH2F (" hTOFNsigmaEl" , " TOF n sigma el;p_{in} (GeV/c);n #sigma_{e}^{TOF}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
205- list->Add (new TH2F (" hTOFNsigmaMu" , " TOF n sigma mu;p_{in} (GeV/c);n #sigma_{#mu}^{TOF}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
206- list->Add (new TH2F (" hTOFNsigmaPi" , " TOF n sigma pi;p_{in} (GeV/c);n #sigma_{#pi}^{TOF}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
207- list->Add (new TH2F (" hTOFNsigmaKa" , " TOF n sigma ka;p_{in} (GeV/c);n #sigma_{K}^{TOF}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
208- list->Add (new TH2F (" hTOFNsigmaPr" , " TOF n sigma pr;p_{in} (GeV/c);n #sigma_{p}^{TOF}" , 1000 , 0 , 10 , 100 , -5 , +5 ));
226+ list->Add (new TH2F (" hTPCdEdx" , " TPC dE/dx;p_{in} (GeV/c);TPC dE/dx (a.u.)" , 1000 , 0 , maxP , 200 , 0 , 200 ));
227+ list->Add (new TH2F (" hTPCNsigmaEl" , " TPC n sigma el;p_{in} (GeV/c);n #sigma_{e}^{TPC}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
228+ list->Add (new TH2F (" hTPCNsigmaMu" , " TPC n sigma mu;p_{in} (GeV/c);n #sigma_{#mu}^{TPC}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
229+ list->Add (new TH2F (" hTPCNsigmaPi" , " TPC n sigma pi;p_{in} (GeV/c);n #sigma_{#pi}^{TPC}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
230+ list->Add (new TH2F (" hTPCNsigmaKa" , " TPC n sigma ka;p_{in} (GeV/c);n #sigma_{K}^{TPC}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
231+ list->Add (new TH2F (" hTPCNsigmaPr" , " TPC n sigma pr;p_{in} (GeV/c);n #sigma_{p}^{TPC}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
232+ list->Add (new TH2F (" hTOFbeta" , " TOF beta;p_{in} (GeV/c);TOF #beta" , 1000 , 0 , maxP , 600 , 0 , 1.2 ));
233+ list->Add (new TH2F (" hTOFNsigmaEl" , " TOF n sigma el;p_{in} (GeV/c);n #sigma_{e}^{TOF}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
234+ list->Add (new TH2F (" hTOFNsigmaMu" , " TOF n sigma mu;p_{in} (GeV/c);n #sigma_{#mu}^{TOF}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
235+ list->Add (new TH2F (" hTOFNsigmaPi" , " TOF n sigma pi;p_{in} (GeV/c);n #sigma_{#pi}^{TOF}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
236+ list->Add (new TH2F (" hTOFNsigmaKa" , " TOF n sigma ka;p_{in} (GeV/c);n #sigma_{K}^{TOF}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
237+ list->Add (new TH2F (" hTOFNsigmaPr" , " TOF n sigma pr;p_{in} (GeV/c);n #sigma_{p}^{TOF}" , 1000 , 0 , maxP , 100 , -5 , +5 ));
209238 list->Add (new TH1F (" hTPCNcr2Nf" , " TPC Ncr/Nfindable" , 200 , 0 , 2 ));
210239 list->Add (new TH1F (" hTPCNcls2Nf" , " TPC Ncls/Nfindable" , 200 , 0 , 2 ));
211240 list->Add (new TH1F (" hNclsITS" , " number of ITS clusters" , 8 , -0.5 , 7.5 ));
212- list->Add (new TH1F (" hChi2ITS" , " chi2/number of ITS clusters" , 360 , 0 , 36 ));
241+ list->Add (new TH1F (" hChi2ITS" , " chi2/number of ITS clusters" , 100 , 0 , 10 ));
213242 list->Add (new TH1F (" hITSClusterMap" , " ITS cluster map" , 128 , -0.5 , 127.5 ));
214243 }
215244
0 commit comments