CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PATTauProducer.cc
Go to the documentation of this file.
1 //
2 // $Id: PATTauProducer.cc,v 1.34 2010/09/03 15:41:27 hegner Exp $
3 //
4 
6 
12 
20 
23 
24 #include <vector>
25 #include <memory>
26 
27 using namespace pat;
28 
30  isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation") : edm::ParameterSet(), false) ,
31  useUserData_(iConfig.exists("userData"))
32 {
33  // initialize the configurables
34  tauSrc_ = iConfig.getParameter<edm::InputTag>( "tauSource" );
35 
36  embedIsolationTracks_ = iConfig.getParameter<bool> ( "embedIsolationTracks" );
37  embedLeadTrack_ = iConfig.getParameter<bool> ( "embedLeadTrack" );
38  embedSignalTracks_ = iConfig.getParameter<bool> ( "embedSignalTracks" );
39  embedLeadPFCand_ = iConfig.getParameter<bool>( "embedLeadPFCand" );
40  embedLeadPFChargedHadrCand_ = iConfig.getParameter<bool>( "embedLeadPFChargedHadrCand" );
41  embedLeadPFNeutralCand_ = iConfig.getParameter<bool>( "embedLeadPFNeutralCand" );
42  embedSignalPFCands_ = iConfig.getParameter<bool>( "embedSignalPFCands" );
43  embedSignalPFChargedHadrCands_ = iConfig.getParameter<bool>( "embedSignalPFChargedHadrCands" );
44  embedSignalPFNeutralHadrCands_ = iConfig.getParameter<bool>( "embedSignalPFNeutralHadrCands" );
45  embedSignalPFGammaCands_ = iConfig.getParameter<bool>( "embedSignalPFGammaCands" );
46  embedIsolationPFCands_ = iConfig.getParameter<bool>( "embedIsolationPFCands" );
47  embedIsolationPFChargedHadrCands_ = iConfig.getParameter<bool>( "embedIsolationPFChargedHadrCands" );
48  embedIsolationPFNeutralHadrCands_ = iConfig.getParameter<bool>( "embedIsolationPFNeutralHadrCands" );
49  embedIsolationPFGammaCands_ = iConfig.getParameter<bool>( "embedIsolationPFGammaCands" );
50 
51  addGenMatch_ = iConfig.getParameter<bool> ( "addGenMatch" );
52 
53  if (addGenMatch_) {
54  embedGenMatch_ = iConfig.getParameter<bool> ( "embedGenMatch" );
55  if (iConfig.existsAs<edm::InputTag>("genParticleMatch")) {
56  genMatchSrc_.push_back(iConfig.getParameter<edm::InputTag>( "genParticleMatch" ));
57  } else {
58  genMatchSrc_ = iConfig.getParameter<std::vector<edm::InputTag> >( "genParticleMatch" );
59  }
60  }
61 
62  addGenJetMatch_ = iConfig.getParameter<bool> ( "addGenJetMatch" );
63  if(addGenJetMatch_) {
64  embedGenJetMatch_ = iConfig.getParameter<bool> ( "embedGenJetMatch" );
65  genJetMatchSrc_ = iConfig.getParameter<edm::InputTag>( "genJetMatch" );
66  }
67 
68 
69  // tau ID configurables
70  addTauID_ = iConfig.getParameter<bool> ( "addTauID" );
71  if ( addTauID_ ) {
72  // it might be a single tau ID
73  if (iConfig.existsAs<edm::InputTag>("tauIDSource")) {
74  tauIDSrcs_.push_back(NameTag("", iConfig.getParameter<edm::InputTag>("tauIDSource")));
75  }
76  // or there might be many of them
77  if (iConfig.existsAs<edm::ParameterSet>("tauIDSources")) {
78  // please don't configure me twice
79  if (!tauIDSrcs_.empty()) throw cms::Exception("Configuration") <<
80  "PATTauProducer: you can't specify both 'tauIDSource' and 'tauIDSources'\n";
81  // read the different tau ID names
82  edm::ParameterSet idps = iConfig.getParameter<edm::ParameterSet>("tauIDSources");
83  std::vector<std::string> names = idps.getParameterNamesForType<edm::InputTag>();
84  for (std::vector<std::string>::const_iterator it = names.begin(), ed = names.end(); it != ed; ++it) {
85  tauIDSrcs_.push_back(NameTag(*it, idps.getParameter<edm::InputTag>(*it)));
86  }
87  }
88  // but in any case at least once
89  if (tauIDSrcs_.empty()) throw cms::Exception("Configuration") <<
90  "PATTauProducer: id addTauID is true, you must specify either:\n" <<
91  "\tInputTag tauIDSource = <someTag>\n" << "or\n" <<
92  "\tPSet tauIDSources = { \n" <<
93  "\t\tInputTag <someName> = <someTag> // as many as you want \n " <<
94  "\t}\n";
95  }
96 
97  // IsoDeposit configurables
98  if (iConfig.exists("isoDeposits")) {
99  edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>("isoDeposits");
100  if ( depconf.exists("tracker") ) isoDepositLabels_.push_back(std::make_pair(pat::TrackIso, depconf.getParameter<edm::InputTag>("tracker")));
101  if ( depconf.exists("ecal") ) isoDepositLabels_.push_back(std::make_pair(pat::EcalIso, depconf.getParameter<edm::InputTag>("ecal")));
102  if ( depconf.exists("hcal") ) isoDepositLabels_.push_back(std::make_pair(pat::HcalIso, depconf.getParameter<edm::InputTag>("hcal")));
103  if ( depconf.exists("pfAllParticles") ) isoDepositLabels_.push_back(std::make_pair(pat::PfAllParticleIso, depconf.getParameter<edm::InputTag>("pfAllParticles")));
104  if ( depconf.exists("pfChargedHadron") ) isoDepositLabels_.push_back(std::make_pair(pat::PfChargedHadronIso, depconf.getParameter<edm::InputTag>("pfChargedHadron")));
105  if ( depconf.exists("pfNeutralHadron") ) isoDepositLabels_.push_back(std::make_pair(pat::PfNeutralHadronIso,depconf.getParameter<edm::InputTag>("pfNeutralHadron")));
106  if ( depconf.exists("pfGamma") ) isoDepositLabels_.push_back(std::make_pair(pat::PfGammaIso, depconf.getParameter<edm::InputTag>("pfGamma")));
107 
108  if ( depconf.exists("user") ) {
109  std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag> >("user");
110  std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
111  int key = UserBaseIso;
112  for ( ; it != ed; ++it, ++key) {
113  isoDepositLabels_.push_back(std::make_pair(IsolationKeys(key), *it));
114  }
115  }
116  }
117 
118  // Efficiency configurables
119  addEfficiencies_ = iConfig.getParameter<bool>("addEfficiencies");
120  if (addEfficiencies_) {
122  }
123 
124  // Resolution configurables
125  addResolutions_ = iConfig.getParameter<bool>("addResolutions");
126  if (addResolutions_) {
128  }
129 
130  // Check to see if the user wants to add user data
131  if ( useUserData_ ) {
133  }
134 
135  // produces vector of taus
136  produces<std::vector<Tau> >();
137 }
138 
140 {
141 }
142 
144 {
145  // Get the collection of taus from the event
147  try {
148  iEvent.getByLabel(tauSrc_, anyTaus);
149  } catch (const edm::Exception &e) {
150  edm::LogWarning("DataSource") << "WARNING! No Tau collection found. This missing input will not block the job. Instead, an empty tau collection is being be produced.";
151  std::auto_ptr<std::vector<Tau> > patTaus(new std::vector<Tau>());
152  iEvent.put(patTaus);
153  return;
154  }
155 
156  if (iEvent.isRealData()){
157  addGenMatch_ = false;
158  embedGenMatch_ = false;
159  addGenJetMatch_ = false;
160  }
161 
162  if (isolator_.enabled()) isolator_.beginEvent(iEvent,iSetup);
163 
165  if (resolutionLoader_.enabled()) resolutionLoader_.newEvent(iEvent, iSetup);
166 
167  std::vector<edm::Handle<edm::ValueMap<IsoDeposit> > > deposits(isoDepositLabels_.size());
168  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
169  iEvent.getByLabel(isoDepositLabels_[j].second, deposits[j]);
170  }
171 
172  // prepare the MC matching
173  std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > > genMatches(genMatchSrc_.size());
174  if (addGenMatch_) {
175  for (size_t j = 0, nd = genMatchSrc_.size(); j < nd; ++j) {
176  iEvent.getByLabel(genMatchSrc_[j], genMatches[j]);
177  }
178  }
179 
181  if (addGenJetMatch_) iEvent.getByLabel(genJetMatchSrc_, genJetMatch);
182 
183  std::auto_ptr<std::vector<Tau> > patTaus(new std::vector<Tau>());
184 
185  for (size_t idx = 0, ntaus = anyTaus->size(); idx < ntaus; ++idx) {
186  edm::RefToBase<reco::BaseTau> tausRef = anyTaus->refAt(idx);
187  edm::Ptr<reco::BaseTau> tausPtr = anyTaus->ptrAt(idx);
188 
189  Tau aTau(tausRef);
190  if (embedLeadTrack_) aTau.embedLeadTrack();
193  if (embedLeadPFCand_) {
194  if (aTau.isPFTau() )
195  aTau.embedLeadPFCand();
196  else
197  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
198  }
200  if (aTau.isPFTau() )
202  else
203  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
204  }
206  if (aTau.isPFTau() )
207  aTau.embedLeadPFNeutralCand();
208  else
209  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
210  }
211  if (embedSignalPFCands_) {
212  if (aTau.isPFTau() )
213  aTau.embedSignalPFCands();
214  else
215  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
216  }
218  if (aTau.isPFTau() )
220  else
221  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
222  }
224  if (aTau.isPFTau() )
226  else
227  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
228  }
230  if (aTau.isPFTau() )
232  else
233  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
234  }
236  if (aTau.isPFTau() )
237  aTau.embedIsolationPFCands();
238  else
239  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
240  }
242  if (aTau.isPFTau() )
244  else
245  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
246  }
248  if (aTau.isPFTau() )
250  else
251  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
252  }
254  if (aTau.isPFTau() )
256  else
257  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
258  }
259 
260  // store the match to the generated final state muons
261  if (addGenMatch_) {
262  for(size_t i = 0, n = genMatches.size(); i < n; ++i) {
263  reco::GenParticleRef genTau = (*genMatches[i])[tausRef];
264  aTau.addGenParticleRef(genTau);
265  }
266  if (embedGenMatch_) aTau.embedGenParticle();
267  }
268 
269  // store the match to the visible part of the generated tau
270  if (addGenJetMatch_) {
271  reco::GenJetRef genJetTau = (*genJetMatch)[tausRef];
272  if (genJetTau.isNonnull() && genJetTau.isAvailable() ) {
273  aTau.setGenJet( genJetTau );
274  } // leave empty if no match found
275  }
276 
277  // prepare ID extraction
278  if ( addTauID_ ) {
279  std::vector<pat::Tau::IdPair> ids(tauIDSrcs_.size());
280  for ( size_t i = 0; i < tauIDSrcs_.size(); ++i ) {
282  iEvent.getByLabel(tauIDSrcs_[i].second, caloTauIdDiscr);
283 
285  iEvent.getByLabel(tauIDSrcs_[i].second, pfTauIdDiscr);
286 
287  if ( typeid(*tausRef) == typeid(reco::PFTau) ) {
288  //std::cout << "filling PFTauDiscriminator '" << tauIDSrcs_[i].first << "' into pat::Tau object..." << std::endl;
289  edm::Handle<reco::PFTauCollection> pfTauCollection;
290  iEvent.getByLabel(tauSrc_, pfTauCollection);
291 
293  iEvent.getByLabel(tauIDSrcs_[i].second, pfTauIdDiscr);
294 
295  ids[i].first = tauIDSrcs_[i].first;
296  ids[i].second = getTauIdDiscriminator(pfTauCollection, idx, pfTauIdDiscr);
297  } else if ( typeid(*tausRef) == typeid(reco::CaloTau) ) {
298  //std::cout << "filling CaloTauDiscriminator '" << tauIDSrcs_[i].first << "' into pat::Tau object..." << std::endl;
299  edm::Handle<reco::CaloTauCollection> caloTauCollection;
300  iEvent.getByLabel(tauSrc_, caloTauCollection);
301 
303  iEvent.getByLabel(tauIDSrcs_[i].second, caloTauIdDiscr);
304 
305  ids[i].first = tauIDSrcs_[i].first;
306  ids[i].second = getTauIdDiscriminator(caloTauCollection, idx, caloTauIdDiscr);
307  } else {
308  throw cms::Exception("Type Mismatch") <<
309  "PATTauProducer: unsupported datatype '" << typeid(*tausRef).name() << "' for tauSource\n";
310  }
311  }
312 
313  aTau.setTauIDs(ids);
314  }
315 
316  // extraction of reconstructed tau decay mode
317  // (only available for PFTaus)
318  if ( aTau.isPFTau() ) {
320  iEvent.getByLabel(tauSrc_, pfTaus);
321  reco::PFTauRef pfTauRef(pfTaus, idx);
322 
323  aTau.setDecayMode(pfTauRef->decayMode());
324  }
325 
326  // Isolation
327  if (isolator_.enabled()) {
328  isolator_.fill(*anyTaus, idx, isolatorTmpStorage_);
329  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
330  // better to loop backwards, so the vector is resized less times
331  for ( IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(),
332  ed = isolatorTmpStorage_.rend(); it != ed; ++it) {
333  aTau.setIsolation(it->first, it->second);
334  }
335  }
336 
337  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
338  aTau.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[tausRef]);
339  }
340 
341  if (efficiencyLoader_.enabled()) {
342  efficiencyLoader_.setEfficiencies( aTau, tausRef );
343  }
344 
345  if (resolutionLoader_.enabled()) {
347  }
348 
349  if ( useUserData_ ) {
350  userDataHelper_.add( aTau, iEvent, iSetup );
351  }
352 
353  patTaus->push_back(aTau);
354  }
355 
356  // sort taus in pT
357  std::sort(patTaus->begin(), patTaus->end(), pTTauComparator_);
358 
359  // put genEvt object in Event
360  iEvent.put(patTaus);
361 
362  // clean up
364 }
365 
366 template <typename TauCollectionType, typename TauDiscrType>
367 float PATTauProducer::getTauIdDiscriminator(const edm::Handle<TauCollectionType>& tauCollection, size_t tauIdx, const edm::Handle<TauDiscrType>& tauIdDiscr)
368 {
369  edm::Ref<TauCollectionType> tauRef(tauCollection, tauIdx);
370  return (*tauIdDiscr)[tauRef];
371 }
372 
373 // ParameterSet description for module
375 {
377  iDesc.setComment("PAT tau producer module");
378 
379  // input source
380  iDesc.add<edm::InputTag>("tauSource", edm::InputTag())->setComment("input collection");
381 
382  // embedding
383  iDesc.add<bool>("embedIsolationTracks", false)->setComment("embed external isolation tracks");
384  iDesc.add<bool>("embedLeadTrack", false)->setComment("embed external leading track");
385  iDesc.add<bool>("embedLeadTracks", false)->setComment("embed external signal tracks");
386 
387  // MC matching configurables
388  iDesc.add<bool>("addGenMatch", true)->setComment("add MC matching");
389  iDesc.add<bool>("embedGenMatch", false)->setComment("embed MC matched MC information");
390  std::vector<edm::InputTag> emptySourceVector;
391  iDesc.addNode( edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
392  edm::ParameterDescription<std::vector<edm::InputTag> >("genParticleMatch", emptySourceVector, true)
393  )->setComment("input with MC match information");
394 
395  // MC jet matching variables
396  iDesc.add<bool>("addGenJetMatch", true)->setComment("add MC jet matching");
397  iDesc.add<bool>("embedGenJetMatch", false)->setComment("embed MC jet matched jet information");
398  iDesc.add<edm::InputTag>("genJetMatch", edm::InputTag("tauGenJetMatch"));
399 
400 
402 
403  // tau ID configurables
404  iDesc.add<bool>("addTauID", true)->setComment("add tau ID variables");
405  edm::ParameterSetDescription tauIDSourcesPSet;
406  tauIDSourcesPSet.setAllowAnything();
407  iDesc.addNode( edm::ParameterDescription<edm::InputTag>("tauIDSource", edm::InputTag(), true) xor
408  edm::ParameterDescription<edm::ParameterSetDescription>("tauIDSources", tauIDSourcesPSet, true)
409  )->setComment("input with electron ID variables");
410 
411  // IsoDeposit configurables
412  edm::ParameterSetDescription isoDepositsPSet;
413  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
414  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
415  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
416  isoDepositsPSet.addOptional<edm::InputTag>("pfAllParticles");
417  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadron");
418  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadron");
419  isoDepositsPSet.addOptional<edm::InputTag>("pfGamma");
420  isoDepositsPSet.addOptional<std::vector<edm::InputTag> >("user");
421  iDesc.addOptional("isoDeposits", isoDepositsPSet);
422 
423  // Efficiency configurables
424  edm::ParameterSetDescription efficienciesPSet;
425  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
426  iDesc.add("efficiencies", efficienciesPSet);
427  iDesc.add<bool>("addEfficiencies", false);
428 
429  // Check to see if the user wants to add user data
430  edm::ParameterSetDescription userDataPSet;
432  iDesc.addOptional("userData", userDataPSet);
433 
434  edm::ParameterSetDescription isolationPSet;
435  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
436  iDesc.add("userIsolation", isolationPSet);
437 
438 }
439 
441 
443 
444 
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
T getParameter(std::string const &) const
void setComment(std::string const &value)
Assists in assimilating all pat::UserData into pat objects.
int i
Definition: DBlmapReader.cc:9
std::pair< std::string, edm::InputTag > NameTag
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
void setIsolation(IsolationKeys key, float value)
Definition: Lepton.h:99
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:181
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
void setAllowAnything()
allow any parameter label/value pairs
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
void embedLeadPFChargedHadrCand()
method to store the leading charged hadron candidate internally
Definition: Tau.cc:287
pat::helper::EfficiencyLoader efficiencyLoader_
bool exists(std::string const &parameterName) const
checks if a parameter exists
pat::helper::KinResolutionsLoader resolutionLoader_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
void embedSignalPFGammaCands()
method to store the signal gamma candidates internally
Definition: Tau.cc:339
float getTauIdDiscriminator(const edm::Handle< TauCollectionType > &, size_t, const edm::Handle< TauDiscrType > &)
void embedIsolationPFCands()
method to store the isolation candidates internally
Definition: Tau.cc:350
void embedIsolationPFGammaCands()
method to store the isolation gamma candidates internally
Definition: Tau.cc:381
void setTauIDs(const std::vector< IdPair > &ids)
Definition: Tau.h:262
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
void embedSignalTracks()
method to store the signal tracks internally
Definition: Tau.cc:193
edm::InputTag genJetMatchSrc_
bool isAvailable() const
Definition: Ref.h:275
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
std::vector< edm::InputTag > genMatchSrc_
bool isRealData() const
Definition: EventBase.h:60
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
Definition: Lepton.h:173
bool embedIsolationPFChargedHadrCands_
static void fillDescription(edm::ParameterSetDescription &iDesc)
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:189
U second(std::pair< T, U > const &p)
bool enabled() const
True if it has a non null configuration.
Definition: MultiIsolator.h:50
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:249
void embedSignalPFChargedHadrCands()
method to store the signal charged hadrons candidates internally
Definition: Tau.cc:319
void setComment(std::string const &value)
int iEvent
Definition: GenABIO.cc:243
void embedSignalPFCands()
method to store the signal candidates internally
Definition: Tau.cc:309
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
pat::helper::MultiIsolator isolator_
edm::InputTag tauSrc_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:84
void embedGenParticle()
Definition: PATObject.h:669
bool embedIsolationPFNeutralHadrCands_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void embedLeadTrack()
method to store the leading track internally
Definition: Tau.cc:183
int j
Definition: DBlmapReader.cc:9
pat::PATUserDataHelper< pat::Tau > userDataHelper_
bool embedSignalPFNeutralHadrCands_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
bool first
Definition: L1TdeRCT.cc:79
Analysis-level tau class.
Definition: Tau.h:51
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
void embedIsolationPFNeutralHadrCands()
method to store the isolation neutral hadrons candidates internally
Definition: Tau.cc:371
void embedLeadPFNeutralCand()
method to store the leading neutral candidate internally
Definition: Tau.cc:298
void addGenParticleRef(const reco::GenParticleRef &ref)
Definition: PATObject.h:653
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
void embedSignalPFNeutralHadrCands()
method to store the signal neutral hadrons candidates internally
Definition: Tau.cc:329
void setDecayMode(int)
set decay mode
Definition: Tau.cc:269
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
Definition: MultiIsolator.h:16
void embedIsolationPFChargedHadrCands()
method to store the isolation charged hadrons candidates internally
Definition: Tau.cc:361
PATTauProducer(const edm::ParameterSet &iConfig)
list key
Definition: combine.py:13
bool isPFTau() const
Returns true if this pat::Tau was made from a reco::PFTau.
Definition: Tau.h:149
void setGenJet(const reco::GenJetRef &ref)
set the matched GenJet
Definition: Tau.cc:204
void embedIsolationTracks()
method to store the isolation tracks internally
Definition: Tau.cc:172
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
bool embedSignalPFChargedHadrCands_
void newEvent(const edm::Event &event, const edm::EventSetup &setup) const
To be called for each new event, reads in the EventSetup object.
static const HistoName names[]
void embedLeadPFCand()
method to store the leading candidate internally
Definition: Tau.cc:276
std::vector< NameTag > tauIDSrcs_
void newEvent(const edm::Event &event) const
To be called for each new event, reads in the ValueMaps for efficiencies.
GreaterByPt< Tau > pTTauComparator_
Produces pat::Tau&#39;s.
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
Definition: MultiIsolator.h:82