]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/AliPrimJPSItoEleReco_all.C
Removing PWG3TrackExtrapInterface from PWG3base library (Gines)
[u/mrichter/AliRoot.git] / PWG3 / 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
10 gSystem->Load("libAOD.so");
11 gSystem->Load("libPWG3base.so");
12
13 //============== R E C O N S T R U C T I O N ==============================
14
15 Int_t evFirst = 0;
16 Int_t evLast = 99;
17
18 // Get field from galice.root
19 if (gAlice) {
20 delete gAlice->GetRunLoader();
21 delete gAlice;
22 gAlice=0;
23 }
24 AliRunLoader *rl = AliRunLoader::Open("galice.root");
25 if (rl == 0x0) {
26 cerr<<"Can not open session"<<endl;
27 return;
28 }
29 Int_t retval = rl->LoadgAlice();
30 if (retval) {
31 cerr<<"LoadgAlice returned error"<<endl;
32 delete rl;
33 return;
34 }
35 gAlice=rl->GetAliRun();
36 AliMagF *fiel = (AliMagF*)gAlice->Field();
37 // Set the conversion constant between curvature and Pt
38 AliTracker::SetFieldMap(fiel,kTRUE);
39
40 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
41 // set simulation to take info on PDG codes from kine tree
42 analysis->SetSimulation();
43 rl->LoadKinematics();
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);
62 analysis->SetBCuts();
63
64 //--- check the settings
65 analysis->PrintStatus();
66
67 analysis->FindCandidates(evFirst,evLast,"AliJPSItoEle_all.root");
68 delete analysis;
69
70 return;
71}
72//==========================================================================
73void AliBtoJPSItoEleSele() {
74
75 gSystem->Load("libAOD.so");
76 gSystem->Load("libPWG3base.so");
77
78 //======================== S E L E C T I O N ============================
79
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");
86 delete analysis;
87
88 return;
89}
90//==========================================================================
91
92
93
94
95
96