CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripElectron.h
Go to the documentation of this file.
1 #ifndef EgammaCandidates_SiStripElectron_h
2 #define EgammaCandidates_SiStripElectron_h
3 // -*- C++ -*-
4 //
5 // Package: EgammaCandidates
6 // Class : SiStripElectron
7 //
16 //
17 // Original Author: Jim Pivarski
18 // Created: Fri May 26 15:43:14 EDT 2006
19 // $Id: SiStripElectron.h,v 1.14 2008/11/03 17:33:44 nancy Exp $
20 //
21 
22 // system include files
23 
24 #include <vector>
25 
26 // user include files
27 
31 
32 // forward declarations
33 
34 namespace reco {
35 
36  class SiStripElectron : public RecoCandidate {
37  public:
42  Charge q,
43  const std::vector<SiStripRecHit2D>& rphiRecHits,
44  const std::vector<SiStripRecHit2D>& stereoRecHits,
46  double phiVsRSlope,
47  double phiAtOrigin,
48  double chi2,
49  int ndof,
50  double pt,
51  double pz,
52  double zVsRSlope,
53  unsigned int numberOfStereoHits,
54  unsigned int numberOfBarrelRphiHits,
55  unsigned int numberOfEndcapZphiHits)
56  : RecoCandidate(q, LorentzVector(pt*cos(phiAtOrigin), pt*sin(phiAtOrigin), pz,
57  sqrt( pt*pt + pz*pz + 0.000510*0.000510)), Point(0,0,0), -11 * q )
58  , superCluster_(superCluster)
59  , rphiRecHits_(rphiRecHits)
60  , stereoRecHits_(stereoRecHits)
61  , superClusterPhiVsRSlope_(superClusterPhiVsRSlope)
62  , phiVsRSlope_(phiVsRSlope)
63  , phiAtOrigin_(phiAtOrigin)
64  , chi2_(chi2)
65  , ndof_(ndof)
66  , pt_(pt)
67  , pz_(pz)
68  , zVsRSlope_(zVsRSlope)
69  , numberOfStereoHits_(numberOfStereoHits)
70  , numberOfBarrelRphiHits_(numberOfBarrelRphiHits)
71  , numberOfEndcapZphiHits_(numberOfEndcapZphiHits) { }
72 
75  : RecoCandidate(rhs)
77  , rphiRecHits_(rhs.rphiRecHits())
80  , phiVsRSlope_(rhs.phiVsRSlope())
81  , phiAtOrigin_(rhs.phiAtOrigin())
82  , chi2_(rhs.chi2())
83  , ndof_(rhs.ndof())
84  , pt_(rhs.pt())
85  , pz_(rhs.pz())
86  , zVsRSlope_(rhs.zVsRSlope())
90 
92  SiStripElectron( Charge q, const LorentzVector & p4, const Point & vtx = Point( 0, 0, 0 ) ) :
93  RecoCandidate( q, p4, vtx, -11 * q ) { }
95  virtual ~SiStripElectron();
97  virtual SiStripElectron * clone() const;
99  virtual reco::SuperClusterRef superCluster() const;
100 
102  const std::vector<SiStripRecHit2D>& rphiRecHits() const { return rphiRecHits_; }
104  const std::vector<SiStripRecHit2D>& stereoRecHits() const { return stereoRecHits_; }
105 
109  double phiVsRSlope() const { return phiVsRSlope_; }
111  double phiAtOrigin() const { return phiAtOrigin_; }
113  double chi2() const { return chi2_; }
115  int ndof() const { return ndof_; }
116 
118  double pt() const { return pt_; }
120  double pz() const { return pz_; }
121 
123  double zVsRSlope() const { return zVsRSlope_; }
124 
126  unsigned int numberOfStereoHits() const { return numberOfStereoHits_; }
128  unsigned int numberOfBarrelRphiHits() const { return numberOfBarrelRphiHits_; }
130  unsigned int numberOfEndcapZphiHits() const { return numberOfEndcapZphiHits_; }
131 
132  bool isElectron() const;
133  private:
135  virtual bool overlap( const Candidate & ) const;
138  std::vector<SiStripRecHit2D> rphiRecHits_;
139  std::vector<SiStripRecHit2D> stereoRecHits_;
140 
142  double phiVsRSlope_;
143  double phiAtOrigin_;
144  double chi2_;
145  int ndof_;
146 
147  double pt_;
148  double pz_;
149 
150  double zVsRSlope_;
151 
152  unsigned int numberOfStereoHits_;
155  };
156 }
157 
158 #endif
int Charge
electric charge type
Definition: Candidate.h:36
double chi2() const
returns chi^2 of fit to tracker hits
SiStripElectron()
default constructor
int ndof() const
returns number of degrees of freedom of fit to tracker hits
double phiAtOrigin() const
returns phi(r=0) intercept from fit to tracker hits
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
unsigned int numberOfBarrelRphiHits_
SiStripElectron(const reco::SuperClusterRef &superCluster, Charge q, const std::vector< SiStripRecHit2D > &rphiRecHits, const std::vector< SiStripRecHit2D > &stereoRecHits, double superClusterPhiVsRSlope, double phiVsRSlope, double phiAtOrigin, double chi2, int ndof, double pt, double pz, double zVsRSlope, unsigned int numberOfStereoHits, unsigned int numberOfBarrelRphiHits, unsigned int numberOfEndcapZphiHits)
constructor from band algorithm
std::vector< SiStripRecHit2D > rphiRecHits_
unsigned int numberOfBarrelRphiHits() const
returns number of barrel rphi hits in phi band
const std::vector< SiStripRecHit2D > & rphiRecHits() const
reference to the rphiRecHits identified as belonging to an electron
SiStripElectron(Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0))
constructor from RecoCandidate
double pt() const
returns transverse momentum, as determined by fit to tracker hits
double pz() const
returns longitudinal momentum, as determined by fit to tracker hits
unsigned int numberOfStereoHits() const
returns number of stereo hits in phi band (barrel + endcap)
double zVsRSlope() const
returns z(r) slope fit from stereo tracker hits (constrained to pass through supercluster) ...
double phiVsRSlope() const
returns phi(r) slope from fit to tracker hits
T sqrt(T t)
Definition: SSEVec.h:46
double superClusterPhiVsRSlope() const
returns phi(r) projection from supercluster
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
unsigned int numberOfEndcapZphiHits() const
returns number of endcap zphi hits in phi band
unsigned int numberOfStereoHits_
reco::SuperClusterRef superCluster_
reference to a SuperCluster
math::XYZTLorentzVector LorentzVector
Lorentz vector.
Definition: Candidate.h:38
virtual bool overlap(const Candidate &) const
check overlap with another candidate
SiStripElectron(const SiStripElectron &rhs)
copy constructor (update in SiStripElectron.cc)
virtual reco::SuperClusterRef superCluster() const
reference to a SuperCluster
unsigned int numberOfEndcapZphiHits_
virtual ~SiStripElectron()
destructor
math::XYZPoint Point
point in the space
Definition: Candidate.h:42
std::vector< SiStripRecHit2D > stereoRecHits_
bool isElectron() const
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
virtual SiStripElectron * clone() const
returns a clone of the candidate
math::XYZPoint Point
point in the space
Definition: LeafCandidate.h:29
const std::vector< SiStripRecHit2D > & stereoRecHits() const
reference to the stereoRecHits identified as belonging to an electron