File indexing completed on 2024-04-06 12:04:06
0001 #ifndef EgammaCandidates_SiStripElectron_h
0002 #define EgammaCandidates_SiStripElectron_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #include <vector>
0024
0025
0026
0027 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
0028 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
0029 #include "DataFormats/Common/interface/RefVector.h"
0030
0031
0032
0033 namespace reco {
0034
0035 class SiStripElectron : public RecoCandidate {
0036 public:
0037
0038 SiStripElectron() : RecoCandidate() {}
0039
0040 SiStripElectron(const reco::SuperClusterRef& superCluster,
0041 Charge q,
0042 const std::vector<SiStripRecHit2D>& rphiRecHits,
0043 const std::vector<SiStripRecHit2D>& stereoRecHits,
0044 double superClusterPhiVsRSlope,
0045 double phiVsRSlope,
0046 double phiAtOrigin,
0047 double chi2,
0048 int ndof,
0049 double pt,
0050 double pz,
0051 double zVsRSlope,
0052 unsigned int numberOfStereoHits,
0053 unsigned int numberOfBarrelRphiHits,
0054 unsigned int numberOfEndcapZphiHits)
0055 : RecoCandidate(q, PtEtaPhiMass(pt, etaFromRZ(pt, pz), phiAtOrigin, 0.000510f), Point(0, 0, 0), -11 * q),
0056 superCluster_(superCluster),
0057 rphiRecHits_(rphiRecHits),
0058 stereoRecHits_(stereoRecHits),
0059 superClusterPhiVsRSlope_(superClusterPhiVsRSlope),
0060 phiVsRSlope_(phiVsRSlope),
0061 phiAtOrigin_(phiAtOrigin),
0062 chi2_(chi2),
0063 ndof_(ndof),
0064 zVsRSlope_(zVsRSlope),
0065 numberOfStereoHits_(numberOfStereoHits),
0066 numberOfBarrelRphiHits_(numberOfBarrelRphiHits),
0067 numberOfEndcapZphiHits_(numberOfEndcapZphiHits) {}
0068
0069
0070 template <typename P4>
0071 SiStripElectron(Charge q, const P4& p4, const Point& vtx = Point(0, 0, 0)) : RecoCandidate(q, p4, vtx, -11 * q) {}
0072
0073 ~SiStripElectron() override;
0074
0075 SiStripElectron* clone() const override;
0076
0077 reco::SuperClusterRef superCluster() const override;
0078
0079
0080 const std::vector<SiStripRecHit2D>& rphiRecHits() const { return rphiRecHits_; }
0081
0082 const std::vector<SiStripRecHit2D>& stereoRecHits() const { return stereoRecHits_; }
0083
0084
0085 double superClusterPhiVsRSlope() const { return superClusterPhiVsRSlope_; }
0086
0087 double phiVsRSlope() const { return phiVsRSlope_; }
0088
0089 double phiAtOrigin() const { return phiAtOrigin_; }
0090
0091 double chi2() const { return chi2_; }
0092
0093 int ndof() const { return ndof_; }
0094
0095
0096 double zVsRSlope() const { return zVsRSlope_; }
0097
0098
0099 unsigned int numberOfStereoHits() const { return numberOfStereoHits_; }
0100
0101 unsigned int numberOfBarrelRphiHits() const { return numberOfBarrelRphiHits_; }
0102
0103 unsigned int numberOfEndcapZphiHits() const { return numberOfEndcapZphiHits_; }
0104
0105 bool isElectron() const override;
0106
0107 private:
0108
0109 bool overlap(const Candidate&) const override;
0110
0111 reco::SuperClusterRef superCluster_;
0112 std::vector<SiStripRecHit2D> rphiRecHits_;
0113 std::vector<SiStripRecHit2D> stereoRecHits_;
0114
0115 double superClusterPhiVsRSlope_;
0116 double phiVsRSlope_;
0117 double phiAtOrigin_;
0118 double chi2_;
0119 int ndof_;
0120
0121 double zVsRSlope_;
0122
0123 unsigned int numberOfStereoHits_;
0124 unsigned int numberOfBarrelRphiHits_;
0125 unsigned int numberOfEndcapZphiHits_;
0126 };
0127 }
0128
0129 #endif