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 // $Id: PATElectronProducer.h,v 1.32 2013/04/09 18:39:29 tjkim Exp $
2 //
3 
4 #ifndef PhysicsTools_PatAlgos_PATElectronProducer_h
5 #define PhysicsTools_PatAlgos_PATElectronProducer_h
6 
26 
28 
32 
34 
37 
41 
43 
44 #include <string>
45 
46 
47 namespace pat {
48 
49 
50  class TrackerIsolationPt;
51  class CaloIsolationEnergy;
52  class LeptonLRCalc;
53 
54 
56 
57  public:
58 
59  explicit PATElectronProducer(const edm::ParameterSet & iConfig);
61 
62  virtual void produce(edm::Event & iEvent, const edm::EventSetup& iSetup) override;
63 
64  static void fillDescriptions(edm::ConfigurationDescriptions & descriptions);
65 
66  private:
67 
68  // configurables
83 
84  std::vector<edm::InputTag> genMatchSrc_;
85 
91 
95 
99  bool usePV_;
101 
102  typedef std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > GenAssociations;
104  typedef std::vector< edm::Handle< edm::ValueMap<IsoDeposit> > > IsoDepositMaps;
105  typedef std::vector< edm::Handle< edm::ValueMap<double> > > IsolationValueMaps;
106 
107 
109  void fillElectron( Electron& aElectron,
110  const ElectronBaseRef& electronRef,
111  const reco::CandidateBaseRef& baseRef,
112  const GenAssociations& genMatches,
113  const IsoDepositMaps& deposits,
114  const bool pfId,
115  const IsolationValueMaps& isolationValues,
116  const IsolationValueMaps& isolationValuesNoPFId) const;
117 
118  void fillElectron2( Electron& anElectron,
119  const reco::CandidatePtr& candPtrForIsolation,
120  const reco::CandidatePtr& candPtrForGenMatch,
121  const reco::CandidatePtr& candPtrForLoader,
122  const GenAssociations& genMatches,
123  const IsoDepositMaps& deposits,
124  const IsolationValueMaps& isolationValues ) const;
125 
126  // embed various impact parameters with errors
127  // embed high level selection
128  void embedHighLevel( pat::Electron & anElectron,
129  reco::GsfTrackRef track,
131  reco::Vertex & primaryVertex,
132  bool primaryVertexIsValid,
133  reco::BeamSpot & beamspot,
134  bool beamspotIsValid );
135 
136  typedef std::pair<pat::IsolationKeys,edm::InputTag> IsolationLabel;
137  typedef std::vector<IsolationLabel> IsolationLabels;
138 
141  void readIsolationLabels( const edm::ParameterSet & iConfig,
142  const char* psetName,
144 
146  typedef std::pair<std::string, edm::InputTag> NameTag;
147  std::vector<NameTag> elecIDSrcs_;
148 
149  // tools
151 
153  pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_; // better here than recreate at each event
157 
160 
163 
166 
168 
169  };
170 
171 
172 }
173 
174 #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
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)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
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