memory consumption measures only memory used by preprocessor
[u/mrichter/AliRoot.git] / PWG3 / vertexingOld / 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
c75b58db 9 gSystem->Load("libANALYSIS");
7201805f 10 gSystem->Load("libANALYSISalice");
9af36e3a 11 gSystem->Load("libAOD.so");
12 gSystem->Load("libPWG3base.so");
7d7abf3f 13 gSystem->Load("libPWG3.so");
3d1d2038 14 gSystem->Load("libPWG3vertexingOld.so");
eafbab77 15
16 //============== R E C O N S T R U C T I O N ==============================
17
18 Int_t evFirst = 0;
19 Int_t evLast = 1000000;
20
21 // Get field from galice.root
22 if (gAlice) {
23 delete gAlice->GetRunLoader();
24 delete gAlice;
25 gAlice=0;
26 }
27 AliRunLoader *rl = AliRunLoader::Open("galice.root");
28 if (rl == 0x0) {
29 cerr<<"Can not open session"<<endl;
30 return;
31 }
32 Int_t retval = rl->LoadgAlice();
33 if (retval) {
34 cerr<<"LoadgAlice returned error"<<endl;
35 delete rl;
36 return;
37 }
38 gAlice=rl->GetAliRun();
39 AliMagF *fiel = (AliMagF*)gAlice->Field();
40 // Set the conversion constant between curvature and Pt
41 AliTracker::SetFieldMap(fiel,kTRUE);
42
43 AliD0toKpiAnalysis *analysis = new AliD0toKpiAnalysis();
44 // set simulation to take info on PDG codes from kine tree
45 analysis->SetSimulation();
46 rl->LoadKinematics();
47 analysis->MakeTracksRefFile(gAlice,evFirst,evLast);
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 D0 by D0 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 D0 candidates to be written to file
60 // (see AliD0toKpiAnalysis.h for a description and for the defaults)
61 //analysis->SetD0Cuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
62 analysis->SetD0Cuts();
63
64 //--- check the settings
65 analysis->PrintStatus();
66
67 analysis->FindCandidates(evFirst,evLast,"AliD0toKpi.root");
68 delete analysis;
69
70 return;
71}
72//==========================================================================
73void AliD0toKpiSele() {
74
c75b58db 75 gSystem->Load("libANALYSIS");
7201805f 76 gSystem->Load("libANALYSISalice");
9af36e3a 77 gSystem->Load("libAOD.so");
78 gSystem->Load("libPWG3base.so");
7d7abf3f 79 gSystem->Load("libPWG3.so");
3d1d2038 80 gSystem->Load("libPWG3vertexingOld.so");
eafbab77 81
82 //======================== S E L E C T I O N ============================
83
84 AliD0toKpiAnalysis *analysis = new AliD0toKpiAnalysis();
85 analysis->SetSimulation();
86 analysis->SetOnlySignal();
87 analysis->SetD0Cuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5);
88 analysis->ApplySelection("AliD0toKpi.root","AliD0toKpi_sele.root");
89 delete analysis;
90
91 return;
92}
93//==========================================================================
94
95
96
97
98
99