CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
pat::PATTauProducer Class Reference

Produces pat::Tau's. More...

#include "PhysicsTools/PatAlgos/interface/PATTauProducer.h"

Inheritance diagram for pat::PATTauProducer:
edm::stream::EDProducer<>

Public Member Functions

 PATTauProducer (const edm::ParameterSet &iConfig)
 
void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 
 ~PATTauProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Types

typedef std::pair< edm::InputTag, std::vector< NameWPIdx > > IDContainerData
 
typedef std::pair< std::string, edm::InputTagNameTag
 
typedef std::pair< std::string, WPIdxNameWPIdx
 
typedef std::pair< std::string, std::string > WPCfg
 
typedef std::pair< WPCfg, int > WPIdx
 

Private Member Functions

template<typename TauCollectionType , typename TauDiscrType >
float getTauIdDiscriminator (const edm::Handle< TauCollectionType > &, size_t, const edm::Handle< TauDiscrType > &)
 
float getTauIdDiscriminatorFromContainer (const edm::Handle< reco::PFTauCollection > &, size_t, const edm::Handle< reco::TauDiscriminatorContainer > &, int)
 

Private Attributes

bool addEfficiencies_
 
bool addGenJetMatch_
 
bool addGenMatch_
 
bool addResolutions_
 
bool addTauID_
 
bool addTauJetCorrFactors_
 
edm::EDGetTokenT< edm::View< reco::BaseTau > > baseTauToken_
 
pat::helper::EfficiencyLoader efficiencyLoader_
 
bool embedGenJetMatch_
 
bool embedGenMatch_
 
bool embedIsolationPFCands_
 
bool embedIsolationPFChargedHadrCands_
 
bool embedIsolationPFGammaCands_
 
bool embedIsolationPFNeutralHadrCands_
 
bool embedIsolationTracks_
 
bool embedLeadPFCand_
 
bool embedLeadPFChargedHadrCand_
 
bool embedLeadPFNeutralCand_
 
bool embedLeadTrack_
 
bool embedSignalPFCands_
 
bool embedSignalPFChargedHadrCands_
 
bool embedSignalPFGammaCands_
 
bool embedSignalPFNeutralHadrCands_
 
bool embedSignalTracks_
 
bool firstOccurence_
 
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetMatchToken_
 
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
 
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
 
pat::helper::MultiIsolator isolator_
 
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
 
std::vector< edm::EDGetTokenT< reco::TauDiscriminatorContainer > > pfTauIDContainerTokens_
 
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > pfTauIDTokens_
 
edm::EDGetTokenT< reco::PFTauCollectionpfTauToken_
 
edm::ProcessHistoryID phID_
 
GreaterByPt< TaupTTauComparator_
 
pat::helper::KinResolutionsLoader resolutionLoader_
 
bool skipMissingTauID_
 
std::vector< std::vector< NameWPIdx > > tauIDSrcContainers_
 
std::vector< NameTagtauIDSrcs_
 
std::vector< edm::EDGetTokenT< edm::ValueMap< TauJetCorrFactors > > > tauJetCorrFactorsTokens_
 
edm::InputTag tauTransverseImpactParameterSrc_
 
edm::EDGetTokenT< PFTauTIPAssociationByReftauTransverseImpactParameterToken_
 
pat::PATUserDataHelper< pat::TauuserDataHelper_
 
bool useUserData_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 

Detailed Description

Produces pat::Tau's.

The PATTauProducer produces analysis-level pat::Tau's starting from a collection of objects of TauType.

Author
Steven Lowette, Christophe Delaere

Definition at line 49 of file PATTauProducer.h.

Member Typedef Documentation

◆ IDContainerData

typedef std::pair<edm::InputTag, std::vector<NameWPIdx> > pat::PATTauProducer::IDContainerData
private

Definition at line 98 of file PATTauProducer.h.

◆ NameTag

typedef std::pair<std::string, edm::InputTag> pat::PATTauProducer::NameTag
private

Definition at line 93 of file PATTauProducer.h.

◆ NameWPIdx

typedef std::pair<std::string, WPIdx> pat::PATTauProducer::NameWPIdx
private

Definition at line 96 of file PATTauProducer.h.

◆ WPCfg

typedef std::pair<std::string, std::string> pat::PATTauProducer::WPCfg
private

Definition at line 94 of file PATTauProducer.h.

◆ WPIdx

typedef std::pair<WPCfg, int> pat::PATTauProducer::WPIdx
private

Definition at line 95 of file PATTauProducer.h.

Constructor & Destructor Documentation

◆ PATTauProducer()

PATTauProducer::PATTauProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 30 of file PATTauProducer.cc.

31  : isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation")
33  consumesCollector(),
34  false),
35  useUserData_(iConfig.exists("userData")) {
36  firstOccurence_ = true;
37  // initialize the configurables
38  baseTauToken_ = consumes<edm::View<reco::BaseTau>>(iConfig.getParameter<edm::InputTag>("tauSource"));
39  tauTransverseImpactParameterSrc_ = iConfig.getParameter<edm::InputTag>("tauTransverseImpactParameterSource");
40  tauTransverseImpactParameterToken_ = consumes<PFTauTIPAssociationByRef>(tauTransverseImpactParameterSrc_);
41  pfTauToken_ = consumes<reco::PFTauCollection>(iConfig.getParameter<edm::InputTag>("tauSource"));
42  embedIsolationTracks_ = iConfig.getParameter<bool>("embedIsolationTracks");
43  embedLeadTrack_ = iConfig.getParameter<bool>("embedLeadTrack");
44  embedSignalTracks_ = iConfig.getParameter<bool>("embedSignalTracks");
45  embedLeadPFCand_ = iConfig.getParameter<bool>("embedLeadPFCand");
46  embedLeadPFChargedHadrCand_ = iConfig.getParameter<bool>("embedLeadPFChargedHadrCand");
47  embedLeadPFNeutralCand_ = iConfig.getParameter<bool>("embedLeadPFNeutralCand");
48  embedSignalPFCands_ = iConfig.getParameter<bool>("embedSignalPFCands");
49  embedSignalPFChargedHadrCands_ = iConfig.getParameter<bool>("embedSignalPFChargedHadrCands");
50  embedSignalPFNeutralHadrCands_ = iConfig.getParameter<bool>("embedSignalPFNeutralHadrCands");
51  embedSignalPFGammaCands_ = iConfig.getParameter<bool>("embedSignalPFGammaCands");
52  embedIsolationPFCands_ = iConfig.getParameter<bool>("embedIsolationPFCands");
53  embedIsolationPFChargedHadrCands_ = iConfig.getParameter<bool>("embedIsolationPFChargedHadrCands");
54  embedIsolationPFNeutralHadrCands_ = iConfig.getParameter<bool>("embedIsolationPFNeutralHadrCands");
55  embedIsolationPFGammaCands_ = iConfig.getParameter<bool>("embedIsolationPFGammaCands");
56  addGenMatch_ = iConfig.getParameter<bool>("addGenMatch");
57  if (addGenMatch_) {
58  embedGenMatch_ = iConfig.getParameter<bool>("embedGenMatch");
59  if (iConfig.existsAs<edm::InputTag>("genParticleMatch")) {
61  iConfig.getParameter<edm::InputTag>("genParticleMatch")));
62  } else {
64  iConfig.getParameter<std::vector<edm::InputTag>>("genParticleMatch"),
65  [this](edm::InputTag const& tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
66  }
67  }
68  addGenJetMatch_ = iConfig.getParameter<bool>("addGenJetMatch");
69  if (addGenJetMatch_) {
70  embedGenJetMatch_ = iConfig.getParameter<bool>("embedGenJetMatch");
72  consumes<edm::Association<reco::GenJetCollection>>(iConfig.getParameter<edm::InputTag>("genJetMatch"));
73  }
74  addTauJetCorrFactors_ = iConfig.getParameter<bool>("addTauJetCorrFactors");
76  iConfig.getParameter<std::vector<edm::InputTag>>("tauJetCorrFactorsSource"),
77  [this](edm::InputTag const& tag) { return mayConsume<edm::ValueMap<TauJetCorrFactors>>(tag); });
78  // tau ID configurables
79  addTauID_ = iConfig.getParameter<bool>("addTauID");
80  if (addTauID_) {
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::ParameterSet>();
84  std::map<std::string, IDContainerData> idContainerMap;
85  for (auto const& name : names) {
86  auto const& idp = idps.getParameter<edm::ParameterSet>(name);
87  std::string prov_cfg_label = idp.getParameter<std::string>("provenanceConfigLabel");
88  std::string prov_ID_label = idp.getParameter<std::string>("idLabel");
89  edm::InputTag tag = idp.getParameter<edm::InputTag>("inputTag");
90  if (prov_cfg_label.empty()) {
91  tauIDSrcs_.push_back(NameTag(name, tag));
92  } else {
93  if (prov_cfg_label != "rawValues" && prov_cfg_label != "workingPoints" && prov_cfg_label != "IDdefinitions" &&
94  prov_cfg_label != "IDWPdefinitions" && prov_cfg_label != "direct_rawValues" &&
95  prov_cfg_label != "direct_workingPoints")
96  throw cms::Exception("Configuration")
97  << "PATTauProducer: Parameter 'provenanceConfigLabel' does only accept 'rawValues', 'workingPoints', "
98  "'IDdefinitions', 'IDWPdefinitions', 'direct_rawValues', 'direct_workingPoints'\n";
99  std::map<std::string, IDContainerData>::iterator it;
100  it = idContainerMap.insert({tag.label() + tag.instance(), {tag, std::vector<NameWPIdx>()}}).first;
101  it->second.second.push_back(NameWPIdx(name, WPIdx(WPCfg(prov_cfg_label, prov_ID_label), -99)));
102  }
103  }
104  // but in any case at least once
105  if (tauIDSrcs_.empty() && idContainerMap.empty())
106  throw cms::Exception("Configuration") << "PATTauProducer: id addTauID is true, you must specify either:\n"
107  << "\tPSet tauIDSources = { \n"
108  << "\t\tInputTag <someName> = <someTag> // as many as you want \n "
109  << "\t}\n";
110 
111  for (auto const& mapEntry : idContainerMap) {
112  tauIDSrcContainers_.push_back(mapEntry.second.second);
113  pfTauIDContainerTokens_.push_back(mayConsume<reco::TauDiscriminatorContainer>(mapEntry.second.first));
114  }
115  }
117  tauIDSrcs_, [this](NameTag const& tag) { return mayConsume<reco::PFTauDiscriminator>(tag.second); });
118  skipMissingTauID_ = iConfig.getParameter<bool>("skipMissingTauID");
119  // IsoDeposit configurables
120  if (iConfig.exists("isoDeposits")) {
121  edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>("isoDeposits");
122  if (depconf.exists("tracker"))
123  isoDepositLabels_.push_back(std::make_pair(pat::TrackIso, depconf.getParameter<edm::InputTag>("tracker")));
124  if (depconf.exists("ecal"))
125  isoDepositLabels_.push_back(std::make_pair(pat::EcalIso, depconf.getParameter<edm::InputTag>("ecal")));
126  if (depconf.exists("hcal"))
127  isoDepositLabels_.push_back(std::make_pair(pat::HcalIso, depconf.getParameter<edm::InputTag>("hcal")));
128  if (depconf.exists("pfAllParticles"))
129  isoDepositLabels_.push_back(
130  std::make_pair(pat::PfAllParticleIso, depconf.getParameter<edm::InputTag>("pfAllParticles")));
131  if (depconf.exists("pfChargedHadron"))
132  isoDepositLabels_.push_back(
133  std::make_pair(pat::PfChargedHadronIso, depconf.getParameter<edm::InputTag>("pfChargedHadron")));
134  if (depconf.exists("pfNeutralHadron"))
135  isoDepositLabels_.push_back(
136  std::make_pair(pat::PfNeutralHadronIso, depconf.getParameter<edm::InputTag>("pfNeutralHadron")));
137  if (depconf.exists("pfGamma"))
138  isoDepositLabels_.push_back(std::make_pair(pat::PfGammaIso, depconf.getParameter<edm::InputTag>("pfGamma")));
139 
140  if (depconf.exists("user")) {
141  std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag>>("user");
142  std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
143  int key = UserBaseIso;
144  for (; it != ed; ++it, ++key) {
145  isoDepositLabels_.push_back(std::make_pair(IsolationKeys(key), *it));
146  }
147  }
148  }
150  edm::vector_transform(isoDepositLabels_, [this](std::pair<IsolationKeys, edm::InputTag> const& label) {
151  return consumes<edm::ValueMap<IsoDeposit>>(label.second);
152  });
153  // Efficiency configurables
154  addEfficiencies_ = iConfig.getParameter<bool>("addEfficiencies");
155  if (addEfficiencies_) {
157  pat::helper::EfficiencyLoader(iConfig.getParameter<edm::ParameterSet>("efficiencies"), consumesCollector());
158  }
159  // Resolution configurables
160  addResolutions_ = iConfig.getParameter<bool>("addResolutions");
161  if (addResolutions_) {
163  }
164  // Check to see if the user wants to add user data
165  if (useUserData_) {
166  userDataHelper_ = PATUserDataHelper<Tau>(iConfig.getParameter<edm::ParameterSet>("userData"), consumesCollector());
167  }
168  // produces vector of taus
169  produces<std::vector<Tau>>();
170 }

References addEfficiencies_, addGenJetMatch_, addGenMatch_, addResolutions_, addTauID_, addTauJetCorrFactors_, baseTauToken_, pat::EcalIso, efficiencyLoader_, embedGenJetMatch_, embedGenMatch_, embedIsolationPFCands_, embedIsolationPFChargedHadrCands_, embedIsolationPFGammaCands_, embedIsolationPFNeutralHadrCands_, embedIsolationTracks_, embedLeadPFCand_, embedLeadPFChargedHadrCand_, embedLeadPFNeutralCand_, embedLeadTrack_, embedSignalPFCands_, embedSignalPFChargedHadrCands_, embedSignalPFGammaCands_, embedSignalPFNeutralHadrCands_, embedSignalTracks_, Exception, edm::ParameterSet::exists(), edm::ParameterSet::existsAs(), dqmdumpme::first, firstOccurence_, genJetMatchToken_, genMatchTokens_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNamesForType(), pat::HcalIso, isoDepositLabels_, isoDepositTokens_, crabWrapper::key, label, Skims_PA_cff::name, names, pat::PfAllParticleIso, pat::PfChargedHadronIso, pat::PfGammaIso, pat::PfNeutralHadronIso, pfTauIDContainerTokens_, pfTauIDTokens_, pfTauToken_, resolutionLoader_, skipMissingTauID_, AlCaHLTBitMon_QueryRunRegistry::string, GlobalPosition_Frontier_DevDB_cff::tag, tauIDSrcContainers_, tauIDSrcs_, tauJetCorrFactorsTokens_, tauTransverseImpactParameterSrc_, tauTransverseImpactParameterToken_, pat::TrackIso, pat::UserBaseIso, userDataHelper_, useUserData_, and edm::vector_transform().

◆ ~PATTauProducer()

PATTauProducer::~PATTauProducer ( )
override

Definition at line 172 of file PATTauProducer.cc.

172 {}

Member Function Documentation

◆ fillDescriptions()

void PATTauProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 688 of file PATTauProducer.cc.

688  {
690  iDesc.setComment("PAT tau producer module");
691 
692  // input source
693  iDesc.add<edm::InputTag>("tauSource", edm::InputTag())->setComment("input collection");
694 
695  // embedding
696  iDesc.add<bool>("embedIsolationTracks", false)->setComment("embed external isolation tracks");
697  iDesc.add<bool>("embedLeadTrack", false)->setComment("embed external leading track");
698  iDesc.add<bool>("embedLeadTracks", false)->setComment("embed external signal tracks");
699 
700  // MC matching configurables
701  iDesc.add<bool>("addGenMatch", true)->setComment("add MC matching");
702  iDesc.add<bool>("embedGenMatch", false)->setComment("embed MC matched MC information");
703  std::vector<edm::InputTag> emptySourceVector;
704  iDesc
705  .addNode(edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
706  edm::ParameterDescription<std::vector<edm::InputTag>>("genParticleMatch", emptySourceVector, true))
707  ->setComment("input with MC match information");
708 
709  // MC jet matching variables
710  iDesc.add<bool>("addGenJetMatch", true)->setComment("add MC jet matching");
711  iDesc.add<bool>("embedGenJetMatch", false)->setComment("embed MC jet matched jet information");
712  iDesc.add<edm::InputTag>("genJetMatch", edm::InputTag("tauGenJetMatch"));
713 
715 
716  // tau ID configurables
717  iDesc.add<bool>("addTauID", true)->setComment("add tau ID variables");
718  edm::ParameterSetDescription tauIDSourcesPSet;
719  tauIDSourcesPSet.setAllowAnything();
720  iDesc
722  edm::ParameterDescription<edm::ParameterSetDescription>("tauIDSources", tauIDSourcesPSet, true))
723  ->setComment("input with tau ID variables");
724  // (Dis)allow to skip missing tauId sources
725  iDesc.add<bool>("skipMissingTauID", false)
726  ->setComment("allow to skip a tau ID variable when not present in the event");
727 
728  // IsoDeposit configurables
729  edm::ParameterSetDescription isoDepositsPSet;
730  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
731  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
732  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
733  isoDepositsPSet.addOptional<edm::InputTag>("pfAllParticles");
734  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadron");
735  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadron");
736  isoDepositsPSet.addOptional<edm::InputTag>("pfGamma");
737  isoDepositsPSet.addOptional<std::vector<edm::InputTag>>("user");
738  iDesc.addOptional("isoDeposits", isoDepositsPSet);
739 
740  // Efficiency configurables
741  edm::ParameterSetDescription efficienciesPSet;
742  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
743  iDesc.add("efficiencies", efficienciesPSet);
744  iDesc.add<bool>("addEfficiencies", false);
745 
746  // Check to see if the user wants to add user data
747  edm::ParameterSetDescription userDataPSet;
749  iDesc.addOptional("userData", userDataPSet);
750 
751  edm::ParameterSetDescription isolationPSet;
752  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
753  iDesc.add("userIsolation", isolationPSet);
754 }

References edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addNode(), edm::ParameterSetDescription::addOptional(), pat::helper::KinResolutionsLoader::fillDescription(), pat::PATUserDataHelper< ObjectType >::fillDescription(), HLT_2018_cff::InputTag, edm::ParameterSetDescription::setAllowAnything(), edm::ParameterSetDescription::setComment(), and edm::ParameterDescriptionNode::setComment().

◆ getTauIdDiscriminator()

template<typename TauCollectionType , typename TauDiscrType >
float PATTauProducer::getTauIdDiscriminator ( const edm::Handle< TauCollectionType > &  tauCollection,
size_t  tauIdx,
const edm::Handle< TauDiscrType > &  tauIdDiscr 
)
private

Definition at line 662 of file PATTauProducer.cc.

664  {
666  return (*tauIdDiscr)[tauRef];
667 }

References RecoTauValidationMiniAOD_cfi::tauCollection.

Referenced by produce().

◆ getTauIdDiscriminatorFromContainer()

float PATTauProducer::getTauIdDiscriminatorFromContainer ( const edm::Handle< reco::PFTauCollection > &  tauCollection,
size_t  tauIdx,
const edm::Handle< reco::TauDiscriminatorContainer > &  tauIdDiscr,
int  wpIdx 
)
private

Definition at line 668 of file PATTauProducer.cc.

671  {
673  if (wpIdx < 0) {
674  //Only 0th component filled with default value if prediscriminor in RecoTauDiscriminator failed.
675  if ((*tauIdDiscr)[tauRef].rawValues.size() == 1)
676  return (*tauIdDiscr)[tauRef].rawValues.at(0);
677  //uses negative indices to access rawValues. In most cases only one rawValue at wpIdx=-1 exists.
678  return (*tauIdDiscr)[tauRef].rawValues.at(-1 - wpIdx);
679  } else {
680  //WP vector not filled if prediscriminor in RecoTauDiscriminator failed. Set PAT output to false in this case
681  if ((*tauIdDiscr)[tauRef].workingPoints.empty())
682  return 0.0;
683  return (*tauIdDiscr)[tauRef].workingPoints.at(wpIdx);
684  }
685 }

References PDWG_TauSkim_cff::rawValues, RecoTauValidationMiniAOD_cfi::tauCollection, and PDWG_TauSkim_cff::workingPoints.

Referenced by produce().

◆ produce()

void PATTauProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 174 of file PATTauProducer.cc.

174  {
175  // switch off embedding (in unschedules mode)
176  if (iEvent.isRealData()) {
177  addGenMatch_ = false;
178  embedGenMatch_ = false;
179  addGenJetMatch_ = false;
180  }
181 
182  // Get the collection of taus from the event
184  try {
185  iEvent.getByToken(baseTauToken_, anyTaus);
186  } catch (const edm::Exception& e) {
187  edm::LogWarning("DataSource") << "WARNING! No Tau collection found. This missing input will not block the job. "
188  "Instead, an empty tau collection is being be produced.";
189  auto patTaus = std::make_unique<std::vector<Tau>>();
190  iEvent.put(std::move(patTaus));
191  return;
192  }
193 
194  if (isolator_.enabled())
195  isolator_.beginEvent(iEvent, iSetup);
196 
201 
202  std::vector<edm::Handle<edm::ValueMap<IsoDeposit>>> deposits(isoDepositTokens_.size());
203  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
204  iEvent.getByToken(isoDepositTokens_[j], deposits[j]);
205  }
206 
207  // prepare the MC matching
208  std::vector<edm::Handle<edm::Association<reco::GenParticleCollection>>> genMatches(genMatchTokens_.size());
209  if (addGenMatch_) {
210  for (size_t j = 0, nd = genMatchTokens_.size(); j < nd; ++j) {
211  iEvent.getByToken(genMatchTokens_[j], genMatches[j]);
212  }
213  }
214 
216  if (addGenJetMatch_)
217  iEvent.getByToken(genJetMatchToken_, genJetMatch);
218 
219  // read in the jet correction factors ValueMap
220  std::vector<edm::ValueMap<TauJetCorrFactors>> tauJetCorrs;
221  if (addTauJetCorrFactors_) {
222  for (size_t i = 0; i < tauJetCorrFactorsTokens_.size(); ++i) {
224  iEvent.getByToken(tauJetCorrFactorsTokens_[i], tauJetCorr);
225  tauJetCorrs.push_back(*tauJetCorr);
226  }
227  }
228 
229  auto patTaus = std::make_unique<std::vector<Tau>>();
230 
231  bool first = true; // this is introduced to issue warnings only for the first tau-jet
232  for (size_t idx = 0, ntaus = anyTaus->size(); idx < ntaus; ++idx) {
233  edm::RefToBase<reco::BaseTau> tausRef = anyTaus->refAt(idx);
234  edm::Ptr<reco::BaseTau> tausPtr = anyTaus->ptrAt(idx);
235 
236  Tau aTau(tausRef);
237  if (embedLeadTrack_)
238  aTau.embedLeadTrack();
239  if (embedSignalTracks_)
240  aTau.embedSignalTracks();
242  aTau.embedIsolationTracks();
243  if (embedLeadPFCand_) {
244  if (aTau.isPFTau())
245  aTau.embedLeadPFCand();
246  else
247  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
248  "from a reco::PFTau is impossible.\n";
249  }
251  if (aTau.isPFTau())
252  aTau.embedLeadPFChargedHadrCand();
253  else
254  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
255  "from a reco::PFTau is impossible.\n";
256  }
258  if (aTau.isPFTau())
259  aTau.embedLeadPFNeutralCand();
260  else
261  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
262  "from a reco::PFTau is impossible.\n";
263  }
264  if (embedSignalPFCands_) {
265  if (aTau.isPFTau())
266  aTau.embedSignalPFCands();
267  else
268  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
269  "from a reco::PFTau is impossible.\n";
270  }
272  if (aTau.isPFTau())
273  aTau.embedSignalPFChargedHadrCands();
274  else
275  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
276  "from a reco::PFTau is impossible.\n";
277  }
279  if (aTau.isPFTau())
280  aTau.embedSignalPFNeutralHadrCands();
281  else
282  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
283  "from a reco::PFTau is impossible.\n";
284  }
286  if (aTau.isPFTau())
287  aTau.embedSignalPFGammaCands();
288  else
289  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
290  "from a reco::PFTau is impossible.\n";
291  }
293  if (aTau.isPFTau())
294  aTau.embedIsolationPFCands();
295  else
296  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
297  "from a reco::PFTau is impossible.\n";
298  }
300  if (aTau.isPFTau())
301  aTau.embedIsolationPFChargedHadrCands();
302  else
303  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
304  "from a reco::PFTau is impossible.\n";
305  }
307  if (aTau.isPFTau())
308  aTau.embedIsolationPFNeutralHadrCands();
309  else
310  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
311  "from a reco::PFTau is impossible.\n";
312  }
314  if (aTau.isPFTau())
315  aTau.embedIsolationPFGammaCands();
316  else
317  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
318  "from a reco::PFTau is impossible.\n";
319  }
320 
321  if (addTauJetCorrFactors_) {
322  // add additional JetCorrs to the jet
323  for (unsigned int i = 0; i < tauJetCorrs.size(); ++i) {
324  const TauJetCorrFactors& tauJetCorr = tauJetCorrs[i][tausRef];
325  // uncomment for debugging
326  // tauJetCorr.print();
327  aTau.addJECFactors(tauJetCorr);
328  }
329  std::vector<std::string> levels = tauJetCorrs[0][tausRef].correctionLabels();
330  if (std::find(levels.begin(), levels.end(), "L2L3Residual") != levels.end()) {
331  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("L2L3Residual"));
332  } else if (std::find(levels.begin(), levels.end(), "L3Absolute") != levels.end()) {
333  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("L3Absolute"));
334  } else {
335  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("Uncorrected"));
336  if (first) {
337  edm::LogWarning("L3Absolute not found")
338  << "L2L3Residual and L3Absolute are not part of the correction applied jetCorrFactors \n"
339  << "of module " << tauJetCorrs[0][tausRef].jecSet() << " jets will remain"
340  << " uncorrected.";
341  first = false;
342  }
343  }
344  }
345 
346  // store the match to the generated final state muons
347  if (addGenMatch_) {
348  for (size_t i = 0, n = genMatches.size(); i < n; ++i) {
349  reco::GenParticleRef genTau = (*genMatches[i])[tausRef];
350  aTau.addGenParticleRef(genTau);
351  }
352  if (embedGenMatch_)
353  aTau.embedGenParticle();
354  }
355 
356  // store the match to the visible part of the generated tau
357  if (addGenJetMatch_) {
358  reco::GenJetRef genJetTau = (*genJetMatch)[tausRef];
359  if (genJetTau.isNonnull() && genJetTau.isAvailable()) {
360  aTau.setGenJet(genJetTau);
361  } // leave empty if no match found
362  }
363 
364  // prepare ID extraction
365  if (addTauID_) {
366  size_t numberPlainTauIds = tauIDSrcs_.size();
367  size_t numberTauIds = numberPlainTauIds;
368  for (auto const& it : tauIDSrcContainers_) {
369  numberTauIds += it.size();
370  }
371  // if ID containers exist, product incices need to be retrieved from provenanceConfigLabel.
372  // This is done if config history changes, in particular for the first event.
373  if (numberPlainTauIds != numberTauIds && phID_ != iEvent.processHistoryID()) {
374  phID_ = iEvent.processHistoryID();
375  for (size_t idx = 0; idx < tauIDSrcContainers_.size(); ++idx) {
376  auto pfTauIdDiscr = iEvent.getHandle(pfTauIDContainerTokens_[idx]);
377  if (!pfTauIdDiscr.isValid())
378  continue; // missing IDs will be skipped lateron or crash there depending on skipMissingTauID_
379  const edm::Provenance* prov = pfTauIdDiscr.provenance();
380  for (NameWPIdx& idcfg : tauIDSrcContainers_[idx]) {
381  std::string prov_cfg_label = idcfg.second.first.first;
382  std::string prov_ID_label = idcfg.second.first.second;
383  bool found = false;
384  if (prov_cfg_label == "rawValues" || prov_cfg_label == "workingPoints") {
385  const std::vector<std::string> psetsFromProvenance =
386  edm::parameterSet(*prov, iEvent.processHistory())
387  .getParameter<std::vector<std::string>>(prov_cfg_label);
388  for (size_t i = 0; i < psetsFromProvenance.size(); ++i) {
389  if (psetsFromProvenance[i] == prov_ID_label) {
390  // using negative indices for raw values
391  if (prov_cfg_label == "rawValues")
392  idcfg.second.second = -1 - i;
393  else
394  idcfg.second.second = i;
395  found = true;
396  }
397  }
398  } else if (prov_cfg_label == "IDdefinitions" || prov_cfg_label == "IDWPdefinitions") {
399  const std::vector<edm::ParameterSet> psetsFromProvenance =
400  edm::parameterSet(*prov, iEvent.processHistory())
401  .getParameter<std::vector<edm::ParameterSet>>(prov_cfg_label);
402  for (size_t i = 0; i < psetsFromProvenance.size(); ++i) {
403  if (psetsFromProvenance[i].getParameter<std::string>("IDname") == prov_ID_label) {
404  // using negative indices for raw values
405  if (prov_cfg_label == "IDdefinitions")
406  idcfg.second.second = -1 - i;
407  else
408  idcfg.second.second = i;
409  found = true;
410  }
411  }
412  } else {
413  // checked prov_cfg_label before, so it must be a direct access via indices
414  try {
415  int i = std::stoi(prov_ID_label);
416  if (prov_cfg_label == "direct_rawValues")
417  idcfg.second.second = -i;
418  else
419  idcfg.second.second = i;
420  } catch (std::invalid_argument const& e) {
421  throw cms::Exception("Configuration") << "PATTauProducer: Direct access to ID container requested, so "
422  "argument of 'idLabel' must be convertable to int!\n";
423  }
424  }
425  if (!found) {
426  throw cms::Exception("Configuration") << "PATTauProducer: Requested working point '" << prov_ID_label
427  << "' for ID '" << idcfg.first << "' not found!\n";
428  }
429  }
430  }
431  }
432  std::string missingDiscriminators;
433  std::vector<pat::Tau::IdPair> ids(numberTauIds);
434  auto const& tausDeref = *tausRef;
435  if (typeid(tausDeref) == typeid(reco::PFTau)) {
436  edm::Handle<reco::PFTauCollection> pfTauCollection;
437  iEvent.getByToken(pfTauToken_, pfTauCollection);
438  for (size_t i = 0; i < numberPlainTauIds; ++i) {
439  //std::cout << "filling PFTauDiscriminator '" << tauIDSrcs_[i].first << "' into pat::Tau object..." << std::endl;
440 
441  auto pfTauIdDiscr = iEvent.getHandle(pfTauIDTokens_[i]);
442 
443  if (skipMissingTauID_ && !pfTauIdDiscr.isValid()) {
444  if (!missingDiscriminators.empty()) {
445  missingDiscriminators += ", ";
446  }
447  missingDiscriminators += tauIDSrcs_[i].first;
448  continue;
449  }
450  ids[i].first = tauIDSrcs_[i].first;
451  ids[i].second = getTauIdDiscriminator(pfTauCollection, idx, pfTauIdDiscr);
452  }
453  for (size_t i = 0; i < tauIDSrcContainers_.size(); ++i) {
454  auto pfTauIdDiscr = iEvent.getHandle(pfTauIDContainerTokens_[i]);
455  if (skipMissingTauID_ && !pfTauIdDiscr.isValid()) {
456  for (auto const& it : tauIDSrcContainers_[i]) {
457  if (!missingDiscriminators.empty()) {
458  missingDiscriminators += ", ";
459  }
460  missingDiscriminators += it.first;
461  }
462  continue;
463  }
464  for (size_t j = 0; j < tauIDSrcContainers_[i].size(); ++j) {
465  ids[numberPlainTauIds + j].first = tauIDSrcContainers_[i][j].first;
466  ids[numberPlainTauIds + j].second = getTauIdDiscriminatorFromContainer(
467  pfTauCollection, idx, pfTauIdDiscr, tauIDSrcContainers_[i][j].second.second);
468  }
469  numberPlainTauIds += tauIDSrcContainers_[i].size();
470  }
471  } else {
472  throw cms::Exception("Type Mismatch")
473  << "PATTauProducer: unsupported datatype '" << typeid(tausDeref).name() << "' for tauSource\n";
474  }
475  if (!missingDiscriminators.empty() && firstOccurence_) {
476  edm::LogWarning("DataSource") << "The following tau discriminators have not been found in the event:\n"
477  << missingDiscriminators << "\n"
478  << "They will not be embedded into the pat::Tau object.\n"
479  << "Note: this message will be printed only at first occurence.";
480  firstOccurence_ = false;
481  }
482  aTau.setTauIDs(ids);
483  }
484 
485  // extraction of reconstructed tau decay mode
486  // (only available for PFTaus)
487  if (aTau.isPFTau()) {
489  iEvent.getByToken(pfTauToken_, pfTaus);
490  reco::PFTauRef pfTauRef(pfTaus, idx);
491 
492  aTau.setDecayMode(pfTauRef->decayMode());
493  }
494 
495  // extraction of variables needed to rerun MVA isolation and anti-electron discriminator on MiniAOD
496  if (!aTau.pfEssential_.empty()) {
498  iEvent.getByToken(pfTauToken_, pfTaus);
499  reco::PFTauRef pfTauRef(pfTaus, idx);
500  pat::tau::TauPFEssential& aTauPFEssential = aTau.pfEssential_[0];
501  float ecalEnergy = 0;
502  float hcalEnergy = 0;
503  float sumPhiTimesEnergy = 0.;
504  float sumEtaTimesEnergy = 0.;
505  float sumEnergy = 0.;
506  float leadChargedCandPt = -99;
507  float leadChargedCandEtaAtEcalEntrance = -99;
508  const std::vector<reco::CandidatePtr>& signalCands = pfTauRef->signalCands();
509  for (const auto& it : signalCands) {
510  const reco::PFCandidate* icand = dynamic_cast<const reco::PFCandidate*>(it.get());
511  if (icand != nullptr) {
512  ecalEnergy += icand->ecalEnergy();
513  hcalEnergy += icand->hcalEnergy();
514  sumPhiTimesEnergy += icand->positionAtECALEntrance().phi() * icand->energy();
515  sumEtaTimesEnergy += icand->positionAtECALEntrance().eta() * icand->energy();
516  sumEnergy += icand->energy();
517  const reco::Track* track = nullptr;
518  if (icand->trackRef().isNonnull())
519  track = icand->trackRef().get();
520  else if (icand->muonRef().isNonnull() && icand->muonRef()->innerTrack().isNonnull())
521  track = icand->muonRef()->innerTrack().get();
522  else if (icand->muonRef().isNonnull() && icand->muonRef()->globalTrack().isNonnull())
523  track = icand->muonRef()->globalTrack().get();
524  else if (icand->muonRef().isNonnull() && icand->muonRef()->outerTrack().isNonnull())
525  track = icand->muonRef()->outerTrack().get();
526  else if (icand->gsfTrackRef().isNonnull())
527  track = icand->gsfTrackRef().get();
528  if (track) {
529  if (track->pt() > leadChargedCandPt) {
530  leadChargedCandEtaAtEcalEntrance = icand->positionAtECALEntrance().eta();
531  leadChargedCandPt = track->pt();
532  }
533  }
534  } else {
535  // TauReco@MiniAOD: individual ECAL and HCAL energies currently not available for PackedCandidates
536  // (see above implementation for PFCandidates).
537  // Should be added if available, as well as on-the-fly computation of position at ECAL entrance
538  sumEnergy += it->energy();
539  const reco::Track* track = it->bestTrack();
540  if (track != nullptr) {
541  if (track->pt() > leadChargedCandPt) {
542  leadChargedCandPt = track->pt();
543  }
544  }
545  }
546  }
547  aTauPFEssential.ecalEnergy_ = ecalEnergy;
548  aTauPFEssential.hcalEnergy_ = hcalEnergy;
549  aTauPFEssential.ptLeadChargedCand_ = leadChargedCandPt;
550  aTauPFEssential.etaAtEcalEntranceLeadChargedCand_ = leadChargedCandEtaAtEcalEntrance;
551  if (sumEnergy != 0.) {
552  aTauPFEssential.phiAtEcalEntrance_ = sumPhiTimesEnergy / sumEnergy;
553  aTauPFEssential.etaAtEcalEntrance_ = sumEtaTimesEnergy / sumEnergy;
554  } else {
555  aTauPFEssential.phiAtEcalEntrance_ = -99.;
556  aTauPFEssential.etaAtEcalEntrance_ = -99.;
557  }
558  float leadingTrackNormChi2 = 0;
559  float ecalEnergyLeadChargedHadrCand = -99.;
560  float hcalEnergyLeadChargedHadrCand = -99.;
561  float emFraction = -1.;
562  float myHCALenergy = 0.;
563  float myECALenergy = 0.;
564  const reco::CandidatePtr& leadingPFCharged = pfTauRef->leadChargedHadrCand();
565  if (leadingPFCharged.isNonnull()) {
566  const reco::PFCandidate* pfCandPtr = dynamic_cast<const reco::PFCandidate*>(leadingPFCharged.get());
567  if (pfCandPtr != nullptr) { // PFTau made from PFCandidates
568  ecalEnergyLeadChargedHadrCand = pfCandPtr->ecalEnergy();
569  hcalEnergyLeadChargedHadrCand = pfCandPtr->hcalEnergy();
570  reco::TrackRef trackRef = pfCandPtr->trackRef();
571  if (trackRef.isNonnull()) {
572  leadingTrackNormChi2 = trackRef->normalizedChi2();
573  for (const auto& isoPFCand : pfTauRef->isolationPFCands()) {
574  myHCALenergy += isoPFCand->hcalEnergy();
575  myECALenergy += isoPFCand->ecalEnergy();
576  }
577  for (const auto& signalPFCand : pfTauRef->signalPFCands()) {
578  myHCALenergy += signalPFCand->hcalEnergy();
579  myECALenergy += signalPFCand->ecalEnergy();
580  }
581  if (myHCALenergy + myECALenergy != 0.) {
582  emFraction = myECALenergy / (myHCALenergy + myECALenergy);
583  }
584  }
585  } else {
586  const pat::PackedCandidate* packedCandPtr = dynamic_cast<const pat::PackedCandidate*>(leadingPFCharged.get());
587  if (packedCandPtr != nullptr) {
588  // TauReco@MiniAOD: Update code below if ecal/hcal energies are available.
589  const reco::Track* track = packedCandPtr->hasTrackDetails() ? &packedCandPtr->pseudoTrack() : nullptr;
590  if (track != nullptr) {
591  leadingTrackNormChi2 = track->normalizedChi2();
592  }
593  }
594  }
595  }
596 
597  aTauPFEssential.emFraction_ = emFraction;
598  aTauPFEssential.leadingTrackNormChi2_ = leadingTrackNormChi2;
599  aTauPFEssential.ecalEnergyLeadChargedHadrCand_ = ecalEnergyLeadChargedHadrCand;
600  aTauPFEssential.hcalEnergyLeadChargedHadrCand_ = hcalEnergyLeadChargedHadrCand;
601  // extraction of tau lifetime information
602  if (!tauTransverseImpactParameterSrc_.label().empty()) {
603  edm::Handle<PFTauTIPAssociationByRef> tauLifetimeInfos;
604  iEvent.getByToken(tauTransverseImpactParameterToken_, tauLifetimeInfos);
605  const reco::PFTauTransverseImpactParameter& tauLifetimeInfo = *(*tauLifetimeInfos)[pfTauRef];
606  pat::tau::TauPFEssential& aTauPFEssential = aTau.pfEssential_[0];
607  aTauPFEssential.dxy_PCA_ = tauLifetimeInfo.dxy_PCA();
608  aTauPFEssential.dxy_ = tauLifetimeInfo.dxy();
609  aTauPFEssential.dxy_error_ = tauLifetimeInfo.dxy_error();
610  aTauPFEssential.hasSV_ = tauLifetimeInfo.hasSecondaryVertex();
611  aTauPFEssential.flightLength_ = tauLifetimeInfo.flightLength();
612  aTauPFEssential.flightLengthSig_ = tauLifetimeInfo.flightLengthSig();
613  aTauPFEssential.ip3d_ = tauLifetimeInfo.ip3d();
614  aTauPFEssential.ip3d_error_ = tauLifetimeInfo.ip3d_error();
615  }
616  }
617 
618  // Isolation
619  if (isolator_.enabled()) {
621  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
622  // better to loop backwards, so the vector is resized less times
623  for (IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(),
624  ed = isolatorTmpStorage_.rend();
625  it != ed;
626  ++it) {
627  aTau.setIsolation(it->first, it->second);
628  }
629  }
630 
631  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
632  aTau.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[tausRef]);
633  }
634 
635  if (efficiencyLoader_.enabled()) {
636  efficiencyLoader_.setEfficiencies(aTau, tausRef);
637  }
638 
639  if (resolutionLoader_.enabled()) {
641  }
642 
643  if (useUserData_) {
644  userDataHelper_.add(aTau, iEvent, iSetup);
645  }
646 
647  patTaus->push_back(aTau);
648  }
649 
650  // sort taus in pT
651  std::sort(patTaus->begin(), patTaus->end(), pTTauComparator_);
652 
653  // put genEvt object in Event
654  iEvent.put(std::move(patTaus));
655 
656  // clean up
657  if (isolator_.enabled())
659 }

References pat::PATUserDataHelper< ObjectType >::add(), addGenJetMatch_, addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), pat::Tau::addJECFactors(), addTauID_, addTauJetCorrFactors_, baseTauToken_, pat::helper::MultiIsolator::beginEvent(), CandIsolatorFromDeposits_cfi::deposits, reco::PFTauTransverseImpactParameter::dxy(), pat::tau::TauPFEssential::dxy_, reco::PFTauTransverseImpactParameter::dxy_error(), pat::tau::TauPFEssential::dxy_error_, reco::PFTauTransverseImpactParameter::dxy_PCA(), pat::tau::TauPFEssential::dxy_PCA_, MillePedeFileConverter_cfg::e, reco::PFCandidate::ecalEnergy(), pat::tau::TauPFEssential::ecalEnergy_, pat::tau::TauPFEssential::ecalEnergyLeadChargedHadrCand_, efficiencyLoader_, embedGenMatch_, pat::PATObject< ObjectType >::embedGenParticle(), pat::Tau::embedIsolationPFCands(), embedIsolationPFCands_, pat::Tau::embedIsolationPFChargedHadrCands(), embedIsolationPFChargedHadrCands_, pat::Tau::embedIsolationPFGammaCands(), embedIsolationPFGammaCands_, pat::Tau::embedIsolationPFNeutralHadrCands(), embedIsolationPFNeutralHadrCands_, pat::Tau::embedIsolationTracks(), embedIsolationTracks_, pat::Tau::embedLeadPFCand(), embedLeadPFCand_, pat::Tau::embedLeadPFChargedHadrCand(), embedLeadPFChargedHadrCand_, pat::Tau::embedLeadPFNeutralCand(), embedLeadPFNeutralCand_, pat::Tau::embedLeadTrack(), embedLeadTrack_, pat::Tau::embedSignalPFCands(), embedSignalPFCands_, pat::Tau::embedSignalPFChargedHadrCands(), embedSignalPFChargedHadrCands_, pat::Tau::embedSignalPFGammaCands(), embedSignalPFGammaCands_, pat::Tau::embedSignalPFNeutralHadrCands(), embedSignalPFNeutralHadrCands_, pat::Tau::embedSignalTracks(), embedSignalTracks_, pat::tau::TauPFEssential::emFraction_, pat::helper::EfficiencyLoader::enabled(), pat::helper::KinResolutionsLoader::enabled(), pat::helper::MultiIsolator::enabled(), pat::helper::MultiIsolator::endEvent(), reco::LeafCandidate::energy(), pat::tau::TauPFEssential::etaAtEcalEntrance_, pat::tau::TauPFEssential::etaAtEcalEntranceLeadChargedCand_, Exception, pat::helper::MultiIsolator::fill(), spr::find(), dqmdumpme::first, firstOccurence_, reco::PFTauTransverseImpactParameter::flightLength(), pat::tau::TauPFEssential::flightLength_, reco::PFTauTransverseImpactParameter::flightLengthSig(), pat::tau::TauPFEssential::flightLengthSig_, newFWLiteAna::found, jetProducer_cfi::genJetMatch, genJetMatchToken_, genMatchTokens_, edm::Ptr< T >::get(), edm::Ref< C, T, F >::get(), getTauIdDiscriminator(), getTauIdDiscriminatorFromContainer(), reco::PFCandidate::gsfTrackRef(), reco::PFTauTransverseImpactParameter::hasSecondaryVertex(), pat::tau::TauPFEssential::hasSV_, pat::PackedCandidate::hasTrackDetails(), reco::PFCandidate::hcalEnergy(), pat::tau::TauPFEssential::hcalEnergy_, pat::tau::TauPFEssential::hcalEnergyLeadChargedHadrCand_, mps_fire::i, training_settings::idx, iEvent, pat::Tau::initializeJEC(), reco::PFTauTransverseImpactParameter::ip3d(), pat::tau::TauPFEssential::ip3d_, reco::PFTauTransverseImpactParameter::ip3d_error(), pat::tau::TauPFEssential::ip3d_error_, edm::Ref< C, T, F >::isAvailable(), edm::Ptr< T >::isNonnull(), edm::Ref< C, T, F >::isNonnull(), isoDepositLabels_, isoDepositTokens_, isolator_, isolatorTmpStorage_, pat::Tau::isPFTau(), dqmiolumiharvest::j, edm::InputTag::label(), pat::tau::TauPFEssential::leadingTrackNormChi2_, jets_cff::levels, eostools::move(), reco::PFCandidate::muonRef(), dqmiodumpmetadata::n, Skims_PA_cff::name, pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), TauSpinnerFilter_cfi::ntaus, edm::parameterSet(), hemisphereProducer_cfi::patTaus, pat::Tau::pfEssential_, pfTauIDContainerTokens_, pfTauIDTokens_, pfTauToken_, pat::tau::TauPFEssential::phiAtEcalEntrance_, phID_, reco::PFCandidate::positionAtECALEntrance(), pat::PackedCandidate::pseudoTrack(), pat::tau::TauPFEssential::ptLeadChargedCand_, pTTauComparator_, resolutionLoader_, edm::second(), pat::Tau::setDecayMode(), pat::helper::EfficiencyLoader::setEfficiencies(), pat::Tau::setGenJet(), pat::Lepton< LeptonType >::setIsoDeposit(), pat::Lepton< LeptonType >::setIsolation(), pat::helper::KinResolutionsLoader::setResolutions(), pat::Tau::setTauIDs(), skipMissingTauID_, AlCaHLTBitMon_QueryRunRegistry::string, tauIDSrcContainers_, tauIDSrcs_, tauJetCorrFactorsTokens_, tauTransverseImpactParameterSrc_, tauTransverseImpactParameterToken_, HLT_2018_cff::track, reco::PFCandidate::trackRef(), userDataHelper_, and useUserData_.

Member Data Documentation

◆ addEfficiencies_

bool pat::PATTauProducer::addEfficiencies_
private

Definition at line 113 of file PATTauProducer.h.

Referenced by PATTauProducer().

◆ addGenJetMatch_

bool pat::PATTauProducer::addGenJetMatch_
private

Definition at line 85 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ addGenMatch_

bool pat::PATTauProducer::addGenMatch_
private

Definition at line 81 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ addResolutions_

bool pat::PATTauProducer::addResolutions_
private

Definition at line 116 of file PATTauProducer.h.

Referenced by PATTauProducer().

◆ addTauID_

bool pat::PATTauProducer::addTauID_
private

Definition at line 92 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ addTauJetCorrFactors_

bool pat::PATTauProducer::addTauJetCorrFactors_
private

Definition at line 89 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ baseTauToken_

edm::EDGetTokenT<edm::View<reco::BaseTau> > pat::PATTauProducer::baseTauToken_
private

Definition at line 62 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ efficiencyLoader_

pat::helper::EfficiencyLoader pat::PATTauProducer::efficiencyLoader_
private

Definition at line 114 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedGenJetMatch_

bool pat::PATTauProducer::embedGenJetMatch_
private

Definition at line 86 of file PATTauProducer.h.

Referenced by PATTauProducer().

◆ embedGenMatch_

bool pat::PATTauProducer::embedGenMatch_
private

Definition at line 82 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationPFCands_

bool pat::PATTauProducer::embedIsolationPFCands_
private

Definition at line 76 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationPFChargedHadrCands_

bool pat::PATTauProducer::embedIsolationPFChargedHadrCands_
private

Definition at line 77 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationPFGammaCands_

bool pat::PATTauProducer::embedIsolationPFGammaCands_
private

Definition at line 79 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationPFNeutralHadrCands_

bool pat::PATTauProducer::embedIsolationPFNeutralHadrCands_
private

Definition at line 78 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationTracks_

bool pat::PATTauProducer::embedIsolationTracks_
private

Definition at line 66 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedLeadPFCand_

bool pat::PATTauProducer::embedLeadPFCand_
private

Definition at line 69 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedLeadPFChargedHadrCand_

bool pat::PATTauProducer::embedLeadPFChargedHadrCand_
private

Definition at line 70 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedLeadPFNeutralCand_

bool pat::PATTauProducer::embedLeadPFNeutralCand_
private

Definition at line 71 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedLeadTrack_

bool pat::PATTauProducer::embedLeadTrack_
private

Definition at line 67 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedSignalPFCands_

bool pat::PATTauProducer::embedSignalPFCands_
private

Definition at line 72 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedSignalPFChargedHadrCands_

bool pat::PATTauProducer::embedSignalPFChargedHadrCands_
private

Definition at line 73 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedSignalPFGammaCands_

bool pat::PATTauProducer::embedSignalPFGammaCands_
private

Definition at line 75 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedSignalPFNeutralHadrCands_

bool pat::PATTauProducer::embedSignalPFNeutralHadrCands_
private

Definition at line 74 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ embedSignalTracks_

bool pat::PATTauProducer::embedSignalTracks_
private

Definition at line 68 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ firstOccurence_

bool pat::PATTauProducer::firstOccurence_
private

Definition at line 59 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ genJetMatchToken_

edm::EDGetTokenT<edm::Association<reco::GenJetCollection> > pat::PATTauProducer::genJetMatchToken_
private

Definition at line 87 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ genMatchTokens_

std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection> > > pat::PATTauProducer::genMatchTokens_
private

Definition at line 83 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ isoDepositLabels_

std::vector<std::pair<pat::IsolationKeys, edm::InputTag> > pat::PATTauProducer::isoDepositLabels_
private

Definition at line 110 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ isoDepositTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<IsoDeposit> > > pat::PATTauProducer::isoDepositTokens_
private

Definition at line 111 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ isolator_

pat::helper::MultiIsolator pat::PATTauProducer::isolator_
private

Definition at line 108 of file PATTauProducer.h.

Referenced by produce().

◆ isolatorTmpStorage_

pat::helper::MultiIsolator::IsolationValuePairs pat::PATTauProducer::isolatorTmpStorage_
private

Definition at line 109 of file PATTauProducer.h.

Referenced by produce().

◆ pfTauIDContainerTokens_

std::vector<edm::EDGetTokenT<reco::TauDiscriminatorContainer> > pat::PATTauProducer::pfTauIDContainerTokens_
private

Definition at line 102 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ pfTauIDTokens_

std::vector<edm::EDGetTokenT<reco::PFTauDiscriminator> > pat::PATTauProducer::pfTauIDTokens_
private

Definition at line 101 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ pfTauToken_

edm::EDGetTokenT<reco::PFTauCollection> pat::PATTauProducer::pfTauToken_
private

Definition at line 64 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ phID_

edm::ProcessHistoryID pat::PATTauProducer::phID_
private

Definition at line 104 of file PATTauProducer.h.

Referenced by produce().

◆ pTTauComparator_

GreaterByPt<Tau> pat::PATTauProducer::pTTauComparator_
private

Definition at line 106 of file PATTauProducer.h.

Referenced by produce().

◆ resolutionLoader_

pat::helper::KinResolutionsLoader pat::PATTauProducer::resolutionLoader_
private

Definition at line 117 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ skipMissingTauID_

bool pat::PATTauProducer::skipMissingTauID_
private

Definition at line 103 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ tauIDSrcContainers_

std::vector<std::vector<NameWPIdx> > pat::PATTauProducer::tauIDSrcContainers_
private

Definition at line 100 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ tauIDSrcs_

std::vector<NameTag> pat::PATTauProducer::tauIDSrcs_
private

Definition at line 99 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ tauJetCorrFactorsTokens_

std::vector<edm::EDGetTokenT<edm::ValueMap<TauJetCorrFactors> > > pat::PATTauProducer::tauJetCorrFactorsTokens_
private

Definition at line 90 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ tauTransverseImpactParameterSrc_

edm::InputTag pat::PATTauProducer::tauTransverseImpactParameterSrc_
private

Definition at line 65 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ tauTransverseImpactParameterToken_

edm::EDGetTokenT<PFTauTIPAssociationByRef> pat::PATTauProducer::tauTransverseImpactParameterToken_
private

Definition at line 63 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ userDataHelper_

pat::PATUserDataHelper<pat::Tau> pat::PATTauProducer::userDataHelper_
private

Definition at line 120 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

◆ useUserData_

bool pat::PATTauProducer::useUserData_
private

Definition at line 119 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

reco::PFCandidate::trackRef
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:408
pat::PackedCandidate::hasTrackDetails
bool hasTrackDetails() const
Return true if a bestTrack can be extracted from this Candidate.
Definition: PackedCandidate.h:787
pat::PATTauProducer::firstOccurence_
bool firstOccurence_
Definition: PATTauProducer.h:59
hemisphereProducer_cfi.patTaus
patTaus
Definition: hemisphereProducer_cfi.py:8
pat::tau::TauPFEssential::hasSV_
bool hasSV_
Definition: TauPFEssential.h:46
pat::PATTauProducer::pfTauToken_
edm::EDGetTokenT< reco::PFTauCollection > pfTauToken_
Definition: PATTauProducer.h:64
PDWG_TauSkim_cff.rawValues
rawValues
Definition: PDWG_TauSkim_cff.py:13
pat::PATUserDataHelper
Assists in assimilating all pat::UserData into pat objects.
Definition: PATUserDataHelper.h:49
mps_fire.i
i
Definition: mps_fire.py:355
pat::EcalIso
Definition: Isolation.h:11
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
reco::PFTauTransverseImpactParameter::dxy_error
double dxy_error() const
Definition: PFTauTransverseImpactParameter.h:53
pat::PATTauProducer::addGenJetMatch_
bool addGenJetMatch_
Definition: PATTauProducer.h:85
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
pat::tau::TauPFEssential::dxy_error_
float dxy_error_
Definition: TauPFEssential.h:41
pat::tau::TauPFEssential::flightLengthSig_
float flightLengthSig_
Definition: TauPFEssential.h:48
pat::PATTauProducer::tauIDSrcContainers_
std::vector< std::vector< NameWPIdx > > tauIDSrcContainers_
Definition: PATTauProducer.h:100
pat::tau::TauPFEssential::etaAtEcalEntranceLeadChargedCand_
float etaAtEcalEntranceLeadChargedCand_
Definition: TauPFEssential.h:61
pat::helper::EfficiencyLoader
Definition: EfficiencyLoader.h:16
edm::Ref::isAvailable
bool isAvailable() const
Definition: Ref.h:537
pat::PATTauProducer::WPIdx
std::pair< WPCfg, int > WPIdx
Definition: PATTauProducer.h:95
pat::helper::MultiIsolator::fill
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
Definition: MultiIsolator.h:84
pat::PATTauProducer::embedIsolationPFNeutralHadrCands_
bool embedIsolationPFNeutralHadrCands_
Definition: PATTauProducer.h:78
pat::PATTauProducer::embedSignalTracks_
bool embedSignalTracks_
Definition: PATTauProducer.h:68
pat::PATUserDataHelper::fillDescription
static void fillDescription(edm::ParameterSetDescription &iDesc)
Definition: PATUserDataHelper.h:135
pat::tau::TauPFEssential::ptLeadChargedCand_
float ptLeadChargedCand_
Definition: TauPFEssential.h:62
pat::PATTauProducer::embedIsolationTracks_
bool embedIsolationTracks_
Definition: PATTauProducer.h:66
pat::PATTauProducer::embedGenMatch_
bool embedGenMatch_
Definition: PATTauProducer.h:82
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
reco::PFCandidate::positionAtECALEntrance
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:362
pat::tau::TauPFEssential::flightLength_
Vector flightLength_
Definition: TauPFEssential.h:47
pat::helper::EfficiencyLoader::enabled
bool enabled() const
'true' if this there is at least one efficiency configured
Definition: EfficiencyLoader.h:25
edm::Ref::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
pat::PfAllParticleIso
Definition: Isolation.h:13
reco::PFTau
Definition: PFTau.h:36
pat::PATTauProducer::embedLeadPFCand_
bool embedLeadPFCand_
Definition: PATTauProducer.h:69
pat::PATTauProducer::embedIsolationPFGammaCands_
bool embedIsolationPFGammaCands_
Definition: PATTauProducer.h:79
edm::Ptr::get
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:139
pat::PATTauProducer::embedLeadPFChargedHadrCand_
bool embedLeadPFChargedHadrCand_
Definition: PATTauProducer.h:70
pat::PATTauProducer::isolator_
pat::helper::MultiIsolator isolator_
Definition: PATTauProducer.h:108
pat::tau::TauPFEssential::ip3d_
float ip3d_
Definition: TauPFEssential.h:52
edm::ParameterSet::existsAs
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:160
Tau
Definition: Tau.py:1
pat::PATTauProducer::pfTauIDContainerTokens_
std::vector< edm::EDGetTokenT< reco::TauDiscriminatorContainer > > pfTauIDContainerTokens_
Definition: PATTauProducer.h:102
pat::PATTauProducer::addGenMatch_
bool addGenMatch_
Definition: PATTauProducer.h:81
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle
Definition: AssociativeIterator.h:50
training_settings.idx
idx
Definition: training_settings.py:16
edm::ParameterSetDescription::addOptional
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:105
dqmdumpme.first
first
Definition: dqmdumpme.py:55
pat::helper::MultiIsolator::IsolationValuePairs
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
Definition: MultiIsolator.h:17
pat::helper::KinResolutionsLoader::enabled
bool enabled() const
'true' if this there is at least one efficiency configured
Definition: KinResolutionsLoader.h:27
pat::PATTauProducer::phID_
edm::ProcessHistoryID phID_
Definition: PATTauProducer.h:104
pat::helper::MultiIsolator::enabled
bool enabled() const
True if it has a non null configuration.
Definition: MultiIsolator.h:55
edm::Ref
Definition: AssociativeIterator.h:58
RecoTauValidationMiniAOD_cfi.tauCollection
tauCollection
Definition: RecoTauValidationMiniAOD_cfi.py:5
pat::PATTauProducer::addResolutions_
bool addResolutions_
Definition: PATTauProducer.h:116
edm::Exception
Definition: EDMException.h:77
pat::helper::MultiIsolator::endEvent
void endEvent()
Definition: MultiIsolator.cc:85
pat::PATTauProducer::embedSignalPFGammaCands_
bool embedSignalPFGammaCands_
Definition: PATTauProducer.h:75
reco::PFTauTransverseImpactParameter::dxy
double dxy() const
Definition: PFTauTransverseImpactParameter.h:52
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
pat::tau::TauPFEssential::dxy_
float dxy_
Definition: TauPFEssential.h:40
pat::PATTauProducer::genMatchTokens_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
Definition: PATTauProducer.h:83
reco::PFCandidate::muonRef
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:421
pat::PATTauProducer::NameTag
std::pair< std::string, edm::InputTag > NameTag
Definition: PATTauProducer.h:93
pat::PATTauProducer::embedLeadTrack_
bool embedLeadTrack_
Definition: PATTauProducer.h:67
pat::PATTauProducer::isoDepositLabels_
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
Definition: PATTauProducer.h:110
reco::PFTauTransverseImpactParameter::flightLengthSig
double flightLengthSig() const
Definition: PFTauTransverseImpactParameter.cc:71
names
const std::string names[nVars_]
Definition: PhotonIDValueMapProducer.cc:122
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
pat::PfChargedHadronIso
Definition: Isolation.h:14
pat::PATUserDataHelper::add
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
Definition: PATUserDataHelper.h:114
pat::PATTauProducer::isolatorTmpStorage_
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
Definition: PATTauProducer.h:109
pat::helper::EfficiencyLoader::newEvent
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
Definition: EfficiencyLoader.cc:21
pat::tau::TauPFEssential::ip3d_error_
float ip3d_error_
Definition: TauPFEssential.h:53
pat::PATTauProducer::NameWPIdx
std::pair< std::string, WPIdx > NameWPIdx
Definition: PATTauProducer.h:96
reco::Track
Definition: Track.h:27
pat::helper::KinResolutionsLoader
Definition: KinResolutionsLoader.h:18
TauSpinnerFilter_cfi.ntaus
ntaus
Definition: TauSpinnerFilter_cfi.py:5
pat::PATTauProducer::tauIDSrcs_
std::vector< NameTag > tauIDSrcs_
Definition: PATTauProducer.h:99
pat::PATTauProducer::genJetMatchToken_
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetMatchToken_
Definition: PATTauProducer.h:87
pat::PATTauProducer::addTauJetCorrFactors_
bool addTauJetCorrFactors_
Definition: PATTauProducer.h:89
pat::tau::TauPFEssential::hcalEnergy_
float hcalEnergy_
Definition: TauPFEssential.h:55
reco::PFTauTransverseImpactParameter
Definition: PFTauTransverseImpactParameter.h:25
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::vector_transform
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
Definition: transform.h:11
reco::PFTauTransverseImpactParameter::hasSecondaryVertex
bool hasSecondaryVertex() const
Definition: PFTauTransverseImpactParameter.h:62
edm::LogWarning
Definition: MessageLogger.h:141
pat::helper::KinResolutionsLoader::setResolutions
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
Definition: KinResolutionsLoader.h:49
edm::ParameterSet::exists
bool exists(std::string const &parameterName) const
checks if a parameter exists
Definition: ParameterSet.cc:674
pat::PATTauProducer::WPCfg
std::pair< std::string, std::string > WPCfg
Definition: PATTauProducer.h:94
pat::PackedCandidate::pseudoTrack
virtual const reco::Track & pseudoTrack() const
Definition: PackedCandidate.h:772
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
edm::ParameterSet
Definition: ParameterSet.h:36
edm::ParameterSetDescription::setComment
void setComment(std::string const &value)
Definition: ParameterSetDescription.cc:33
reco::PFCandidate::gsfTrackRef
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:440
pat::tau::TauPFEssential
Definition: TauPFEssential.h:22
pat::PATTauProducer::embedSignalPFChargedHadrCands_
bool embedSignalPFChargedHadrCands_
Definition: PATTauProducer.h:73
jetProducer_cfi.genJetMatch
genJetMatch
switch on/off embedding of matched genJet's
Definition: jetProducer_cfi.py:85
PDWG_TauSkim_cff.workingPoints
workingPoints
Definition: PDWG_TauSkim_cff.py:15
pat::PATTauProducer::efficiencyLoader_
pat::helper::EfficiencyLoader efficiencyLoader_
Definition: PATTauProducer.h:114
pat::PfGammaIso
Definition: Isolation.h:16
pat::helper::KinResolutionsLoader::fillDescription
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
Definition: KinResolutionsLoader.cc:34
pat::PATTauProducer::pfTauIDTokens_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > pfTauIDTokens_
Definition: PATTauProducer.h:101
pat::PackedCandidate
Definition: PackedCandidate.h:22
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
pat::tau::TauPFEssential::emFraction_
float emFraction_
Definition: TauPFEssential.h:63
pat::UserBaseIso
Definition: Isolation.h:22
pat::PATTauProducer::baseTauToken_
edm::EDGetTokenT< edm::View< reco::BaseTau > > baseTauToken_
Definition: PATTauProducer.h:62
pat::PATTauProducer::skipMissingTauID_
bool skipMissingTauID_
Definition: PATTauProducer.h:103
pat::TrackIso
Definition: Isolation.h:10
edm::ParameterSet::getParameterNamesForType
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:168
iEvent
int iEvent
Definition: GenABIO.cc:224
pat::PATTauProducer::isoDepositTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
Definition: PATTauProducer.h:111
pat::PATTauProducer::embedSignalPFNeutralHadrCands_
bool embedSignalPFNeutralHadrCands_
Definition: PATTauProducer.h:74
pat::PATTauProducer::embedIsolationPFCands_
bool embedIsolationPFCands_
Definition: PATTauProducer.h:76
pat::HcalIso
Definition: Isolation.h:12
reco::PFTauTransverseImpactParameter::ip3d
double ip3d() const
Definition: PFTauTransverseImpactParameter.h:56
pat::PfNeutralHadronIso
Definition: Isolation.h:15
reco::PFTauTransverseImpactParameter::ip3d_error
double ip3d_error() const
Definition: PFTauTransverseImpactParameter.h:57
edm::Association
Definition: Association.h:18
edm::ParameterSetDescription::addNode
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
Definition: ParameterSetDescription.cc:41
pat::tau::TauPFEssential::leadingTrackNormChi2_
float leadingTrackNormChi2_
Definition: TauPFEssential.h:56
reco::PFTauTransverseImpactParameter::dxy_PCA
const Point & dxy_PCA() const
Definition: PFTauTransverseImpactParameter.h:51
edm::ParameterSetDescription::setAllowAnything
void setAllowAnything()
allow any parameter label/value pairs
Definition: ParameterSetDescription.cc:37
pat::PATTauProducer::embedGenJetMatch_
bool embedGenJetMatch_
Definition: PATTauProducer.h:86
pat::helper::KinResolutionsLoader::newEvent
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
Definition: KinResolutionsLoader.cc:27
reco::PFCandidate::ecalEnergy
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:220
pat::TauJetCorrFactors
Definition: TauJetCorrFactors.h:31
edm::Ptr
Definition: AssociationVector.h:31
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
pat::PATTauProducer::pTTauComparator_
GreaterByPt< Tau > pTTauComparator_
Definition: PATTauProducer.h:106
pat::tau::TauPFEssential::ecalEnergyLeadChargedHadrCand_
float ecalEnergyLeadChargedHadrCand_
Definition: TauPFEssential.h:59
eostools.move
def move(src, dest)
Definition: eostools.py:511
pat::IsolationKeys
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
pat::helper::MultiIsolator::beginEvent
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
Definition: MultiIsolator.cc:79
pat::helper::EfficiencyLoader::setEfficiencies
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
Definition: EfficiencyLoader.h:41
reco::PFCandidate::hcalEnergy
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:232
pat::PATTauProducer::userDataHelper_
pat::PATUserDataHelper< pat::Tau > userDataHelper_
Definition: PATTauProducer.h:120
pat::PATTauProducer::embedIsolationPFChargedHadrCands_
bool embedIsolationPFChargedHadrCands_
Definition: PATTauProducer.h:77
pat::PATTauProducer::addTauID_
bool addTauID_
Definition: PATTauProducer.h:92
Exception
Definition: hltDiff.cc:246
pat::PATTauProducer::embedLeadPFNeutralCand_
bool embedLeadPFNeutralCand_
Definition: PATTauProducer.h:71
pat::PATTauProducer::getTauIdDiscriminator
float getTauIdDiscriminator(const edm::Handle< TauCollectionType > &, size_t, const edm::Handle< TauDiscrType > &)
Definition: PATTauProducer.cc:662
pat::tau::TauPFEssential::etaAtEcalEntrance_
float etaAtEcalEntrance_
Definition: TauPFEssential.h:58
edm::parameterSet
ParameterSet const & parameterSet(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
pat::PATTauProducer::getTauIdDiscriminatorFromContainer
float getTauIdDiscriminatorFromContainer(const edm::Handle< reco::PFTauCollection > &, size_t, const edm::Handle< reco::TauDiscriminatorContainer > &, int)
Definition: PATTauProducer.cc:668
edm::Ptr::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
edm::RefToBase
Definition: AssociativeIterator.h:54
reco::LeafCandidate::energy
double energy() const final
energy
Definition: LeafCandidate.h:125
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
pat::PATTauProducer::tauJetCorrFactorsTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< TauJetCorrFactors > > > tauJetCorrFactorsTokens_
Definition: PATTauProducer.h:90
pat::PATTauProducer::resolutionLoader_
pat::helper::KinResolutionsLoader resolutionLoader_
Definition: PATTauProducer.h:117
HLT_2018_cff.track
track
Definition: HLT_2018_cff.py:10352
pat::PATTauProducer::tauTransverseImpactParameterToken_
edm::EDGetTokenT< PFTauTIPAssociationByRef > tauTransverseImpactParameterToken_
Definition: PATTauProducer.h:63
pat::PATTauProducer::embedSignalPFCands_
bool embedSignalPFCands_
Definition: PATTauProducer.h:72
cms::Exception
Definition: Exception.h:70
pat::PATTauProducer::tauTransverseImpactParameterSrc_
edm::InputTag tauTransverseImpactParameterSrc_
Definition: PATTauProducer.h:65
pat::PATTauProducer::useUserData_
bool useUserData_
Definition: PATTauProducer.h:119
edm::ParameterDescriptionNode::setComment
void setComment(std::string const &value)
Definition: ParameterDescriptionNode.cc:106
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::Provenance
Definition: Provenance.h:34
crabWrapper.key
key
Definition: crabWrapper.py:19
pat::PATTauProducer::addEfficiencies_
bool addEfficiencies_
Definition: PATTauProducer.h:113
edm::ParameterDescription
Definition: ParameterDescription.h:110
CandIsolatorFromDeposits_cfi.deposits
deposits
Definition: CandIsolatorFromDeposits_cfi.py:4
edm::InputTag
Definition: InputTag.h:15
label
const char * label
Definition: PFTauDecayModeTools.cc:11
jets_cff.levels
levels
Definition: jets_cff.py:23
pat::tau::TauPFEssential::ecalEnergy_
float ecalEnergy_
Definition: TauPFEssential.h:54
pat::tau::TauPFEssential::dxy_PCA_
Point dxy_PCA_
Definition: TauPFEssential.h:39
pat::tau::TauPFEssential::phiAtEcalEntrance_
float phiAtEcalEntrance_
Definition: TauPFEssential.h:57
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
reco::PFTauTransverseImpactParameter::flightLength
const Vector & flightLength() const
Definition: PFTauTransverseImpactParameter.cc:67
pat::tau::TauPFEssential::hcalEnergyLeadChargedHadrCand_
float hcalEnergyLeadChargedHadrCand_
Definition: TauPFEssential.h:60