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...

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
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

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_
 
PositionAtECalEntranceComputer posAtECalEntranceComputer_
 
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<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::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 56 of file PATTauProducer.cc.

Member Typedef Documentation

◆ IDContainerData

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

Definition at line 105 of file PATTauProducer.cc.

◆ NameTag

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

Definition at line 100 of file PATTauProducer.cc.

◆ NameWPIdx

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

Definition at line 103 of file PATTauProducer.cc.

◆ WPCfg

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

Definition at line 101 of file PATTauProducer.cc.

◆ WPIdx

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

Definition at line 102 of file PATTauProducer.cc.

Constructor & Destructor Documentation

◆ PATTauProducer()

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

Definition at line 143 of file PATTauProducer.cc.

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(), 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, makeGlobalPositionRcd_cfg::tag, tauIDSrcContainers_, tauIDSrcs_, tauJetCorrFactorsTokens_, tauTransverseImpactParameterSrc_, tauTransverseImpactParameterToken_, pat::TrackIso, pat::UserBaseIso, userDataHelper_, useUserData_, and edm::vector_transform().

144  : isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation")
145  : edm::ParameterSet(),
146  consumesCollector(),
147  false),
148  useUserData_(iConfig.exists("userData")),
149  posAtECalEntranceComputer_(consumesCollector()) {
150  firstOccurence_ = true;
151  // initialize the configurables
152  baseTauToken_ = consumes<edm::View<reco::BaseTau>>(iConfig.getParameter<edm::InputTag>("tauSource"));
153  tauTransverseImpactParameterSrc_ = iConfig.getParameter<edm::InputTag>("tauTransverseImpactParameterSource");
154  tauTransverseImpactParameterToken_ = consumes<PFTauTIPAssociationByRef>(tauTransverseImpactParameterSrc_);
155  pfTauToken_ = consumes<reco::PFTauCollection>(iConfig.getParameter<edm::InputTag>("tauSource"));
156  embedIsolationTracks_ = iConfig.getParameter<bool>("embedIsolationTracks");
157  embedLeadTrack_ = iConfig.getParameter<bool>("embedLeadTrack");
158  embedSignalTracks_ = iConfig.getParameter<bool>("embedSignalTracks");
159  embedLeadPFCand_ = iConfig.getParameter<bool>("embedLeadPFCand");
160  embedLeadPFChargedHadrCand_ = iConfig.getParameter<bool>("embedLeadPFChargedHadrCand");
161  embedLeadPFNeutralCand_ = iConfig.getParameter<bool>("embedLeadPFNeutralCand");
162  embedSignalPFCands_ = iConfig.getParameter<bool>("embedSignalPFCands");
163  embedSignalPFChargedHadrCands_ = iConfig.getParameter<bool>("embedSignalPFChargedHadrCands");
164  embedSignalPFNeutralHadrCands_ = iConfig.getParameter<bool>("embedSignalPFNeutralHadrCands");
165  embedSignalPFGammaCands_ = iConfig.getParameter<bool>("embedSignalPFGammaCands");
166  embedIsolationPFCands_ = iConfig.getParameter<bool>("embedIsolationPFCands");
167  embedIsolationPFChargedHadrCands_ = iConfig.getParameter<bool>("embedIsolationPFChargedHadrCands");
168  embedIsolationPFNeutralHadrCands_ = iConfig.getParameter<bool>("embedIsolationPFNeutralHadrCands");
169  embedIsolationPFGammaCands_ = iConfig.getParameter<bool>("embedIsolationPFGammaCands");
170  addGenMatch_ = iConfig.getParameter<bool>("addGenMatch");
171  if (addGenMatch_) {
172  embedGenMatch_ = iConfig.getParameter<bool>("embedGenMatch");
173  if (iConfig.existsAs<edm::InputTag>("genParticleMatch")) {
175  iConfig.getParameter<edm::InputTag>("genParticleMatch")));
176  } else {
178  iConfig.getParameter<std::vector<edm::InputTag>>("genParticleMatch"),
179  [this](edm::InputTag const& tag) { return consumes<edm::Association<reco::GenParticleCollection>>(tag); });
180  }
181  }
182  addGenJetMatch_ = iConfig.getParameter<bool>("addGenJetMatch");
183  if (addGenJetMatch_) {
184  embedGenJetMatch_ = iConfig.getParameter<bool>("embedGenJetMatch");
186  consumes<edm::Association<reco::GenJetCollection>>(iConfig.getParameter<edm::InputTag>("genJetMatch"));
187  }
188  addTauJetCorrFactors_ = iConfig.getParameter<bool>("addTauJetCorrFactors");
190  iConfig.getParameter<std::vector<edm::InputTag>>("tauJetCorrFactorsSource"),
191  [this](edm::InputTag const& tag) { return mayConsume<edm::ValueMap<TauJetCorrFactors>>(tag); });
192  // tau ID configurables
193  addTauID_ = iConfig.getParameter<bool>("addTauID");
194  if (addTauID_) {
195  // read the different tau ID names
196  edm::ParameterSet idps = iConfig.getParameter<edm::ParameterSet>("tauIDSources");
197  std::vector<std::string> names = idps.getParameterNamesForType<edm::ParameterSet>();
198  std::map<std::string, IDContainerData> idContainerMap;
199  for (auto const& name : names) {
200  auto const& idp = idps.getParameter<edm::ParameterSet>(name);
201  std::string prov_cfg_label = idp.getParameter<std::string>("provenanceConfigLabel");
202  std::string prov_ID_label = idp.getParameter<std::string>("idLabel");
203  edm::InputTag tag = idp.getParameter<edm::InputTag>("inputTag");
204  if (prov_cfg_label.empty()) {
205  tauIDSrcs_.push_back(NameTag(name, tag));
206  } else {
207  if (prov_cfg_label != "rawValues" && prov_cfg_label != "workingPoints" && prov_cfg_label != "IDdefinitions" &&
208  prov_cfg_label != "IDWPdefinitions" && prov_cfg_label != "direct_rawValues" &&
209  prov_cfg_label != "direct_workingPoints")
210  throw cms::Exception("Configuration")
211  << "PATTauProducer: Parameter 'provenanceConfigLabel' does only accept 'rawValues', 'workingPoints', "
212  "'IDdefinitions', 'IDWPdefinitions', 'direct_rawValues', 'direct_workingPoints'\n";
213  std::map<std::string, IDContainerData>::iterator it;
214  it = idContainerMap.insert({tag.label() + tag.instance(), {tag, std::vector<NameWPIdx>()}}).first;
215  it->second.second.push_back(NameWPIdx(name, WPIdx(WPCfg(prov_cfg_label, prov_ID_label), -99)));
216  }
217  }
218  // but in any case at least once
219  if (tauIDSrcs_.empty() && idContainerMap.empty())
220  throw cms::Exception("Configuration") << "PATTauProducer: id addTauID is true, you must specify either:\n"
221  << "\tPSet tauIDSources = { \n"
222  << "\t\tInputTag <someName> = <someTag> // as many as you want \n "
223  << "\t}\n";
224 
225  for (auto const& mapEntry : idContainerMap) {
226  tauIDSrcContainers_.push_back(mapEntry.second.second);
227  pfTauIDContainerTokens_.push_back(mayConsume<reco::TauDiscriminatorContainer>(mapEntry.second.first));
228  }
229  }
231  tauIDSrcs_, [this](NameTag const& tag) { return mayConsume<reco::PFTauDiscriminator>(tag.second); });
232  skipMissingTauID_ = iConfig.getParameter<bool>("skipMissingTauID");
233  // IsoDeposit configurables
234  if (iConfig.exists("isoDeposits")) {
235  edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>("isoDeposits");
236  if (depconf.exists("tracker"))
237  isoDepositLabels_.push_back(std::make_pair(pat::TrackIso, depconf.getParameter<edm::InputTag>("tracker")));
238  if (depconf.exists("ecal"))
239  isoDepositLabels_.push_back(std::make_pair(pat::EcalIso, depconf.getParameter<edm::InputTag>("ecal")));
240  if (depconf.exists("hcal"))
241  isoDepositLabels_.push_back(std::make_pair(pat::HcalIso, depconf.getParameter<edm::InputTag>("hcal")));
242  if (depconf.exists("pfAllParticles"))
243  isoDepositLabels_.push_back(
244  std::make_pair(pat::PfAllParticleIso, depconf.getParameter<edm::InputTag>("pfAllParticles")));
245  if (depconf.exists("pfChargedHadron"))
246  isoDepositLabels_.push_back(
247  std::make_pair(pat::PfChargedHadronIso, depconf.getParameter<edm::InputTag>("pfChargedHadron")));
248  if (depconf.exists("pfNeutralHadron"))
249  isoDepositLabels_.push_back(
250  std::make_pair(pat::PfNeutralHadronIso, depconf.getParameter<edm::InputTag>("pfNeutralHadron")));
251  if (depconf.exists("pfGamma"))
252  isoDepositLabels_.push_back(std::make_pair(pat::PfGammaIso, depconf.getParameter<edm::InputTag>("pfGamma")));
253 
254  if (depconf.exists("user")) {
255  std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag>>("user");
256  std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
257  int key = UserBaseIso;
258  for (; it != ed; ++it, ++key) {
259  isoDepositLabels_.push_back(std::make_pair(IsolationKeys(key), *it));
260  }
261  }
262  }
264  edm::vector_transform(isoDepositLabels_, [this](std::pair<IsolationKeys, edm::InputTag> const& label) {
265  return consumes<edm::ValueMap<IsoDeposit>>(label.second);
266  });
267  // Efficiency configurables
268  addEfficiencies_ = iConfig.getParameter<bool>("addEfficiencies");
269  if (addEfficiencies_) {
271  pat::helper::EfficiencyLoader(iConfig.getParameter<edm::ParameterSet>("efficiencies"), consumesCollector());
272  }
273  // Resolution configurables
274  addResolutions_ = iConfig.getParameter<bool>("addResolutions");
275  if (addResolutions_) {
277  pat::helper::KinResolutionsLoader(iConfig.getParameter<edm::ParameterSet>("resolutions"), consumesCollector());
278  }
279  // Check to see if the user wants to add user data
280  if (useUserData_) {
281  userDataHelper_ = PATUserDataHelper<Tau>(iConfig.getParameter<edm::ParameterSet>("userData"), consumesCollector());
282  }
283  // produces vector of taus
284  produces<std::vector<Tau>>();
285 }
Assists in assimilating all pat::UserData into pat objects.
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
std::pair< std::string, edm::InputTag > NameTag
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
bool exists(std::string const &parameterName) const
checks if a parameter exists
pat::helper::EfficiencyLoader efficiencyLoader_
pat::helper::KinResolutionsLoader resolutionLoader_
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:171
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
const std::string names[nVars_]
std::vector< edm::EDGetTokenT< reco::TauDiscriminatorContainer > > pfTauIDContainerTokens_
bool embedIsolationPFChargedHadrCands_
char const * label
edm::EDGetTokenT< PFTauTIPAssociationByRef > tauTransverseImpactParameterToken_
pat::helper::MultiIsolator isolator_
edm::EDGetTokenT< edm::View< reco::BaseTau > > baseTauToken_
bool embedIsolationPFNeutralHadrCands_
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:179
pat::PATUserDataHelper< pat::Tau > userDataHelper_
std::vector< edm::EDGetTokenT< edm::ValueMap< TauJetCorrFactors > > > tauJetCorrFactorsTokens_
edm::InputTag tauTransverseImpactParameterSrc_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
std::pair< std::string, WPIdx > NameWPIdx
std::pair< std::string, std::string > WPCfg
std::vector< std::vector< NameWPIdx > > tauIDSrcContainers_
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetMatchToken_
std::pair< WPCfg, int > WPIdx
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > pfTauIDTokens_
std::vector< NameTag > tauIDSrcs_
edm::EDGetTokenT< reco::PFTauCollection > pfTauToken_
PositionAtECalEntranceComputer posAtECalEntranceComputer_

◆ ~PATTauProducer()

PATTauProducer::~PATTauProducer ( )
override

Definition at line 287 of file PATTauProducer.cc.

287 {}

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 845 of file PATTauProducer.cc.

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

845  {
847  iDesc.setComment("PAT tau producer module");
848 
849  // input source
850  iDesc.add<edm::InputTag>("tauSource", edm::InputTag())->setComment("input collection");
851 
852  // embedding
853  iDesc.add<bool>("embedIsolationTracks", false)->setComment("embed external isolation tracks");
854  iDesc.add<bool>("embedLeadTrack", false)->setComment("embed external leading track");
855  iDesc.add<bool>("embedLeadTracks", false)->setComment("embed external signal tracks");
856 
857  // MC matching configurables
858  iDesc.add<bool>("addGenMatch", true)->setComment("add MC matching");
859  iDesc.add<bool>("embedGenMatch", false)->setComment("embed MC matched MC information");
860  std::vector<edm::InputTag> emptySourceVector;
861  iDesc
862  .addNode(edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
863  edm::ParameterDescription<std::vector<edm::InputTag>>("genParticleMatch", emptySourceVector, true))
864  ->setComment("input with MC match information");
865 
866  // MC jet matching variables
867  iDesc.add<bool>("addGenJetMatch", true)->setComment("add MC jet matching");
868  iDesc.add<bool>("embedGenJetMatch", false)->setComment("embed MC jet matched jet information");
869  iDesc.add<edm::InputTag>("genJetMatch", edm::InputTag("tauGenJetMatch"));
870 
872 
873  // tau ID configurables
874  iDesc.add<bool>("addTauID", true)->setComment("add tau ID variables");
875  edm::ParameterSetDescription tauIDSourcesPSet;
876  tauIDSourcesPSet.setAllowAnything();
877  iDesc
879  edm::ParameterDescription<edm::ParameterSetDescription>("tauIDSources", tauIDSourcesPSet, true))
880  ->setComment("input with tau ID variables");
881  // (Dis)allow to skip missing tauId sources
882  iDesc.add<bool>("skipMissingTauID", false)
883  ->setComment("allow to skip a tau ID variable when not present in the event");
884 
885  // IsoDeposit configurables
886  edm::ParameterSetDescription isoDepositsPSet;
887  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
888  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
889  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
890  isoDepositsPSet.addOptional<edm::InputTag>("pfAllParticles");
891  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadron");
892  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadron");
893  isoDepositsPSet.addOptional<edm::InputTag>("pfGamma");
894  isoDepositsPSet.addOptional<std::vector<edm::InputTag>>("user");
895  iDesc.addOptional("isoDeposits", isoDepositsPSet);
896 
897  // Efficiency configurables
898  edm::ParameterSetDescription efficienciesPSet;
899  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
900  iDesc.add("efficiencies", efficienciesPSet);
901  iDesc.add<bool>("addEfficiencies", false);
902 
903  // Check to see if the user wants to add user data
904  edm::ParameterSetDescription userDataPSet;
906  iDesc.addOptional("userData", userDataPSet);
907 
908  edm::ParameterSetDescription isolationPSet;
909  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
910  iDesc.add("userIsolation", isolationPSet);
911 }
void setComment(std::string const &value)
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
void setAllowAnything()
allow any parameter label/value pairs
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
static void fillDescription(edm::ParameterSetDescription &iDesc)
void setComment(std::string const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.

◆ 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 819 of file PATTauProducer.cc.

References RecoTauValidationMiniAOD_cfi::tauCollection.

Referenced by produce().

821  {
823  return (*tauIdDiscr)[tauRef];
824 }

◆ 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 825 of file PATTauProducer.cc.

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

Referenced by produce().

828  {
830  if (wpIdx < 0) {
831  //Only 0th component filled with default value if prediscriminor in RecoTauDiscriminator failed.
832  if ((*tauIdDiscr)[tauRef].rawValues.size() == 1)
833  return (*tauIdDiscr)[tauRef].rawValues.at(0);
834  //uses negative indices to access rawValues. In most cases only one rawValue at wpIdx=-1 exists.
835  return (*tauIdDiscr)[tauRef].rawValues.at(-1 - wpIdx);
836  } else {
837  //WP vector not filled if prediscriminor in RecoTauDiscriminator failed. Set PAT output to false in this case
838  if ((*tauIdDiscr)[tauRef].workingPoints.empty())
839  return 0.0;
840  return (*tauIdDiscr)[tauRef].workingPoints.at(wpIdx);
841  }
842 }

◆ produce()

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

Definition at line 289 of file PATTauProducer.cc.

References pat::PATUserDataHelper< ObjectType >::add(), addGenJetMatch_, addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), pat::Tau::addJECFactors(), addTauID_, addTauJetCorrFactors_, baseTauToken_, PositionAtECalEntranceComputer::beginEvent(), pat::helper::MultiIsolator::beginEvent(), pat::PackedCandidate::bestTrack(), pat::PackedCandidate::caloFraction(), 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::PackedCandidate::energy(), pat::PackedCandidate::eta(), pat::tau::TauPFEssential::etaAtEcalEntrance_, pat::tau::TauPFEssential::etaAtEcalEntranceLeadChargedCand_, Exception, pat::helper::MultiIsolator::fill(), spr::find(), 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_, reco::PFCandidate::hcalEnergy(), pat::tau::TauPFEssential::hcalEnergy_, pat::tau::TauPFEssential::hcalEnergyLeadChargedHadrCand_, pat::PackedCandidate::hcalFraction(), mps_fire::i, heavyIonCSV_trainingSettings::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_, jetsAK4_CHS_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::PackedCandidate::phi(), pat::tau::TauPFEssential::phiAtEcalEntrance_, phID_, posAtECalEntranceComputer_, reco::PFCandidate::positionAtECALEntrance(), 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_, jetUpdater_cfi::sort, edm::Provenance::stable(), AlCaHLTBitMon_QueryRunRegistry::string, summarizeEdmComparisonLogfiles::success, tauIDSrcContainers_, tauIDSrcs_, tauJetCorrFactorsTokens_, tauTransverseImpactParameterSrc_, tauTransverseImpactParameterToken_, HLT_2022v12_cff::track, reco::PFCandidate::trackRef(), userDataHelper_, and useUserData_.

289  {
290  // switch off embedding (in unschedules mode)
291  if (iEvent.isRealData()) {
292  addGenMatch_ = false;
293  embedGenMatch_ = false;
294  addGenJetMatch_ = false;
295  }
296 
297  // Get the collection of taus from the event
299  try {
300  iEvent.getByToken(baseTauToken_, anyTaus);
301  } catch (const edm::Exception& e) {
302  edm::LogWarning("DataSource") << "WARNING! No Tau collection found. This missing input will not block the job. "
303  "Instead, an empty tau collection is being be produced.";
304  auto patTaus = std::make_unique<std::vector<Tau>>();
305  iEvent.put(std::move(patTaus));
306  return;
307  }
308 
310 
311  if (isolator_.enabled())
312  isolator_.beginEvent(iEvent, iSetup);
313 
318 
319  std::vector<edm::Handle<edm::ValueMap<IsoDeposit>>> deposits(isoDepositTokens_.size());
320  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
321  iEvent.getByToken(isoDepositTokens_[j], deposits[j]);
322  }
323 
324  // prepare the MC matching
325  std::vector<edm::Handle<edm::Association<reco::GenParticleCollection>>> genMatches(genMatchTokens_.size());
326  if (addGenMatch_) {
327  for (size_t j = 0, nd = genMatchTokens_.size(); j < nd; ++j) {
328  iEvent.getByToken(genMatchTokens_[j], genMatches[j]);
329  }
330  }
331 
333  if (addGenJetMatch_)
334  iEvent.getByToken(genJetMatchToken_, genJetMatch);
335 
336  // read in the jet correction factors ValueMap
337  std::vector<edm::ValueMap<TauJetCorrFactors>> tauJetCorrs;
338  if (addTauJetCorrFactors_) {
339  for (size_t i = 0; i < tauJetCorrFactorsTokens_.size(); ++i) {
341  iEvent.getByToken(tauJetCorrFactorsTokens_[i], tauJetCorr);
342  tauJetCorrs.push_back(*tauJetCorr);
343  }
344  }
345 
346  auto patTaus = std::make_unique<std::vector<Tau>>();
347 
348  bool first = true; // this is introduced to issue warnings only for the first tau-jet
349  for (size_t idx = 0, ntaus = anyTaus->size(); idx < ntaus; ++idx) {
350  edm::RefToBase<reco::BaseTau> tausRef = anyTaus->refAt(idx);
351  edm::Ptr<reco::BaseTau> tausPtr = anyTaus->ptrAt(idx);
352 
353  Tau aTau(tausRef);
354  if (embedLeadTrack_)
355  aTau.embedLeadTrack();
356  if (embedSignalTracks_)
357  aTau.embedSignalTracks();
359  aTau.embedIsolationTracks();
360  if (embedLeadPFCand_) {
361  if (aTau.isPFTau())
362  aTau.embedLeadPFCand();
363  else
364  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
365  "from a reco::PFTau is impossible.\n";
366  }
368  if (aTau.isPFTau())
369  aTau.embedLeadPFChargedHadrCand();
370  else
371  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
372  "from a reco::PFTau is impossible.\n";
373  }
375  if (aTau.isPFTau())
376  aTau.embedLeadPFNeutralCand();
377  else
378  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
379  "from a reco::PFTau is impossible.\n";
380  }
381  if (embedSignalPFCands_) {
382  if (aTau.isPFTau())
383  aTau.embedSignalPFCands();
384  else
385  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
386  "from a reco::PFTau is impossible.\n";
387  }
389  if (aTau.isPFTau())
390  aTau.embedSignalPFChargedHadrCands();
391  else
392  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
393  "from a reco::PFTau is impossible.\n";
394  }
396  if (aTau.isPFTau())
397  aTau.embedSignalPFNeutralHadrCands();
398  else
399  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
400  "from a reco::PFTau is impossible.\n";
401  }
403  if (aTau.isPFTau())
404  aTau.embedSignalPFGammaCands();
405  else
406  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
407  "from a reco::PFTau is impossible.\n";
408  }
410  if (aTau.isPFTau())
411  aTau.embedIsolationPFCands();
412  else
413  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
414  "from a reco::PFTau is impossible.\n";
415  }
417  if (aTau.isPFTau())
418  aTau.embedIsolationPFChargedHadrCands();
419  else
420  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
421  "from a reco::PFTau is impossible.\n";
422  }
424  if (aTau.isPFTau())
425  aTau.embedIsolationPFNeutralHadrCands();
426  else
427  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
428  "from a reco::PFTau is impossible.\n";
429  }
431  if (aTau.isPFTau())
432  aTau.embedIsolationPFGammaCands();
433  else
434  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made "
435  "from a reco::PFTau is impossible.\n";
436  }
437 
438  if (addTauJetCorrFactors_) {
439  // add additional JetCorrs to the jet
440  for (unsigned int i = 0; i < tauJetCorrs.size(); ++i) {
441  const TauJetCorrFactors& tauJetCorr = tauJetCorrs[i][tausRef];
442  // uncomment for debugging
443  // tauJetCorr.print();
444  aTau.addJECFactors(tauJetCorr);
445  }
446  std::vector<std::string> levels = tauJetCorrs[0][tausRef].correctionLabels();
447  if (std::find(levels.begin(), levels.end(), "L2L3Residual") != levels.end()) {
448  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("L2L3Residual"));
449  } else if (std::find(levels.begin(), levels.end(), "L3Absolute") != levels.end()) {
450  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("L3Absolute"));
451  } else {
452  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("Uncorrected"));
453  if (first) {
454  edm::LogWarning("L3Absolute not found")
455  << "L2L3Residual and L3Absolute are not part of the correction applied jetCorrFactors \n"
456  << "of module " << tauJetCorrs[0][tausRef].jecSet() << " jets will remain"
457  << " uncorrected.";
458  first = false;
459  }
460  }
461  }
462 
463  // store the match to the generated final state muons
464  if (addGenMatch_) {
465  for (size_t i = 0, n = genMatches.size(); i < n; ++i) {
466  reco::GenParticleRef genTau = (*genMatches[i])[tausRef];
467  aTau.addGenParticleRef(genTau);
468  }
469  if (embedGenMatch_)
470  aTau.embedGenParticle();
471  }
472 
473  // store the match to the visible part of the generated tau
474  if (addGenJetMatch_) {
475  reco::GenJetRef genJetTau = (*genJetMatch)[tausRef];
476  if (genJetTau.isNonnull() && genJetTau.isAvailable()) {
477  aTau.setGenJet(genJetTau);
478  } // leave empty if no match found
479  }
480 
481  // prepare ID extraction
482  if (addTauID_) {
483  size_t numberPlainTauIds = tauIDSrcs_.size();
484  size_t numberTauIds = numberPlainTauIds;
485  for (auto const& it : tauIDSrcContainers_) {
486  numberTauIds += it.size();
487  }
488  // if ID containers exist, product incices need to be retrieved from provenanceConfigLabel.
489  // This is done if config history changes, in particular for the first event.
490  if (numberPlainTauIds != numberTauIds && phID_ != iEvent.processHistoryID()) {
491  phID_ = iEvent.processHistoryID();
492  for (size_t idx = 0; idx < tauIDSrcContainers_.size(); ++idx) {
493  auto pfTauIdDiscr = iEvent.getHandle(pfTauIDContainerTokens_[idx]);
494  if (!pfTauIdDiscr.isValid())
495  continue; // missing IDs will be skipped lateron or crash there depending on skipMissingTauID_
496  const edm::Provenance* prov = pfTauIdDiscr.provenance();
497  for (NameWPIdx& idcfg : tauIDSrcContainers_[idx]) {
498  std::string prov_cfg_label = idcfg.second.first.first;
499  std::string prov_ID_label = idcfg.second.first.second;
500  bool found = false;
501  if (prov_cfg_label == "rawValues" || prov_cfg_label == "workingPoints") {
502  const std::vector<std::string> psetsFromProvenance =
503  edm::parameterSet(prov->stable(), iEvent.processHistory())
504  .getParameter<std::vector<std::string>>(prov_cfg_label);
505  for (size_t i = 0; i < psetsFromProvenance.size(); ++i) {
506  if (psetsFromProvenance[i] == prov_ID_label) {
507  // using negative indices for raw values
508  if (prov_cfg_label == "rawValues")
509  idcfg.second.second = -1 - i;
510  else
511  idcfg.second.second = i;
512  found = true;
513  }
514  }
515  } else if (prov_cfg_label == "IDdefinitions" || prov_cfg_label == "IDWPdefinitions") {
516  const std::vector<edm::ParameterSet> psetsFromProvenance =
517  edm::parameterSet(prov->stable(), iEvent.processHistory())
518  .getParameter<std::vector<edm::ParameterSet>>(prov_cfg_label);
519  for (size_t i = 0; i < psetsFromProvenance.size(); ++i) {
520  if (psetsFromProvenance[i].getParameter<std::string>("IDname") == prov_ID_label) {
521  // using negative indices for raw values
522  if (prov_cfg_label == "IDdefinitions")
523  idcfg.second.second = -1 - i;
524  else
525  idcfg.second.second = i;
526  found = true;
527  }
528  }
529  } else {
530  // checked prov_cfg_label before, so it must be a direct access via indices
531  try {
532  int i = std::stoi(prov_ID_label);
533  if (prov_cfg_label == "direct_rawValues")
534  idcfg.second.second = -1 - i;
535  else
536  idcfg.second.second = i;
537  found = true;
538  } catch (std::invalid_argument const& e) {
539  throw cms::Exception("Configuration") << "PATTauProducer: Direct access to ID container requested, so "
540  "argument of 'idLabel' must be convertable to int!\n";
541  }
542  }
543  if (!found) {
544  throw cms::Exception("Configuration") << "PATTauProducer: Requested working point '" << prov_ID_label
545  << "' for ID '" << idcfg.first << "' not found!\n";
546  }
547  }
548  }
549  }
550  std::string missingDiscriminators;
551  std::vector<pat::Tau::IdPair> ids(numberTauIds);
552  auto const& tausDeref = *tausRef;
553  if (typeid(tausDeref) == typeid(reco::PFTau)) {
554  edm::Handle<reco::PFTauCollection> pfTauCollection;
555  iEvent.getByToken(pfTauToken_, pfTauCollection);
556  for (size_t i = 0; i < numberPlainTauIds; ++i) {
557  //std::cout << "filling PFTauDiscriminator '" << tauIDSrcs_[i].first << "' into pat::Tau object..." << std::endl;
558 
559  auto pfTauIdDiscr = iEvent.getHandle(pfTauIDTokens_[i]);
560 
561  if (skipMissingTauID_ && !pfTauIdDiscr.isValid()) {
562  if (!missingDiscriminators.empty()) {
563  missingDiscriminators += ", ";
564  }
565  missingDiscriminators += tauIDSrcs_[i].first;
566  continue;
567  }
568  ids[i].first = tauIDSrcs_[i].first;
569  ids[i].second = getTauIdDiscriminator(pfTauCollection, idx, pfTauIdDiscr);
570  }
571  for (size_t i = 0; i < tauIDSrcContainers_.size(); ++i) {
572  auto pfTauIdDiscr = iEvent.getHandle(pfTauIDContainerTokens_[i]);
573  if (skipMissingTauID_ && !pfTauIdDiscr.isValid()) {
574  for (auto const& it : tauIDSrcContainers_[i]) {
575  if (!missingDiscriminators.empty()) {
576  missingDiscriminators += ", ";
577  }
578  missingDiscriminators += it.first;
579  }
580  continue;
581  }
582  for (size_t j = 0; j < tauIDSrcContainers_[i].size(); ++j) {
583  ids[numberPlainTauIds + j].first = tauIDSrcContainers_[i][j].first;
584  ids[numberPlainTauIds + j].second = getTauIdDiscriminatorFromContainer(
585  pfTauCollection, idx, pfTauIdDiscr, tauIDSrcContainers_[i][j].second.second);
586  }
587  numberPlainTauIds += tauIDSrcContainers_[i].size();
588  }
589  } else {
590  throw cms::Exception("Type Mismatch")
591  << "PATTauProducer: unsupported datatype '" << typeid(tausDeref).name() << "' for tauSource\n";
592  }
593  if (!missingDiscriminators.empty() && firstOccurence_) {
594  edm::LogWarning("DataSource") << "The following tau discriminators have not been found in the event:\n"
595  << missingDiscriminators << "\n"
596  << "They will not be embedded into the pat::Tau object.\n"
597  << "Note: this message will be printed only at first occurence.";
598  firstOccurence_ = false;
599  }
600  aTau.setTauIDs(ids);
601  }
602 
603  // extraction of reconstructed tau decay mode
604  // (only available for PFTaus)
605  if (aTau.isPFTau()) {
607  iEvent.getByToken(pfTauToken_, pfTaus);
608  reco::PFTauRef pfTauRef(pfTaus, idx);
609 
610  aTau.setDecayMode(pfTauRef->decayMode());
611  }
612 
613  // extraction of variables needed to rerun MVA isolation and anti-electron discriminator on MiniAOD
614  if (!aTau.pfEssential_.empty()) {
616  iEvent.getByToken(pfTauToken_, pfTaus);
617  reco::PFTauRef pfTauRef(pfTaus, idx);
618  pat::tau::TauPFEssential& aTauPFEssential = aTau.pfEssential_[0];
619  float ecalEnergy = 0;
620  float hcalEnergy = 0;
621  float sumPhiTimesEnergy = 0.;
622  float sumEtaTimesEnergy = 0.;
623  float sumEnergy = 0.;
624  float leadChargedCandPt = -99;
625  float leadChargedCandEtaAtEcalEntrance = -99;
626  const std::vector<reco::CandidatePtr>& signalCands = pfTauRef->signalCands();
627  for (const auto& it : signalCands) {
628  const reco::PFCandidate* ipfcand = dynamic_cast<const reco::PFCandidate*>(it.get());
629  if (ipfcand != nullptr) {
630  ecalEnergy += ipfcand->ecalEnergy();
631  hcalEnergy += ipfcand->hcalEnergy();
632  sumPhiTimesEnergy += ipfcand->positionAtECALEntrance().phi() * ipfcand->energy();
633  sumEtaTimesEnergy += ipfcand->positionAtECALEntrance().eta() * ipfcand->energy();
634  sumEnergy += ipfcand->energy();
635  const reco::Track* track = nullptr;
636  if (ipfcand->trackRef().isNonnull())
637  track = ipfcand->trackRef().get();
638  else if (ipfcand->muonRef().isNonnull() && ipfcand->muonRef()->innerTrack().isNonnull())
639  track = ipfcand->muonRef()->innerTrack().get();
640  else if (ipfcand->muonRef().isNonnull() && ipfcand->muonRef()->globalTrack().isNonnull())
641  track = ipfcand->muonRef()->globalTrack().get();
642  else if (ipfcand->muonRef().isNonnull() && ipfcand->muonRef()->outerTrack().isNonnull())
643  track = ipfcand->muonRef()->outerTrack().get();
644  else if (ipfcand->gsfTrackRef().isNonnull())
645  track = ipfcand->gsfTrackRef().get();
646  if (track) {
647  if (track->pt() > leadChargedCandPt) {
648  leadChargedCandEtaAtEcalEntrance = ipfcand->positionAtECALEntrance().eta();
649  leadChargedCandPt = track->pt();
650  }
651  }
652  } else {
653  // TauReco@MiniAOD: individual ECAL and HCAL energies recovered from fractions,
654  // and position at ECAL entrance computed on-the-fly
655  const pat::PackedCandidate* ipatcand = dynamic_cast<const pat::PackedCandidate*>(it.get());
656  if (ipatcand != nullptr) {
657  ecalEnergy += ipatcand->caloFraction() * ipatcand->energy() * (1. - ipatcand->hcalFraction());
658  hcalEnergy += ipatcand->caloFraction() * ipatcand->energy() * ipatcand->hcalFraction();
659  double posAtECal_phi = ipatcand->phi();
660  double posAtECal_eta = ipatcand->eta();
661  bool success = false;
662  reco::Candidate::Point posAtECalEntrance = posAtECalEntranceComputer_(ipatcand, success);
663  if (success) {
664  posAtECal_phi = posAtECalEntrance.phi();
665  posAtECal_eta = posAtECalEntrance.eta();
666  }
667  sumPhiTimesEnergy += posAtECal_phi * ipatcand->energy();
668  sumEtaTimesEnergy += posAtECal_eta * ipatcand->energy();
669  sumEnergy += ipatcand->energy();
670  const reco::Track* track = ipatcand->bestTrack();
671  if (track != nullptr) {
672  if (track->pt() > leadChargedCandPt) {
673  leadChargedCandEtaAtEcalEntrance = posAtECal_eta;
674  leadChargedCandPt = track->pt();
675  }
676  }
677  }
678  }
679  }
680  aTauPFEssential.ecalEnergy_ = ecalEnergy;
681  aTauPFEssential.hcalEnergy_ = hcalEnergy;
682  aTauPFEssential.ptLeadChargedCand_ = leadChargedCandPt;
683  aTauPFEssential.etaAtEcalEntranceLeadChargedCand_ = leadChargedCandEtaAtEcalEntrance;
684  if (sumEnergy != 0.) {
685  aTauPFEssential.phiAtEcalEntrance_ = sumPhiTimesEnergy / sumEnergy;
686  aTauPFEssential.etaAtEcalEntrance_ = sumEtaTimesEnergy / sumEnergy;
687  } else {
688  aTauPFEssential.phiAtEcalEntrance_ = -99.;
689  aTauPFEssential.etaAtEcalEntrance_ = -99.;
690  }
691  float leadingTrackNormChi2 = 0;
692  float ecalEnergyLeadChargedHadrCand = -99.;
693  float hcalEnergyLeadChargedHadrCand = -99.;
694  float emFraction = -1.;
695  float myHCALenergy = 0.;
696  float myECALenergy = 0.;
697  const reco::CandidatePtr& leadingPFCharged = pfTauRef->leadChargedHadrCand();
698  if (leadingPFCharged.isNonnull()) {
699  const reco::PFCandidate* pfCandPtr = dynamic_cast<const reco::PFCandidate*>(leadingPFCharged.get());
700  if (pfCandPtr != nullptr) { // PFTau made from PFCandidates
701  ecalEnergyLeadChargedHadrCand = pfCandPtr->ecalEnergy();
702  hcalEnergyLeadChargedHadrCand = pfCandPtr->hcalEnergy();
703  reco::TrackRef trackRef = pfCandPtr->trackRef();
704  if (trackRef.isNonnull()) {
705  leadingTrackNormChi2 = trackRef->normalizedChi2();
706  for (const auto& isoPFCand : pfTauRef->isolationPFCands()) {
707  myHCALenergy += isoPFCand->hcalEnergy();
708  myECALenergy += isoPFCand->ecalEnergy();
709  }
710  for (const auto& signalPFCand : pfTauRef->signalPFCands()) {
711  myHCALenergy += signalPFCand->hcalEnergy();
712  myECALenergy += signalPFCand->ecalEnergy();
713  }
714  if (myHCALenergy + myECALenergy != 0.) {
715  emFraction = myECALenergy / (myHCALenergy + myECALenergy);
716  }
717  }
718  } else {
719  const pat::PackedCandidate* packedCandPtr = dynamic_cast<const pat::PackedCandidate*>(leadingPFCharged.get());
720  if (packedCandPtr != nullptr) {
721  // TauReco@MiniAOD: individual ECAL and HCAL energies recovered from fractions,
722  // and position at ECAL entrance computed on-the-fly
723  ecalEnergyLeadChargedHadrCand =
724  packedCandPtr->caloFraction() * packedCandPtr->energy() * (1. - packedCandPtr->hcalFraction());
725  hcalEnergyLeadChargedHadrCand =
726  packedCandPtr->caloFraction() * packedCandPtr->energy() * packedCandPtr->hcalFraction();
727  const reco::Track* track = packedCandPtr->bestTrack();
728  if (track != nullptr) {
729  leadingTrackNormChi2 = track->normalizedChi2();
730  for (const auto& isoCand : pfTauRef->isolationCands()) {
731  //can safely use static_cast as it is ensured that this PFTau is
732  //built with packedCands as its leadingCanidate
733  const pat::PackedCandidate* isoPackedCand = static_cast<const pat::PackedCandidate*>(isoCand.get());
734  myHCALenergy += isoPackedCand->caloFraction() * isoPackedCand->energy() * isoPackedCand->hcalFraction();
735  myECALenergy +=
736  isoPackedCand->caloFraction() * isoPackedCand->energy() * (1. - isoPackedCand->hcalFraction());
737  }
738  for (const auto& signalCand : pfTauRef->signalCands()) {
739  //can safely use static_cast as it is ensured that this PFTau is
740  //built with packedCands as its leadingCanidate
741  const pat::PackedCandidate* sigPackedCand = static_cast<const pat::PackedCandidate*>(signalCand.get());
742  myHCALenergy += sigPackedCand->caloFraction() * sigPackedCand->energy() * sigPackedCand->hcalFraction();
743  myECALenergy +=
744  sigPackedCand->caloFraction() * sigPackedCand->energy() * (1. - sigPackedCand->hcalFraction());
745  }
746  if (myHCALenergy + myECALenergy != 0.) {
747  emFraction = myECALenergy / (myHCALenergy + myECALenergy);
748  }
749  }
750  }
751  }
752  }
753 
754  aTauPFEssential.emFraction_ = emFraction;
755  aTauPFEssential.leadingTrackNormChi2_ = leadingTrackNormChi2;
756  aTauPFEssential.ecalEnergyLeadChargedHadrCand_ = ecalEnergyLeadChargedHadrCand;
757  aTauPFEssential.hcalEnergyLeadChargedHadrCand_ = hcalEnergyLeadChargedHadrCand;
758  // extraction of tau lifetime information
759  if (!tauTransverseImpactParameterSrc_.label().empty()) {
760  edm::Handle<PFTauTIPAssociationByRef> tauLifetimeInfos;
761  iEvent.getByToken(tauTransverseImpactParameterToken_, tauLifetimeInfos);
762  const reco::PFTauTransverseImpactParameter& tauLifetimeInfo = *(*tauLifetimeInfos)[pfTauRef];
763  pat::tau::TauPFEssential& aTauPFEssential = aTau.pfEssential_[0];
764  aTauPFEssential.dxy_PCA_ = tauLifetimeInfo.dxy_PCA();
765  aTauPFEssential.dxy_ = tauLifetimeInfo.dxy();
766  aTauPFEssential.dxy_error_ = tauLifetimeInfo.dxy_error();
767  aTauPFEssential.hasSV_ = tauLifetimeInfo.hasSecondaryVertex();
768  aTauPFEssential.flightLength_ = tauLifetimeInfo.flightLength();
769  aTauPFEssential.flightLengthSig_ = tauLifetimeInfo.flightLengthSig();
770  aTauPFEssential.ip3d_ = tauLifetimeInfo.ip3d();
771  aTauPFEssential.ip3d_error_ = tauLifetimeInfo.ip3d_error();
772  }
773  }
774 
775  // Isolation
776  if (isolator_.enabled()) {
778  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
779  // better to loop backwards, so the vector is resized less times
780  for (IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(),
781  ed = isolatorTmpStorage_.rend();
782  it != ed;
783  ++it) {
784  aTau.setIsolation(it->first, it->second);
785  }
786  }
787 
788  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
789  aTau.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[tausRef]);
790  }
791 
792  if (efficiencyLoader_.enabled()) {
793  efficiencyLoader_.setEfficiencies(aTau, tausRef);
794  }
795 
796  if (resolutionLoader_.enabled()) {
798  }
799 
800  if (useUserData_) {
801  userDataHelper_.add(aTau, iEvent, iSetup);
802  }
803 
804  patTaus->push_back(aTau);
805  }
806 
807  // sort taus in pT
808  std::sort(patTaus->begin(), patTaus->end(), pTTauComparator_);
809 
810  // put genEvt object in Event
811  iEvent.put(std::move(patTaus));
812 
813  // clean up
814  if (isolator_.enabled())
816 }
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:462
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
bool enabled() const
True if it has a non null configuration.
Definition: MultiIsolator.h:55
void beginEvent(const edm::EventSetup &)
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
pat::helper::EfficiencyLoader efficiencyLoader_
pat::helper::KinResolutionsLoader resolutionLoader_
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
const math::XYZPointF & positionAtECALEntrance() const
Definition: PFCandidate.h:388
float getTauIdDiscriminator(const edm::Handle< TauCollectionType > &, size_t, const edm::Handle< TauDiscrType > &)
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
std::string const & label() const
Definition: InputTag.h:36
float caloFraction() const
Set the fraction of ECAL+HCAL energy over candidate energy.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:11
std::vector< edm::EDGetTokenT< reco::TauDiscriminatorContainer > > pfTauIDContainerTokens_
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
Definition: MultiIsolator.h:84
bool embedIsolationPFChargedHadrCands_
U second(std::pair< T, U > const &p)
int iEvent
Definition: GenABIO.cc:224
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
edm::EDGetTokenT< PFTauTIPAssociationByRef > tauTransverseImpactParameterToken_
double eta() const override
momentum pseudorapidity
pat::helper::MultiIsolator isolator_
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:233
edm::EDGetTokenT< edm::View< reco::BaseTau > > baseTauToken_
void newEvent(const edm::Event &event, const edm::EventSetup &setup)
To be called for each new event, reads in the EventSetup object.
bool embedIsolationPFNeutralHadrCands_
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:146
bool isAvailable() const
Definition: Ref.h:537
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
float getTauIdDiscriminatorFromContainer(const edm::Handle< reco::PFTauCollection > &, size_t, const edm::Handle< reco::TauDiscriminatorContainer > &, int)
pat::PATUserDataHelper< pat::Tau > userDataHelper_
genJetMatch
switch on/off embedding of matched genJet&#39;s
double ecalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:221
reco::MuonRef muonRef() const
Definition: PFCandidate.cc:443
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:139
void add(ObjectType &patObject, edm::Event const &iEvent, edm::EventSetup const &iSetup)
const reco::Track * bestTrack() const override
return a pointer to the track if present. otherwise, return a null pointer
Definition: Tau.py:1
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
Definition: MultiIsolator.h:17
std::vector< edm::EDGetTokenT< edm::ValueMap< TauJetCorrFactors > > > tauJetCorrFactorsTokens_
edm::InputTag tauTransverseImpactParameterSrc_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
std::pair< std::string, WPIdx > NameWPIdx
std::vector< std::vector< NameWPIdx > > tauIDSrcContainers_
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetMatchToken_
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
float hcalFraction() const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
double energy() const override
energy
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:232
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:430
math::XYZPoint Point
point in the space
Definition: Candidate.h:40
Log< level::Warning, false > LogWarning
edm::ProcessHistoryID phID_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > pfTauIDTokens_
StableProvenance const & stable() const
Definition: Provenance.h:42
std::vector< NameTag > tauIDSrcs_
edm::EDGetTokenT< reco::PFTauCollection > pfTauToken_
def move(src, dest)
Definition: eostools.py:511
double phi() const override
momentum azimuthal angle
GreaterByPt< Tau > pTTauComparator_
PositionAtECalEntranceComputer posAtECalEntranceComputer_
double energy() const final
energy

Member Data Documentation

◆ addEfficiencies_

bool pat::PATTauProducer::addEfficiencies_
private

Definition at line 120 of file PATTauProducer.cc.

Referenced by PATTauProducer().

◆ addGenJetMatch_

bool pat::PATTauProducer::addGenJetMatch_
private

Definition at line 92 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ addGenMatch_

bool pat::PATTauProducer::addGenMatch_
private

Definition at line 88 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ addResolutions_

bool pat::PATTauProducer::addResolutions_
private

Definition at line 123 of file PATTauProducer.cc.

Referenced by PATTauProducer().

◆ addTauID_

bool pat::PATTauProducer::addTauID_
private

Definition at line 99 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ addTauJetCorrFactors_

bool pat::PATTauProducer::addTauJetCorrFactors_
private

Definition at line 96 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ baseTauToken_

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

Definition at line 69 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ efficiencyLoader_

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

Definition at line 121 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedGenJetMatch_

bool pat::PATTauProducer::embedGenJetMatch_
private

Definition at line 93 of file PATTauProducer.cc.

Referenced by PATTauProducer().

◆ embedGenMatch_

bool pat::PATTauProducer::embedGenMatch_
private

Definition at line 89 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationPFCands_

bool pat::PATTauProducer::embedIsolationPFCands_
private

Definition at line 83 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationPFChargedHadrCands_

bool pat::PATTauProducer::embedIsolationPFChargedHadrCands_
private

Definition at line 84 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationPFGammaCands_

bool pat::PATTauProducer::embedIsolationPFGammaCands_
private

Definition at line 86 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationPFNeutralHadrCands_

bool pat::PATTauProducer::embedIsolationPFNeutralHadrCands_
private

Definition at line 85 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedIsolationTracks_

bool pat::PATTauProducer::embedIsolationTracks_
private

Definition at line 73 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedLeadPFCand_

bool pat::PATTauProducer::embedLeadPFCand_
private

Definition at line 76 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedLeadPFChargedHadrCand_

bool pat::PATTauProducer::embedLeadPFChargedHadrCand_
private

Definition at line 77 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedLeadPFNeutralCand_

bool pat::PATTauProducer::embedLeadPFNeutralCand_
private

Definition at line 78 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedLeadTrack_

bool pat::PATTauProducer::embedLeadTrack_
private

Definition at line 74 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedSignalPFCands_

bool pat::PATTauProducer::embedSignalPFCands_
private

Definition at line 79 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedSignalPFChargedHadrCands_

bool pat::PATTauProducer::embedSignalPFChargedHadrCands_
private

Definition at line 80 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedSignalPFGammaCands_

bool pat::PATTauProducer::embedSignalPFGammaCands_
private

Definition at line 82 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedSignalPFNeutralHadrCands_

bool pat::PATTauProducer::embedSignalPFNeutralHadrCands_
private

Definition at line 81 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ embedSignalTracks_

bool pat::PATTauProducer::embedSignalTracks_
private

Definition at line 75 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ firstOccurence_

bool pat::PATTauProducer::firstOccurence_
private

Definition at line 66 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ genJetMatchToken_

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

Definition at line 94 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ genMatchTokens_

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

Definition at line 90 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ isoDepositLabels_

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

Definition at line 117 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ isoDepositTokens_

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

Definition at line 118 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ isolator_

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

Definition at line 115 of file PATTauProducer.cc.

Referenced by produce().

◆ isolatorTmpStorage_

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

Definition at line 116 of file PATTauProducer.cc.

Referenced by produce().

◆ pfTauIDContainerTokens_

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

Definition at line 109 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ pfTauIDTokens_

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

Definition at line 108 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ pfTauToken_

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

Definition at line 71 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ phID_

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

Definition at line 111 of file PATTauProducer.cc.

Referenced by produce().

◆ posAtECalEntranceComputer_

PositionAtECalEntranceComputer pat::PATTauProducer::posAtECalEntranceComputer_
private

Definition at line 136 of file PATTauProducer.cc.

Referenced by produce().

◆ pTTauComparator_

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

Definition at line 113 of file PATTauProducer.cc.

Referenced by produce().

◆ resolutionLoader_

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

Definition at line 124 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ skipMissingTauID_

bool pat::PATTauProducer::skipMissingTauID_
private

Definition at line 110 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ tauIDSrcContainers_

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

Definition at line 107 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ tauIDSrcs_

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

Definition at line 106 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ tauJetCorrFactorsTokens_

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

Definition at line 97 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ tauTransverseImpactParameterSrc_

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

Definition at line 72 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ tauTransverseImpactParameterToken_

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

Definition at line 70 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ userDataHelper_

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

Definition at line 127 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().

◆ useUserData_

bool pat::PATTauProducer::useUserData_
private

Definition at line 126 of file PATTauProducer.cc.

Referenced by PATTauProducer(), and produce().