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 */
6 //-------------------------------------------------------------------------
7 // Class AliBtoJPSItoEleAnalysis
8 // Reconstruction and analysis B -> J/\psi + X
11 // Origin: G.E Bruno giuseppe.bruno@ba.infn.it
12 // based on Class for charm golden channel (D0->Kpi)
13 //-------------------------------------------------------------------------
17 #include "AliESDEvent.h"
20 //-----------------------------------------------------------------------------
21 class AliBtoJPSItoEleAnalysis : public TNamed {
24 AliBtoJPSItoEleAnalysis();
25 virtual ~AliBtoJPSItoEleAnalysis();
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 // void SetKFPrimVertex() { fKFPrimVertex=kTRUE; } //new setter
49 void SetKFSecondVertex() {fKFSecondVertex=kTRUE;} //new setter
50 void UnSetKFSecondVertex() {fKFSecondVertex=kFALSE;} //new setter
51 // void SetKFTopConstr() { fKFTopConstr=kTRUE; } //new setter
55 Bool_t fVertexOnTheFly; // flag for primary vertex reco on the fly
56 Bool_t fSim; // flag for the analysis of simulated events
57 Bool_t fOnlySignal; // write to file only signal candidates (for sim)
58 Bool_t fOnlyPrimaryJpsi;// write to file only primary Jpsi candidates (for sim)
59 TString fPID; // PID scheme
61 Double_t fV1[3]; // primary vertex position (in cm)
62 Double_t fPtCut; // minimum track pt (in GeV/c)
63 Double_t fd0Cut; // minimum track |rphi impact parameter| (in micron)
64 Double_t fMassCut; // maximum of |InvMass-M(J/Psi)| (in GeV)
65 Double_t fPidCut; // min. pid probability as an electron
66 Bool_t fKFSecondVertex; // flag for Kalmann Filter reco of secondary vertex
67 // Bool_t fKFTopConstr; // flag for Kalmann Filter topological constraint in primary vtx reco
68 // Bool_t fKFPrimVertex; // flag for Kalmann Filter reco of primary vertex
69 Double_t fBCuts[9]; // cuts on b candidates (see SetBCuts())
70 // (to be passed to function AliBtoJPSItoEle::Select())
71 // 0 = inv. mass half width [GeV]
74 // 3 = pTP [GeV/c] (positron)
75 // 4 = pTN [GeV/c] (electron)
76 // 5 = d0P [micron] upper limit!
77 // 6 = d0N [micron] upper limit!
78 // 7 = d0d0 [micron^2]
82 Double_t CalculateTOFmass(Double_t mom,Double_t length,Double_t time) const;
83 Bool_t SelectInvMass(const Double_t p[6]) const;
84 void SelectTracks(AliESDEvent *event,
85 TObjArray &trksP,Int_t *trkEntryP,Int_t &nTrksP,
86 TObjArray &trksN,Int_t *trkEntryN,Int_t &nTrksN) const;
87 void SetVertex1(Double_t x=0.,Double_t y=0.,Double_t z=0.)
88 { fV1[0]=x;fV1[1]=y;fV1[2]=z; }
89 void SimulationInfo(TTree *treeBin,TTree *treeBout) const;
90 Bool_t SingleTrkCuts(const AliESDtrack& trk, Double_t b) const;
92 ClassDef(AliBtoJPSItoEleAnalysis,2) // Reconstruction of B->JPSI-> e+e- candidates class