]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PWG3/AliBtoJPSItoEleAnalysis.h
Track regerence id for hmpid added.
[u/mrichter/AliRoot.git] / PWG3 / AliBtoJPSItoEleAnalysis.h
1 #ifndef AliBtoJPSItoEleAnalysis_H
2 #define AliBtoJPSItoEleAnalysis_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 AliBtoJPSItoEleAnalysis
8 //             Reconstruction and analysis B -> J/\psi + X 
9 //                                                |_> e+ e- 
10 //      
11 //         Origin: G.E Bruno    giuseppe.bruno@ba.infn.it                
12 //  based on Class for charm golden channel (D0->Kpi)
13 //-------------------------------------------------------------------------
14
15 #include <TString.h>
16 #include <TNamed.h>
17 #include "AliESDEvent.h"
18 #include "AliRun.h"
19
20 //-----------------------------------------------------------------------------
21 class AliBtoJPSItoEleAnalysis : public TNamed {
22  public:
23   //
24   AliBtoJPSItoEleAnalysis();
25   virtual ~AliBtoJPSItoEleAnalysis();
26
27   void ApplySelection(const Char_t *inName="AliBtoJPSItoEle.root",
28                       const Char_t *outName="AliBtoJPSItoEle_sele.root") const;
29   void FindCandidates(Int_t evFirst=0,Int_t evLast=0,
30                       const Char_t *outName="AliBtoJPSItoEle.root");
31   void MakeTracksRefFile(AliRun *gAlice,Int_t evFirst=0,Int_t evLast=0) const;
32   void PrintStatus() const;
33   void SetVertexOnTheFly() { fVertexOnTheFly=kTRUE; }
34   void SetSimulation() { fSim=kTRUE; }
35   void SetOnlySignal() { fOnlySignal=kTRUE; }
36   void SetOnlyPrimaryJpsi() { fOnlyPrimaryJpsi=kTRUE; }
37   void SetOnlySignalAndPrimaryJpsi() { fOnlySignal=kTRUE; fOnlyPrimaryJpsi=kTRUE; }
38   void SetPtCut(Double_t pt=0.) { fPtCut=pt; }
39   void Setd0Cut(Double_t d0=0.) { fd0Cut=d0; } 
40   void SetPidCut(Double_t pid=0.) { fPidCut=pid; }
41   void SetMassCut(Double_t deltaM=1000.) { fMassCut=deltaM; }
42   void SetBCuts(Double_t cut0=1000.,Double_t cut1=100000.,
43                  Double_t cut2=1.1,Double_t cut3=0.,Double_t cut4=0.,
44                  Double_t cut5=100000.,Double_t cut6=100000.,
45                  Double_t cut7=100000000.,Double_t cut8=-1.1); 
46   void SetBCuts(const Double_t cuts[9]); 
47   void SetPID(const Char_t * pid="TRDTPCparam") { fPID=pid; }
48   //
49  private:
50   //
51   Bool_t   fVertexOnTheFly; // flag for primary vertex reco on the fly
52   Bool_t   fSim;            // flag for the analysis of simulated events
53   Bool_t   fOnlySignal;     // write to file only signal candidates (for sim)
54   Bool_t   fOnlyPrimaryJpsi;// write to file only primary Jpsi candidates (for sim)
55   TString  fPID;           // PID scheme
56
57   Double_t fV1[3]; // primary vertex position (in cm)
58   Double_t fPtCut;   // minimum track pt (in GeV/c)
59   Double_t fd0Cut;   // minimum track |rphi impact parameter| (in micron) 
60   Double_t fMassCut; // maximum of |InvMass-M(J/Psi)| (in GeV)
61   Double_t fPidCut; // min. pid probability as an electron
62   Double_t fBCuts[9]; // cuts on b candidates (see SetBCuts())
63                        // (to be passed to function AliBtoJPSItoEle::Select())
64                        // 0 = inv. mass half width [GeV]   
65                        // 1 = dca [micron]
66                        // 2 = cosThetaStar 
67                        // 3 = pTP [GeV/c] (positron)
68                        // 4 = pTN [GeV/c] (electron)
69                        // 5 = d0P [micron]   upper limit!
70                        // 6 = d0N [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   Bool_t   SelectInvMass(const Double_t p[6]) const;
77   void     SelectTracks(AliESDEvent *event,
78                         TObjArray &trksP,Int_t *trkEntryP,Int_t &nTrksP,
79                         TObjArray &trksN,Int_t *trkEntryN,Int_t &nTrksN) const;
80   void     SetVertex1(Double_t x=0.,Double_t y=0.,Double_t z=0.) 
81     { fV1[0]=x;fV1[1]=y;fV1[2]=z; }
82   void     SimulationInfo(TTree *treeBin,TTree *treeBout) const;
83   Bool_t   SingleTrkCuts(const AliESDtrack& trk, Double_t b) const;
84   //
85   ClassDef(AliBtoJPSItoEleAnalysis,1)  // Reconstruction of B->JPSI-> e+e- candidates class
86 };
87
88
89 #endif
90
91
92