Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:04:06

0001 #ifndef EgammaCandidates_SiStripElectron_h
0002 #define EgammaCandidates_SiStripElectron_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     EgammaCandidates
0006 // Class  :     SiStripElectron
0007 //
0008 /**\class SiStripElectron SiStripElectron.h DataFormats/EgammaCandidates/interface/SiStripElectron.h
0009 
0010  Description: <one line class summary>
0011 
0012  Usage:
0013     <usage>
0014 
0015 */
0016 //
0017 // Original Author:  Jim Pivarski
0018 //         Created:  Fri May 26 15:43:14 EDT 2006
0019 //
0020 
0021 // system include files
0022 
0023 #include <vector>
0024 
0025 // user include files
0026 
0027 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
0028 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h"
0029 #include "DataFormats/Common/interface/RefVector.h"
0030 
0031 // forward declarations
0032 
0033 namespace reco {
0034 
0035   class SiStripElectron : public RecoCandidate {
0036   public:
0037     /// default constructor
0038     SiStripElectron() : RecoCandidate() {}
0039     /// constructor from band algorithm
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     /// constructor from RecoCandidate
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     /// destructor
0073     ~SiStripElectron() override;
0074     /// returns a clone of the candidate
0075     SiStripElectron* clone() const override;
0076     /// reference to a SuperCluster
0077     reco::SuperClusterRef superCluster() const override;
0078 
0079     /// reference to the rphiRecHits identified as belonging to an electron
0080     const std::vector<SiStripRecHit2D>& rphiRecHits() const { return rphiRecHits_; }
0081     /// reference to the stereoRecHits identified as belonging to an electron
0082     const std::vector<SiStripRecHit2D>& stereoRecHits() const { return stereoRecHits_; }
0083 
0084     /// returns phi(r) projection from supercluster
0085     double superClusterPhiVsRSlope() const { return superClusterPhiVsRSlope_; }
0086     /// returns phi(r) slope from fit to tracker hits
0087     double phiVsRSlope() const { return phiVsRSlope_; }
0088     /// returns phi(r=0) intercept from fit to tracker hits
0089     double phiAtOrigin() const { return phiAtOrigin_; }
0090     /// returns chi^2 of fit to tracker hits
0091     double chi2() const { return chi2_; }
0092     /// returns number of degrees of freedom of fit to tracker hits
0093     int ndof() const { return ndof_; }
0094 
0095     /// returns z(r) slope fit from stereo tracker hits (constrained to pass through supercluster)
0096     double zVsRSlope() const { return zVsRSlope_; }
0097 
0098     /// returns number of stereo hits in phi band (barrel + endcap)
0099     unsigned int numberOfStereoHits() const { return numberOfStereoHits_; }
0100     /// returns number of barrel rphi hits in phi band
0101     unsigned int numberOfBarrelRphiHits() const { return numberOfBarrelRphiHits_; }
0102     /// returns number of endcap zphi hits in phi band
0103     unsigned int numberOfEndcapZphiHits() const { return numberOfEndcapZphiHits_; }
0104 
0105     bool isElectron() const override;
0106 
0107   private:
0108     /// check overlap with another candidate
0109     bool overlap(const Candidate&) const override;
0110     /// reference to a SuperCluster
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 }  // namespace reco
0128 
0129 #endif