ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/DataTree/interface/Conversion.h
Revision: 1.11
Committed: Tue Dec 9 17:46:59 2008 UTC (16 years, 4 months ago) by loizides
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_006b, Mit_006a
Changes since 1.10: +11 -10 lines
Log Message:
Added ObjType to retrieve type of object.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: Conversion.h,v 1.10 2008/11/14 14:46:35 bendavid Exp $
3 //
4 // Conversion
5 //
6 // Details to be worked out...
7 //
8 // Authors: J.Bendavid
9 //--------------------------------------------------------------------------------------------------
10
11 #ifndef MITANA_DATATREE_CONVERSION_H
12 #define MITANA_DATATREE_CONVERSION_H
13
14 #include "MitAna/DataTree/interface/CompositeParticle.h"
15 #include "MitAna/DataTree/interface/Vertex.h"
16 #include "MitAna/DataTree/interface/Electron.h"
17
18 namespace mithep
19 {
20 class Conversion : public CompositeParticle
21 {
22 public:
23 Conversion() : fVertex(0,0,0) {}
24 Conversion(Double_t x, Double_t y, Double_t z) : fVertex(x,y,z) {}
25 Conversion(Double_t x, Double_t y, Double_t z, Double_t xErr, Double_t yErr, Double_t zErr) :
26 fVertex(x,y,z,xErr,yErr,zErr) {}
27 ~Conversion() {}
28
29 const Electron *Daughter(UInt_t i) const;
30 Double_t DCotTheta() const { return fDCotTheta; }
31 Double_t EOverP() const { return fEOverP; }
32 Double_t PairMass() const { return fPairMass; }
33 const ThreeVector &PairMomentum() const { return fPairMomentum; }
34 const Vertex &DecayVertex() const { return fVertex; }
35 Vertex &DecayVertex() { return fVertex; }
36 EObjType ObjType() const { return kConversion; }
37 void SetDCotTheta(Double_t dCotTh) { fDCotTheta = dCotTh; }
38 void SetEOverP(Double_t eOverP) { fEOverP = eOverP; }
39 void SetPairMass(Double_t pairMass) { fPairMass = pairMass; }
40 void SetPairMomentum(Double_t px, Double_t py, Double_t pz);
41
42 protected:
43 Vertex fVertex; //reconstructed decay vertex
44 Double32_t fDCotTheta; //delta cot theta wrt tracks at the conversion point
45 Double32_t fEOverP; //energy over momentum of conversion tracks
46 Double32_t fPairMass; //mass of electron-positron pair at conversion point
47 ThreeVector32 fPairMomentum; //momentum of tracks at conversion point
48
49 ClassDef(Conversion,1) // Conversion class
50 };
51 }
52
53 //--------------------------------------------------------------------------------------------------
54 inline const mithep::Electron *mithep::Conversion::Daughter(UInt_t i) const
55 {
56 // Return reference to electron daughters.
57
58 return static_cast<const mithep::Electron*>(fDaughters.At(i));
59 }
60
61 //--------------------------------------------------------------------------------------------------
62 inline void mithep::Conversion::SetPairMomentum(Double_t px, Double_t py, Double_t pz)
63 {
64 // Set pair momentum.
65
66 fPairMomentum.SetXYZ(px,py,pz);;
67 }
68 #endif