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