2 const char *aodHFFileName=
"AliAOD.VertexingHF.root")
13 Bool_t useParFiles=kFALSE;
14 gROOT->LoadMacro(
"$ALICE_ROOT/PWG3/vertexingHF/macros/LoadLibraries.C");
18 TH2F *hCPtaVSd0d0 =
new TH2F(
"hCPtaVSd0d0",
"D^{0} correlation plot",1000,-50000,50000,1000,-1,1);
19 hCPtaVSd0d0->SetXTitle(
"Product of impact parameters [#mu m^{2}]");
20 hCPtaVSd0d0->SetYTitle(
"Cosine of pointing angle");
21 TH1F *hMass =
new TH1F(
"hMass",
"D^{0} mass plot",100,1.7,2);
22 hMass->SetXTitle(
"Invariant mass [GeV]");
23 hMass->SetYTitle(
"Entries");
24 TH1F *hSecVtxZ =
new TH1F(
"hSecVtxZ",
"D^{0} decay vertex z",1000,-10,10);
25 hSecVtxZ->SetXTitle(
"z of decay vertex [cm]");
26 hSecVtxZ->SetYTitle(
"Entries");
27 TH1F *hDeltaMassDstar =
new TH1F(
"hDeltaMassDstar",
"D* delta mass plot",100,0,0.3);
28 hDeltaMassDstar->SetXTitle(
"M(Kpipi)-M(Kpi) [GeV]");
29 hDeltaMassDstar->SetYTitle(
"Entries");
33 TFile inFile(aodFileName,
"READ");
34 if (!inFile.IsOpen())
return;
36 TTree *aodTree = (TTree*)inFile.Get(
"aodTree");
37 aodTree->AddFriend(
"aodTree",aodHFFileName);
39 AliAODEvent *aod =
new AliAODEvent();
41 aod->ReadFromTree(aodTree);
44 TClonesArray *arrayVerticesHF =
45 (TClonesArray*)aod->GetList()->FindObject(
"VerticesHF");
48 TClonesArray *arrayD0toKpi =
49 (TClonesArray*)aod->GetList()->FindObject(
"D0toKpi");
52 TClonesArray *array3Prong =
53 (TClonesArray*)aod->GetList()->FindObject(
"Charm3Prong");
56 TClonesArray *arrayDstar =
57 (TClonesArray*)aod->GetList()->FindObject(
"Dstar");
60 TClonesArray *arrayCascades =
61 (TClonesArray*)aod->GetList()->FindObject(
"CascadesHF");
65 Int_t nTotHF=0,nTotD0toKpi=0,nTotDstar=0,nTot3Prong=0,nTotCasc=0;
79 Int_t nTot3ProngSele=0;
80 Int_t nTotD0toKpiSele=0;
81 Int_t nTotDStarSele=0;
84 Int_t
nEvents = aodTree->GetEntries();
85 for (Int_t nEv = 0; nEv <
nEvents; nEv++) {
86 cout<<
"\n------------ Event: "<<nEv<<
" ------------------"<<endl;
89 aodTree->GetEvent(nEv);
93 aod->GetHeader()->Print();
96 vtx1 = (AliAODVertex*)aod->GetPrimaryVertex();
118 Int_t nD0toKpi = arrayD0toKpi->GetEntriesFast();
119 nTotD0toKpi += nD0toKpi;
120 cout<<
"Number of D0->Kpi: "<<nD0toKpi<<endl;
122 for (Int_t iD0toKpi = 0; iD0toKpi < nD0toKpi; iD0toKpi++) {
134 printf(
"D0 %d\n",iD0toKpi);
141 Int_t nDstar = arrayDstar->GetEntriesFast();
143 cout<<
"Number of D*->D0pi: "<<nDstar<<endl;
147 for (Int_t iDstar = 0; iDstar < nDstar; iDstar++) {
149 printf(
"D* %d\n",iDstar);
157 Int_t n3Prong = array3Prong->GetEntriesFast();
158 nTot3Prong += n3Prong;
159 cout<<
"Number of Charm->3Prong: "<<n3Prong<<endl;
161 for (Int_t i3p = 0; i3p < n3Prong; i3p++) {
163 printf(
"3p %d\n",i3p);
189 printf(
"\n Total HF vertices: %d\n",nTotHF);
190 printf(
"\n Total D0->Kpi: %d; selected %d\n",nTotD0toKpi,nTotD0toKpiSele);
191 printf(
"\n Total D*->D0pi: %d; selected %d\n",nTotDstar,nTotDStarSele);
192 printf(
"\n Total Charm->3Prong: %d; selected %d\n",nTot3Prong,nTot3ProngSele);
193 if (arrayCascades) printf(
"\n Total Cascades: %d\n",nTotCasc);
224 Bool_t useParFiles=kFALSE;
225 gROOT->LoadMacro(
"$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");
229 TH2F *hCPtaVSd0d0 =
new TH2F(
"hCPtaVSd0d0",
"D^{0} correlation plot",1000,-50000,50000,1000,-1,1);
230 hCPtaVSd0d0->SetXTitle(
"Product of impact parameters [#mu m^{2}]");
231 hCPtaVSd0d0->SetYTitle(
"Cosine of pointing angle");
232 TH1F *hMass =
new TH1F(
"hMass",
"D^{0} mass plot",100,1.7,2);
233 hMass->SetXTitle(
"Invariant mass [GeV]");
234 hMass->SetYTitle(
"Entries");
235 TH1F *hSecVtxZ =
new TH1F(
"hSecVtxZ",
"D^{0} decay vertex z",1000,-10,10);
236 hSecVtxZ->SetXTitle(
"z of decay vertex [cm]");
237 hSecVtxZ->SetYTitle(
"Entries");
240 TFile inFile(aodHFFileName,
"READ");
241 if (!inFile.IsOpen())
return;
243 TTree *aodTree = (TTree*)inFile.Get(
"aodTree");
245 AliAODEvent *aod =
new AliAODEvent();
247 aod->ReadFromTree(aodTree);
250 TClonesArray *arrayVerticesHF =
251 (TClonesArray*)aod->GetList()->FindObject(
"VerticesHF");
254 TClonesArray *arrayD0toKpi =
255 (TClonesArray*)aod->GetList()->FindObject(
"D0toKpi");
278 Int_t nTotHF=0,nTotD0toKpi=0;
279 AliAODVertex *vtx1=0;
282 Int_t
nEvents = aodTree->GetEntries();
283 for (Int_t nEv = 0; nEv <
nEvents; nEv++) {
284 cout<<
"\n------------ Event: "<<nEv<<
" ------------------"<<endl;
287 aodTree->GetEvent(nEv);
292 Int_t nD0toKpi = arrayD0toKpi->GetEntriesFast();
293 nTotD0toKpi += nD0toKpi;
294 cout<<
"Number of D0->Kpi: "<<nD0toKpi<<endl;
296 for (Int_t iD0toKpi = 0; iD0toKpi < nD0toKpi; iD0toKpi++) {
298 Int_t okD0=0,okD0bar=0;
299 if(d->
SelectD0(cutsD0,okD0,okD0bar)) {
304 hSecVtxZ->Fill(d->GetSecVtxZ());
312 printf(
"\n Total D0->Kpi: %d\n",nTotD0toKpi);
314 TCanvas *c =
new TCanvas(
"c",
"c",0,0,1000,1000);
317 hCPtaVSd0d0->Draw(
"colz");
319 hMass->SetFillColor(4);
322 hSecVtxZ->SetFillColor(2);
void LoadLibraries(Int_t mode)
Load analysis libraries.
virtual void SetStandardCutsPP2010()
Double_t InvMassD0() const
Double_t Prodd0d0() const
Class for cuts on AOD reconstructed D+->Kpipi.
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel, AliAODEvent *aod)
Double_t InvMassD0bar() const
virtual void SetStandardCutsPP2010()
Bool_t SelectD0(const Double_t *cuts, Int_t &okD0, Int_t &okD0bar) const
void SetOwnPrimaryVtx(const AliAODVertex *vtx)
void ReadAODVertexingHFsa(const char *aodHFFileName="AliAOD.VertexingHF.sa.root")
void SetRemoveDaughtersFromPrim(Bool_t removeDaughtersPrim)
virtual void SetStandardCutsPP2010()
virtual Int_t IsSelected(TObject *obj, Int_t selectionLevel)
Double_t CosPointingAngle() const
void ReadAODVertexingHF(const char *aodFileName="AliAOD.root", const char *aodHFFileName="AliAOD.VertexingHF.root")