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 hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Types

typedef std::pair< std::string, edm::InputTagNameTag
 

Private Member Functions

template<typename TauCollectionType , typename TauDiscrType >
float getTauIdDiscriminator (const edm::Handle< TauCollectionType > &, size_t, const edm::Handle< TauDiscrType > &)
 

Private Attributes

bool addEfficiencies_
 
bool addGenJetMatch_
 
bool addGenMatch_
 
bool addResolutions_
 
bool addTauID_
 
bool addTauJetCorrFactors_
 
edm::EDGetTokenT< edm::View< reco::BaseTau > > baseTauToken_
 
std::vector< edm::EDGetTokenT< reco::CaloTauDiscriminator > > caloTauIDTokens_
 
edm::EDGetTokenT< reco::CaloTauCollectioncaloTauToken_
 
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::PFTauDiscriminator > > pfTauIDTokens_
 
edm::EDGetTokenT< reco::PFTauCollectionpfTauToken_
 
GreaterByPt< TaupTTauComparator_
 
pat::helper::KinResolutionsLoader resolutionLoader_
 
bool skipMissingTauID_
 
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 46 of file PATTauProducer.h.

Member Typedef Documentation

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

Definition at line 93 of file PATTauProducer.h.

Constructor & Destructor Documentation

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

Definition at line 31 of file PATTauProducer.cc.

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

31  :
32  isolator_(iConfig.exists("userIsolation") ? iConfig.getParameter<edm::ParameterSet>("userIsolation") : edm::ParameterSet(), consumesCollector(), false) ,
33  useUserData_(iConfig.exists("userData"))
34 {
35  firstOccurence_=true;
36  // initialize the configurables
37  baseTauToken_ = consumes<edm::View<reco::BaseTau> >(iConfig.getParameter<edm::InputTag>( "tauSource" ));
38  tauTransverseImpactParameterSrc_ = iConfig.getParameter<edm::InputTag>( "tauTransverseImpactParameterSource" );
39  tauTransverseImpactParameterToken_ = consumes<PFTauTIPAssociationByRef>( tauTransverseImpactParameterSrc_);
40  pfTauToken_ = consumes<reco::PFTauCollection>(iConfig.getParameter<edm::InputTag>( "tauSource" ));
41  caloTauToken_ = mayConsume<reco::CaloTauCollection>(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")) {
60  genMatchTokens_.push_back(consumes<edm::Association<reco::GenParticleCollection> >(iConfig.getParameter<edm::InputTag>( "genParticleMatch" )));
61  }
62  else {
63  genMatchTokens_ = edm::vector_transform(iConfig.getParameter<std::vector<edm::InputTag> >( "genParticleMatch" ), [this](edm::InputTag const & tag){return consumes<edm::Association<reco::GenParticleCollection> >(tag);});
64  }
65  }
66  addGenJetMatch_ = iConfig.getParameter<bool>( "addGenJetMatch" );
67  if(addGenJetMatch_) {
68  embedGenJetMatch_ = iConfig.getParameter<bool>( "embedGenJetMatch" );
69  genJetMatchToken_ = consumes<edm::Association<reco::GenJetCollection> >(iConfig.getParameter<edm::InputTag>( "genJetMatch" ));
70  }
71  addTauJetCorrFactors_ = iConfig.getParameter<bool>( "addTauJetCorrFactors" );
72  tauJetCorrFactorsTokens_ = edm::vector_transform(iConfig.getParameter<std::vector<edm::InputTag> >( "tauJetCorrFactorsSource" ), [this](edm::InputTag const & tag){return mayConsume<edm::ValueMap<TauJetCorrFactors> >(tag);});
73  // tau ID configurables
74  addTauID_ = iConfig.getParameter<bool>( "addTauID" );
75  if ( addTauID_ ) {
76  // read the different tau ID names
77  edm::ParameterSet idps = iConfig.getParameter<edm::ParameterSet>("tauIDSources");
78  std::vector<std::string> names = idps.getParameterNamesForType<edm::InputTag>();
79  for (std::vector<std::string>::const_iterator it = names.begin(), ed = names.end(); it != ed; ++it) {
80  tauIDSrcs_.push_back(NameTag(*it, idps.getParameter<edm::InputTag>(*it)));
81  }
82  // but in any case at least once
83  if (tauIDSrcs_.empty()) throw cms::Exception("Configuration") <<
84  "PATTauProducer: id addTauID is true, you must specify either:\n" <<
85  "\tPSet tauIDSources = { \n" <<
86  "\t\tInputTag <someName> = <someTag> // as many as you want \n " <<
87  "\t}\n";
88  }
89  caloTauIDTokens_ = edm::vector_transform(tauIDSrcs_, [this](NameTag const & tag){return mayConsume<reco::CaloTauDiscriminator>(tag.second);});
90  pfTauIDTokens_ = edm::vector_transform(tauIDSrcs_, [this](NameTag const & tag){return mayConsume<reco::PFTauDiscriminator>(tag.second);});
91  skipMissingTauID_ = iConfig.getParameter<bool>( "skipMissingTauID" );
92  // IsoDeposit configurables
93  if (iConfig.exists("isoDeposits")) {
94  edm::ParameterSet depconf = iConfig.getParameter<edm::ParameterSet>("isoDeposits");
95  if ( depconf.exists("tracker") ) isoDepositLabels_.push_back(std::make_pair(pat::TrackIso, depconf.getParameter<edm::InputTag>("tracker")));
96  if ( depconf.exists("ecal") ) isoDepositLabels_.push_back(std::make_pair(pat::EcalIso, depconf.getParameter<edm::InputTag>("ecal")));
97  if ( depconf.exists("hcal") ) isoDepositLabels_.push_back(std::make_pair(pat::HcalIso, depconf.getParameter<edm::InputTag>("hcal")));
98  if ( depconf.exists("pfAllParticles") ) isoDepositLabels_.push_back(std::make_pair(pat::PfAllParticleIso, depconf.getParameter<edm::InputTag>("pfAllParticles")));
99  if ( depconf.exists("pfChargedHadron") ) isoDepositLabels_.push_back(std::make_pair(pat::PfChargedHadronIso, depconf.getParameter<edm::InputTag>("pfChargedHadron")));
100  if ( depconf.exists("pfNeutralHadron") ) isoDepositLabels_.push_back(std::make_pair(pat::PfNeutralHadronIso,depconf.getParameter<edm::InputTag>("pfNeutralHadron")));
101  if ( depconf.exists("pfGamma") ) isoDepositLabels_.push_back(std::make_pair(pat::PfGammaIso, depconf.getParameter<edm::InputTag>("pfGamma")));
102 
103  if ( depconf.exists("user") ) {
104  std::vector<edm::InputTag> userdeps = depconf.getParameter<std::vector<edm::InputTag> >("user");
105  std::vector<edm::InputTag>::const_iterator it = userdeps.begin(), ed = userdeps.end();
106  int key = UserBaseIso;
107  for ( ; it != ed; ++it, ++key) {
108  isoDepositLabels_.push_back(std::make_pair(IsolationKeys(key), *it));
109  }
110  }
111  }
112  isoDepositTokens_ = edm::vector_transform(isoDepositLabels_, [this](std::pair<IsolationKeys,edm::InputTag> const & label){return consumes<edm::ValueMap<IsoDeposit> >(label.second);});
113  // Efficiency configurables
114  addEfficiencies_ = iConfig.getParameter<bool>("addEfficiencies");
115  if (addEfficiencies_) {
116  efficiencyLoader_ = pat::helper::EfficiencyLoader(iConfig.getParameter<edm::ParameterSet>("efficiencies"), consumesCollector());
117  }
118  // Resolution configurables
119  addResolutions_ = iConfig.getParameter<bool>("addResolutions");
120  if (addResolutions_) {
122  }
123  // Check to see if the user wants to add user data
124  if ( useUserData_ ) {
125  userDataHelper_ = PATUserDataHelper<Tau>(iConfig.getParameter<edm::ParameterSet>("userData"), consumesCollector());
126  }
127  // produces vector of taus
128  produces<std::vector<Tau> >();
129 }
T getParameter(std::string const &) const
Assists in assimilating all pat::UserData into pat objects.
std::pair< std::string, edm::InputTag > NameTag
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
static const HistoName names[]
pat::helper::EfficiencyLoader efficiencyLoader_
bool exists(std::string const &parameterName) const
checks if a parameter exists
pat::helper::KinResolutionsLoader resolutionLoader_
IsolationKeys
Enum defining isolation keys.
Definition: Isolation.h:9
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
bool embedIsolationPFChargedHadrCands_
std::vector< std::string > getParameterNamesForType(bool trackiness=true) const
Definition: ParameterSet.h:194
edm::EDGetTokenT< PFTauTIPAssociationByRef > tauTransverseImpactParameterToken_
pat::helper::MultiIsolator isolator_
edm::EDGetTokenT< edm::View< reco::BaseTau > > baseTauToken_
bool embedIsolationPFNeutralHadrCands_
edm::EDGetTokenT< reco::CaloTauCollection > caloTauToken_
pat::PATUserDataHelper< pat::Tau > userDataHelper_
bool embedSignalPFNeutralHadrCands_
std::vector< edm::EDGetTokenT< reco::CaloTauDiscriminator > > caloTauIDTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< TauJetCorrFactors > > > tauJetCorrFactorsTokens_
edm::InputTag tauTransverseImpactParameterSrc_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetMatchToken_
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
bool embedSignalPFChargedHadrCands_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > pfTauIDTokens_
std::vector< NameTag > tauIDSrcs_
edm::EDGetTokenT< reco::PFTauCollection > pfTauToken_
PATTauProducer::~PATTauProducer ( )
override

Definition at line 131 of file PATTauProducer.cc.

132 {
133 }

Member Function Documentation

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

Definition at line 513 of file PATTauProducer.cc.

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

514 {
516  iDesc.setComment("PAT tau producer module");
517 
518  // input source
519  iDesc.add<edm::InputTag>("tauSource", edm::InputTag())->setComment("input collection");
520 
521  // embedding
522  iDesc.add<bool>("embedIsolationTracks", false)->setComment("embed external isolation tracks");
523  iDesc.add<bool>("embedLeadTrack", false)->setComment("embed external leading track");
524  iDesc.add<bool>("embedLeadTracks", false)->setComment("embed external signal tracks");
525 
526  // MC matching configurables
527  iDesc.add<bool>("addGenMatch", true)->setComment("add MC matching");
528  iDesc.add<bool>("embedGenMatch", false)->setComment("embed MC matched MC information");
529  std::vector<edm::InputTag> emptySourceVector;
530  iDesc.addNode( edm::ParameterDescription<edm::InputTag>("genParticleMatch", edm::InputTag(), true) xor
531  edm::ParameterDescription<std::vector<edm::InputTag> >("genParticleMatch", emptySourceVector, true)
532  )->setComment("input with MC match information");
533 
534  // MC jet matching variables
535  iDesc.add<bool>("addGenJetMatch", true)->setComment("add MC jet matching");
536  iDesc.add<bool>("embedGenJetMatch", false)->setComment("embed MC jet matched jet information");
537  iDesc.add<edm::InputTag>("genJetMatch", edm::InputTag("tauGenJetMatch"));
538 
539 
541 
542  // tau ID configurables
543  iDesc.add<bool>("addTauID", true)->setComment("add tau ID variables");
544  edm::ParameterSetDescription tauIDSourcesPSet;
545  tauIDSourcesPSet.setAllowAnything();
546  iDesc.addNode( edm::ParameterDescription<edm::InputTag>("tauIDSource", edm::InputTag(), true) xor
547  edm::ParameterDescription<edm::ParameterSetDescription>("tauIDSources", tauIDSourcesPSet, true)
548  )->setComment("input with tau ID variables");
549  // (Dis)allow to skip missing tauId sources
550  iDesc.add<bool>("skipMissingTauID", false)->setComment("allow to skip a tau ID variable when not present in the event");
551 
552  // IsoDeposit configurables
553  edm::ParameterSetDescription isoDepositsPSet;
554  isoDepositsPSet.addOptional<edm::InputTag>("tracker");
555  isoDepositsPSet.addOptional<edm::InputTag>("ecal");
556  isoDepositsPSet.addOptional<edm::InputTag>("hcal");
557  isoDepositsPSet.addOptional<edm::InputTag>("pfAllParticles");
558  isoDepositsPSet.addOptional<edm::InputTag>("pfChargedHadron");
559  isoDepositsPSet.addOptional<edm::InputTag>("pfNeutralHadron");
560  isoDepositsPSet.addOptional<edm::InputTag>("pfGamma");
561  isoDepositsPSet.addOptional<std::vector<edm::InputTag> >("user");
562  iDesc.addOptional("isoDeposits", isoDepositsPSet);
563 
564  // Efficiency configurables
565  edm::ParameterSetDescription efficienciesPSet;
566  efficienciesPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
567  iDesc.add("efficiencies", efficienciesPSet);
568  iDesc.add<bool>("addEfficiencies", false);
569 
570  // Check to see if the user wants to add user data
571  edm::ParameterSetDescription userDataPSet;
573  iDesc.addOptional("userData", userDataPSet);
574 
575  edm::ParameterSetDescription isolationPSet;
576  isolationPSet.setAllowAnything(); // TODO: the pat helper needs to implement a description.
577  iDesc.add("userIsolation", isolationPSet);
578 
579 }
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.
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 506 of file PATTauProducer.cc.

Referenced by produce().

507 {
508  edm::Ref<TauCollectionType> tauRef(tauCollection, tauIdx);
509  return (*tauIdDiscr)[tauRef];
510 }
void PATTauProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 135 of file PATTauProducer.cc.

References addGenJetMatch_, addGenMatch_, pat::PATObject< ObjectType >::addGenParticleRef(), pat::Tau::addJECFactors(), addTauID_, addTauJetCorrFactors_, baseTauToken_, pat::helper::MultiIsolator::beginEvent(), caloTauIDTokens_, caloTauToken_, 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, 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(), pat::tau::TauPFEssential::etaAtEcalEntrance_, pat::tau::TauPFEssential::etaAtEcalEntranceLeadChargedCand_, Exception, pat::helper::MultiIsolator::fill(), spr::find(), plotBeamSpotDB::first, firstOccurence_, reco::PFTauTransverseImpactParameter::flightLength(), pat::tau::TauPFEssential::flightLength_, reco::PFTauTransverseImpactParameter::flightLengthSig(), pat::tau::TauPFEssential::flightLengthSig_, jetProducer_cfi::genJetMatch, genJetMatchToken_, genMatchTokens_, edm::Ptr< T >::get(), edm::Event::getByToken(), getTauIdDiscriminator(), reco::PFTauTransverseImpactParameter::hasSecondaryVertex(), pat::tau::TauPFEssential::hasSV_, pat::tau::TauPFEssential::hcalEnergy_, pat::tau::TauPFEssential::hcalEnergyLeadChargedHadrCand_, mps_fire::i, electrons_cff::ids, training_settings::idx, 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(), edm::EventBase::isRealData(), edm::HandleBase::isValid(), edm::InputTag::label(), pat::tau::TauPFEssential::leadingTrackNormChi2_, jets_cff::levels, eostools::move(), gen::n, pat::helper::EfficiencyLoader::newEvent(), pat::helper::KinResolutionsLoader::newEvent(), hemisphereProducer_cfi::patTaus, pat::Tau::pfEssential_, RecoPFTauTag_cff::PFTau, pfTauIDTokens_, pfTauToken_, pat::tau::TauPFEssential::phiAtEcalEntrance_, reco::TrackBase::pt(), pat::tau::TauPFEssential::ptLeadChargedCand_, pTTauComparator_, edm::Event::put(), resolutionLoader_, 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, tauIDSrcs_, tauJetCorrFactorsTokens_, tauTransverseImpactParameterSrc_, tauTransverseImpactParameterToken_, HiIsolationCommonParameters_cff::track, userDataHelper_, and useUserData_.

136 {
137  // switch off embedding (in unschedules mode)
138  if (iEvent.isRealData()){
139  addGenMatch_ = false;
140  embedGenMatch_ = false;
141  addGenJetMatch_ = false;
142  }
143 
144  // Get the collection of taus from the event
146  try {
147  iEvent.getByToken(baseTauToken_, anyTaus);
148  } catch (const edm::Exception &e) {
149  edm::LogWarning("DataSource") << "WARNING! No Tau collection found. This missing input will not block the job. Instead, an empty tau collection is being be produced.";
150  auto patTaus = std::make_unique<std::vector<Tau>>();
151  iEvent.put(std::move(patTaus));
152  return;
153  }
154 
155  if (isolator_.enabled()) isolator_.beginEvent(iEvent,iSetup);
156 
158  if (resolutionLoader_.enabled()) resolutionLoader_.newEvent(iEvent, iSetup);
159 
160  std::vector<edm::Handle<edm::ValueMap<IsoDeposit> > > deposits(isoDepositTokens_.size());
161  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
162  iEvent.getByToken(isoDepositTokens_[j], deposits[j]);
163  }
164 
165  // prepare the MC matching
166  std::vector<edm::Handle<edm::Association<reco::GenParticleCollection> > >genMatches(genMatchTokens_.size());
167  if (addGenMatch_) {
168  for (size_t j = 0, nd = genMatchTokens_.size(); j < nd; ++j) {
169  iEvent.getByToken(genMatchTokens_[j], genMatches[j]);
170  }
171  }
172 
174  if (addGenJetMatch_) iEvent.getByToken(genJetMatchToken_, genJetMatch);
175 
176  // read in the jet correction factors ValueMap
177  std::vector<edm::ValueMap<TauJetCorrFactors> > tauJetCorrs;
178  if (addTauJetCorrFactors_) {
179  for ( size_t i = 0; i < tauJetCorrFactorsTokens_.size(); ++i ) {
181  iEvent.getByToken(tauJetCorrFactorsTokens_[i], tauJetCorr);
182  tauJetCorrs.push_back( *tauJetCorr );
183  }
184  }
185 
186  auto patTaus = std::make_unique<std::vector<Tau>>();
187 
188  bool first=true; // this is introduced to issue warnings only for the first tau-jet
189  for (size_t idx = 0, ntaus = anyTaus->size(); idx < ntaus; ++idx) {
190  edm::RefToBase<reco::BaseTau> tausRef = anyTaus->refAt(idx);
191  edm::Ptr<reco::BaseTau> tausPtr = anyTaus->ptrAt(idx);
192 
193  Tau aTau(tausRef);
194  if (embedLeadTrack_) aTau.embedLeadTrack();
195  if (embedSignalTracks_) aTau.embedSignalTracks();
196  if (embedIsolationTracks_) aTau.embedIsolationTracks();
197  if (embedLeadPFCand_) {
198  if (aTau.isPFTau() )
199  aTau.embedLeadPFCand();
200  else
201  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
202  }
204  if (aTau.isPFTau() )
205  aTau.embedLeadPFChargedHadrCand();
206  else
207  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
208  }
210  if (aTau.isPFTau() )
211  aTau.embedLeadPFNeutralCand();
212  else
213  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
214  }
215  if (embedSignalPFCands_) {
216  if (aTau.isPFTau() )
217  aTau.embedSignalPFCands();
218  else
219  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
220  }
222  if (aTau.isPFTau() )
223  aTau.embedSignalPFChargedHadrCands();
224  else
225  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
226  }
228  if (aTau.isPFTau() )
229  aTau.embedSignalPFNeutralHadrCands();
230  else
231  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
232  }
234  if (aTau.isPFTau() )
235  aTau.embedSignalPFGammaCands();
236  else
237  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
238  }
240  if (aTau.isPFTau() )
241  aTau.embedIsolationPFCands();
242  else
243  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
244  }
246  if (aTau.isPFTau() )
247  aTau.embedIsolationPFChargedHadrCands();
248  else
249  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
250  }
252  if (aTau.isPFTau() )
253  aTau.embedIsolationPFNeutralHadrCands();
254  else
255  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
256  }
258  if (aTau.isPFTau() )
259  aTau.embedIsolationPFGammaCands();
260  else
261  edm::LogWarning("Type Error") << "Embedding a PFTau-specific information into a pat::Tau which wasn't made from a reco::PFTau is impossible.\n";
262  }
263 
264  if (addTauJetCorrFactors_) {
265  // add additional JetCorrs to the jet
266  for ( unsigned int i=0; i<tauJetCorrs.size(); ++i ) {
267  const TauJetCorrFactors& tauJetCorr = tauJetCorrs[i][tausRef];
268  // uncomment for debugging
269  // tauJetCorr.print();
270  aTau.addJECFactors(tauJetCorr);
271  }
272  std::vector<std::string> levels = tauJetCorrs[0][tausRef].correctionLabels();
273  if(std::find(levels.begin(), levels.end(), "L2L3Residual")!=levels.end()){
274  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("L2L3Residual"));
275  }
276  else if(std::find(levels.begin(), levels.end(), "L3Absolute")!=levels.end()){
277  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("L3Absolute"));
278  }
279  else{
280  aTau.initializeJEC(tauJetCorrs[0][tausRef].jecLevel("Uncorrected"));
281  if(first){
282  edm::LogWarning("L3Absolute not found")
283  << "L2L3Residual and L3Absolute are not part of the correction applied jetCorrFactors \n"
284  << "of module " << tauJetCorrs[0][tausRef].jecSet() << " jets will remain"
285  << " uncorrected.";
286  first=false;
287  }
288  }
289  }
290 
291  // store the match to the generated final state muons
292  if (addGenMatch_) {
293  for(size_t i = 0, n = genMatches.size(); i < n; ++i) {
294  reco::GenParticleRef genTau = (*genMatches[i])[tausRef];
295  aTau.addGenParticleRef(genTau);
296  }
297  if (embedGenMatch_) aTau.embedGenParticle();
298  }
299 
300  // store the match to the visible part of the generated tau
301  if (addGenJetMatch_) {
302  reco::GenJetRef genJetTau = (*genJetMatch)[tausRef];
303  if (genJetTau.isNonnull() && genJetTau.isAvailable() ) {
304  aTau.setGenJet( genJetTau );
305  } // leave empty if no match found
306  }
307 
308  // prepare ID extraction
309  if ( addTauID_ ) {
310  std::string missingDiscriminators;
311  std::vector<pat::Tau::IdPair> ids(tauIDSrcs_.size());
312  for ( size_t i = 0; i < tauIDSrcs_.size(); ++i ) {
313  if ( typeid(*tausRef) == typeid(reco::PFTau) ) {
314  //std::cout << "filling PFTauDiscriminator '" << tauIDSrcs_[i].first << "' into pat::Tau object..." << std::endl;
315  edm::Handle<reco::PFTauCollection> pfTauCollection;
316  iEvent.getByToken(pfTauToken_, pfTauCollection);
317 
319  iEvent.getByToken(pfTauIDTokens_[i], pfTauIdDiscr);
320 
321  if(skipMissingTauID_ && !pfTauIdDiscr.isValid()){
322  if(!missingDiscriminators.empty()){
323  missingDiscriminators+=", ";
324  }
325  missingDiscriminators+=tauIDSrcs_[i].first;
326  continue;
327  }
328  ids[i].first = tauIDSrcs_[i].first;
329  ids[i].second = getTauIdDiscriminator(pfTauCollection, idx, pfTauIdDiscr);
330  } else if ( typeid(*tausRef) == typeid(reco::CaloTau) ) {
331  //std::cout << "filling CaloTauDiscriminator '" << tauIDSrcs_[i].first << "' into pat::Tau object..." << std::endl;
332  edm::Handle<reco::CaloTauCollection> caloTauCollection;
333  iEvent.getByToken(caloTauToken_, caloTauCollection);
334 
336  iEvent.getByToken(caloTauIDTokens_[i], caloTauIdDiscr);
337 
338  if(skipMissingTauID_ && !caloTauIdDiscr.isValid()){
339  if(!missingDiscriminators.empty()){
340  missingDiscriminators+=", ";
341  }
342  missingDiscriminators+=tauIDSrcs_[i].first;
343  continue;
344  }
345  ids[i].first = tauIDSrcs_[i].first;
346  ids[i].second = getTauIdDiscriminator(caloTauCollection, idx, caloTauIdDiscr);
347  } else {
348  throw cms::Exception("Type Mismatch") <<
349  "PATTauProducer: unsupported datatype '" << typeid(*tausRef).name() << "' for tauSource\n";
350  }
351  }
352  if(!missingDiscriminators.empty() && firstOccurence_){
353  edm::LogWarning("DataSource") << "The following tau discriminators have not been found in the event:\n"
354  << missingDiscriminators <<"\n"
355  << "They will not be embedded into the pat::Tau object.\n"
356  << "Note: this message will be printed only at first occurence.";
357  firstOccurence_=false;
358  }
359  aTau.setTauIDs(ids);
360  }
361 
362  // extraction of reconstructed tau decay mode
363  // (only available for PFTaus)
364  if ( aTau.isPFTau() ) {
366  iEvent.getByToken(pfTauToken_, pfTaus);
367  reco::PFTauRef pfTauRef(pfTaus, idx);
368 
369  aTau.setDecayMode(pfTauRef->decayMode());
370  }
371 
372  // extraction of variables needed to rerun MVA isolation and anti-electron discriminator on MiniAOD
373  if( aTau.isPFTau() ) {
375  iEvent.getByToken(pfTauToken_, pfTaus);
376  reco::PFTauRef pfTauRef(pfTaus, idx);
377  pat::tau::TauPFEssential& aTauPFEssential = aTau.pfEssential_[0];
378  float ecalEnergy = 0;
379  float hcalEnergy = 0;
380  float sumPhiTimesEnergy = 0.;
381  float sumEtaTimesEnergy = 0.;
382  float sumEnergy = 0.;
383  float leadChargedCandPt = -99;
384  float leadChargedCandEtaAtEcalEntrance = -99;
385  const std::vector<reco::PFCandidatePtr>& signalCands = pfTauRef->signalPFCands();
386  for(std::vector<reco::PFCandidatePtr>::const_iterator it = signalCands.begin(); it != signalCands.end(); ++it) {
387  const reco::PFCandidatePtr& icand = *it;
388  ecalEnergy += icand->ecalEnergy();
389  hcalEnergy += icand->hcalEnergy();
390  sumPhiTimesEnergy += icand->positionAtECALEntrance().phi()*icand->energy();
391  sumEtaTimesEnergy += icand->positionAtECALEntrance().eta()*icand->energy();
392  sumEnergy += icand->energy();
393  const reco::Track* track = nullptr;
394  if ( icand->trackRef().isNonnull() ) track = icand->trackRef().get();
395  else if ( icand->muonRef().isNonnull() && icand->muonRef()->innerTrack().isNonnull() ) track = icand->muonRef()->innerTrack().get();
396  else if ( icand->muonRef().isNonnull() && icand->muonRef()->globalTrack().isNonnull() ) track = icand->muonRef()->globalTrack().get();
397  else if ( icand->muonRef().isNonnull() && icand->muonRef()->outerTrack().isNonnull() ) track = icand->muonRef()->outerTrack().get();
398  else if ( icand->gsfTrackRef().isNonnull() ) track = icand->gsfTrackRef().get();
399  if( track ) {
400  if( track->pt() > leadChargedCandPt ) {
401  leadChargedCandEtaAtEcalEntrance = icand->positionAtECALEntrance().eta();
402  leadChargedCandPt = track->pt();
403  }
404  }
405  }
406  aTauPFEssential.ecalEnergy_ = ecalEnergy;
407  aTauPFEssential.hcalEnergy_ = hcalEnergy;
408  aTauPFEssential.ptLeadChargedCand_ = leadChargedCandPt;
409  aTauPFEssential.etaAtEcalEntranceLeadChargedCand_ = leadChargedCandEtaAtEcalEntrance;
410  if (sumEnergy != 0.) {
411  aTauPFEssential.phiAtEcalEntrance_ = sumPhiTimesEnergy/sumEnergy;
412  aTauPFEssential.etaAtEcalEntrance_ = sumEtaTimesEnergy/sumEnergy;
413  }
414  else {
415  aTauPFEssential.phiAtEcalEntrance_ = -99.;
416  aTauPFEssential.etaAtEcalEntrance_ = -99.;
417  }
418  float leadingTrackNormChi2 = 0;
419  float ecalEnergyLeadChargedHadrCand = -99.;
420  float hcalEnergyLeadChargedHadrCand = -99.;
421  float emFraction = -1.;
422  float myHCALenergy = 0.;
423  float myECALenergy = 0.;
424  const reco::PFCandidatePtr& leadingPFCharged = pfTauRef->leadPFChargedHadrCand();
425  if(leadingPFCharged.isNonnull()) {
426  ecalEnergyLeadChargedHadrCand = leadingPFCharged->ecalEnergy();
427  hcalEnergyLeadChargedHadrCand = leadingPFCharged->hcalEnergy();
428  reco::TrackRef trackRef = leadingPFCharged->trackRef();
429  if( trackRef.isNonnull() ) {
430  leadingTrackNormChi2 = trackRef->normalizedChi2();
431  for( std::vector<reco::PFCandidatePtr>::const_iterator tauIt = pfTauRef->isolationPFCands().begin(); tauIt!=pfTauRef->isolationPFCands().end(); ++tauIt ){
432  myHCALenergy += (*tauIt)->hcalEnergy();
433  myECALenergy += (*tauIt)->ecalEnergy();
434  }
435  for( std::vector<reco::PFCandidatePtr>::const_iterator tauIt = pfTauRef->signalPFCands().begin(); tauIt!=pfTauRef->signalPFCands().end(); ++tauIt ){
436  myHCALenergy += (*tauIt)->hcalEnergy();
437  myECALenergy += (*tauIt)->ecalEnergy();
438  }
439  if( myHCALenergy + myECALenergy != 0. ) {
440  emFraction = myECALenergy/( myHCALenergy + myECALenergy);
441  }
442  }
443  }
444  aTauPFEssential.emFraction_ = emFraction;
445  aTauPFEssential.leadingTrackNormChi2_ = leadingTrackNormChi2;
446  aTauPFEssential.ecalEnergyLeadChargedHadrCand_ = ecalEnergyLeadChargedHadrCand;
447  aTauPFEssential.hcalEnergyLeadChargedHadrCand_ = hcalEnergyLeadChargedHadrCand;
448  // extraction of tau lifetime information
450  edm::Handle<PFTauTIPAssociationByRef> tauLifetimeInfos;
451  iEvent.getByToken(tauTransverseImpactParameterToken_, tauLifetimeInfos);
452  const reco::PFTauTransverseImpactParameter& tauLifetimeInfo = *(*tauLifetimeInfos)[pfTauRef];
453  pat::tau::TauPFEssential& aTauPFEssential = aTau.pfEssential_[0];
454  aTauPFEssential.dxy_PCA_ = tauLifetimeInfo.dxy_PCA();
455  aTauPFEssential.dxy_ = tauLifetimeInfo.dxy();
456  aTauPFEssential.dxy_error_ = tauLifetimeInfo.dxy_error();
457  aTauPFEssential.hasSV_ = tauLifetimeInfo.hasSecondaryVertex();
458  aTauPFEssential.flightLength_ = tauLifetimeInfo.flightLength();
459  aTauPFEssential.flightLengthSig_ = tauLifetimeInfo.flightLengthSig();
460  aTauPFEssential.ip3d_ = tauLifetimeInfo.ip3d();
461  aTauPFEssential.ip3d_error_ = tauLifetimeInfo.ip3d_error();
462  }
463  }
464 
465  // Isolation
466  if (isolator_.enabled()) {
468  typedef pat::helper::MultiIsolator::IsolationValuePairs IsolationValuePairs;
469  // better to loop backwards, so the vector is resized less times
470  for ( IsolationValuePairs::const_reverse_iterator it = isolatorTmpStorage_.rbegin(),
471  ed = isolatorTmpStorage_.rend(); it != ed; ++it) {
472  aTau.setIsolation(it->first, it->second);
473  }
474  }
475 
476  for (size_t j = 0, nd = deposits.size(); j < nd; ++j) {
477  aTau.setIsoDeposit(isoDepositLabels_[j].first, (*deposits[j])[tausRef]);
478  }
479 
480  if (efficiencyLoader_.enabled()) {
481  efficiencyLoader_.setEfficiencies( aTau, tausRef );
482  }
483 
484  if (resolutionLoader_.enabled()) {
486  }
487 
488  if ( useUserData_ ) {
489  userDataHelper_.add( aTau, iEvent, iSetup );
490  }
491 
492  patTaus->push_back(aTau);
493  }
494 
495  // sort taus in pT
496  std::sort(patTaus->begin(), patTaus->end(), pTTauComparator_);
497 
498  // put genEvt object in Event
499  iEvent.put(std::move(patTaus));
500 
501  // clean up
503 }
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
bool isAvailable() const
Definition: Ref.h:577
void newEvent(const edm::Event &event)
To be called for each new event, reads in the ValueMaps for efficiencies.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:136
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:253
std::vector< edm::EDGetTokenT< edm::ValueMap< IsoDeposit > > > isoDepositTokens_
pat::helper::MultiIsolator::IsolationValuePairs isolatorTmpStorage_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:519
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:159
pat::helper::EfficiencyLoader efficiencyLoader_
pat::helper::KinResolutionsLoader resolutionLoader_
float getTauIdDiscriminator(const edm::Handle< TauCollectionType > &, size_t, const edm::Handle< TauDiscrType > &)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
void setResolutions(pat::PATObject< T > &obj) const
Sets the efficiencies for this object, using the reference to the original objects.
bool isRealData() const
Definition: EventBase.h:64
bool enabled() const
&#39;true&#39; if this there is at least one efficiency configured
bool embedIsolationPFChargedHadrCands_
bool enabled() const
True if it has a non null configuration.
Definition: MultiIsolator.h:50
void beginEvent(const edm::Event &event, const edm::EventSetup &eventSetup)
edm::EDGetTokenT< PFTauTIPAssociationByRef > tauTransverseImpactParameterToken_
pat::helper::MultiIsolator isolator_
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_
double pt() const
track transverse momentum
Definition: TrackBase.h:621
edm::EDGetTokenT< reco::CaloTauCollection > caloTauToken_
pat::PATUserDataHelper< pat::Tau > userDataHelper_
genJetMatch
switch on/off embedding of matched genJet&#39;s
bool embedSignalPFNeutralHadrCands_
bool isValid() const
Definition: HandleBase.h:74
bool isNonnull() const
Checks for non-null.
Definition: Ptr.h:168
Definition: Tau.py:1
std::vector< edm::EDGetTokenT< reco::CaloTauDiscriminator > > caloTauIDTokens_
std::vector< edm::EDGetTokenT< edm::ValueMap< TauJetCorrFactors > > > tauJetCorrFactorsTokens_
edm::InputTag tauTransverseImpactParameterSrc_
std::vector< edm::EDGetTokenT< edm::Association< reco::GenParticleCollection > > > genMatchTokens_
void setEfficiencies(pat::PATObject< T > &obj, const R &originalRef) const
Sets the efficiencies for this object, using the reference to the original objects.
edm::EDGetTokenT< edm::Association< reco::GenJetCollection > > genJetMatchToken_
std::string const & label() const
Definition: InputTag.h:36
std::vector< std::pair< pat::IsolationKeys, float > > IsolationValuePairs
Definition: MultiIsolator.h:16
std::vector< std::pair< pat::IsolationKeys, edm::InputTag > > isoDepositLabels_
bool embedSignalPFChargedHadrCands_
std::vector< edm::EDGetTokenT< reco::PFTauDiscriminator > > pfTauIDTokens_
std::vector< NameTag > tauIDSrcs_
edm::EDGetTokenT< reco::PFTauCollection > pfTauToken_
def move(src, dest)
Definition: eostools.py:510
GreaterByPt< Tau > pTTauComparator_
void fill(const edm::View< T > &coll, int idx, IsolationValuePairs &isolations) const
Definition: MultiIsolator.h:82

Member Data Documentation

bool pat::PATTauProducer::addEfficiencies_
private

Definition at line 106 of file PATTauProducer.h.

Referenced by PATTauProducer().

bool pat::PATTauProducer::addGenJetMatch_
private

Definition at line 85 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::addGenMatch_
private

Definition at line 81 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::addResolutions_
private

Definition at line 109 of file PATTauProducer.h.

Referenced by PATTauProducer().

bool pat::PATTauProducer::addTauID_
private

Definition at line 92 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::addTauJetCorrFactors_
private

Definition at line 89 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 61 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

std::vector<edm::EDGetTokenT<reco::CaloTauDiscriminator> > pat::PATTauProducer::caloTauIDTokens_
private

Definition at line 95 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

edm::EDGetTokenT<reco::CaloTauCollection> pat::PATTauProducer::caloTauToken_
private

Definition at line 64 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 107 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedGenJetMatch_
private

Definition at line 86 of file PATTauProducer.h.

Referenced by PATTauProducer().

bool pat::PATTauProducer::embedGenMatch_
private

Definition at line 82 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedIsolationPFCands_
private

Definition at line 76 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedIsolationPFChargedHadrCands_
private

Definition at line 77 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedIsolationPFGammaCands_
private

Definition at line 79 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedIsolationPFNeutralHadrCands_
private

Definition at line 78 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedIsolationTracks_
private

Definition at line 66 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedLeadPFCand_
private

Definition at line 69 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedLeadPFChargedHadrCand_
private

Definition at line 70 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedLeadPFNeutralCand_
private

Definition at line 71 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedLeadTrack_
private

Definition at line 67 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedSignalPFCands_
private

Definition at line 72 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedSignalPFChargedHadrCands_
private

Definition at line 73 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedSignalPFGammaCands_
private

Definition at line 75 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedSignalPFNeutralHadrCands_
private

Definition at line 74 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::embedSignalTracks_
private

Definition at line 68 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::firstOccurence_
private

Definition at line 58 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 87 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

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

Definition at line 103 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 104 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 101 of file PATTauProducer.h.

Referenced by produce().

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

Definition at line 102 of file PATTauProducer.h.

Referenced by produce().

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

Definition at line 96 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 63 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 99 of file PATTauProducer.h.

Referenced by produce().

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

Definition at line 110 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::skipMissingTauID_
private

Definition at line 97 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 94 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 90 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 65 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 62 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

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

Definition at line 113 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().

bool pat::PATTauProducer::useUserData_
private

Definition at line 112 of file PATTauProducer.h.

Referenced by PATTauProducer(), and produce().