CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
PFRecoTauDiscriminationByIsolationContainer Class Reference
Inheritance diagram for PFRecoTauDiscriminationByIsolationContainer:
TauDiscriminationProducerBase< TauType, TauDiscriminator, TauDiscriminatorDataType, ConsumeType > edm::stream::EDProducer<>

Classes

struct  FootprintCorrection
 

Public Types

enum  StoredRawType {
  None, SumPt, PUsumPt, Occupancy,
  FootPrintCorrection, PhotonSumPt
}
 
- Public Types inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator, TauDiscriminatorDataType, ConsumeType >
typedef std::vector< TauType > TauCollection
 
typedef edm::Ref< TauCollectionTauRef
 
typedef edm::RefProd< TauCollectionTauRefProd
 
- 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
 

Public Member Functions

void beginEvent (const edm::Event &evt, const edm::EventSetup &evtSetup) override
 
reco::SingleTauDiscriminatorContainer discriminate (const PFTauRef &pfTau) const override
 
 PFRecoTauDiscriminationByIsolationContainer (const edm::ParameterSet &pset)
 
double weightedSum (const std::vector< CandidatePtr > &inColl_, double eta, double phi) const
 
 ~PFRecoTauDiscriminationByIsolationContainer () override
 
- Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator, TauDiscriminatorDataType, ConsumeType >
virtual TauDiscriminatorDataType discriminate (const TauRef &tau) const =0
 
virtual void endEvent (edm::Event &)
 
void produce (edm::Event &, const edm::EventSetup &) override
 
 TauDiscriminationProducerBase ()
 
 TauDiscriminationProducerBase (const edm::ParameterSet &iConfig)
 
 ~TauDiscriminationProducerBase () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator, TauDiscriminatorDataType, ConsumeType >
static void fillProducerDescriptions (edm::ParameterSetDescription &desc)
 
static std::string getTauTypeString ()
 helper method to retrieve tau type name, e.g. to build correct cfi getter More...
 

Private Attributes

std::vector< bool > applyDeltaBetaCorrection_
 
bool applyFootprintCorrection_
 
bool applyRhoCorrection_
 
std::vector< bool > calculateWeights_
 
std::vector< reco::CandidatePtrchargedPFCandidatesInEvent_
 
double customIsoCone_
 
double deltaBetaCollectionCone_
 
double deltaBetaFactorThisEvent_
 
std::unique_ptr< TFormula > deltaBetaFormula_
 
bool deltaBetaNeeded_
 
std::vector< std::unique_ptr< FootprintCorrection > > footprintCorrections_
 
bool gammasNeeded_
 
std::vector< bool > includeGammas_
 
std::vector< bool > includeTracks_
 
std::vector< std::vector< double > > maxAbsValue_
 
std::vector< std::vector< double > > maxRelValue_
 
double minPtForNoIso_
 
std::string moduleLabel_
 
std::vector< std::vector< double > > offsetRelValue_
 
edm::EDGetTokenT< edm::View< reco::Candidate > > pfCand_token
 
edm::InputTag pfCandSrc_
 
std::unique_ptr< tau::RecoTauQualityCutspileupQcutsGeneralQCuts_
 
std::unique_ptr< tau::RecoTauQualityCutspileupQcutsPUTrackSelection_
 
std::unique_ptr< tau::RecoTauQualityCutsqcuts_
 
edm::ParameterSet qualityCutsPSet_
 
std::vector< std::vector< int > > rawValue_reference_
 
edm::EDGetTokenT< double > rho_token
 
double rhoConeSize_
 
double rhoCorrectionThisEvent_
 
edm::InputTag rhoProducer_
 
double rhoThisEvent_
 
double rhoUEOffsetCorrection_
 
std::vector< StoredRawTypestoreRawValue_
 
bool tracksNeeded_
 
std::vector< bool > useAllPFCandsForWeights_
 
int verbosity_
 
edm::EDGetTokenT< reco::VertexCollectionvertex_token
 
std::unique_ptr< tau::RecoTauVertexAssociatorvertexAssociator_
 
edm::InputTag vertexSrc_
 
double weightGammas_
 
bool weightsNeeded_
 

Additional Inherited Members

- Protected Attributes inherited from TauDiscriminationProducerBase< TauType, TauDiscriminator, TauDiscriminatorDataType, ConsumeType >
std::string moduleLabel_
 
double prediscriminantFailValue_
 
edm::EDGetTokenT< TauCollectionTau_token
 
size_t tauIndex_
 
edm::InputTag TauProducer_
 

Detailed Description

Definition at line 28 of file PFRecoTauDiscriminationByIsolationContainer.cc.

Member Enumeration Documentation

◆ StoredRawType

Enumerator
None 
SumPt 
PUsumPt 
Occupancy 
FootPrintCorrection 
PhotonSumPt 

Definition at line 30 of file PFRecoTauDiscriminationByIsolationContainer.cc.

Constructor & Destructor Documentation

◆ PFRecoTauDiscriminationByIsolationContainer()

PFRecoTauDiscriminationByIsolationContainer::PFRecoTauDiscriminationByIsolationContainer ( const edm::ParameterSet pset)
inlineexplicit

Definition at line 31 of file PFRecoTauDiscriminationByIsolationContainer.cc.

33  moduleLabel_(pset.getParameter<std::string>("@module_label")),
34  qualityCutsPSet_(pset.getParameter<edm::ParameterSet>("qualityCuts")) {
35  // RIC: multiply neutral isolation by a flat factor.
36  // Useful, for instance, to combine charged and neutral isolations
37  // with different relative weights
38  weightGammas_ = pset.getParameter<double>("WeightECALIsolation");
39 
40  // RIC: allow to relax the isolation completely beyond a given tau pt
41  minPtForNoIso_ = pset.getParameter<double>("minTauPtForNoIso");
42 
43  // Get configs for raw values
44  bool storeRawFootprintCorrection = false;
45  deltaBetaNeeded_ = false;
46  weightsNeeded_ = false;
47  tracksNeeded_ = false;
48  gammasNeeded_ = false;
49  storeRawValue_.clear();
50  auto const& rawDefs = pset.getParameter<std::vector<edm::ParameterSet>>("IDdefinitions");
51  std::vector<std::string> idnames;
52  for (auto const& rawDefsEntry : rawDefs) {
53  idnames.push_back(rawDefsEntry.getParameter<std::string>("IDname"));
54  // Can only store one type
55  int numStoreOptions = 0;
56  if (rawDefsEntry.getParameter<bool>("storeRawSumPt")) {
57  storeRawValue_.push_back(SumPt);
58  ++numStoreOptions;
59  }
60  if (rawDefsEntry.getParameter<bool>("storeRawOccupancy")) {
61  storeRawValue_.push_back(Occupancy);
62  ++numStoreOptions;
63  }
64  if (rawDefsEntry.getParameter<bool>("storeRawPUsumPt")) {
65  storeRawValue_.push_back(PUsumPt);
66  ++numStoreOptions;
67  }
68  if (rawDefsEntry.getParameter<bool>("storeRawFootprintCorrection")) {
71  ++numStoreOptions;
72  }
73  if (rawDefsEntry.getParameter<bool>("storeRawPhotonSumPt_outsideSignalCone")) {
74  storeRawValue_.push_back(PhotonSumPt);
75  ++numStoreOptions;
76  }
77  if (numStoreOptions != 1) {
78  throw cms::Exception("BadIsoConfig")
79  << "Multiple or none of 'store sum pt' and/or 'store occupancy' options are set."
80  << " These options are mutually exclusive.";
81  }
82 
83  includeGammas_.push_back(rawDefsEntry.getParameter<bool>("ApplyDiscriminationByECALIsolation"));
84  if (includeGammas_.back())
85  gammasNeeded_ = true;
86  calculateWeights_.push_back(rawDefsEntry.getParameter<bool>("ApplyDiscriminationByWeightedECALIsolation"));
87  if (calculateWeights_.back())
88  weightsNeeded_ = true;
89  includeTracks_.push_back(rawDefsEntry.getParameter<bool>("ApplyDiscriminationByTrackerIsolation"));
90  if (includeTracks_.back())
91  tracksNeeded_ = true;
92  applyDeltaBetaCorrection_.push_back(rawDefsEntry.getParameter<bool>("applyDeltaBetaCorrection"));
93  if (applyDeltaBetaCorrection_.back())
94  deltaBetaNeeded_ = true;
95  useAllPFCandsForWeights_.push_back(rawDefsEntry.getParameter<bool>("UseAllPFCandsForWeights"));
96 
97  // sanity check2 - can't use weighted and unweighted iso at the same time
98  if (includeGammas_.back() && calculateWeights_.back()) {
99  throw cms::Exception("BadIsoConfig")
100  << "Both 'ApplyDiscriminationByECALIsolation' and 'ApplyDiscriminationByWeightedECALIsolation' "
101  << "have been set to true. These options are mutually exclusive.";
102  }
103  }
104 
105  // Get configs for WPs - negative cut values are used to switch of the condition
106  std::vector<edm::ParameterSet> wpDefs = pset.getParameter<std::vector<edm::ParameterSet>>("IDWPdefinitions");
107  for (std::vector<edm::ParameterSet>::iterator wpDefsEntry = wpDefs.begin(); wpDefsEntry != wpDefs.end();
108  ++wpDefsEntry) {
109  maxAbsValue_.push_back(wpDefsEntry->getParameter<std::vector<double>>("maximumAbsoluteValues"));
110  maxRelValue_.push_back(wpDefsEntry->getParameter<std::vector<double>>("maximumRelativeValues"));
111  offsetRelValue_.push_back(wpDefsEntry->getParameter<std::vector<double>>("relativeValueOffsets"));
112  auto refRawIDNames = wpDefsEntry->getParameter<std::vector<std::string>>("referenceRawIDNames");
113  if (!maxAbsValue_.back().empty() && maxAbsValue_.back().size() != refRawIDNames.size())
114  throw cms::Exception("BadIsoConfig")
115  << "WP configuration: Length of 'maximumAbsoluteValues' does not match length of 'referenceRawIDNames'!";
116  if (!maxRelValue_.back().empty() && maxRelValue_.back().size() != refRawIDNames.size())
117  throw cms::Exception("BadIsoConfig")
118  << "WP configuration: Length of 'maximumRelativeValues' does not match length of 'referenceRawIDNames'!";
119  if (!offsetRelValue_.back().empty() && offsetRelValue_.back().size() != refRawIDNames.size())
120  throw cms::Exception("BadIsoConfig")
121  << "WP configuration: Length of 'relativeValueOffsets' does not match length of 'referenceRawIDNames'!";
122  else if (offsetRelValue_.back().empty())
123  offsetRelValue_.back().assign(refRawIDNames.size(), 0.0);
124  rawValue_reference_.push_back(std::vector<int>(refRawIDNames.size()));
125  for (size_t i = 0; i < refRawIDNames.size(); i++) {
126  bool found = false;
127  for (size_t j = 0; j < idnames.size(); j++) {
128  if (refRawIDNames[i] == idnames[j]) {
129  rawValue_reference_.back()[i] = j;
130  found = true;
131  break;
132  }
133  }
134  if (!found)
135  throw cms::Exception("BadIsoConfig")
136  << "WP configuration: Requested raw ID '" << refRawIDNames[i] << "' not defined!";
137  }
138  }
139 
140  customIsoCone_ = pset.getParameter<double>("customOuterCone");
141 
142  applyFootprintCorrection_ = pset.getParameter<bool>("applyFootprintCorrection");
144  edm::VParameterSet cfgFootprintCorrections = pset.getParameter<edm::VParameterSet>("footprintCorrections");
145  for (edm::VParameterSet::const_iterator cfgFootprintCorrection = cfgFootprintCorrections.begin();
146  cfgFootprintCorrection != cfgFootprintCorrections.end();
147  ++cfgFootprintCorrection) {
148  std::string selection = cfgFootprintCorrection->getParameter<std::string>("selection");
149  std::string offset = cfgFootprintCorrection->getParameter<std::string>("offset");
150  std::unique_ptr<FootprintCorrection> footprintCorrection(new FootprintCorrection(selection, offset));
151  footprintCorrections_.push_back(std::move(footprintCorrection));
152  }
153  }
154 
155  // Get the quality cuts specific to the isolation region
156  edm::ParameterSet isolationQCuts = qualityCutsPSet_.getParameterSet("isolationQualityCuts");
157 
158  qcuts_.reset(new tau::RecoTauQualityCuts(isolationQCuts));
159 
160  vertexAssociator_.reset(new tau::RecoTauVertexAssociator(qualityCutsPSet_, consumesCollector()));
161 
163  // Factorize the isolation QCuts into those that are used to
164  // select PU and those that are not.
165  std::pair<edm::ParameterSet, edm::ParameterSet> puFactorizedIsoQCuts =
166  reco::tau::factorizePUQCuts(isolationQCuts);
167 
168  // Determine the pt threshold for the PU tracks
169  // First check if the user specifies explicitly the cut.
170  // For that the user has to provide a >= 0 value for the PtCutOverride.
171  bool deltaBetaPUTrackPtCutOverride = pset.getParameter<bool>("deltaBetaPUTrackPtCutOverride");
173  double deltaBetaPUTrackPtCutOverride_val = pset.getParameter<double>("deltaBetaPUTrackPtCutOverride_val");
174  puFactorizedIsoQCuts.second.addParameter<double>("minTrackPt", deltaBetaPUTrackPtCutOverride_val);
175  } else {
176  // Secondly take it from the minGammaEt
177  puFactorizedIsoQCuts.second.addParameter<double>("minTrackPt",
178  isolationQCuts.getParameter<double>("minGammaEt"));
179  }
180 
181  pileupQcutsPUTrackSelection_.reset(new tau::RecoTauQualityCuts(puFactorizedIsoQCuts.first));
182 
183  pileupQcutsGeneralQCuts_.reset(new tau::RecoTauQualityCuts(puFactorizedIsoQCuts.second));
184 
185  pfCandSrc_ = pset.getParameter<edm::InputTag>("particleFlowSrc");
186  pfCand_token = consumes<edm::View<reco::Candidate>>(pfCandSrc_);
187  vertexSrc_ = pset.getParameter<edm::InputTag>("vertexSrc");
188  vertex_token = consumes<reco::VertexCollection>(vertexSrc_);
189  deltaBetaCollectionCone_ = pset.getParameter<double>("isoConeSizeForDeltaBeta");
190  std::string deltaBetaFactorFormula = pset.getParameter<string>("deltaBetaFactor");
191  deltaBetaFormula_.reset(new TFormula("DB_corr", deltaBetaFactorFormula.c_str()));
192  }
193 
194  applyRhoCorrection_ = pset.getParameter<bool>("applyRhoCorrection");
195  if (applyRhoCorrection_) {
196  rhoProducer_ = pset.getParameter<edm::InputTag>("rhoProducer");
197  rho_token = consumes<double>(rhoProducer_);
198  rhoConeSize_ = pset.getParameter<double>("rhoConeSize");
199  rhoUEOffsetCorrection_ = pset.getParameter<double>("rhoUEOffsetCorrection");
200  }
201 
202  verbosity_ = pset.getParameter<int>("verbosity");
203  }

References HLT_2018_cff::deltaBetaPUTrackPtCutOverride, HLT_2018_cff::deltaBetaPUTrackPtCutOverride_val, Exception, reco::tau::factorizePUQCuts(), newFWLiteAna::found, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterSet(), mps_fire::i, dqmiolumiharvest::j, eostools::move(), IntegrityClient_cfi::Occupancy, hltrates_dqm_sourceclient-live_cfg::offset, muonDTDigis_cfi::pset, corrVsCorr::selection, HLT_2018_cff::storeRawFootprintCorrection, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~PFRecoTauDiscriminationByIsolationContainer()

PFRecoTauDiscriminationByIsolationContainer::~PFRecoTauDiscriminationByIsolationContainer ( )
inlineoverride

Definition at line 205 of file PFRecoTauDiscriminationByIsolationContainer.cc.

205 {}

Member Function Documentation

◆ beginEvent()

void PFRecoTauDiscriminationByIsolationContainer::beginEvent ( const edm::Event evt,
const edm::EventSetup evtSetup 
)
overridevirtual

Reimplemented from TauDiscriminationProducerBase< TauType, TauDiscriminator, TauDiscriminatorDataType, ConsumeType >.

Definition at line 296 of file PFRecoTauDiscriminationByIsolationContainer.cc.

297  {
298  // NB: The use of the PV in this context is necessitated by its use in
299  // applying quality cuts to the different objects in the isolation cone
300  // The vertex associator contains the logic to select the appropriate vertex
301  // We need to pass it the event so it can load the vertices.
302  vertexAssociator_->setEvent(event);
303 
304  // If we are applying the delta beta correction, we need to get the PF
305  // candidates from the event so we can find the PU tracks.
307  // Collect all the PF pile up tracks
309  event.getByToken(pfCand_token, pfCandidates);
311  chargedPFCandidatesInEvent_.reserve(pfCandidates->size());
312  size_t numPFCandidates = pfCandidates->size();
313  for (size_t i = 0; i < numPFCandidates; ++i) {
314  reco::CandidatePtr pfCandidate(pfCandidates, i);
315  if (pfCandidate->charge() != 0) {
316  chargedPFCandidatesInEvent_.push_back(pfCandidate);
317  }
318  }
319  // Count all the vertices in the event, to parameterize the DB
320  // correction factor
322  event.getByToken(vertex_token, vertices);
323  size_t nVtxThisEvent = vertices->size();
324  deltaBetaFactorThisEvent_ = deltaBetaFormula_->Eval(nVtxThisEvent);
325  }
326 
327  if (applyRhoCorrection_) {
328  edm::Handle<double> rhoHandle_;
329  event.getByToken(rho_token, rhoHandle_);
330  rhoThisEvent_ = (*rhoHandle_ - rhoUEOffsetCorrection_) * (3.14159) * rhoConeSize_ * rhoConeSize_;
331  }
332 }

References reco::Candidate::charge(), mps_fire::i, zmumugammaAnalyzer_cfi::pfCandidates, and pwdgSkimBPark_cfi::vertices.

◆ discriminate()

reco::SingleTauDiscriminatorContainer PFRecoTauDiscriminationByIsolationContainer::discriminate ( const PFTauRef pfTau) const
override

Definition at line 334 of file PFRecoTauDiscriminationByIsolationContainer.cc.

335  {
336  LogDebug("discriminate") << " tau: Pt = " << pfTau->pt() << ", eta = " << pfTau->eta() << ", phi = " << pfTau->phi();
337  LogDebug("discriminate") << *pfTau;
338 
339  // collect the objects we are working with (ie tracks, tracks+gammas, etc)
340  std::vector<CandidatePtr> isoCharged_;
341  std::vector<CandidatePtr> isoNeutral_;
342  std::vector<CandidatePtr> isoPU_;
343  std::vector<CandidatePtr> isoPUall_;
344  CandidateCollection isoNeutralWeight_;
345  CandidateCollection isoNeutralWeight_UseAllPFCands_;
346  std::vector<CandidatePtr> chPV_;
347  std::vector<CandidatePtr> chPVall_;
348  isoCharged_.reserve(pfTau->isolationChargedHadrCands().size());
349  isoNeutral_.reserve(pfTau->isolationGammaCands().size());
350  isoPU_.reserve(std::min(100UL, chargedPFCandidatesInEvent_.size()));
351  isoPUall_.reserve(std::min(100UL, chargedPFCandidatesInEvent_.size()));
352  isoNeutralWeight_.reserve(pfTau->isolationGammaCands().size());
353  isoNeutralWeight_UseAllPFCands_.reserve(pfTau->isolationGammaCands().size());
354 
355  chPV_.reserve(std::min(50UL, chargedPFCandidatesInEvent_.size()));
356  chPVall_.reserve(std::min(50UL, chargedPFCandidatesInEvent_.size()));
357 
358  // Get the primary vertex associated to this tau
359  reco::VertexRef pv = vertexAssociator_->associatedVertex(*pfTau);
360  // Let the quality cuts know which the vertex to use when applying selections
361  // on dz, etc.
362  if (verbosity_) {
363  if (pv.isNonnull()) {
364  LogTrace("discriminate") << "pv: x = " << pv->position().x() << ", y = " << pv->position().y()
365  << ", z = " << pv->position().z();
366  } else {
367  LogTrace("discriminate") << "pv: N/A";
368  }
369  if (pfTau->leadChargedHadrCand().isNonnull()) {
370  LogTrace("discriminate") << "leadPFChargedHadron:"
371  << " Pt = " << pfTau->leadChargedHadrCand()->pt() << ","
372  << " eta = " << pfTau->leadChargedHadrCand()->eta() << ","
373  << " phi = " << pfTau->leadChargedHadrCand()->phi();
374  } else {
375  LogTrace("discriminate") << "leadPFChargedHadron: N/A";
376  }
377  }
378 
379  // CV: isolation is not well defined in case primary vertex or leading charged hadron do not exist
380  if (!(pv.isNonnull() && pfTau->leadChargedHadrCand().isNonnull()))
381  return 0.;
382 
383  qcuts_->setPV(pv);
384  qcuts_->setLeadTrack(*pfTau->leadChargedHadrCand());
385 
388  pileupQcutsGeneralQCuts_->setLeadTrack(*pfTau->leadChargedHadrCand());
390  pileupQcutsPUTrackSelection_->setLeadTrack(*pfTau->leadChargedHadrCand());
391  }
392 
393  // Load the tracks if they are being used.
394  if (tracksNeeded_) {
395  for (auto const& cand : pfTau->isolationChargedHadrCands()) {
396  if (qcuts_->filterCandRef(cand)) {
397  LogTrace("discriminate") << "adding charged iso cand with pt " << cand->pt();
398  isoCharged_.push_back(cand);
399  }
400  }
401  }
402  if (gammasNeeded_ || weightsNeeded_) {
403  for (auto const& cand : pfTau->isolationGammaCands()) {
404  if (qcuts_->filterCandRef(cand)) {
405  LogTrace("discriminate") << "adding neutral iso cand with pt " << cand->pt();
406  isoNeutral_.push_back(cand);
407  }
408  }
409  }
410 
413 
414  // If desired, get PU tracks.
416  // First select by inverted the DZ/track weight cuts. True = invert
417  if (verbosity_) {
418  std::cout << "Initial PFCands: " << chargedPFCandidatesInEvent_.size() << std::endl;
419  }
420 
421  std::vector<CandidatePtr> allPU = pileupQcutsPUTrackSelection_->filterCandRefs(chargedPFCandidatesInEvent_, true);
422 
423  std::vector<CandidatePtr> allNPU = pileupQcutsPUTrackSelection_->filterCandRefs(chargedPFCandidatesInEvent_);
424  LogTrace("discriminate") << "After track cuts: " << allPU.size();
425 
426  // Now apply the rest of the cuts, like pt, and TIP, tracker hits, etc
427  std::vector<CandidatePtr> cleanPU = pileupQcutsGeneralQCuts_->filterCandRefs(allPU);
428 
429  std::vector<CandidatePtr> cleanNPU = pileupQcutsGeneralQCuts_->filterCandRefs(allNPU);
430 
431  LogTrace("discriminate") << "After cleaning cuts: " << cleanPU.size();
432 
433  // Only select PU tracks inside the isolation cone.
434  DRFilter deltaBetaFilter(pfTau->p4(), 0, deltaBetaCollectionCone_);
435  for (auto const& cand : cleanPU) {
436  if (deltaBetaFilter(cand))
437  isoPU_.push_back(cand);
438  }
439 
440  for (auto const& cand : cleanNPU) {
441  if (deltaBetaFilter(cand))
442  chPV_.push_back(cand);
443  }
444  LogTrace("discriminate") << "After cone cuts: " << isoPU_.size() << " " << chPV_.size();
445  isoPUall_ = std::move(allPU);
446  chPVall_ = std::move(allNPU);
447  }
448 
449  if (weightsNeeded_) {
450  for (auto const& isoObject : isoNeutral_) {
451  if (isoObject->charge() != 0) {
452  // weight only neutral objects
453  isoNeutralWeight_.push_back(*isoObject);
454  isoNeutralWeight_UseAllPFCands_.push_back(*isoObject);
455  continue;
456  }
457 
458  double eta = isoObject->eta();
459  double phi = isoObject->phi();
460  {
461  double sumNPU = 0.5 * log(weightedSum(chPV_, eta, phi));
462 
463  double sumPU = 0.5 * log(weightedSum(isoPU_, eta, phi));
464  LeafCandidate neutral(*isoObject);
465  if ((sumNPU + sumPU) > 0)
466  neutral.setP4(((sumNPU) / (sumNPU + sumPU)) * neutral.p4());
467 
468  isoNeutralWeight_.push_back(neutral);
469  }
470  {
471  double sumNPU = 0.5 * log(weightedSum(chPVall_, eta, phi));
472 
473  double sumPU = 0.5 * log(weightedSum(isoPUall_, eta, phi));
474  LeafCandidate neutral(*isoObject);
475  if ((sumNPU + sumPU) > 0)
476  neutral.setP4(((sumNPU) / (sumNPU + sumPU)) * neutral.p4());
477 
478  isoNeutralWeight_UseAllPFCands_.push_back(neutral);
479  }
480  }
481  }
482 
483  // Check if we want a custom iso cone
484  if (customIsoCone_ >= 0.) {
485  DRFilter filter(pfTau->p4(), 0, customIsoCone_);
486  DRFilter2 filter2(pfTau->p4(), 0, customIsoCone_);
487  std::vector<CandidatePtr> isoCharged_filter;
488  std::vector<CandidatePtr> isoNeutral_filter;
489  // Remove all the objects not in our iso cone
490  for (auto const& isoObject : isoCharged_) {
491  if (filter(isoObject))
492  isoCharged_filter.push_back(isoObject);
493  }
494  isoCharged_ = isoCharged_filter;
495  for (auto const& isoObject : isoNeutral_) {
496  if (filter(isoObject))
497  isoNeutral_filter.push_back(isoObject);
498  }
499  isoNeutral_ = isoNeutral_filter;
500  {
501  CandidateCollection isoNeutralWeight_filter;
502  for (auto const& isoObject : isoNeutralWeight_) {
503  if (filter2(isoObject))
504  isoNeutralWeight_filter.push_back(isoObject);
505  }
506  isoNeutralWeight_ = isoNeutralWeight_filter;
507  }
508  {
509  CandidateCollection isoNeutralWeight_filter;
510  for (auto const& isoObject : isoNeutralWeight_UseAllPFCands_) {
511  if (filter2(isoObject))
512  isoNeutralWeight_filter.push_back(isoObject);
513  }
514  isoNeutralWeight_UseAllPFCands_ = isoNeutralWeight_filter;
515  }
516  }
517 
518  //Now all needed incredients are ready. Loop over all ID configurations and produce output
520  for (size_t i = 0; i < includeGammas_.size(); i++) {
521  //--- nObjects requirement
522  int neutrals = isoNeutral_.size();
523 
524  if (applyDeltaBetaCorrection_.at(i)) {
525  neutrals -= TMath::Nint(deltaBetaFactorThisEvent_ * isoPU_.size());
526  }
527  if (neutrals < 0) {
528  neutrals = 0;
529  }
530 
531  int nOccupants = isoCharged_.size() + neutrals;
532 
533  double footprintCorrection_value = 0.;
535  for (std::vector<std::unique_ptr<FootprintCorrection>>::const_iterator footprintCorrection =
536  footprintCorrections_.begin();
537  footprintCorrection != footprintCorrections_.end();
538  ++footprintCorrection) {
539  if ((*footprintCorrection)->selection_(*pfTau)) {
540  footprintCorrection_value = (*footprintCorrection)->offset_(*pfTau);
541  }
542  }
543  }
544 
545  double totalPt = 0.;
546  double puPt = 0.;
547  //--- Sum PT requirement
548  if (storeRawValue_.at(i) == SumPt || storeRawValue_.at(i) == PUsumPt) {
549  double chargedPt = 0.;
550  double neutralPt = 0.;
551  double weightedNeutralPt = 0.;
552  if (includeTracks_.at(i)) {
553  for (auto const& isoObject : isoCharged_) {
554  chargedPt += isoObject->pt();
555  }
556  }
557 
558  if (calculateWeights_.at(i)) {
559  if (useAllPFCandsForWeights_.at(i)) {
560  for (auto const& isoObject : isoNeutralWeight_UseAllPFCands_) {
561  weightedNeutralPt += isoObject.pt();
562  }
563  } else {
564  for (auto const& isoObject : isoNeutralWeight_) {
565  weightedNeutralPt += isoObject.pt();
566  }
567  }
568  } else if (includeGammas_.at(i)) {
569  for (auto const& isoObject : isoNeutral_) {
570  neutralPt += isoObject->pt();
571  }
572  }
573  for (auto const& isoObject : isoPU_) {
574  puPt += isoObject->pt();
575  }
576  LogTrace("discriminate") << "chargedPt = " << chargedPt;
577  LogTrace("discriminate") << "neutralPt = " << neutralPt;
578  LogTrace("discriminate") << "weighted neutral Pt = " << weightedNeutralPt;
579  LogTrace("discriminate") << "puPt = " << puPt << " (delta-beta corr. = " << (deltaBetaFactorThisEvent_ * puPt)
580  << ")";
581 
582  if (calculateWeights_.at(i)) {
583  neutralPt = weightedNeutralPt;
584  }
585 
586  if (applyDeltaBetaCorrection_.at(i)) {
587  neutralPt -= (deltaBetaFactorThisEvent_ * puPt);
588  }
589 
591  neutralPt -= footprintCorrection_value;
592  }
593 
594  if (applyRhoCorrection_) {
595  neutralPt -= rhoThisEvent_;
596  }
597 
598  if (neutralPt < 0.) {
599  neutralPt = 0.;
600  }
601 
602  totalPt = chargedPt + weightGammas_ * neutralPt;
603  }
604 
605  double photonSumPt_outsideSignalCone = 0.;
606  if (storeRawValue_.at(i) == PhotonSumPt) {
607  const std::vector<reco::CandidatePtr>& signalGammas = pfTau->signalGammaCands();
608  for (std::vector<reco::CandidatePtr>::const_iterator signalGamma = signalGammas.begin();
609  signalGamma != signalGammas.end();
610  ++signalGamma) {
611  double dR = deltaR(pfTau->eta(), pfTau->phi(), (*signalGamma)->eta(), (*signalGamma)->phi());
612  if (dR > pfTau->signalConeSize())
613  photonSumPt_outsideSignalCone += (*signalGamma)->pt();
614  }
615  }
616 
617  // We did error checking in the constructor, so this is safe.
618  if (storeRawValue_.at(i) == SumPt) {
619  result.rawValues.push_back(totalPt);
620  } else if (storeRawValue_.at(i) == PUsumPt) {
622  result.rawValues.push_back(puPt);
623  else if (applyRhoCorrection_)
624  result.rawValues.push_back(rhoThisEvent_);
625  else
626  result.rawValues.push_back(0.);
627  } else if (storeRawValue_.at(i) == Occupancy) {
628  result.rawValues.push_back(nOccupants);
629  } else if (storeRawValue_.at(i) == FootPrintCorrection) {
630  result.rawValues.push_back(footprintCorrection_value);
631  } else if (storeRawValue_.at(i) == PhotonSumPt) {
632  result.rawValues.push_back(photonSumPt_outsideSignalCone);
633  }
634  }
635  for (size_t i = 0; i < rawValue_reference_.size(); i++) {
636  bool pass = true;
637  if (minPtForNoIso_ > 0. && pfTau->pt() > minPtForNoIso_)
638  LogDebug("discriminate") << "tau pt = " << pfTau->pt() << "\t min cutoff pt = " << minPtForNoIso_;
639  else {
640  for (size_t j = 0; j < rawValue_reference_[i].size(); j++) {
641  double rawValue = result.rawValues[rawValue_reference_[i][j]];
642  LogTrace("discriminate") << "Iso sum = " << rawValue << " (max_abs = " << maxAbsValue_[i][j]
643  << ", max_rel = " << maxRelValue_[i][j] << ", offset_rel = " << offsetRelValue_[i][j]
644  << ")";
645  if (!maxAbsValue_[i].empty() && maxAbsValue_[i][j] >= 0.0)
646  pass = rawValue <= maxAbsValue_[i][j];
647  if (!maxRelValue_[i].empty() && maxRelValue_[i][j] >= 0.0)
648  pass = rawValue <= maxRelValue_[i][j] * (pfTau->pt() - offsetRelValue_[i][j]);
649  if (!pass)
650  break; // do not pass if one of the conditions in the j list fails
651  }
652  }
653  result.workingPoints.push_back(pass);
654  }
655  return result;
656 }

References gather_cfg::cout, reco::deltaR(), HGC3DClusterGenMatchSelector_cfi::dR, relativeConstraints::empty, PVValHelper::eta, ALCARECOTkAlBeamHalo_cff::filter, mps_fire::i, edm::Ref< C, T, F >::isNonnull(), dqmiolumiharvest::j, dqm-mbProfile::log, LogDebug, LogTrace, min(), eostools::move(), IntegrityClient_cfi::Occupancy, reco::LeafCandidate::p4(), edm::OwnVector< T, P >::push_back(), MetAnalyzer::pv(), edm::OwnVector< T, P >::reserve(), mps_fire::result, and reco::LeafCandidate::setP4().

◆ fillDescriptions()

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

Definition at line 658 of file PFRecoTauDiscriminationByIsolationContainer.cc.

658  {
659  // pfRecoTauDiscriminationByIsolationContainer
661  desc.add<edm::InputTag>("PFTauProducer", edm::InputTag("pfRecoTauProducer"));
662 
663  {
664  edm::ParameterSetDescription pset_signalQualityCuts;
665  pset_signalQualityCuts.add<double>("maxDeltaZ", 0.4);
666  pset_signalQualityCuts.add<double>("minTrackPt", 0.5);
667  pset_signalQualityCuts.add<double>("minTrackVertexWeight", -1.0);
668  pset_signalQualityCuts.add<double>("maxTrackChi2", 100.0);
669  pset_signalQualityCuts.add<unsigned int>("minTrackPixelHits", 0);
670  pset_signalQualityCuts.add<double>("minGammaEt", 1.0);
671  pset_signalQualityCuts.add<unsigned int>("minTrackHits", 3);
672  pset_signalQualityCuts.add<double>("minNeutralHadronEt", 30.0);
673  pset_signalQualityCuts.add<double>("maxTransverseImpactParameter", 0.1);
674  pset_signalQualityCuts.addOptional<bool>("useTracksInsteadOfPFHadrons");
675 
676  edm::ParameterSetDescription pset_vxAssocQualityCuts;
677  pset_vxAssocQualityCuts.add<double>("minTrackPt", 0.5);
678  pset_vxAssocQualityCuts.add<double>("minTrackVertexWeight", -1.0);
679  pset_vxAssocQualityCuts.add<double>("maxTrackChi2", 100.0);
680  pset_vxAssocQualityCuts.add<unsigned int>("minTrackPixelHits", 0);
681  pset_vxAssocQualityCuts.add<double>("minGammaEt", 1.0);
682  pset_vxAssocQualityCuts.add<unsigned int>("minTrackHits", 3);
683  pset_vxAssocQualityCuts.add<double>("maxTransverseImpactParameter", 0.1);
684  pset_vxAssocQualityCuts.addOptional<bool>("useTracksInsteadOfPFHadrons");
685 
686  edm::ParameterSetDescription pset_isolationQualityCuts;
687  pset_isolationQualityCuts.add<double>("maxDeltaZ", 0.2);
688  pset_isolationQualityCuts.add<double>("minTrackPt", 1.0);
689  pset_isolationQualityCuts.add<double>("minTrackVertexWeight", -1.0);
690  pset_isolationQualityCuts.add<double>("maxTrackChi2", 100.0);
691  pset_isolationQualityCuts.add<unsigned int>("minTrackPixelHits", 0);
692  pset_isolationQualityCuts.add<double>("minGammaEt", 1.5);
693  pset_isolationQualityCuts.add<unsigned int>("minTrackHits", 8);
694  pset_isolationQualityCuts.add<double>("maxTransverseImpactParameter", 0.03);
695  pset_isolationQualityCuts.addOptional<bool>("useTracksInsteadOfPFHadrons");
696 
697  edm::ParameterSetDescription pset_qualityCuts;
698  pset_qualityCuts.add<edm::ParameterSetDescription>("signalQualityCuts", pset_signalQualityCuts);
699  pset_qualityCuts.add<edm::ParameterSetDescription>("vxAssocQualityCuts", pset_vxAssocQualityCuts);
700  pset_qualityCuts.add<edm::ParameterSetDescription>("isolationQualityCuts", pset_isolationQualityCuts);
701  pset_qualityCuts.add<std::string>("leadingTrkOrPFCandOption", "leadPFCand");
702  pset_qualityCuts.add<std::string>("pvFindingAlgo", "closestInDeltaZ");
703  pset_qualityCuts.add<edm::InputTag>("primaryVertexSrc", edm::InputTag("offlinePrimaryVertices"));
704  pset_qualityCuts.add<bool>("vertexTrackFiltering", false);
705  pset_qualityCuts.add<bool>("recoverLeadingTrk", false);
706 
707  desc.add<edm::ParameterSetDescription>("qualityCuts", pset_qualityCuts);
708  }
709 
710  desc.add<double>("minTauPtForNoIso", -99.0);
711  desc.add<edm::InputTag>("vertexSrc", edm::InputTag("offlinePrimaryVertices"));
712  desc.add<double>("rhoConeSize", 0.5);
713  desc.add<edm::InputTag>("rhoProducer", edm::InputTag("fixedGridRhoFastjetAll"));
714 
715  {
717  vpsd1.add<std::string>("selection");
718  vpsd1.add<std::string>("offset");
719  desc.addVPSet("footprintCorrections", vpsd1, {});
720  }
721 
722  desc.add<std::string>("deltaBetaFactor", "0.38");
723  desc.add<bool>("applyFootprintCorrection", false);
724  {
725  edm::ParameterSetDescription pset_Prediscriminants;
726  pset_Prediscriminants.add<std::string>("BooleanOperator", "and");
727  {
729  psd1.add<double>("cut", 0.5);
730  psd1.add<edm::InputTag>("Producer", edm::InputTag("pfRecoTauDiscriminationByLeadingTrackFinding"));
731  pset_Prediscriminants.addOptional<edm::ParameterSetDescription>("leadTrack", psd1);
732  }
733  {
735  psd1.add<double>("cut", 0.5);
736  psd1.add<edm::InputTag>("Producer", edm::InputTag("hpsPFTauDiscriminationByDecayModeFindingNewDMs"));
737  pset_Prediscriminants.addOptional<edm::ParameterSetDescription>("decayMode", psd1);
738  }
739  {
741  psd1.add<double>("cut", 0.5);
742  psd1.add<edm::InputTag>("Producer", edm::InputTag("hpsPFTauDiscriminationByLooseChargedIsolation"));
743  pset_Prediscriminants.addOptional<edm::ParameterSetDescription>("preIso", psd1);
744  }
745  desc.add<edm::ParameterSetDescription>("Prediscriminants", pset_Prediscriminants);
746  }
747 
748  desc.add<int>("verbosity", 0);
749 
750  desc.add<bool>("deltaBetaPUTrackPtCutOverride", false);
751  desc.add<bool>("applyRhoCorrection", false);
752 
753  desc.add<double>("WeightECALIsolation", 1.0);
754  desc.add<double>("rhoUEOffsetCorrection", 1.0);
755  desc.add<double>("deltaBetaPUTrackPtCutOverride_val", -1.5);
756  desc.add<double>("isoConeSizeForDeltaBeta", 0.5);
757  desc.add<double>("customOuterCone", -1.0);
758  desc.add<edm::InputTag>("particleFlowSrc", edm::InputTag("particleFlow"));
759 
760  // options for various stored ID raw values
761  edm::ParameterSetDescription desc_idlist;
762  desc_idlist.add<string>("IDname"); //not needed by producer but required for mapping at PAT level
763  desc_idlist.add<bool>("storeRawSumPt", false);
764  desc_idlist.add<bool>("storeRawPUsumPt", false);
765  desc_idlist.add<bool>("storeRawOccupancy", false);
766  desc_idlist.add<bool>("storeRawFootprintCorrection", false);
767  desc_idlist.add<bool>("storeRawPhotonSumPt_outsideSignalCone", false);
768  desc_idlist.add<bool>("ApplyDiscriminationByECALIsolation", false);
769  desc_idlist.add<bool>("ApplyDiscriminationByWeightedECALIsolation", false);
770  desc_idlist.add<bool>("ApplyDiscriminationByTrackerIsolation", false);
771  desc_idlist.add<bool>("applyDeltaBetaCorrection", false);
772  desc_idlist.add<bool>("UseAllPFCandsForWeights", false);
773  desc.addVPSet("IDdefinitions", desc_idlist, {});
774  // options for various stored ID WPs
775  edm::ParameterSetDescription desc_idwplist;
776  desc_idwplist.add<string>("IDname"); //not needed by producer but required for mapping at PAT level
777  desc_idwplist.add<std::vector<string>>("referenceRawIDNames")
778  ->setComment(
779  "List of raw IDs defined in 'IDdefinitions' to pass all respective conditions defined in "
780  "'maximumAbsoluteValues', 'maximumRelativeValues' , and 'relativeValueOffsets'");
781  desc_idwplist.add<std::vector<double>>("maximumAbsoluteValues", {});
782  desc_idwplist.add<std::vector<double>>("maximumRelativeValues", {});
783  desc_idwplist.add<std::vector<double>>("relativeValueOffsets", {});
784  desc.addVPSet("IDWPdefinitions", desc_idwplist, {});
785 
786  descriptions.add("pfRecoTauDiscriminationByIsolationContainer", desc);
787 }

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addOptional(), edm::ParameterSetDescription::addVPSet(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ weightedSum()

double PFRecoTauDiscriminationByIsolationContainer::weightedSum ( const std::vector< CandidatePtr > &  inColl_,
double  eta,
double  phi 
) const
inline

Definition at line 210 of file PFRecoTauDiscriminationByIsolationContainer.cc.

210  {
211  double out = 1.0;
212  for (auto const& inObj_ : inColl_) {
213  double sum = (inObj_->pt() * inObj_->pt()) / (deltaR2(eta, phi, inObj_->eta(), inObj_->phi()));
214  if (sum > 1.0)
215  out *= sum;
216  }
217  return out;
218  }

References reco::deltaR2(), PVValHelper::eta, and MillePedeFileConverter_cfg::out.

Member Data Documentation

◆ applyDeltaBetaCorrection_

std::vector<bool> PFRecoTauDiscriminationByIsolationContainer::applyDeltaBetaCorrection_
private

◆ applyFootprintCorrection_

bool PFRecoTauDiscriminationByIsolationContainer::applyFootprintCorrection_
private

◆ applyRhoCorrection_

bool PFRecoTauDiscriminationByIsolationContainer::applyRhoCorrection_
private

◆ calculateWeights_

std::vector<bool> PFRecoTauDiscriminationByIsolationContainer::calculateWeights_
private

◆ chargedPFCandidatesInEvent_

std::vector<reco::CandidatePtr> PFRecoTauDiscriminationByIsolationContainer::chargedPFCandidatesInEvent_
private

◆ customIsoCone_

double PFRecoTauDiscriminationByIsolationContainer::customIsoCone_
private

◆ deltaBetaCollectionCone_

double PFRecoTauDiscriminationByIsolationContainer::deltaBetaCollectionCone_
private

◆ deltaBetaFactorThisEvent_

double PFRecoTauDiscriminationByIsolationContainer::deltaBetaFactorThisEvent_
private

◆ deltaBetaFormula_

std::unique_ptr<TFormula> PFRecoTauDiscriminationByIsolationContainer::deltaBetaFormula_
private

◆ deltaBetaNeeded_

bool PFRecoTauDiscriminationByIsolationContainer::deltaBetaNeeded_
private

◆ footprintCorrections_

std::vector<std::unique_ptr<FootprintCorrection> > PFRecoTauDiscriminationByIsolationContainer::footprintCorrections_
private

◆ gammasNeeded_

bool PFRecoTauDiscriminationByIsolationContainer::gammasNeeded_
private

◆ includeGammas_

std::vector<bool> PFRecoTauDiscriminationByIsolationContainer::includeGammas_
private

◆ includeTracks_

std::vector<bool> PFRecoTauDiscriminationByIsolationContainer::includeTracks_
private

◆ maxAbsValue_

std::vector<std::vector<double> > PFRecoTauDiscriminationByIsolationContainer::maxAbsValue_
private

◆ maxRelValue_

std::vector<std::vector<double> > PFRecoTauDiscriminationByIsolationContainer::maxRelValue_
private

◆ minPtForNoIso_

double PFRecoTauDiscriminationByIsolationContainer::minPtForNoIso_
private

◆ moduleLabel_

std::string PFRecoTauDiscriminationByIsolationContainer::moduleLabel_
private

◆ offsetRelValue_

std::vector<std::vector<double> > PFRecoTauDiscriminationByIsolationContainer::offsetRelValue_
private

◆ pfCand_token

edm::EDGetTokenT<edm::View<reco::Candidate> > PFRecoTauDiscriminationByIsolationContainer::pfCand_token
private

◆ pfCandSrc_

edm::InputTag PFRecoTauDiscriminationByIsolationContainer::pfCandSrc_
private

◆ pileupQcutsGeneralQCuts_

std::unique_ptr<tau::RecoTauQualityCuts> PFRecoTauDiscriminationByIsolationContainer::pileupQcutsGeneralQCuts_
private

◆ pileupQcutsPUTrackSelection_

std::unique_ptr<tau::RecoTauQualityCuts> PFRecoTauDiscriminationByIsolationContainer::pileupQcutsPUTrackSelection_
private

◆ qcuts_

std::unique_ptr<tau::RecoTauQualityCuts> PFRecoTauDiscriminationByIsolationContainer::qcuts_
private

◆ qualityCutsPSet_

edm::ParameterSet PFRecoTauDiscriminationByIsolationContainer::qualityCutsPSet_
private

◆ rawValue_reference_

std::vector<std::vector<int> > PFRecoTauDiscriminationByIsolationContainer::rawValue_reference_
private

◆ rho_token

edm::EDGetTokenT<double> PFRecoTauDiscriminationByIsolationContainer::rho_token
private

◆ rhoConeSize_

double PFRecoTauDiscriminationByIsolationContainer::rhoConeSize_
private

◆ rhoCorrectionThisEvent_

double PFRecoTauDiscriminationByIsolationContainer::rhoCorrectionThisEvent_
private

◆ rhoProducer_

edm::InputTag PFRecoTauDiscriminationByIsolationContainer::rhoProducer_
private

◆ rhoThisEvent_

double PFRecoTauDiscriminationByIsolationContainer::rhoThisEvent_
private

◆ rhoUEOffsetCorrection_

double PFRecoTauDiscriminationByIsolationContainer::rhoUEOffsetCorrection_
private

◆ storeRawValue_

std::vector<StoredRawType> PFRecoTauDiscriminationByIsolationContainer::storeRawValue_
private

◆ tracksNeeded_

bool PFRecoTauDiscriminationByIsolationContainer::tracksNeeded_
private

◆ useAllPFCandsForWeights_

std::vector<bool> PFRecoTauDiscriminationByIsolationContainer::useAllPFCandsForWeights_
private

◆ verbosity_

int PFRecoTauDiscriminationByIsolationContainer::verbosity_
private

◆ vertex_token

edm::EDGetTokenT<reco::VertexCollection> PFRecoTauDiscriminationByIsolationContainer::vertex_token
private

◆ vertexAssociator_

std::unique_ptr<tau::RecoTauVertexAssociator> PFRecoTauDiscriminationByIsolationContainer::vertexAssociator_
private

◆ vertexSrc_

edm::InputTag PFRecoTauDiscriminationByIsolationContainer::vertexSrc_
private

◆ weightGammas_

double PFRecoTauDiscriminationByIsolationContainer::weightGammas_
private

◆ weightsNeeded_

bool PFRecoTauDiscriminationByIsolationContainer::weightsNeeded_
private
PFTauDiscriminationContainerProducerBase
TauDiscriminationProducerBase< reco::PFTau, reco::TauDiscriminatorContainer, reco::SingleTauDiscriminatorContainer, reco::PFTauDiscriminator > PFTauDiscriminationContainerProducerBase
Definition: TauDiscriminationProducerBase.h:123
PFRecoTauDiscriminationByIsolationContainer::rhoUEOffsetCorrection_
double rhoUEOffsetCorrection_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:288
zmumugammaAnalyzer_cfi.pfCandidates
pfCandidates
Definition: zmumugammaAnalyzer_cfi.py:11
mps_fire.i
i
Definition: mps_fire.py:355
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
PFRecoTauDiscriminationByIsolationContainer::customIsoCone_
double customIsoCone_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:238
PFRecoTauDiscriminationByIsolationContainer::pfCand_token
edm::EDGetTokenT< edm::View< reco::Candidate > > pfCand_token
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:273
reco::tau::RecoTauQualityCuts
Definition: RecoTauQualityCuts.h:34
PFRecoTauDiscriminationByIsolationContainer::deltaBetaFormula_
std::unique_ptr< TFormula > deltaBetaFormula_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:280
PFRecoTauDiscriminationByIsolationContainer::PhotonSumPt
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:30
min
T min(T a, T b)
Definition: MathUtil.h:58
PFRecoTauDiscriminationByIsolationContainer::SumPt
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:30
gather_cfg.cout
cout
Definition: gather_cfg.py:144
PFRecoTauDiscriminationByIsolationContainer::storeRawValue_
std::vector< StoredRawType > storeRawValue_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:253
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PFRecoTauDiscriminationByIsolationContainer::includeGammas_
std::vector< bool > includeGammas_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:260
PFRecoTauDiscriminationByIsolationContainer::moduleLabel_
std::string moduleLabel_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:223
PFRecoTauDiscriminationByIsolationContainer::qualityCutsPSet_
edm::ParameterSet qualityCutsPSet_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:225
edm::VParameterSet
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
PFRecoTauDiscriminationByIsolationContainer::footprintCorrections_
std::vector< std::unique_ptr< FootprintCorrection > > footprintCorrections_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:250
PFRecoTauDiscriminationByIsolationContainer::FootPrintCorrection
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:30
HLT_2018_cff.deltaBetaPUTrackPtCutOverride
deltaBetaPUTrackPtCutOverride
Definition: HLT_2018_cff.py:31433
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
edm::Handle
Definition: AssociativeIterator.h:50
edm::ParameterSetDescription::addOptional
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:105
edm::Ref< VertexCollection >
PFRecoTauDiscriminationByIsolationContainer::calculateWeights_
std::vector< bool > calculateWeights_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:261
PFRecoTauDiscriminationByIsolationContainer::rhoConeSize_
double rhoConeSize_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:287
PFRecoTauDiscriminationByIsolationContainer::pileupQcutsPUTrackSelection_
std::unique_ptr< tau::RecoTauQualityCuts > pileupQcutsPUTrackSelection_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:229
PFRecoTauDiscriminationByIsolationContainer::PUsumPt
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:30
reco::tau::RecoTauVertexAssociator
Definition: RecoTauVertexAssociator.h:50
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
PFRecoTauDiscriminationByIsolationContainer::vertexSrc_
edm::InputTag vertexSrc_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:275
PVValHelper::eta
Definition: PVValidationHelpers.h:69
PFRecoTauDiscriminationByIsolationContainer::applyDeltaBetaCorrection_
std::vector< bool > applyDeltaBetaCorrection_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:263
corrVsCorr.selection
selection
main part
Definition: corrVsCorr.py:100
HLT_2018_cff.deltaBetaPUTrackPtCutOverride_val
deltaBetaPUTrackPtCutOverride_val
Definition: HLT_2018_cff.py:31453
PFRecoTauDiscriminationByIsolationContainer::weightGammas_
double weightGammas_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:237
PFRecoTauDiscriminationByIsolationContainer::vertexAssociator_
std::unique_ptr< tau::RecoTauVertexAssociator > vertexAssociator_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:232
PFRecoTauDiscriminationByIsolationContainer::tracksNeeded_
bool tracksNeeded_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:235
PFRecoTauDiscriminationByIsolationContainer::None
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:30
PFRecoTauDiscriminationByIsolationContainer::maxRelValue_
std::vector< std::vector< double > > maxRelValue_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:257
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
PFRecoTauDiscriminationByIsolationContainer::useAllPFCandsForWeights_
std::vector< bool > useAllPFCandsForWeights_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:264
PbPb_ZMuSkimMuonDPG_cff.deltaR
deltaR
Definition: PbPb_ZMuSkimMuonDPG_cff.py:63
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::OwnVector::reserve
void reserve(size_t)
Definition: OwnVector.h:320
PFRecoTauDiscriminationByIsolationContainer::maxAbsValue_
std::vector< std::vector< double > > maxAbsValue_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:256
PFRecoTauDiscriminationByIsolationContainer::chargedPFCandidatesInEvent_
std::vector< reco::CandidatePtr > chargedPFCandidatesInEvent_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:277
PFRecoTauDiscriminationByIsolationContainer::rho_token
edm::EDGetTokenT< double > rho_token
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:286
HLT_2018_cff.InputTag
InputTag
Definition: HLT_2018_cff.py:79016
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
edm::ParameterSet
Definition: ParameterSet.h:36
PFRecoTauDiscriminationByIsolationContainer::vertex_token
edm::EDGetTokenT< reco::VertexCollection > vertex_token
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:276
reco::tau::cone::DeltaRPtrFilter
Definition: ConeTools.h:33
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
PFRecoTauDiscriminationByIsolationContainer::qcuts_
std::unique_ptr< tau::RecoTauQualityCuts > qcuts_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:226
reco::tau::cone::DeltaRFilter
Definition: ConeTools.h:15
PFRecoTauDiscriminationByIsolationContainer::deltaBetaFactorThisEvent_
double deltaBetaFactorThisEvent_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:281
cand
Definition: decayParser.h:34
PFRecoTauDiscriminationByIsolationContainer::applyFootprintCorrection_
bool applyFootprintCorrection_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:242
PFRecoTauDiscriminationByIsolationContainer::verbosity_
int verbosity_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:293
PFRecoTauDiscriminationByIsolationContainer::gammasNeeded_
bool gammasNeeded_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:236
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
PFRecoTauDiscriminationByIsolationContainer::weightsNeeded_
bool weightsNeeded_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:234
HLT_2018_cff.storeRawFootprintCorrection
storeRawFootprintCorrection
Definition: HLT_2018_cff.py:31458
PFRecoTauDiscriminationByIsolationContainer::deltaBetaCollectionCone_
double deltaBetaCollectionCone_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:279
reco::tau::factorizePUQCuts
std::pair< edm::ParameterSet, edm::ParameterSet > factorizePUQCuts(const edm::ParameterSet &inputSet)
Definition: RecoTauQualityCuts.cc:384
PFRecoTauDiscriminationByIsolationContainer::weightedSum
double weightedSum(const std::vector< CandidatePtr > &inColl_, double eta, double phi) const
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:210
PFRecoTauDiscriminationByIsolationContainer::rawValue_reference_
std::vector< std::vector< int > > rawValue_reference_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:255
edm::Ptr< Candidate >
PFRecoTauDiscriminationByIsolationContainer::rhoProducer_
edm::InputTag rhoProducer_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:285
PFRecoTauDiscriminationByIsolationContainer::includeTracks_
std::vector< bool > includeTracks_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:262
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
eostools.move
def move(src, dest)
Definition: eostools.py:511
HLTMuonOfflineAnalyzer_cfi.deltaR2
deltaR2
Definition: HLTMuonOfflineAnalyzer_cfi.py:105
PFRecoTauDiscriminationByIsolationContainer::rhoThisEvent_
double rhoThisEvent_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:290
PFRecoTauDiscriminationByIsolationContainer::offsetRelValue_
std::vector< std::vector< double > > offsetRelValue_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:258
PFRecoTauDiscriminationByIsolationContainer::applyRhoCorrection_
bool applyRhoCorrection_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:284
PFRecoTauDiscriminationByIsolationContainer::minPtForNoIso_
double minPtForNoIso_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:240
PFRecoTauDiscriminationByIsolationContainer::Occupancy
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:30
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
Exception
Definition: hltDiff.cc:246
dqm-mbProfile.log
log
Definition: dqm-mbProfile.py:17
edm::OwnVector::push_back
void push_back(D *&d)
Definition: OwnVector.h:326
PFRecoTauDiscriminationByIsolationContainer::pileupQcutsGeneralQCuts_
std::unique_ptr< tau::RecoTauQualityCuts > pileupQcutsGeneralQCuts_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:230
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
PFRecoTauDiscriminationByIsolationContainer::pfCandSrc_
edm::InputTag pfCandSrc_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:272
reco::LeafCandidate
Definition: LeafCandidate.h:16
mps_fire.result
result
Definition: mps_fire.py:303
cms::Exception
Definition: Exception.h:70
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
HGC3DClusterGenMatchSelector_cfi.dR
dR
Definition: HGC3DClusterGenMatchSelector_cfi.py:7
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
event
Definition: event.py:1
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:78
edm::InputTag
Definition: InputTag.h:15
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2121
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::OwnVector
Definition: OwnVector.h:24
pwdgSkimBPark_cfi.vertices
vertices
Definition: pwdgSkimBPark_cfi.py:7
PFRecoTauDiscriminationByIsolationContainer::deltaBetaNeeded_
bool deltaBetaNeeded_
Definition: PFRecoTauDiscriminationByIsolationContainer.cc:271
reco::SingleTauDiscriminatorContainer
Definition: TauDiscriminatorContainer.h:9