]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/AliPrimJPSItoEleReco_all.C
Added missing getters (Andrea)
[u/mrichter/AliRoot.git] / PWG3 / AliPrimJPSItoEleReco_all.C
1 //--------------------------------------------------------------------------
2 // Test macro for reconstruction and analysis of Primary J/psi into e+e-
3 //
4 //     Giuseppe Bruno, giuseppe.bruno@ba.infn.it
5 //      based on the for charm golden channel (D0->Kpi)
6 //--------------------------------------------------------------------------
7
8 void AliPrimJPSItoEleReco_all() {
9   
10   gSystem->Load("libANALYSIS");
11   gSystem->Load("libAOD.so");
12   gSystem->Load("libPWG3base.so");
13
14   //==============  R E C O N S T R U C T I O N ==============================
15
16   Int_t evFirst = 0;
17   Int_t evLast  = 99;
18
19   // Get field from galice.root
20   if (gAlice) {
21     delete gAlice->GetRunLoader();
22     delete gAlice; 
23     gAlice=0;
24   }  
25   AliRunLoader *rl = AliRunLoader::Open("galice.root");
26   if (rl == 0x0) {
27     cerr<<"Can not open session"<<endl;
28     return;
29   }
30   Int_t retval = rl->LoadgAlice();
31   if (retval) {
32     cerr<<"LoadgAlice returned error"<<endl;
33     delete rl;
34     return;
35   }
36   gAlice=rl->GetAliRun();
37   AliMagF *fiel = (AliMagF*)gAlice->Field();
38   // Set the conversion constant between curvature and Pt
39   AliTracker::SetFieldMap(fiel,kTRUE);
40
41   AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
42   // set simulation to take info on PDG codes from kine tree
43   analysis->SetSimulation();
44   rl->LoadKinematics(); 
45   analysis->MakeTracksRefFile(gAlice,evFirst,evLast);
46   // cout << "ci arrivo 2" << endl;
47   //--- set this is you want only signal candidates in output file
48    //analysis->SetOnlySignal();
49    analysis->SetOnlyPrimaryJpsi();
50    //analysis->SetOnlySignalAndPrimaryJpsi();
51   //--- set this if you want to compute primary vertex candidate by candidate using 
52   //    other tracks in the event (for pp, broad interaction region);
53   //    it is time-consuming procedure, so it can be done after a 
54   //    preselection on invariant mass
55   //analysis->SetVertexOnTheFly();
56   //analysis->SetMassCut(0.1); // GeV
57   //--- set single-track preselections
58   analysis->SetPtCut(0.); // GeV
59   analysis->Setd0Cut(0.); // micron
60   //--- set cuts on candidates to be written to file
61   //    (see AliBtoJPSItoEleAnalysis.h for a description and for the defaults)
62   //analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
63   analysis->SetBCuts();
64
65   //--- check the settings
66   analysis->PrintStatus();
67
68   analysis->FindCandidates(evFirst,evLast,"AliJPSItoEle_all.root");
69   delete analysis;
70
71   return;
72 }
73 //==========================================================================
74 void AliBtoJPSItoEleSele() {  
75
76   gSystem->Load("libAOD.so");
77   gSystem->Load("libPWG3base.so");
78
79   //========================  S E L E C T I O N ============================
80
81   AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
82   analysis->SetSimulation();
83   //analysis->SetOnlySignal();
84   analysis->SetOnlyPrimaryJpsi();
85   analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
86   analysis->ApplySelection("AliBtoJPSItoEle.root","AliBtoJPSItoEle_sele.root");
87   delete analysis;
88
89   return;
90 }
91 //==========================================================================
92  
93
94
95
96
97