CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PATElectronProducer.h
Go to the documentation of this file.
1 //
2 // $Id: PATElectronProducer.h,v 1.26.2.4 2013/04/01 18:05:40 tjkim Exp $
3 //
4 
5 #ifndef PhysicsTools_PatAlgos_PATElectronProducer_h
6 #define PhysicsTools_PatAlgos_PATElectronProducer_h
7 
27 
29 
33 
35 
38 
42 
44 
45 #include <string>
46 
47 
48 namespace pat {
49 
50 
51  class TrackerIsolationPt;
52  class CaloIsolationEnergy;
53  class LeptonLRCalc;
54 
55 
57 
58  public:
59 
60  explicit PATElectronProducer(const edm::ParameterSet & iConfig);
62 
63  virtual void produce(edm::Event & iEvent, const edm::EventSetup & iSetup);
64 
65  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
66 
67  private:
68 
69  // configurables
84 
85  std::vector<edm::InputTag> genMatchSrc_;
86 
92 
96 
100  bool usePV_;
102 
103  typedef std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > GenAssociations;
105  typedef std::vector< edm::Handle< edm::ValueMap<IsoDeposit> > > IsoDepositMaps;
106  typedef std::vector< edm::Handle< edm::ValueMap<double> > > IsolationValueMaps;
107 
108 
110  void fillElectron( Electron& aElectron,
111  const ElectronBaseRef& electronRef,
112  const reco::CandidateBaseRef& baseRef,
113  const GenAssociations& genMatches,
114  const IsoDepositMaps& deposits,
115  const bool pfId,
116  const IsolationValueMaps& isolationValues,
117  const IsolationValueMaps& isolationValuesNoPFId) const;
118 
119  void fillElectron2( Electron& anElectron,
120  const reco::CandidatePtr& candPtrForIsolation,
121  const reco::CandidatePtr& candPtrForGenMatch,
122  const reco::CandidatePtr& candPtrForLoader,
123  const GenAssociations& genMatches,
124  const IsoDepositMaps& deposits,
125  const IsolationValueMaps& isolationValues ) const;
126 
127  // embed various impact parameters with errors
128  // embed high level selection
129  void embedHighLevel( pat::Electron & anElectron,
130  reco::GsfTrackRef track,
132  reco::Vertex & primaryVertex,
133  bool primaryVertexIsValid,
134  reco::BeamSpot & beamspot,
135  bool beamspotIsValid );
136 
137  typedef std::pair<pat::IsolationKeys,edm::InputTag> IsolationLabel;
138  typedef std::vector<IsolationLabel> IsolationLabels;
139 
142  void readIsolationLabels( const edm::ParameterSet & iConfig,
143  const char* psetName,
145 
147  typedef std::pair<std::string, edm::InputTag> NameTag;
148  std::vector<NameTag> elecIDSrcs_;
149 
150  // tools
152 
154  pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_; // better here than recreate at each event
158 
161 
164 
167 
169 
170  };
171 
172 
173 }
174 
175 #endif
Assists in assimilating all pat::UserData into pat objects.
void embedHighLevel(pat::Electron &anElectron, reco::GsfTrackRef track, reco::TransientTrack &tt, reco::Vertex &primaryVertex, bool primaryVertexIsValid, reco::BeamSpot &beamspot, bool beamspotIsValid)
void fillElectron(Electron &aElectron, const ElectronBaseRef &electronRef, const reco::CandidateBaseRef &baseRef, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const bool pfId, const IsolationValueMaps &isolationValues, const IsolationValueMaps &isolationValuesNoPFId) const
common electron filling, for both the standard and PF2PAT case
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
edm::RefToBase< reco::GsfElectron > ElectronBaseRef
std::vector< edm::InputTag > genMatchSrc_
std::pair< pat::IsolationKeys, edm::InputTag > IsolationLabel
GreaterByPt< Electron > pTComparator_
pat::helper::MultiIsolator isolator_
std::vector< edm::Handle< edm::Association< reco::GenParticleCollection > > > GenAssociations
int iEvent
Definition: GenABIO.cc:243
Produces pat::Electron&#39;s.
PATElectronProducer(const edm::ParameterSet &iConfig)
edm::InputTag reducedEndcapRecHitCollection_
edm::InputTag reducedBarrelRecHitCollection_
mva input variables
std::vector< edm::Handle< edm::ValueMap< double > > > IsolationValueMaps
bool embedHighLevelSelection_
embed high level selection variables?
std::pair< std::string, edm::InputTag > NameTag
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void fillElectron2(Electron &anElectron, const reco::CandidatePtr &candPtrForIsolation, const reco::CandidatePtr &candPtrForGenMatch, const reco::CandidatePtr &candPtrForLoader, const GenAssociations &genMatches, const IsoDepositMaps &deposits, const IsolationValueMaps &isolationValues) const
pat::helper::EfficiencyLoader efficiencyLoader_
pat::PATUserDataHelper< pat::Electron > userDataHelper_
bool useParticleFlow_
pflow specific
Analysis-level electron class.
Definition: Electron.h:52
const CaloTopology * ecalTopology_
IsolationLabels isolationValueLabelsNoPFId_
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
Definition: MultiIsolator.h:16
std::vector< IsolationLabel > IsolationLabels
IsolationLabels isolationValueLabels_
pat::helper::KinResolutionsLoader resolutionLoader_
void readIsolationLabels(const edm::ParameterSet &iConfig, const char *psetName, IsolationLabels &labels)
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
std::vector< NameTag > elecIDSrcs_
std::vector< edm::Handle< edm::ValueMap< IsoDeposit > > > IsoDepositMaps