]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PWG3/AliD0toKpiTest.C
Compilation warnings removed (Andrea)
[u/mrichter/AliRoot.git] / PWG3 / AliD0toKpiTest.C
CommitLineData
eafbab77 1//--------------------------------------------------------------------------
2// Test macro for reconstruction and analysis of D0->Kpi
3//
4// Andrea Dainese, andrea.dainese@lnl.infn.it
5//--------------------------------------------------------------------------
6
7void AliD0toKpiReco() {
8
9af36e3a 9 gSystem->Load("libAOD.so");
10 gSystem->Load("libPWG3base.so");
eafbab77 11
12 //============== R E C O N S T R U C T I O N ==============================
13
14 Int_t evFirst = 0;
15 Int_t evLast = 1000000;
16
17 // Get field from galice.root
18 if (gAlice) {
19 delete gAlice->GetRunLoader();
20 delete gAlice;
21 gAlice=0;
22 }
23 AliRunLoader *rl = AliRunLoader::Open("galice.root");
24 if (rl == 0x0) {
25 cerr<<"Can not open session"<<endl;
26 return;
27 }
28 Int_t retval = rl->LoadgAlice();
29 if (retval) {
30 cerr<<"LoadgAlice returned error"<<endl;
31 delete rl;
32 return;
33 }
34 gAlice=rl->GetAliRun();
35 AliMagF *fiel = (AliMagF*)gAlice->Field();
36 // Set the conversion constant between curvature and Pt
37 AliTracker::SetFieldMap(fiel,kTRUE);
38
39 AliD0toKpiAnalysis *analysis = new AliD0toKpiAnalysis();
40 // set simulation to take info on PDG codes from kine tree
41 analysis->SetSimulation();
42 rl->LoadKinematics();
43 analysis->MakeTracksRefFile(gAlice,evFirst,evLast);
44 //--- set this is you want only signal candidates in output file
45 //analysis->SetOnlySignal();
46 //--- set this if you want to compute primary vertex D0 by D0 using
47 // other tracks in the event (for pp, broad interaction region);
48 // it is time-consuming procedure, so it can be done after a
49 // preselection on invariant mass
50 //analysis->SetVertexOnTheFly();
51 //analysis->SetMassCut(0.1); // GeV
52 //--- set single-track preselections
53 analysis->SetPtCut(0.); // GeV
54 analysis->Setd0Cut(0.); // micron
55 //--- set cuts on D0 candidates to be written to file
56 // (see AliD0toKpiAnalysis.h for a description and for the defaults)
57 //analysis->SetD0Cuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
58 analysis->SetD0Cuts();
59
60 //--- check the settings
61 analysis->PrintStatus();
62
63 analysis->FindCandidates(evFirst,evLast,"AliD0toKpi.root");
64 delete analysis;
65
66 return;
67}
68//==========================================================================
69void AliD0toKpiSele() {
70
9af36e3a 71 gSystem->Load("libAOD.so");
72 gSystem->Load("libPWG3base.so");
eafbab77 73
74 //======================== S E L E C T I O N ============================
75
76 AliD0toKpiAnalysis *analysis = new AliD0toKpiAnalysis();
77 analysis->SetSimulation();
78 analysis->SetOnlySignal();
79 analysis->SetD0Cuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
80 analysis->ApplySelection("AliD0toKpi.root","AliD0toKpi_sele.root");
81 delete analysis;
82
83 return;
84}
85//==========================================================================
86
87
88
89
90
91