memory consumption measures only memory used by preprocessor
[u/mrichter/AliRoot.git] / PWG3 / vertexingOld / AliBtoJPSItoEle.h
CommitLineData
27e190fb 1#ifndef AliBtoJPSItoEle_H
2#define AliBtoJPSItoEle_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 AliBtoJPSItoEle
8// Reconstructed B -> J\PSI+X --> e+ e- *X class
9//
10// Note: the two decay tracks are labelled: 0 (positive electron)
11// 1 (negative electron)
12//
13// Origin: G.E. Bruno giuseppe.bruno@ba.infn.it
14// based on Class for charm golden channel (D0->Kpi) (thanks to Andrea Dainese!)
15//-------------------------------------------------------------------------
16
17#include <TObject.h>
18#include <TMath.h>
19
20//----------------------------------------------------------------------------
21// Some constants (masses)
22//
23// particle masses
24const Double_t kMJPsi = 3.096916; // J/Psi mass
25const Double_t kMe = 0.000510998902; // elec mass
26
27
28
29
30//-----------------------------------------------------------------------------
31class AliBtoJPSItoEle : public TObject {
32 public:
33 //
34 AliBtoJPSItoEle();
35 AliBtoJPSItoEle(Int_t ev,Int_t trkNum[2],
36 Double_t v1[3],Double_t v2[3],Double_t dca,
37 Double_t mom[6],Double_t d0[2]);
38 virtual ~AliBtoJPSItoEle();
27e190fb 39
40 Double_t Alpha() const { return (Ql(0)-Ql(1))/(Ql(0)+Ql(1)); }
41 void ApplyPID(TString pidScheme="TRDTPCparam");
42 Double_t ChildrenRelAngle() const;
43 void ComputeWgts();
44 void CorrectWgt4BR(Double_t factor);
45 Double_t CosPointing() const;
46 Double_t CosPointingXY() const;
47 void CosThetaStar(Double_t &ctsJPSI) const;
48 Double_t Ct() const {return Length()*kMJPsi/P();}
49 Double_t Energy() const { return TMath::Sqrt(P()*P()+kMJPsi*kMJPsi); }
50 Double_t Eta() const;
51 Double_t EtaChild(Int_t child) const;
52 Int_t EventNo() const {return TMath::Abs(fEvent);}
53 Double_t GetDCA() const { return 10000.*fDCA; }
54 Int_t GetTrkNum(Int_t child) const { return fTrkNum[child]; }
55 Double_t Getd0Child(Int_t child) const { return fd0[child]; }
56 Int_t GetPdgChild(Int_t child) const { return fPdg[child]; }
57 Int_t GetPdgMum(Int_t child) const {return fMum[child]; }
58 Int_t GetPdgGMum(Int_t child) const {return fGMum[child]; }
59 void GetPIDresponse(Double_t resp0[5],Double_t resp1[5]) const;
0ac6b6e8 60 Double_t GetTagEl(Int_t child) const;
27e190fb 61 void GetWgts(Double_t &WgtJPsi) const;
62 void GetPrimaryVtx(Double_t vtx[3]) const
63 { vtx[0]=fV1x; vtx[1]=fV1y; vtx[2]=fV1z; }
64 void GetSecondaryVtx(Double_t vtx[3]) const
65 { vtx[0]=fV2x; vtx[1]=fV2y; vtx[2]=fV2z; }
66
67 Double_t ImpPar() const;
68 void InvMass(Double_t &mJPsi) const;
69 Bool_t IsSignal() const { if(fSignal) return kTRUE; return kFALSE; }
70 Bool_t IsJpsiPrimary() const { if(fJpsiPrimary) return kTRUE; return kFALSE; }
71 Double_t Length() const
72 { return TMath::Sqrt((fV1x-fV2x)*(fV1x-fV2x)
73 +(fV1y-fV2y)*(fV1y-fV2y)+(fV1z-fV2z)*(fV1z-fV2z)); }
74 Double_t P() const { return TMath::Sqrt(Pt()*Pt()+Pz()*Pz()); }
75 Double_t PChild(Int_t child) const { return TMath::Sqrt(fPx[child]*fPx[child]+fPy[child]*fPy[child]+fPz[child]*fPz[child]); }
76 Double_t ProdImpParams() const { return fd0[0]*fd0[1]; }
77 Double_t Pt() const { return TMath::Sqrt(Px()*Px()+Py()*Py()); }
78 Double_t PtChild(Int_t child) const { return TMath::Sqrt(fPx[child]*fPx[child]+fPy[child]*fPy[child]); }
79 Double_t Px() const { return (fPx[0]+fPx[1]); }
80 Double_t Py() const { return (fPy[0]+fPy[1]); }
81 Double_t Pz() const { return (fPz[0]+fPz[1]); }
82 Double_t Ql(Int_t child) const;
83 Double_t Qt() const;
84 Double_t Rapidity() const { return 0.5*TMath::Log((Energy()+Pz())/(Energy()-Pz()+1.e-13)); }
85 Bool_t Select(const Double_t* cuts,Int_t& okB) const;
86 void SetPrimaryVtx(Double_t vtx[3])
87 { fV1x=vtx[0]; fV1y=vtx[1]; fV1z=vtx[2]; }
88 void SetSignal() { fSignal = kTRUE; }
89 void SetJpsiPrimary() { fJpsiPrimary = kTRUE; }
90 void SetTOFmasses(Double_t mass[2])
91 { fTOFmass[0]=mass[0]; fTOFmass[1]=mass[1]; }
92 void SetPIDresponse(Double_t resp0[5],Double_t resp1[5]);
93 void SetPdgCodes(Int_t pdg[2]) {fPdg[0]=pdg[0];fPdg[1]=pdg[1]; }
94 void SetMumPdgCodes(Int_t mum[2]) {fMum[0]=mum[0];fMum[1]=mum[1]; }
95 void SetGMumPdgCodes(Int_t gmum[2]) {fGMum[0]=gmum[0];fGMum[1]=gmum[1]; }
96 Double_t TRDTPCCombinedPIDParametrization(Double_t p) const;
97 //
98 private:
99 //
100 Bool_t fSignal; // TRUE if signal, FALSE if background (for simulation)
101 // (background are both combinatorial and primary J/psi)
102 Bool_t fJpsiPrimary; // TRUE if the current candidate is a primary J/psi, FALSE otherway (for simulation)
103 Int_t fEvent; // number of the event this B comes from
104 // -1 if the B comes from ev. mixing
105
106 Int_t fTrkNum[2]; // numbers of the two decay tracks
107
108 Double_t fV1x; // X-position of the primary vertex of the event
109 Double_t fV1y; // Y-position of the primary vertex of the event
110 Double_t fV1z; // Z-position of the primary vertex of the event
111 Double_t fV2x; // X-position of the reconstructed secondary vertex
112 Double_t fV2y; // Y-position of the reconstructed secondary vertex
113 Double_t fV2z; // Z-position of the reconstructed secondary vertex
114 Double_t fDCA; // DCA of the two tracks
115
116 Double_t fPx[2]; // X,Y,Z
117 Double_t fPy[2]; // momenta of the two tracks
118 Double_t fPz[2]; // at the reconstructed vertex
119
120 Double_t fd0[2]; // impact parameters in the bending plane
121
122 Int_t fPdg[2]; // PDG codes of the two tracks (for sim.)
123 Int_t fMum[2]; // PDG codes of the mothers (for sim.)
124 Int_t fGMum[2]; // PDG codes of the grand-mothers (for sim.)
125
126 Double_t fTagEl[2]; // probability to be tagged as electron
127 Double_t fTagPi[2]; // probability to be tagged as pion
128 Double_t fTagKa[2]; // probability to be tagged as kaon
129 Double_t fTagPr[2]; // probability to be tagged as proton
130 Double_t fTagNid[2]; // probability to be tagged as "non-identified"
131
132 Double_t fPIDrespEl[2]; // det. response to be electron
133 Double_t fPIDrespMu[2]; // det. response to be muon
134 Double_t fPIDrespPi[2]; // det. response to be pion
135 Double_t fPIDrespKa[2]; // det. response to be kaon
136 Double_t fPIDrespPr[2]; // det. response to be proton
137 Double_t fTOFmass[2]; // mass estimated by the TOF (-1000. if track not reached TOF)
138 Double_t fWgtJPsi; // weights for the pair
139
140 ClassDef(AliBtoJPSItoEle,1) // Reconstructed B candidate class
141};
142
143#endif
144
145
146
147
148
149
150