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("libAOD.so");
13 gSystem->Load("libPWG3base.so");
15 //============== R E C O N S T R U C T I O N ==============================
20 // Get field from galice.root
22 delete gAlice->GetRunLoader();
26 AliRunLoader *rl = AliRunLoader::Open("galice.root");
28 cerr<<"Can not open session"<<endl;
31 Int_t retval = rl->LoadgAlice();
33 cerr<<"LoadgAlice returned error"<<endl;
37 gAlice=rl->GetAliRun();
38 AliMagF *fiel = (AliMagF*)gAlice->Field();
39 // Set the conversion constant between curvature and Pt
40 AliTracker::SetFieldMap(fiel,kTRUE);
42 AliBtoJPSItoEleAnalysis *analysis = new AliBtoJPSItoEleAnalysis();
43 // set simulation to take info on PDG codes from kine tree
44 analysis->SetSimulation();
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);
64 //--- check the settings
65 analysis->PrintStatus();
67 analysis->FindCandidates(evFirst,evLast,"AliBtoJPSItoEle_all.root");
72 //==========================================================================
73 void AliBtoJPSItoEleSele() {
75 gSystem->Load("libAOD.so");
76 gSystem->Load("libPWG3base.so");
78 //======================== S E L E C T I O N ============================
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");
89 //==========================================================================