Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef GsfElectronCore_h
0002 #define GsfElectronCore_h
0003 
0004 #include "DataFormats/EgammaCandidates/interface/GsfElectronCoreFwd.h"
0005 #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h"
0006 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0007 #include "DataFormats/EgammaReco/interface/SuperCluster.h"
0008 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
0009 #include "DataFormats/EgammaCandidates/interface/ConversionFwd.h"
0010 
0011 #include <vector>
0012 
0013 /****************************************************************************
0014  * \class reco::GsfElectronCore
0015  *
0016  * Core description of an electron, including a a GsfTrack seeded from an
0017  * ElectronSeed. The seed was either calo driven, or tracker driven
0018  * (particle flow). In the latter case, the GsfElectronCore also
0019  * contains a reference to the pflow supercluster.
0020  *
0021  ****************************************************************************/
0022 
0023 namespace reco {
0024 
0025   class GsfElectronCore {
0026   public:
0027     // construction
0028     GsfElectronCore();
0029     GsfElectronCore(const GsfTrackRef&);
0030     GsfElectronCore* clone() const;
0031     ~GsfElectronCore() {}
0032 
0033     // accessors
0034     const GsfTrackRef& gsfTrack() const { return gsfTrack_; }
0035     const SuperClusterRef& superCluster() const {
0036       return (superCluster_.isNull() ? parentSuperCluster_ : superCluster_);
0037     }
0038     TrackRef ctfTrack() const {
0039       return closestCtfTrack_;
0040     }  // get the CTF track best matching the GTF associated to this electron
0041     float ctfGsfOverlap() const {
0042       return ctfGsfOverlap_;
0043     }  // measure the fraction of common hits between the GSF and CTF tracks
0044     bool ecalDrivenSeed() const { return isEcalDrivenSeed_; }
0045     bool trackerDrivenSeed() const { return isTrackerDrivenSeed_; }
0046 
0047     /// get vector of references to  Conversion's
0048     reco::ConversionRefVector conversions() const { return conversions_; }
0049     /// get vector of references to one leg Conversion's
0050     reco::ConversionRefVector conversionsOneLeg() const { return conversionsOneLeg_; }
0051 
0052     // setters
0053     void setGsfTrack(const GsfTrackRef& gsfTrack) { gsfTrack_ = gsfTrack; }
0054     void setSuperCluster(const SuperClusterRef& scl) { superCluster_ = scl; }
0055     void setCtfTrack(const TrackRef& closestCtfTrack, float ctfGsfOverlap) {
0056       closestCtfTrack_ = closestCtfTrack;
0057       ctfGsfOverlap_ = ctfGsfOverlap;
0058     }
0059 
0060     /// add  single ConversionRef to the vector of Refs
0061     void addConversion(const reco::ConversionRef& r) { conversions_.push_back(r); }
0062     /// add  single ConversionRef to the vector of Refs
0063     void addOneLegConversion(const reco::ConversionRef& r) { conversionsOneLeg_.push_back(r); }
0064 
0065     // pflow eventual additionnal info
0066     const SuperClusterRef& parentSuperCluster() const { return parentSuperCluster_; }
0067     void setParentSuperCluster(const SuperClusterRef& scl) { parentSuperCluster_ = scl; }
0068 
0069   private:
0070     GsfTrackRef gsfTrack_;
0071     SuperClusterRef superCluster_;
0072     SuperClusterRef parentSuperCluster_;
0073     TrackRef closestCtfTrack_;  // best matching ctf track
0074     // vector of references to Conversions
0075     reco::ConversionRefVector conversions_;
0076     //vector of references for 1-leg
0077     reco::ConversionRefVector conversionsOneLeg_;
0078     float ctfGsfOverlap_;  // fraction of common hits between the ctf and gsf tracks
0079     bool isEcalDrivenSeed_;
0080     bool isTrackerDrivenSeed_;
0081   };
0082 
0083 }  // namespace reco
0084 
0085 //*****************************************************************************
0086 //
0087 // \author David Chamont  - Laboratoire Leprince-Ringuet - École polytechnique, CNRS/IN2P3
0088 // \author Claude Charlot - Laboratoire Leprince-Ringuet - École polytechnique, CNRS/IN2P3
0089 //
0090 //
0091 // Revision 1.11.2.1  2011/03/04 18:22:31  chamont
0092 // backward incompatible cleaning
0093 //
0094 // Revision 1.11  2011/02/18 15:26:05  chamont
0095 // remove the ref to pflow candidate
0096 //
0097 // Revision 1.10  2011/02/16 17:42:53  chamont
0098 // Extend GsfElectron(Core) with new pflow attributes, backward compatible.
0099 //
0100 // Revision 1.9  2011/01/10 17:18:09  chamont
0101 // so to ease the independant production of ecal-driven and tracker-driven gsf electrons
0102 //
0103 // Revision 1.8.6.1  2011/01/10 17:15:35  chamont
0104 // so to ease the independant production of ecal-driven and tracker-driven gsf electrons
0105 //
0106 // Revision 1.8  2010/02/25 15:32:20  chamont
0107 // make GsfElectronFwd.h a real forward header
0108 //
0109 // Revision 1.7  2009/12/11 09:09:41  chamont
0110 // tranform NARROW into OLDNARROW, and add closestCtfTrack to GsfElectronCore
0111 //
0112 // Revision 1.6  2009/10/20 20:57:54  chamont
0113 // restore previous attribute names, so to preserve backward data compatibility
0114 //
0115 // Revision 1.5  2009/10/10 20:07:35  chamont
0116 // remove is*Driven() lethods
0117 //
0118 // Revision 1.4  2009/10/10 09:00:36  chamont
0119 // Add ecalDrivenSeed() to isEcalDriven(), Add trackerDrivenSeed() to isTrackerDriven(), for classes GsfElectron and GsfElectronCore
0120 //
0121 // Revision 1.3  2009/04/06 11:18:05  chamont
0122 // few changes, should not affect users
0123 //
0124 // Revision 1.2  2009/03/24 17:26:27  charlot
0125 // updated provenance and added comments in headers
0126 //
0127 // Revision 1.1  2009/03/20 22:59:16  chamont
0128 // new class GsfElectronCore and new interface for GsfElectron
0129 //
0130 // Revision 1.20  2009/02/14 11:00:26  charlot
0131 // new interface for fiducial regions
0132 //
0133 //*****************************************************************************
0134 
0135 #endif