]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/AliBtoJPSItoEleReco_all.C
Decay mode kAllMuonic added. (Hermine Woehri)
[u/mrichter/AliRoot.git] / PWG3 / AliBtoJPSItoEleReco_all.C
1 //--------------------------------------------------------------------------
2 // Test macro for reconstruction and analysis of B->J/psi*X
3 //                                                   |_>e+e-
4 //
5 //     Giuseppe Bruno, giuseppe.bruno@ba.infn.it
6 //      based on the for charm golden channel (D0->Kpi)
7 //--------------------------------------------------------------------------
8
9 void AliBtoJPSItoEleReco_all() {
10   
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   //--- set this if you want to compute primary vertex candidate by candidate using 
50   //    other tracks in the event (for pp, broad interaction region);
51   //    it is time-consuming procedure, so it can be done after a 
52   //    preselection on invariant mass
53   //analysis->SetVertexOnTheFly();
54   //analysis->SetMassCut(0.1); // GeV
55   //--- set single-track preselections
56   analysis->SetPtCut(0.); // GeV
57   analysis->Setd0Cut(0.); // micron
58   //--- set cuts on candidates to be written to file
59   //    (see AliBtoJPSItoEleAnalysis.h for a description and for the defaults)
60   //analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
61   analysis->SetBCuts();
62
63   //--- check the settings
64   analysis->PrintStatus();
65
66   analysis->FindCandidates(evFirst,evLast,"AliBtoJPSItoEle_all.root");
67   delete analysis;
68
69   return;
70 }
71 //==========================================================================
72 void AliBtoJPSItoEleSele() {  
73
74   gSystem->Load("libAOD.so");
75   gSystem->Load("libPWG3base.so");
76
77   //========================  S E L E C T I O N ============================
78
79   AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
80   analysis->SetSimulation();
81   analysis->SetOnlySignal();
82   analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
83   analysis->ApplySelection("AliBtoJPSItoEle.root","AliBtoJPSItoEle_sele.root");
84   delete analysis;
85
86   return;
87 }
88 //==========================================================================
89  
90
91
92
93
94