]>
Commit | Line | Data |
---|---|---|
3a9a3487 | 1 | //-------------------------------------------------------------------------- |
2 | // Test macro for reconstruction and analysis of D0->Kpi | |
3 | // | |
4 | // Andrea Dainese, andrea.dainese@pd.infn.it | |
5 | //-------------------------------------------------------------------------- | |
6 | ||
7 | void AliD0toKpiReco() { | |
8 | ||
9 | //============== R E C O N S T R U C T I O N ============================== | |
10 | ||
11 | // Look for field value in galice.root | |
12 | Double_t field = 0.4; | |
13 | if (gAlice) { | |
14 | delete gAlice->GetRunLoader(); | |
15 | delete gAlice; | |
16 | gAlice=0; | |
17 | } | |
18 | if(!gSystem->AccessPathName("galice.root",kFileExists)) { | |
19 | AliRunLoader *rl = AliRunLoader::Open("galice.root"); | |
20 | rl->LoadgAlice(); | |
21 | field=(Double_t)(gAlice->Field()->SolenoidField())/10.; | |
22 | printf(" B = %3.1f T read from gAlice and set\n",field); | |
23 | delete gAlice->GetRunLoader(); | |
24 | delete gAlice; | |
25 | gAlice=0; | |
26 | } else { | |
27 | printf(" File galice.root not found: default %3.1f T being used!\n",field); | |
28 | } | |
29 | ||
30 | AliD0toKpiAnalysis *analysis = new AliD0toKpiAnalysis(); | |
31 | //--- set magnetic field | |
32 | analysis->SetBz(field); | |
33 | // set simulation to take info on PDG codes from kine tree | |
34 | //analysis->SetSimulation(); | |
35 | //--- set this is you want only signal candidates in output file | |
36 | //analysis->SetOnlySignal(); | |
37 | //--- set this if you want to compute primary vertex D0 by D0 using | |
38 | // other tracks in the event (for pp, broad interaction region); | |
39 | // it is time-consuming procedure, so it can be done after a | |
40 | // preselection on invariant mass | |
41 | //analysis->SetVertexOnTheFly(); | |
42 | //analysis->SetMassCut(0.1); // GeV | |
43 | //--- set single-track preselections | |
44 | analysis->SetPtCut(0.5); // GeV | |
45 | analysis->Setd0Cut(50.); // micron | |
46 | //--- set cuts on D0 candidates to be written to file | |
47 | // (see AliD0toKpiAnalysis.h for a description and for the defaults) | |
48 | analysis->SetD0Cuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5); | |
49 | //analysis->SetD0Cuts(); | |
50 | ||
51 | //--- check the settings | |
52 | analysis->PrintStatus(); | |
53 | ||
54 | Int_t evFirst = 0; | |
55 | Int_t evLast = 0; | |
56 | //analysis->SetDebug(); | |
57 | //analysis->FindCandidates(evFirst,evLast,"AliD0toKpi.root"); | |
58 | analysis->FindCandidatesESD(evFirst,evLast,"AliD0toKpi.root"); | |
59 | delete analysis; | |
60 | ||
61 | return; | |
62 | } | |
63 | //========================================================================== | |
64 | void AliD0toKpiSele() { | |
65 | ||
66 | //======================== S E L E C T I O N ============================ | |
67 | ||
68 | AliD0toKpiAnalysis *analysis = new AliD0toKpiAnalysis(); | |
69 | analysis->SetSimulation(); | |
70 | analysis->SetOnlySignal(); | |
71 | analysis->SetD0Cuts(0.1,1000.,1.1,0.,0.,10000.,10000.,0.,.5); | |
72 | analysis->ApplySelection("AliD0toKpi.root","AliD0toKpi_sele.root"); | |
73 | delete analysis; | |
74 | ||
75 | return; | |
76 | } | |
77 | //========================================================================== | |
78 | ||
79 | ||
80 | ||
81 | ||
82 | ||
83 |