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