1 //--------------------------------------------------------------------------
2 // Test macro for reconstruction and analysis of B->J/psi*X
5 // Giuseppe Bruno, giuseppe.bruno@ba.infn.it
6 // based on the for charm golden channel (D0->Kpi)
7 //--------------------------------------------------------------------------
9 void AliBtoJPSItoEleReco_all() {
11 gSystem->Load("libANALYSIS");
12 gSystem->Load("libANALYSISalice");
13 gSystem->Load("libAOD.so");
14 gSystem->Load("libPWG3base.so");
15 gSystem->Load("libPWG3.so");
16 gSystem->Load("libPWG3vertexingOld.so");
18 //============== R E C O N S T R U C T I O N ==============================
23 // Get field from galice.root
25 delete gAlice->GetRunLoader();
29 AliRunLoader *rl = AliRunLoader::Open("galice.root");
31 cerr<<"Can not open session"<<endl;
34 Int_t retval = rl->LoadgAlice();
36 cerr<<"LoadgAlice returned error"<<endl;
40 gAlice=rl->GetAliRun();
41 AliMagF *fiel = (AliMagF*)gAlice->Field();
42 // Set the conversion constant between curvature and Pt
43 AliTracker::SetFieldMap(fiel,kTRUE);
45 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
46 // set simulation to take info on PDG codes from kine tree
47 analysis->SetSimulation();
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);
67 //--- check the settings
68 analysis->PrintStatus();
70 analysis->FindCandidates(evFirst,evLast,"AliBtoJPSItoEle_all.root");
75 //==========================================================================
76 void AliBtoJPSItoEleSele() {
78 gSystem->Load("libANALYSIS");
79 gSystem->Load("libANALYSISalice");
80 gSystem->Load("libAOD.so");
81 gSystem->Load("libPWG3base.so");
82 gSystem->Load("libPWG3.so");
83 gSystem->Load("libPWG3vertexingOld.so");
85 //======================== S E L E C T I O N ============================
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");
96 //==========================================================================