90 std::vector<edm::EDGetTokenT<edm::Association<reco::GenParticleCollection>>>
genMatchTokens_;
100 typedef std::pair<std::string, edm::InputTag>
NameTag;
101 typedef std::pair<std::string, std::string>
WPCfg;
102 typedef std::pair<WPCfg, int>
WPIdx;
104 typedef std::pair<edm::InputTag, std::vector<NameWPIdx>>
129 template <
typename TauCollectionType,
typename TauDiscrType>
144 : isolator_(iConfig.exists(
"userIsolation") ? iConfig.getParameter<edm::
ParameterSet>(
"userIsolation")
148 useUserData_(iConfig.exists(
"userData")),
149 posAtECalEntranceComputer_(consumesCollector()) {
178 iConfig.
getParameter<std::vector<edm::InputTag>>(
"genParticleMatch"),
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"));
188 addTauJetCorrFactors_ =
iConfig.getParameter<
bool>(
"addTauJetCorrFactors");
190 iConfig.getParameter<std::vector<edm::InputTag>>(
"tauJetCorrFactorsSource"),
193 addTauID_ =
iConfig.getParameter<
bool>(
"addTauID");
198 std::map<std::string, IDContainerData> idContainerMap;
199 for (
auto const&
name : names) {
204 if (prov_cfg_label.empty()) {
205 tauIDSrcs_.push_back(NameTag(
name, tag));
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")
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)));
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 "
225 for (
auto const& mapEntry : idContainerMap) {
226 tauIDSrcContainers_.push_back(mapEntry.second.second);
227 pfTauIDContainerTokens_.push_back(mayConsume<reco::TauDiscriminatorContainer>(mapEntry.second.first));
231 tauIDSrcs_, [
this](NameTag
const& tag) {
return mayConsume<reco::PFTauDiscriminator>(tag.second); });
232 skipMissingTauID_ =
iConfig.getParameter<
bool>(
"skipMissingTauID");
234 if (
iConfig.exists(
"isoDeposits")) {
236 if (depconf.
exists(
"tracker"))
238 if (depconf.
exists(
"ecal"))
240 if (depconf.
exists(
"hcal"))
242 if (depconf.
exists(
"pfAllParticles"))
243 isoDepositLabels_.push_back(
245 if (depconf.
exists(
"pfChargedHadron"))
246 isoDepositLabels_.push_back(
248 if (depconf.
exists(
"pfNeutralHadron"))
249 isoDepositLabels_.push_back(
251 if (depconf.
exists(
"pfGamma"))
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();
258 for (; it != ed; ++it, ++
key) {
259 isoDepositLabels_.push_back(std::make_pair(
IsolationKeys(key), *it));
265 return consumes<edm::ValueMap<IsoDeposit>>(label.second);
268 addEfficiencies_ =
iConfig.getParameter<
bool>(
"addEfficiencies");
269 if (addEfficiencies_) {
274 addResolutions_ =
iConfig.getParameter<
bool>(
"addResolutions");
275 if (addResolutions_) {
284 produces<std::vector<Tau>>();
287 PATTauProducer::~PATTauProducer() {}
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>>();
319 std::vector<edm::Handle<edm::ValueMap<IsoDeposit>>> deposits(
isoDepositTokens_.size());
320 for (
size_t j = 0, nd = deposits.size();
j < nd; ++
j) {
325 std::vector<edm::Handle<edm::Association<reco::GenParticleCollection>>> genMatches(
genMatchTokens_.size());
337 std::vector<edm::ValueMap<TauJetCorrFactors>> tauJetCorrs;
342 tauJetCorrs.push_back(*tauJetCorr);
346 auto patTaus = std::make_unique<std::vector<Tau>>();
349 for (
size_t idx = 0, ntaus = anyTaus->size(); idx < ntaus; ++idx) {
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";
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";
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";
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";
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";
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";
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";
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";
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";
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";
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";
440 for (
unsigned int i = 0;
i < tauJetCorrs.size(); ++
i) {
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"));
452 aTau.
initializeJEC(tauJetCorrs[0][tausRef].jecLevel(
"Uncorrected"));
455 <<
"L2L3Residual and L3Absolute are not part of the correction applied jetCorrFactors \n"
456 <<
"of module " << tauJetCorrs[0][tausRef].jecSet() <<
" jets will remain"
465 for (
size_t i = 0,
n = genMatches.size();
i <
n; ++
i) {
484 size_t numberTauIds = numberPlainTauIds;
486 numberTauIds += it.size();
492 for (
size_t idx = 0; idx < tauIDSrcContainers_.size(); ++idx) {
494 if (!pfTauIdDiscr.isValid())
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;
501 if (prov_cfg_label ==
"rawValues" || prov_cfg_label ==
"workingPoints") {
502 const std::vector<std::string> psetsFromProvenance =
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) {
508 if (prov_cfg_label ==
"rawValues")
509 idcfg.second.second = -1 -
i;
511 idcfg.second.second =
i;
515 }
else if (prov_cfg_label ==
"IDdefinitions" || prov_cfg_label ==
"IDWPdefinitions") {
516 const std::vector<edm::ParameterSet> psetsFromProvenance =
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) {
522 if (prov_cfg_label ==
"IDdefinitions")
523 idcfg.second.second = -1 -
i;
525 idcfg.second.second =
i;
532 int i = std::stoi(prov_ID_label);
533 if (prov_cfg_label ==
"direct_rawValues")
534 idcfg.second.second = -1 -
i;
536 idcfg.second.second =
i;
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";
544 throw cms::Exception(
"Configuration") <<
"PATTauProducer: Requested working point '" << prov_ID_label
545 <<
"' for ID '" << idcfg.first <<
"' not found!\n";
551 std::vector<pat::Tau::IdPair> ids(numberTauIds);
552 auto const& tausDeref = *tausRef;
556 for (
size_t i = 0;
i < numberPlainTauIds; ++
i) {
561 if (skipMissingTauID_ && !pfTauIdDiscr.isValid()) {
562 if (!missingDiscriminators.empty()) {
563 missingDiscriminators +=
", ";
571 for (
size_t i = 0;
i < tauIDSrcContainers_.size(); ++
i) {
573 if (skipMissingTauID_ && !pfTauIdDiscr.isValid()) {
574 for (
auto const& it : tauIDSrcContainers_[i]) {
575 if (!missingDiscriminators.empty()) {
576 missingDiscriminators +=
", ";
578 missingDiscriminators += it.first;
582 for (
size_t j = 0;
j < tauIDSrcContainers_[
i].size(); ++
j) {
583 ids[numberPlainTauIds +
j].first = tauIDSrcContainers_[
i][
j].first;
585 pfTauCollection, idx, pfTauIdDiscr, tauIDSrcContainers_[i][
j].
second.second);
587 numberPlainTauIds += tauIDSrcContainers_[
i].size();
591 <<
"PATTauProducer: unsupported datatype '" <<
typeid(tausDeref).
name() <<
"' for tauSource\n";
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.";
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) {
629 if (ipfcand !=
nullptr) {
634 sumEnergy += ipfcand->
energy();
639 track = ipfcand->
muonRef()->innerTrack().
get();
641 track = ipfcand->
muonRef()->globalTrack().
get();
643 track = ipfcand->
muonRef()->outerTrack().
get();
647 if (track->
pt() > leadChargedCandPt) {
649 leadChargedCandPt = track->
pt();
656 if (ipatcand !=
nullptr) {
659 double posAtECal_phi = ipatcand->
phi();
660 double posAtECal_eta = ipatcand->
eta();
664 posAtECal_phi = posAtECalEntrance.phi();
665 posAtECal_eta = posAtECalEntrance.eta();
667 sumPhiTimesEnergy += posAtECal_phi * ipatcand->
energy();
668 sumEtaTimesEnergy += posAtECal_eta * ipatcand->
energy();
669 sumEnergy += ipatcand->
energy();
671 if (track !=
nullptr) {
672 if (track->
pt() > leadChargedCandPt) {
673 leadChargedCandEtaAtEcalEntrance = posAtECal_eta;
674 leadChargedCandPt = track->
pt();
684 if (sumEnergy != 0.) {
691 float leadingTrackNormChi2 = 0;
692 float ecalEnergyLeadChargedHadrCand = -99.;
693 float hcalEnergyLeadChargedHadrCand = -99.;
694 float emFraction = -1.;
695 float myHCALenergy = 0.;
696 float myECALenergy = 0.;
700 if (pfCandPtr !=
nullptr) {
701 ecalEnergyLeadChargedHadrCand = pfCandPtr->
ecalEnergy();
702 hcalEnergyLeadChargedHadrCand = pfCandPtr->
hcalEnergy();
705 leadingTrackNormChi2 = trackRef->normalizedChi2();
706 for (
const auto& isoPFCand : pfTauRef->isolationPFCands()) {
707 myHCALenergy += isoPFCand->hcalEnergy();
708 myECALenergy += isoPFCand->ecalEnergy();
710 for (
const auto& signalPFCand : pfTauRef->signalPFCands()) {
711 myHCALenergy += signalPFCand->hcalEnergy();
712 myECALenergy += signalPFCand->ecalEnergy();
714 if (myHCALenergy + myECALenergy != 0.) {
715 emFraction = myECALenergy / (myHCALenergy + myECALenergy);
720 if (packedCandPtr !=
nullptr) {
723 ecalEnergyLeadChargedHadrCand =
725 hcalEnergyLeadChargedHadrCand =
728 if (track !=
nullptr) {
730 for (
const auto& isoCand : pfTauRef->isolationCands()) {
738 for (
const auto& signalCand : pfTauRef->signalCands()) {
746 if (myHCALenergy + myECALenergy != 0.) {
747 emFraction = myECALenergy / (myHCALenergy + myECALenergy);
765 aTauPFEssential.
dxy_ = tauLifetimeInfo.
dxy();
770 aTauPFEssential.
ip3d_ = tauLifetimeInfo.
ip3d();
788 for (
size_t j = 0, nd = deposits.size();
j < nd; ++
j) {
804 patTaus->push_back(aTau);
818 template <
typename TauCollectionType,
typename TauDiscrType>
823 return (*tauIdDiscr)[tauRef];
832 if ((*tauIdDiscr)[tauRef].
rawValues.size() == 1)
833 return (*tauIdDiscr)[tauRef].rawValues.at(0);
835 return (*tauIdDiscr)[tauRef].rawValues.at(-1 - wpIdx);
840 return (*tauIdDiscr)[tauRef].workingPoints.at(wpIdx);
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");
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;
864 ->
setComment(
"input with MC match information");
867 iDesc.
add<
bool>(
"addGenJetMatch",
true)->setComment(
"add MC jet matching");
868 iDesc.
add<
bool>(
"embedGenJetMatch",
false)->setComment(
"embed MC jet matched jet information");
874 iDesc.
add<
bool>(
"addTauID",
true)->setComment(
"add tau ID variables");
882 iDesc.
add<
bool>(
"skipMissingTauID",
false)
883 ->setComment(
"allow to skip a tau ID variable when not present in the event");
894 isoDepositsPSet.
addOptional<std::vector<edm::InputTag>>(
"user");
900 iDesc.
add(
"efficiencies", efficienciesPSet);
901 iDesc.
add<
bool>(
"addEfficiencies",
false);
910 iDesc.
add(
"userIsolation", isolationPSet);
bool enabled() const
'true' if this there is at least one efficiency configured
~PATTauProducer() override
double ecalEnergy() const
return corrected Ecal energy
void setComment(std::string const &value)
Assists in assimilating all pat::UserData into pat objects.
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
std::pair< std::string, edm::InputTag > NameTag
float etaAtEcalEntranceLeadChargedCand_
bool hasSecondaryVertex() const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
bool isNonnull() const
Checks for non-null.
void setIsolation(IsolationKeys key, float value)
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
std::pair< edm::InputTag, std::vector< NameWPIdx > > IDContainerData
void embedIsolationPFCands()
method to store the isolation candidates internally
void beginEvent(const edm::EventSetup &)
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
void embedIsolationPFGammaCands()
method to store the isolation gamma candidates internally
float hcalFraction() const
bool addTauJetCorrFactors_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void setAllowAnything()
allow any parameter label/value pairs
#define DEFINE_FWK_MODULE(type)
T const * get() const
Returns C++ pointer to the item.
StableProvenance const & stable() const
pat::helper::EfficiencyLoader efficiencyLoader_
void embedLeadTrack()
method to store the leading track internally
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void embedSignalPFChargedHadrCands()
method to store the signal charged hadrons candidates internally
pat::helper::KinResolutionsLoader resolutionLoader_
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
float getTauIdDiscriminator(const edm::Handle< TauCollectionType > &, size_t, const edm::Handle< TauDiscrType > &)
void setDecayMode(int)
set decay mode
void setTauIDs(const std::vector< IdPair > &ids)
IsolationKeys
Enum defining isolation keys.
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 >
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
const std::string names[nVars_]
const Point & dxy_PCA() const
const math::XYZPointF & positionAtECALEntrance() const
bool enabled() const
'true' if this there is at least one efficiency configured
std::vector< edm::EDGetTokenT< reco::TauDiscriminatorContainer > > pfTauIDContainerTokens_
void setIsoDeposit(IsolationKeys key, const IsoDeposit &dep)
Sets the IsoDeposit associated with some key; if it is already existent, it is overwritten.
bool embedIsolationPFChargedHadrCands_
static void fillDescription(edm::ParameterSetDescription &iDesc)
reco::TrackRef trackRef() const
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
U second(std::pair< T, U > const &p)
bool enabled() const
True if it has a non null configuration.
void setComment(std::string const &value)
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
void embedSignalPFCands()
method to store the signal candidates internally
double ip3d_error() const
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
double flightLengthSig() const
edm::EDGetTokenT< PFTauTIPAssociationByRef > tauTransverseImpactParameterToken_
double eta() const override
momentum pseudorapidity
pat::helper::MultiIsolator isolator_
const Vector & flightLength() const
edm::AssociationVector< reco::PFTauRefProd, std::vector< reco::PFTauTransverseImpactParameterRef > > PFTauTIPAssociationByRef
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_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
double pt() const
track transverse momentum
ParameterSet const & parameterSet(StableProvenance const &provenance, ProcessHistory const &history)
float getTauIdDiscriminatorFromContainer(const edm::Handle< reco::PFTauCollection > &, size_t, const edm::Handle< reco::TauDiscriminatorContainer > &, int)
tuple key
prepare the HTCondor submission files and eventually submit them
pat::PATUserDataHelper< pat::Tau > userDataHelper_
T const * get() const
Returns C++ pointer to the item.
bool embedSignalPFNeutralHadrCands_
std::vector< pat::tau::TauPFEssential > pfEssential_
void embedIsolationPFNeutralHadrCands()
method to store the isolation neutral hadrons candidates internally
bool embedIsolationPFCands_
float caloFraction() const
Set the fraction of ECAL+HCAL energy over candidate energy.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void embedLeadPFChargedHadrCand()
method to store the leading charged hadron candidate internally
Analysis-level tau class.
void embedIsolationPFChargedHadrCands()
method to store the isolation charged hadrons candidates internally
reco::MuonRef muonRef() const
bool isNonnull() const
Checks for non-null.
void setGenJet(const reco::GenJetRef &ref)
set the matched GenJet
const reco::Track * bestTrack() const override
return a pointer to the track if present. otherwise, return a null pointer
void embedLeadPFNeutralCand()
method to store the leading neutral candidate internally
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
ProcessHistory const & processHistory() const override
void addGenParticleRef(const reco::GenParticleRef &ref)
std::vector< edm::EDGetTokenT< edm::ValueMap< TauJetCorrFactors > > > tauJetCorrFactorsTokens_
static void fillDescription(edm::ParameterSetDescription &iDesc)
Method for documentation and validation of PSet.
edm::InputTag tauTransverseImpactParameterSrc_
bool embedIsolationTracks_
bool embedLeadPFChargedHadrCand_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
std::pair< std::string, WPIdx > NameWPIdx
bool embedIsolationPFGammaCands_
T getParameter(std::string const &) const
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
std::pair< std::string, std::string > WPCfg
ProcessHistoryID const & processHistoryID() const
std::vector< std::vector< NameWPIdx > > tauIDSrcContainers_
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetMatchToken_
std::pair< WPCfg, int > WPIdx
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
void initializeJEC(unsigned int level, const unsigned int set=0)
initialize the jet to a given JEC level during creation starting from Uncorrected ...
void embedSignalPFNeutralHadrCands()
method to store the signal neutral hadrons candidates internally
bool embedSignalPFGammaCands_
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
Particle reconstructed by the particle flow algorithm.
void addJECFactors(const TauJetCorrFactors &jec)
add more sets of energy correction factors
PATTauProducer(const edm::ParameterSet &iConfig)
bool embedLeadPFNeutralCand_
float leadingTrackNormChi2_
double energy() const override
energy
reco::GsfTrackRef gsfTrackRef() const
double hcalEnergy() const
return corrected Hcal energy
void embedSignalTracks()
method to store the signal tracks internally
bool isPFTau() const
Returns true if this pat::Tau was made from a reco::PFTau.
math::XYZPoint Point
point in the space
void embedSignalPFGammaCands()
method to store the signal gamma candidates internally
Log< level::Warning, false > LogWarning
edm::ProcessHistoryID phID_
float ecalEnergyLeadChargedHadrCand_
bool embedSignalPFChargedHadrCands_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > pfTauIDTokens_
void embedIsolationTracks()
method to store the isolation tracks internally
std::vector< NameTag > tauIDSrcs_
edm::EDGetTokenT< reco::PFTauCollection > pfTauToken_
float hcalEnergyLeadChargedHadrCand_
double phi() const override
momentum azimuthal angle
GreaterByPt< Tau > pTTauComparator_
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
PositionAtECalEntranceComputer posAtECalEntranceComputer_
double energy() const final
energy