Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:53:18

0001 #ifndef EgammaCandidates_Electron_h
0002 #define EgammaCandidates_Electron_h
0003 /** \class reco::Electron
0004  *
0005  * Reco Candidates with an Electron component
0006  *
0007  * \author Luca Lista, INFN
0008  *
0009  *
0010  */
0011 #include "DataFormats/RecoCandidate/interface/RecoCandidate.h"
0012 #include "DataFormats/GsfTrackReco/interface/GsfTrack.h"
0013 
0014 namespace reco {
0015 
0016   class Electron : public RecoCandidate {
0017   public:
0018     /// default constructor
0019     Electron() : RecoCandidate() {}
0020     /// constructor from values
0021     Electron(Charge q, const LorentzVector& p4, const Point& vtx = Point(0, 0, 0))
0022         : RecoCandidate(q, p4, vtx, -11 * q) {}
0023     /// destructor
0024     ~Electron() override;
0025     /// returns a clone of the candidate
0026     Electron* clone() const override;
0027     /// reference to a Track
0028     using reco::RecoCandidate::track;  // avoid hiding the base
0029     reco::TrackRef track() const override;
0030     /// reference to a SuperCluster
0031     reco::SuperClusterRef superCluster() const override;
0032     /// reference to a GsfTrack
0033     reco::GsfTrackRef gsfTrack() const override;
0034     /// set refrence to Photon component
0035     void setSuperCluster(const reco::SuperClusterRef& r) { superCluster_ = r; }
0036     /// set refrence to Track component
0037     void setTrack(const reco::TrackRef& r) { track_ = r; }
0038     /// set reference to GsfTrack component
0039     void setGsfTrack(const reco::GsfTrackRef& r) { gsfTrack_ = r; }
0040 
0041     bool isElectron() const override;
0042 
0043   private:
0044     /// check overlap with another candidate
0045     bool overlap(const Candidate&) const override;
0046     /// reference to a SuperCluster
0047     reco::SuperClusterRef superCluster_;
0048     /// reference to a Track
0049     reco::TrackRef track_;
0050     /// reference to a GsfTrack;
0051     reco::GsfTrackRef gsfTrack_;
0052   };
0053 
0054 }  // namespace reco
0055 
0056 #endif