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