// standard AOD + a friend heavy-flavour AOD) and apply cuts
// Origin: A.Dainese
//
- gSystem->Load("libANALYSIS.so");
- gSystem->Load("libANALYSISalice.so");
- gSystem->Load("libAOD.so");
- gSystem->Load("libPWG3base.so");
+
+ Bool_t useParFiles=kFALSE;
+ gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");
+ LoadLibraries(useParFiles);
// create a test histogram
TH2F *hCPtaVSd0d0 = new TH2F("hCPtaVSd0d0","D^{0} correlation plot",1000,-50000,50000,1000,-1,1);
TH1F *hSecVtxZ = new TH1F("hSecVtxZ","D^{0} decay vertex z",1000,-10,10);
hSecVtxZ->SetXTitle("z of decay vertex [cm]");
hSecVtxZ->SetYTitle("Entries");
+ TH1F *hDeltaMassDstar = new TH1F("hDeltaMassDstar","D* delta mass plot",100,0,0.3);
+ hDeltaMassDstar->SetXTitle("M(Kpipi)-M(Kpi) [GeV]");
+ hDeltaMassDstar->SetYTitle("Entries");
// open input file and get the TTree
TFile inFile(aodFileName,"READ");
TClonesArray *array3Prong =
(TClonesArray*)aod->GetList()->FindObject("Charm3Prong");
+ // load D* candidates
+ TClonesArray *arrayDstar =
+ (TClonesArray*)aod->GetList()->FindObject("Dstar");
+
Double_t cutsD0[9]=
// cutsD0[0] = inv. mass half width [GeV]
100000.,
100000000.,
-1.1};
+ Double_t cutsDstar[5]=
+ // (to be passed to AliAODRecoCascadeHF::SelectDstar())
+ // 0 = inv. mass half width of D* [GeV]
+ // 1 = half width of (M_Kpipi-M_Kpi) [GeV]
+ // 2 = PtMin of pi_s [GeV/c]
+ // 3 = PtMax of pi_s [GeV/c]
+ // 4 = theta, angle between the trace of pi_s and D0 decay plane [rad]
+ {999999.,
+ 999999.,
+ 0.1,
+ 1.0,
+ 0.5};
+
- Int_t nTotHF=0,nTotD0toKpi=0,nTot3Prong=0;
+ Int_t nTotHF=0,nTotD0toKpi=0,nTotDstar=0,nTot3Prong=0;
AliAODVertex *vtx1=0;
// loop over events
trkIDtoEntry[track->GetID()]=it;
}
+
// loop over D0->Kpi candidates
Int_t nD0toKpi = arrayD0toKpi->GetEntriesFast();
nTotD0toKpi += nD0toKpi;
hMass->Fill(d->InvMassD0bar(),0.5);
hCPtaVSd0d0->Fill(1e8*d->Prodd0d0(),d->CosPointingAngle());
hSecVtxZ->Fill(d->GetSecVtxZ());
- //cout<<d->GetSecVtxZ() <<endl;
+ //cout<<d->GetSecVtxX() <<endl;
// get daughter AOD tracks
- AliAODTrack *trk0=aod->GetTrack(trkIDtoEntry[d->GetProngID(0)]);
- AliAODTrack *trk1=aod->GetTrack(trkIDtoEntry[d->GetProngID(1)]);
+ AliAODTrack *trk0 = (AliAODTrack*)d->GetDaughter(0);
+ AliAODTrack *trk1 = (AliAODTrack*)d->GetDaughter(1);
+ if(!trk0 || !trk1) {
+ trk0=aod->GetTrack(trkIDtoEntry[d->GetProngID(0)]);
+ trk1=aod->GetTrack(trkIDtoEntry[d->GetProngID(1)]);
+ cout<<"references to standard AOD not available"<<endl;
+ }
cout<<"pt of positive track: "<<trk0->Pt()<<endl;
- // this will be replaced by
- //AliAODTrack *trk0 = (AliAODTrack*)(d->GetSecondaryVtx()->GetDaughter(0));
+
+ // make a AliNeutralTrackParam from the D0
+ // and calculate impact parameters to primary vertex
+ AliNeutralTrackParam trackD0(d);
+ cout<<"pt of D0: "<<d->Pt()<<" (AliAODRecoDecay); "<<trackD0.Pt()<<" (track)"<<endl;
+ //trackD0.Print();
+ Double_t dz[2],covdz[3];
+ trackD0.PropagateToDCA(vtx1,aod->GetMagneticField(),1000.,dz,covdz);
+ cout<<"D0 impact parameter rphi: "<<dz[0]<<" +- "<<TMath::Sqrt(covdz[0])<<endl;
}
if(unsetvtx) d->UnsetOwnPrimaryVtx();
}
+
+
+ // loop over D* candidates
+ Int_t nDstar = arrayDstar->GetEntriesFast();
+ nTotDstar += nDstar;
+ cout<<"Number of D*->D0pi: "<<nDstar<<endl;
+
+ for (Int_t iDstar = 0; iDstar < nDstar; iDstar++) {
+ AliAODRecoCascadeHF *c = (AliAODRecoCascadeHF*)arrayDstar->UncheckedAt(iDstar);
+ Bool_t unsetvtx=kFALSE;
+ if(!c->GetOwnPrimaryVtx()) {
+ c->SetOwnPrimaryVtx(vtx1); // needed to compute all variables
+ c->Get2Prong()->SetOwnPrimaryVtx(vtx1);
+ unsetvtx=kTRUE;
+ }
+ if(c->SelectDstar(cutsDstar,cutsD0)) {
+ hDeltaMassDstar->Fill(c->DeltaInvMass());
+ // get daughters
+ AliAODTrack *trk = (AliAODTrack*)c->GetBachelor();
+ AliAODRecoDecayHF2Prong *d = (AliAODRecoDecayHF2Prong*)c->Get2Prong();
+ cout<<"pt of soft pi: "<<trk->Pt()<<endl;
+ cout<<"pt of D0: "<<d->Pt()<<endl;
+ }
+
+ if(unsetvtx) {
+ c->UnsetOwnPrimaryVtx();
+ c->Get2Prong()->UnsetOwnPrimaryVtx();
+ }
+ }
+
// count 3prong candidates
Int_t n3Prong = array3Prong->GetEntriesFast();
printf("\n Total HF vertices: %d\n",nTotHF);
printf("\n Total D0->Kpi: %d\n",nTotD0toKpi);
+ printf("\n Total D*->D0pi: %d\n",nTotDstar);
printf("\n Total Charm->3Prong: %d\n",nTot3Prong);
- TCanvas *c = new TCanvas("c","c",0,0,1000,1000);
- c->Divide(2,2);
- c->cd(1);
+ TCanvas *c1 = new TCanvas("c1","c1",0,0,800,700);
+ c1->Divide(2,2);
+ c1->cd(1);
hCPtaVSd0d0->Draw("colz");
- c->cd(2);
+ c1->cd(2);
hMass->SetFillColor(4);
hMass->Draw();
- c->cd(3);
+ c1->cd(3);
hSecVtxZ->SetFillColor(2);
hSecVtxZ->Draw();
+ c1->cd(4);
+ hDeltaMassDstar->SetFillColor(3);
+ hDeltaMassDstar->Draw();
return;
}
// heavy-flavour AOD (i.e. without standard AOD) and apply cuts
// Origin: A.Dainese
//
- gSystem->Load("libANALYSIS.so");
- gSystem->Load("libANALYSISalice.so");
- gSystem->Load("libAOD.so");
- gSystem->Load("libPWG3base.so");
+ Bool_t useParFiles=kFALSE;
+ gROOT->LoadMacro("$ALICE_ROOT/PWG3/vertexingHF/LoadLibraries.C");
+ LoadLibraries(useParFiles);
// create a test histogram
TH2F *hCPtaVSd0d0 = new TH2F("hCPtaVSd0d0","D^{0} correlation plot",1000,-50000,50000,1000,-1,1);