1 //--------------------------------------------------------------------------
2 // Test macro for reconstruction and analysis of Primary J/psi into e+e-
4 // Giuseppe Bruno, giuseppe.bruno@ba.infn.it
5 // based on the for charm golden channel (D0->Kpi)
6 //--------------------------------------------------------------------------
8 void AliPrimJPSItoEleReco_all() {
10 gSystem->Load("libAOD.so");
11 gSystem->Load("libPWG3base.so");
13 //============== R E C O N S T R U C T I O N ==============================
18 // Get field from galice.root
20 delete gAlice->GetRunLoader();
24 AliRunLoader *rl = AliRunLoader::Open("galice.root");
26 cerr<<"Can not open session"<<endl;
29 Int_t retval = rl->LoadgAlice();
31 cerr<<"LoadgAlice returned error"<<endl;
35 gAlice=rl->GetAliRun();
36 AliMagF *fiel = (AliMagF*)gAlice->Field();
37 // Set the conversion constant between curvature and Pt
38 AliTracker::SetFieldMap(fiel,kTRUE);
40 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
41 // set simulation to take info on PDG codes from kine tree
42 analysis->SetSimulation();
44 analysis->MakeTracksRefFile(gAlice,evFirst,evLast);
45 // cout << "ci arrivo 2" << endl;
46 //--- set this is you want only signal candidates in output file
47 //analysis->SetOnlySignal();
48 analysis->SetOnlyPrimaryJpsi();
49 //analysis->SetOnlySignalAndPrimaryJpsi();
50 //--- set this if you want to compute primary vertex candidate by candidate using
51 // other tracks in the event (for pp, broad interaction region);
52 // it is time-consuming procedure, so it can be done after a
53 // preselection on invariant mass
54 //analysis->SetVertexOnTheFly();
55 //analysis->SetMassCut(0.1); // GeV
56 //--- set single-track preselections
57 analysis->SetPtCut(0.); // GeV
58 analysis->Setd0Cut(0.); // micron
59 //--- set cuts on candidates to be written to file
60 // (see AliBtoJPSItoEleAnalysis.h for a description and for the defaults)
61 //analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
64 //--- check the settings
65 analysis->PrintStatus();
67 analysis->FindCandidates(evFirst,evLast,"AliJPSItoEle_all.root");
72 //==========================================================================
73 void AliBtoJPSItoEleSele() {
75 gSystem->Load("libAOD.so");
76 gSystem->Load("libPWG3base.so");
78 //======================== S E L E C T I O N ============================
80 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
81 analysis->SetSimulation();
82 //analysis->SetOnlySignal();
83 analysis->SetOnlyPrimaryJpsi();
84 analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
85 analysis->ApplySelection("AliBtoJPSItoEle.root","AliBtoJPSItoEle_sele.root");
90 //==========================================================================