]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ANALYSIS/AliD0toKpiAnalysis.h
Various small fixes. Make sure Emacs knows it's C++ mode, and the like.
[u/mrichter/AliRoot.git] / ANALYSIS / AliD0toKpiAnalysis.h
1 #ifndef AliD0toKpiAnalysis_H
2 #define AliD0toKpiAnalysis_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 //-------------------------------------------------------------------------
7 //                      Class AliD0toKpiAnalysis
8 //             Reconstruction and analysis D0 -> K^- pi^+
9 //      
10 //         Origin: A. Dainese    andrea.dainese@pd.infn.it                  
11 //-------------------------------------------------------------------------
12
13 #include <TString.h>
14 #include <TNamed.h>
15 #include "AliESD.h"
16 #include "AliMagF.h"
17 #include "AliTracker.h"
18 #include "AliITStrackV2.h"
19
20 //-----------------------------------------------------------------------------
21 class AliD0toKpiAnalysis : public TNamed {
22  public:
23   //
24   AliD0toKpiAnalysis();
25   virtual ~AliD0toKpiAnalysis();
26
27   void ApplySelection(const Char_t *inName="AliD0toKpi.root",
28                       const Char_t *outName="AliD0toKpi_sele.root") const;
29   void FindCandidates(Int_t evFirst=0,Int_t evLast=0,
30                       const Char_t *outName="AliD0toKpi.root");
31   void FindCandidatesESD(Int_t evFirst=0,Int_t evLast=0,
32                          const Char_t *outName="AliD0toKpi.root");
33   void PrintStatus() const;
34   void SetBz(const AliMagF *map) { 
35     AliTracker::SetFieldMap(map,kTRUE); fBz=map->SolenoidField()/10.; 
36   }
37   void SetVertexOnTheFly() { fVertexOnTheFly=kTRUE; }
38   void SetSimulation() { fSim=kTRUE; }
39   void SetOnlySignal() { fOnlySignal=kTRUE; }
40   void SetPtCut(Double_t pt=0.) { fPtCut=pt; }
41   void Setd0Cut(Double_t d0=0.) { fd0Cut=d0; } 
42   void SetMassCut(Double_t deltaM=1000.) { fMassCut=deltaM; }
43   void SetD0Cuts(Double_t cut0=1000.,Double_t cut1=100000.,
44                  Double_t cut2=1.1,Double_t cut3=0.,Double_t cut4=0.,
45                  Double_t cut5=100000.,Double_t cut6=100000.,
46                  Double_t cut7=100000000.,Double_t cut8=-1.1); 
47   void SetD0Cuts(const Double_t cuts[9]); 
48   void SetPID(const Char_t * pid="TOFparam_PbPb") { fPID=pid; }
49   //
50  private:
51   //
52   Double_t fBz;             // value of the magnetic field
53   Bool_t   fVertexOnTheFly; // flag for primary vertex reco on the fly
54   Bool_t   fSim;            // flag for the analysis of simulated events
55   Bool_t   fOnlySignal;     // write to file only signal candidates (for sim)
56   TString  fPID;           // PID scheme
57
58   Double_t fV1[3]; // primary vertex position (in cm)
59   Double_t fPtCut;   // minimum track pt (in GeV/c)
60   Double_t fd0Cut;   // minimum track |rphi impact parameter| (in micron) 
61   Double_t fMassCut; // maximum of |InvMass-MD0| (in GeV)
62   Double_t fD0Cuts[9]; // cuts on D0 candidates (see SetD0Cuts())
63                        // (to be passed to function AliD0toKpi::Select())
64                        // 0 = inv. mass half width [GeV]   
65                        // 1 = dca [micron]
66                        // 2 = cosThetaStar 
67                        // 3 = pTK [GeV/c]
68                        // 4 = pTPi [GeV/c]
69                        // 5 = d0K [micron]   upper limit!
70                        // 6 = d0Pi [micron]  upper limit!
71                        // 7 = d0d0 [micron^2]
72                        // 8 = cosThetaPoint
73
74   //
75   Double_t CalculateTOFmass(Double_t mom,Double_t length,Double_t time) const;
76   void     MakeTracksRefFile(Int_t evFirst=0,Int_t evLast=0) const;
77   void     MakeTracksRefFileESD() const;
78   Bool_t   SelectInvMass(const Double_t p[6]) const;
79   void     SelectTracks(TTree &trkTree,
80                         TObjArray &trksP,Int_t *trkEntryP,Int_t &nTrksP,
81                         TObjArray &trksN,Int_t *trkEntryN,Int_t &nTrksN) const;
82   void     SelectTracksESD(AliESD &event,
83                            TObjArray &trksP,Int_t *trkEntryP,Int_t &nTrksP,
84                            TObjArray &trksN,Int_t *trkEntryN,Int_t &nTrksN) const;
85   void     SelectTracksESDvtx(AliESD &event,TTree *trkTree,
86                               TObjArray &trksP,Int_t *trkEntryP,Int_t &nTrksP,
87                               TObjArray &trksN,Int_t *trkEntryN,Int_t &nTrksN) const;
88   void     SetVertex1(Double_t x=0.,Double_t y=0.,Double_t z=0.) 
89     { fV1[0]=x;fV1[1]=y;fV1[2]=z; }
90   void     SimulationInfo(TTree *treeD0in,TTree *treeD0out) const;
91   Bool_t   SingleTrkCuts(const AliITStrackV2& trk) const;
92   //
93   ClassDef(AliD0toKpiAnalysis,2)  // Reconstruction of D0 candidates class
94 };
95
96
97 #endif
98
99
100
101
102
103
104
105