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("libANALYSIS");
11 gSystem->Load("libANALYSISalice");
12 gSystem->Load("libAOD.so");
13 gSystem->Load("libPWG3base.so");
14 gSystem->Load("libPWG3.so");
16 //============== R E C O N S T R U C T I O N ==============================
21 // Get field from galice.root
23 delete gAlice->GetRunLoader();
27 AliRunLoader *rl = AliRunLoader::Open("galice.root");
29 cerr<<"Can not open session"<<endl;
32 Int_t retval = rl->LoadgAlice();
34 cerr<<"LoadgAlice returned error"<<endl;
38 gAlice=rl->GetAliRun();
39 AliMagF *fiel = (AliMagF*)gAlice->Field();
40 // Set the conversion constant between curvature and Pt
41 AliTracker::SetFieldMap(fiel,kTRUE);
43 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
44 // set simulation to take info on PDG codes from kine tree
45 analysis->SetSimulation();
47 analysis->MakeTracksRefFile(gAlice,evFirst,evLast);
48 // cout << "ci arrivo 2" << endl;
49 //--- set this is you want only signal candidates in output file
50 //analysis->SetOnlySignal();
51 analysis->SetOnlyPrimaryJpsi();
52 //analysis->SetOnlySignalAndPrimaryJpsi();
53 //--- set this if you want to compute primary vertex candidate by candidate using
54 // other tracks in the event (for pp, broad interaction region);
55 // it is time-consuming procedure, so it can be done after a
56 // preselection on invariant mass
57 //analysis->SetVertexOnTheFly();
58 //analysis->SetMassCut(0.1); // GeV
59 //--- set single-track preselections
60 analysis->SetPtCut(0.); // GeV
61 analysis->Setd0Cut(0.); // micron
62 //--- set cuts on candidates to be written to file
63 // (see AliBtoJPSItoEleAnalysis.h for a description and for the defaults)
64 //analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
67 //--- check the settings
68 analysis->PrintStatus();
70 analysis->FindCandidates(evFirst,evLast,"AliJPSItoEle_all.root");
75 //==========================================================================
76 void AliBtoJPSItoEleSele() {
78 gSystem->Load("libANALYSIS");
79 gSystem->Load("libANALYSISalice");
80 gSystem->Load("libAOD.so");
81 gSystem->Load("libPWG3base.so");
82 gSystem->Load("libPWG3.so");
84 //======================== S E L E C T I O N ============================
86 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
87 analysis->SetSimulation();
88 //analysis->SetOnlySignal();
89 analysis->SetOnlyPrimaryJpsi();
90 analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
91 analysis->ApplySelection("AliBtoJPSItoEle.root","AliBtoJPSItoEle_sele.root");
96 //==========================================================================