]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/AliBtoJPSItoEleReco_all.C
reading RAW without data
[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("libANALYSIS");
12   gSystem->Load("libAOD.so");
13   gSystem->Load("libPWG3base.so");
14
15   //==============  R E C O N S T R U C T I O N ==============================
16
17   Int_t evFirst = 0;
18   Int_t evLast  = 99;
19
20   // Get field from galice.root
21   if (gAlice) {
22     delete gAlice->GetRunLoader();
23     delete gAlice; 
24     gAlice=0;
25   }  
26   AliRunLoader *rl = AliRunLoader::Open("galice.root");
27   if (rl == 0x0) {
28     cerr<<"Can not open session"<<endl;
29     return;
30   }
31   Int_t retval = rl->LoadgAlice();
32   if (retval) {
33     cerr<<"LoadgAlice returned error"<<endl;
34     delete rl;
35     return;
36   }
37   gAlice=rl->GetAliRun();
38   AliMagF *fiel = (AliMagF*)gAlice->Field();
39   // Set the conversion constant between curvature and Pt
40   AliTracker::SetFieldMap(fiel,kTRUE);
41
42   AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
43   // set simulation to take info on PDG codes from kine tree
44   analysis->SetSimulation();
45   rl->LoadKinematics(); 
46   analysis->MakeTracksRefFile(gAlice,evFirst,evLast);
47   // cout << "ci arrivo 2" << endl;
48   //--- set this is you want only signal candidates in output file
49    analysis->SetOnlySignal();
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,"AliBtoJPSItoEle_all.root");
68   delete analysis;
69
70   return;
71 }
72 //==========================================================================
73 void 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->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
84   analysis->ApplySelection("AliBtoJPSItoEle.root","AliBtoJPSItoEle_sele.root");
85   delete analysis;
86
87   return;
88 }
89 //==========================================================================
90  
91
92
93
94
95