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");
17 //============== R E C O N S T R U C T I O N ==============================
22 // Get field from galice.root
24 delete gAlice->GetRunLoader();
28 AliRunLoader *rl = AliRunLoader::Open("galice.root");
30 cerr<<"Can not open session"<<endl;
33 Int_t retval = rl->LoadgAlice();
35 cerr<<"LoadgAlice returned error"<<endl;
39 gAlice=rl->GetAliRun();
40 AliMagF *fiel = (AliMagF*)gAlice->Field();
41 // Set the conversion constant between curvature and Pt
42 AliTracker::SetFieldMap(fiel,kTRUE);
44 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
45 // set simulation to take info on PDG codes from kine tree
46 analysis->SetSimulation();
48 analysis->MakeTracksRefFile(gAlice,evFirst,evLast);
49 // cout << "ci arrivo 2" << endl;
50 //--- set this is you want only signal candidates in output file
51 analysis->SetOnlySignal();
52 //--- set this if you want to compute primary vertex candidate by candidate using
53 // other tracks in the event (for pp, broad interaction region);
54 // it is time-consuming procedure, so it can be done after a
55 // preselection on invariant mass
56 //analysis->SetVertexOnTheFly();
57 //analysis->SetMassCut(0.1); // GeV
58 //--- set single-track preselections
59 analysis->SetPtCut(0.); // GeV
60 analysis->Setd0Cut(0.); // micron
61 //--- set cuts on candidates to be written to file
62 // (see AliBtoJPSItoEleAnalysis.h for a description and for the defaults)
63 //analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
66 //--- check the settings
67 analysis->PrintStatus();
69 analysis->FindCandidates(evFirst,evLast,"AliBtoJPSItoEle_all.root");
74 //==========================================================================
75 void AliBtoJPSItoEleSele() {
77 gSystem->Load("libANALYSIS");
78 gSystem->Load("libANALYSISalice");
79 gSystem->Load("libAOD.so");
80 gSystem->Load("libPWG3base.so");
81 gSystem->Load("libPWG3.so");
83 //======================== S E L E C T I O N ============================
85 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
86 analysis->SetSimulation();
87 analysis->SetOnlySignal();
88 analysis->SetBCuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
89 analysis->ApplySelection("AliBtoJPSItoEle.root","AliBtoJPSItoEle_sele.root");
94 //==========================================================================