CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Private Attributes
HLTTauDQMPath Class Reference

#include <HLTTauDQMPath.h>

Classes

struct  Object
 

Public Types

typedef std::tuple
< std::string, size_t > 
FilterIndex
 
typedef math::XYZTLorentzVectorD LV
 
typedef std::vector< LVLVColl
 

Public Member Functions

size_t filtersSize () const
 
bool fired (const edm::TriggerResults &triggerResults) const
 
size_t getFilterIndex (size_t i) const
 
const std::string & getFilterName (size_t i) const
 
int getFilterNElectrons (size_t i) const
 
int getFilterNMuons (size_t i) const
 
int getFilterNTaus (size_t i) const
 
void getFilterObjects (const trigger::TriggerEvent &triggerEvent, size_t i, std::vector< Object > &retval) const
 
size_t getLastFilterBeforeL2TauIndex () const
 
size_t getLastFilterBeforeL3TauIndex () const
 
const std::string & getLastFilterName () const
 
size_t getLastL2TauFilterIndex () const
 
size_t getLastL3TauFilterIndex () const
 
const unsigned int getPathIndex () const
 
const std::string & getPathName () const
 
bool goodOfflineEvent (size_t i, const HLTTauDQMOfflineObjects &offlineObjects) const
 
bool hasL2Taus () const
 
bool hasL3Taus () const
 
 HLTTauDQMPath (const std::string &pathName, const std::string &hltProcess, bool doRefAnalysis, const HLTConfigProvider &HLTCP)
 
bool isFirstFilterL1Seed () const
 
bool isValid () const
 
int lastPassedFilter (const edm::TriggerResults &triggerResults) const
 
bool offlineMatching (size_t i, const std::vector< Object > &triggerObjects, const HLTTauDQMOfflineObjects &offlineObjects, double dR, std::vector< Object > &matchedTriggerObjects, HLTTauDQMOfflineObjects &matchedOfflineObjects) const
 
 ~HLTTauDQMPath ()
 

Static Public Attributes

static constexpr size_t kInvalidIndex = std::numeric_limits<size_t>::max()
 
static constexpr size_t kModuleIndex = 1
 
static constexpr size_t kName = 0
 

Private Attributes

const bool doRefAnalysis_
 
std::vector< int > filterElectronN_
 
std::vector< FilterIndexfilterIndices_
 
std::vector< int > filterMuonN_
 
std::vector< int > filterTauN_
 
const std::string hltProcess_
 
bool isFirstL1Seed_
 
bool isValid_
 
size_t lastFilterBeforeL2TauIndex_
 
size_t lastFilterBeforeL3TauIndex_
 
size_t lastL2TauFilterIndex_
 
size_t lastL3TauFilterIndex_
 
const unsigned int pathIndex_
 
const std::string pathName_
 

Detailed Description

Definition at line 22 of file HLTTauDQMPath.h.

Member Typedef Documentation

typedef std::tuple<std::string, size_t> HLTTauDQMPath::FilterIndex

Definition at line 26 of file HLTTauDQMPath.h.

Definition at line 24 of file HLTTauDQMPath.h.

typedef std::vector<LV> HLTTauDQMPath::LVColl

Definition at line 25 of file HLTTauDQMPath.h.

Constructor & Destructor Documentation

HLTTauDQMPath::HLTTauDQMPath ( const std::string &  pathName,
const std::string &  hltProcess,
bool  doRefAnalysis,
const HLTConfigProvider HLTCP 
)

Definition at line 244 of file HLTTauDQMPath.cc.

References doRefAnalysis_, filterElectronN_, filterIndices_, filterMuonN_, filtersSize(), filterTauN_, getFilterIndex(), getFilterNElectrons(), getFilterNMuons(), getFilterNTaus(), WZElectronSkims53X_cff::HLTPath, i, isFirstL1Seed_, isValid_, kInvalidIndex, lastFilterBeforeL2TauIndex_, lastFilterBeforeL3TauIndex_, lastL2TauFilterIndex_, lastL3TauFilterIndex_, LogDebug, HLTConfigProvider::moduleType(), pathName_, contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

244  :
245  hltProcess_(hltProcess),
246  doRefAnalysis_(doRefAnalysis),
251  isFirstL1Seed_(false),
252  isValid_(false)
253 {
254 #ifdef EDM_ML_DEBUG
255  std::stringstream ss;
256  ss << "HLTTauDQMPath: " << pathName_ << "\n";
257 #endif
258 
259  // Get the filters
260  HLTPath thePath(pathName_);
261  filterIndices_ = thePath.interestingFilters(HLTCP, doRefAnalysis_);
262  if(filterIndices_.empty()) {
263  edm::LogInfo("HLTTauDQMOffline") << "HLTTauDQMPath: " << pathName_ << " no interesting filters found";
264  return;
265  }
266  isFirstL1Seed_ = HLTCP.moduleType(std::get<kName>(filterIndices_[0])) == "HLTLevel1GTSeed";
267 #ifdef EDM_ML_DEBUG
268  ss << " Interesting filters (preceded by the module index in the path)";
269 #endif
270  // Set the filter multiplicity counts
271  filterTauN_.clear();
272  filterElectronN_.clear();
273  filterMuonN_.clear();
274  filterTauN_.reserve(filterIndices_.size());
275  filterElectronN_.reserve(filterIndices_.size());
276  filterMuonN_.reserve(filterIndices_.size());
277  for(size_t i=0; i<filterIndices_.size(); ++i) {
278  const std::string& filterName = std::get<kName>(filterIndices_[i]);
279  const std::string& moduleType = HLTCP.moduleType(filterName);
280 
281  TauLeptonMultiplicity n = inferTauLeptonMultiplicity(HLTCP, filterName, moduleType, pathName_);
282  filterTauN_.push_back(n.tau);
283  filterElectronN_.push_back(n.electron);
284  filterMuonN_.push_back(n.muon);
285 
286 #ifdef EDM_ML_DEBUG
287  ss << "\n " << std::get<kModuleIndex>(filterIndices_[i])
288  << " " << filterName
289  << " " << moduleType
290  << " ntau " << n.tau
291  << " nele " << n.electron
292  << " nmu " << n.muon;
293 #endif
294 
295  }
296 #ifdef EDM_ML_DEBUG
297  LogDebug("HLTTauDQMOffline") << ss.str();
298 #endif
299 
300 
301  // Find the position of tau producer, use filters with taus before
302  // it for L2 tau efficiency, and filters with taus after it for L3
303  // tau efficiency. Here we have to take into account that for
304  // reference-matched case filterIndices_ contains only those filters
305  // that have saveTags=True, while for searching the first L3 tau
306  // filter we have to consider all filters
307  const size_t firstL3TauFilterIndex = thePath.firstL3TauFilterIndex(HLTCP);
308  if(firstL3TauFilterIndex == kInvalidIndex) {
309  edm::LogInfo("HLTTauDQMOffline") << "Did not find a filter with L3 tau producer as input in path " << pathName_;
310  }
311 
316  size_t i = 0;
317  for(; i<filtersSize() && getFilterIndex(i) < firstL3TauFilterIndex; ++i) {
320  if(getFilterNTaus(i) > 0 && getFilterNElectrons(i) == 0 && getFilterNMuons(i) == 0)
322  }
324  for(; i<filtersSize(); ++i) {
327  if(getFilterNTaus(i) > 0 && getFilterNElectrons(i) == 0 && getFilterNMuons(i) == 0)
329  }
330  LogDebug("HLTTauDQMOffline") << "lastFilterBeforeL2 " << lastFilterBeforeL2TauIndex_
331  << " lastL2TauFilter " << lastL2TauFilterIndex_
332  << " lastFilterBeforeL3 " << lastFilterBeforeL3TauIndex_
333  << " lastL3TauFilter " << lastL3TauFilterIndex_;
334  isValid_ = true;
335 }
#define LogDebug(id)
const std::string pathName_
Definition: HLTTauDQMPath.h:86
int i
Definition: DBlmapReader.cc:9
const std::string moduleType(const std::string &module) const
C++ class name of module.
int getFilterNElectrons(size_t i) const
Definition: HLTTauDQMPath.h:54
int getFilterNTaus(size_t i) const
Definition: HLTTauDQMPath.h:53
const std::string hltProcess_
Definition: HLTTauDQMPath.h:79
unsigned int triggerIndex(const std::string &triggerName) const
slot position of trigger path in trigger table (0 to size-1)
int getFilterNMuons(size_t i) const
Definition: HLTTauDQMPath.h:55
const unsigned int pathIndex_
Definition: HLTTauDQMPath.h:87
size_t lastFilterBeforeL2TauIndex_
Definition: HLTTauDQMPath.h:88
size_t filtersSize() const
Definition: HLTTauDQMPath.h:51
size_t lastFilterBeforeL3TauIndex_
Definition: HLTTauDQMPath.h:90
std::vector< int > filterTauN_
Definition: HLTTauDQMPath.h:83
std::vector< FilterIndex > filterIndices_
Definition: HLTTauDQMPath.h:82
size_t getFilterIndex(size_t i) const
Definition: HLTTauDQMPath.h:68
const bool doRefAnalysis_
Definition: HLTTauDQMPath.h:80
size_t lastL3TauFilterIndex_
Definition: HLTTauDQMPath.h:91
size_t lastL2TauFilterIndex_
Definition: HLTTauDQMPath.h:89
std::vector< int > filterElectronN_
Definition: HLTTauDQMPath.h:84
std::vector< int > filterMuonN_
Definition: HLTTauDQMPath.h:85
static constexpr size_t kInvalidIndex
Definition: HLTTauDQMPath.h:30
HLTTauDQMPath::~HLTTauDQMPath ( )

Definition at line 337 of file HLTTauDQMPath.cc.

337 {}

Member Function Documentation

size_t HLTTauDQMPath::filtersSize ( ) const
inline

Definition at line 51 of file HLTTauDQMPath.h.

References filterIndices_.

Referenced by HLTTauDQMPathSummaryPlotter::analyze(), HLTTauDQMPathPlotter::bookHistograms(), and HLTTauDQMPath().

51 { return filterIndices_.size(); }
std::vector< FilterIndex > filterIndices_
Definition: HLTTauDQMPath.h:82
bool HLTTauDQMPath::fired ( const edm::TriggerResults triggerResults) const

Definition at line 340 of file HLTTauDQMPath.cc.

References edm::HLTGlobalStatus::accept(), and pathIndex_.

Referenced by HLTTauDQMPathSummaryPlotter::analyze(), HLTTauDQMPathPlotter::analyze(), and lastPassedFilter().

340  {
341  return triggerResults.accept(pathIndex_);
342 }
bool accept() const
Has at least one path accepted the event?
const unsigned int pathIndex_
Definition: HLTTauDQMPath.h:87
size_t HLTTauDQMPath::getFilterIndex ( size_t  i) const
inline

Definition at line 68 of file HLTTauDQMPath.h.

References filterIndices_, and i.

Referenced by HLTTauDQMPath().

68 { return std::get<kModuleIndex>(filterIndices_[i]); }
int i
Definition: DBlmapReader.cc:9
std::vector< FilterIndex > filterIndices_
Definition: HLTTauDQMPath.h:82
const std::string& HLTTauDQMPath::getFilterName ( size_t  i) const
inline

Definition at line 52 of file HLTTauDQMPath.h.

References filterIndices_, and i.

Referenced by HLTTauDQMPathPlotter::bookHistograms(), and getFilterObjects().

52 { return std::get<kName>(filterIndices_[i]); }
int i
Definition: DBlmapReader.cc:9
std::vector< FilterIndex > filterIndices_
Definition: HLTTauDQMPath.h:82
int HLTTauDQMPath::getFilterNElectrons ( size_t  i) const
inline

Definition at line 54 of file HLTTauDQMPath.h.

References filterElectronN_, and i.

Referenced by HLTTauDQMPathPlotter::analyze(), HLTTauDQMPathPlotter::bookHistograms(), goodOfflineEvent(), and HLTTauDQMPath().

54 {return filterElectronN_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< int > filterElectronN_
Definition: HLTTauDQMPath.h:84
int HLTTauDQMPath::getFilterNMuons ( size_t  i) const
inline

Definition at line 55 of file HLTTauDQMPath.h.

References filterMuonN_, and i.

Referenced by HLTTauDQMPathPlotter::analyze(), HLTTauDQMPathPlotter::bookHistograms(), goodOfflineEvent(), and HLTTauDQMPath().

55 {return filterMuonN_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< int > filterMuonN_
Definition: HLTTauDQMPath.h:85
int HLTTauDQMPath::getFilterNTaus ( size_t  i) const
inline

Definition at line 53 of file HLTTauDQMPath.h.

References filterTauN_, and i.

Referenced by HLTTauDQMPathPlotter::analyze(), HLTTauDQMPathPlotter::bookHistograms(), goodOfflineEvent(), and HLTTauDQMPath().

53 { return filterTauN_[i]; }
int i
Definition: DBlmapReader.cc:9
std::vector< int > filterTauN_
Definition: HLTTauDQMPath.h:83
void HLTTauDQMPath::getFilterObjects ( const trigger::TriggerEvent triggerEvent,
size_t  i,
std::vector< Object > &  retval 
) const

Definition at line 364 of file HLTTauDQMPath.cc.

References trigger::TriggerEvent::filterIds(), trigger::TriggerEvent::filterIndex(), trigger::TriggerEvent::filterKeys(), getFilterName(), trigger::TriggerEvent::getObjects(), hltProcess_, i, relativeConstraints::keys, dbtoconf::object, and trigger::TriggerEvent::sizeFilters().

Referenced by HLTTauDQMPathSummaryPlotter::analyze(), and HLTTauDQMPathPlotter::analyze().

364  {
365  trigger::size_type filterIndex = triggerEvent.filterIndex(edm::InputTag(getFilterName(i), "", hltProcess_));
366  if(filterIndex != triggerEvent.sizeFilters()) {
367  const trigger::Keys& keys = triggerEvent.filterKeys(filterIndex);
368  const trigger::Vids& ids = triggerEvent.filterIds(filterIndex);
369  const trigger::TriggerObjectCollection& triggerObjects = triggerEvent.getObjects();
370  //std::cout << "Filter name " << getFilterName(i) << std::endl;
371  for(size_t i=0; i<keys.size(); ++i) {
372  const trigger::TriggerObject& object = triggerObjects[keys[i]];
373  retval.emplace_back(Object{object, ids[i]});
374  //std::cout << " object id " << object.id() << std::endl;
375  }
376  }
377 }
int i
Definition: DBlmapReader.cc:9
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
trigger::size_type filterIndex(const edm::InputTag &filterTag) const
find index of filter in data-member vector from filter tag
Definition: TriggerEvent.h:123
uint16_t size_type
const std::string hltProcess_
Definition: HLTTauDQMPath.h:79
Single trigger physics object (e.g., an isolated muon)
Definition: TriggerObject.h:22
const Vids & filterIds(trigger::size_type index) const
Definition: TriggerEvent.h:110
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
std::vector< size_type > Keys
const std::string & getFilterName(size_t i) const
Definition: HLTTauDQMPath.h:52
list object
Definition: dbtoconf.py:77
std::vector< int > Vids
size_t HLTTauDQMPath::getLastFilterBeforeL2TauIndex ( ) const
inline

Definition at line 62 of file HLTTauDQMPath.h.

References lastFilterBeforeL2TauIndex_.

Referenced by HLTTauDQMPathPlotter::analyze().

size_t lastFilterBeforeL2TauIndex_
Definition: HLTTauDQMPath.h:88
size_t HLTTauDQMPath::getLastFilterBeforeL3TauIndex ( ) const
inline

Definition at line 64 of file HLTTauDQMPath.h.

References lastFilterBeforeL3TauIndex_.

Referenced by HLTTauDQMPathPlotter::analyze().

size_t lastFilterBeforeL3TauIndex_
Definition: HLTTauDQMPath.h:90
const std::string& HLTTauDQMPath::getLastFilterName ( ) const
inline

Definition at line 58 of file HLTTauDQMPath.h.

References filterIndices_.

58 { return std::get<kName>(filterIndices_.back()); }
std::vector< FilterIndex > filterIndices_
Definition: HLTTauDQMPath.h:82
size_t HLTTauDQMPath::getLastL2TauFilterIndex ( ) const
inline

Definition at line 63 of file HLTTauDQMPath.h.

References lastL2TauFilterIndex_.

Referenced by HLTTauDQMPathPlotter::analyze().

63 { return lastL2TauFilterIndex_; }
size_t lastL2TauFilterIndex_
Definition: HLTTauDQMPath.h:89
size_t HLTTauDQMPath::getLastL3TauFilterIndex ( ) const
inline

Definition at line 65 of file HLTTauDQMPath.h.

References lastL3TauFilterIndex_.

Referenced by HLTTauDQMPathPlotter::analyze().

65 { return lastL3TauFilterIndex_; }
size_t lastL3TauFilterIndex_
Definition: HLTTauDQMPath.h:91
const unsigned int HLTTauDQMPath::getPathIndex ( ) const
inline

Definition at line 49 of file HLTTauDQMPath.h.

References pathIndex_.

49 { return pathIndex_; }
const unsigned int pathIndex_
Definition: HLTTauDQMPath.h:87
const std::string& HLTTauDQMPath::getPathName ( ) const
inline

Definition at line 48 of file HLTTauDQMPath.h.

References pathName_.

Referenced by HLTTauDQMPathPlotter::bookHistograms().

48 { return pathName_; }
const std::string pathName_
Definition: HLTTauDQMPath.h:86
bool HLTTauDQMPath::goodOfflineEvent ( size_t  i,
const HLTTauDQMOfflineObjects offlineObjects 
) const

Definition at line 441 of file HLTTauDQMPath.cc.

References HLTTauDQMOfflineObjects::electrons, getFilterNElectrons(), getFilterNMuons(), getFilterNTaus(), HLTTauDQMOfflineObjects::muons, and HLTTauDQMOfflineObjects::taus.

Referenced by HLTTauDQMPathSummaryPlotter::analyze().

441  {
442  return (static_cast<size_t>(getFilterNTaus(i)) <= offlineObjects.taus.size() &&
443  static_cast<size_t>(getFilterNElectrons(i)) <= offlineObjects.electrons.size() &&
444  static_cast<size_t>(getFilterNMuons(i)) <= offlineObjects.muons.size());
445 }
int i
Definition: DBlmapReader.cc:9
std::vector< LV > electrons
std::vector< LV > taus
int getFilterNElectrons(size_t i) const
Definition: HLTTauDQMPath.h:54
int getFilterNTaus(size_t i) const
Definition: HLTTauDQMPath.h:53
int getFilterNMuons(size_t i) const
Definition: HLTTauDQMPath.h:55
std::vector< LV > muons
bool HLTTauDQMPath::hasL2Taus ( ) const
inline

Definition at line 60 of file HLTTauDQMPath.h.

References kInvalidIndex, and lastL2TauFilterIndex_.

Referenced by HLTTauDQMPathPlotter::analyze(), and HLTTauDQMPathPlotter::bookHistograms().

size_t lastL2TauFilterIndex_
Definition: HLTTauDQMPath.h:89
static constexpr size_t kInvalidIndex
Definition: HLTTauDQMPath.h:30
bool HLTTauDQMPath::hasL3Taus ( ) const
inline

Definition at line 61 of file HLTTauDQMPath.h.

References kInvalidIndex, and lastL3TauFilterIndex_.

Referenced by HLTTauDQMPathPlotter::analyze(), and HLTTauDQMPathPlotter::bookHistograms().

size_t lastL3TauFilterIndex_
Definition: HLTTauDQMPath.h:91
static constexpr size_t kInvalidIndex
Definition: HLTTauDQMPath.h:30
bool HLTTauDQMPath::isFirstFilterL1Seed ( ) const
inline

Definition at line 57 of file HLTTauDQMPath.h.

References isFirstL1Seed_.

Referenced by HLTTauDQMPathPlotter::analyze().

57 { return isFirstL1Seed_; }
bool HLTTauDQMPath::isValid ( void  ) const
inline

Definition at line 40 of file HLTTauDQMPath.h.

References isValid_.

Referenced by HLTTauDQMPathPlotter::HLTTauDQMPathPlotter(), and core.AutoHandle.AutoHandle::ReallyLoad().

40 { return isValid_; }
int HLTTauDQMPath::lastPassedFilter ( const edm::TriggerResults triggerResults) const

Definition at line 344 of file HLTTauDQMPath.cc.

References filterIndices_, fired(), i, edm::HLTGlobalStatus::index(), and pathIndex_.

Referenced by HLTTauDQMPathPlotter::analyze().

344  {
345  if(fired(triggerResults)) {
346  //std::cout << "Event passed" << std::endl;
347  return filterIndices_.size()-1;
348  }
349 
350  unsigned int firstFailedFilter = triggerResults.index(pathIndex_);
351  int lastPassedFilter = -1;
352  for(size_t i=0; i<filterIndices_.size(); ++i) {
353  if(std::get<kModuleIndex>(filterIndices_[i]) < firstFailedFilter) {
354  lastPassedFilter = i;
355  }
356  else {
357  //std::cout << "Decision-making filter " << firstFailedFilter << " this " << std::get<kModuleIndex>(filterIndices_[i]) << std::endl;
358  break;
359  }
360  }
361  return lastPassedFilter;
362 }
int i
Definition: DBlmapReader.cc:9
int lastPassedFilter(const edm::TriggerResults &triggerResults) const
const unsigned int pathIndex_
Definition: HLTTauDQMPath.h:87
unsigned int index(const unsigned int i) const
Get index (slot position) of module giving the decision of the ith path.
std::vector< FilterIndex > filterIndices_
Definition: HLTTauDQMPath.h:82
bool fired(const edm::TriggerResults &triggerResults) const
bool HLTTauDQMPath::offlineMatching ( size_t  i,
const std::vector< Object > &  triggerObjects,
const HLTTauDQMOfflineObjects offlineObjects,
double  dR,
std::vector< Object > &  matchedTriggerObjects,
HLTTauDQMOfflineObjects matchedOfflineObjects 
) const

Definition at line 379 of file HLTTauDQMPath.cc.

References a, b, HLTTauDQMOfflineObjects::electrons, lumiContext::fill, filterElectronN_, filterMuonN_, filterTauN_, isFirstL1Seed_, HLTTauDQMOfflineObjects::muons, python.multivaluedict::sort(), HLTTauDQMOfflineObjects::taus, trigger::TriggerElectron, trigger::TriggerL1CenJet, trigger::TriggerL1IsoEG, trigger::TriggerL1Mu, trigger::TriggerL1NoIsoEG, trigger::TriggerL1TauJet, trigger::TriggerMuon, trigger::TriggerPhoton, and trigger::TriggerTau.

Referenced by HLTTauDQMPathSummaryPlotter::analyze(), and HLTTauDQMPathPlotter::analyze().

379  {
380  bool isL1 = (i==0 && isFirstL1Seed_);
381  std::vector<bool> offlineMask;
382  if(filterTauN_[i] > 0) {
383  int matchedObjects = 0;
384  offlineMask.resize(offlineObjects.taus.size());
385  std::fill(offlineMask.begin(), offlineMask.end(), true);
386  for(const Object& trgObj: triggerObjects) {
387  //std::cout << "trigger object id " << trgObj.id << std::endl;
388  if(! ((isL1 && (trgObj.id == trigger::TriggerL1TauJet || trgObj.id == trigger::TriggerL1CenJet))
389  || trgObj.id == trigger::TriggerTau) )
390  continue;
391  if(deltaRmatch(trgObj.object, offlineObjects.taus, dR, offlineMask, matchedOfflineObjects.taus)) {
392  ++matchedObjects;
393  matchedTriggerObjects.emplace_back(trgObj);
394  }
395  }
396  if(matchedObjects < filterTauN_[i])
397  return false;
398  }
399  if(filterElectronN_[i] > 0) {
400  int matchedObjects = 0;
401  offlineMask.resize(offlineObjects.electrons.size());
402  std::fill(offlineMask.begin(), offlineMask.end(), true);
403  for(const Object& trgObj: triggerObjects) {
404  //std::cout << "trigger object id " << trgObj.id << std::endl;
405  if(! ((isL1 && (trgObj.id == trigger::TriggerL1NoIsoEG || trgObj.id == trigger::TriggerL1IsoEG))
406  || trgObj.id == trigger::TriggerElectron || trgObj.id == trigger::TriggerPhoton) )
407  continue;
408  if(deltaRmatch(trgObj.object, offlineObjects.electrons, dR, offlineMask, matchedOfflineObjects.electrons)) {
409  ++matchedObjects;
410  matchedTriggerObjects.emplace_back(trgObj);
411  }
412  }
413  if(matchedObjects < filterElectronN_[i])
414  return false;
415  }
416  if(filterMuonN_[i] > 0) {
417  int matchedObjects = 0;
418  offlineMask.resize(offlineObjects.muons.size());
419  std::fill(offlineMask.begin(), offlineMask.end(), true);
420  for(const Object& trgObj: triggerObjects) {
421  //std::cout << "trigger object id " << trgObj.id << std::endl;
422  if(! ((isL1 && trgObj.id == trigger::TriggerL1Mu)
423  || trgObj.id == trigger::TriggerMuon) )
424  continue;
425  if(deltaRmatch(trgObj.object, offlineObjects.muons, dR, offlineMask, matchedOfflineObjects.muons)) {
426  ++matchedObjects;
427  matchedTriggerObjects.emplace_back(trgObj);
428  }
429  }
430  if(matchedObjects < filterMuonN_[i])
431  return false;
432  }
433  // Sort offline objects by pt
434  std::sort(matchedOfflineObjects.taus.begin(), matchedOfflineObjects.taus.end(), [](const LV& a, const LV&b) { return a.pt() > b.pt();});
435  std::sort(matchedOfflineObjects.electrons.begin(), matchedOfflineObjects.electrons.end(), [](const LV& a, const LV&b) { return a.pt() > b.pt();});
436  std::sort(matchedOfflineObjects.muons.begin(), matchedOfflineObjects.muons.end(), [](const LV& a, const LV&b) { return a.pt() > b.pt();});
437 
438  return true;
439 }
int i
Definition: DBlmapReader.cc:9
string fill
Definition: lumiContext.py:319
std::vector< LV > electrons
std::vector< LV > taus
enum start value shifted to 81 so as to avoid clashes with PDG codes
math::XYZTLorentzVectorD LV
std::vector< int > filterTauN_
Definition: HLTTauDQMPath.h:83
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
std::vector< int > filterElectronN_
Definition: HLTTauDQMPath.h:84
std::vector< int > filterMuonN_
Definition: HLTTauDQMPath.h:85
std::vector< LV > muons

Member Data Documentation

const bool HLTTauDQMPath::doRefAnalysis_
private

Definition at line 80 of file HLTTauDQMPath.h.

Referenced by HLTTauDQMPath().

std::vector<int> HLTTauDQMPath::filterElectronN_
private

Definition at line 84 of file HLTTauDQMPath.h.

Referenced by getFilterNElectrons(), HLTTauDQMPath(), and offlineMatching().

std::vector<FilterIndex> HLTTauDQMPath::filterIndices_
private
std::vector<int> HLTTauDQMPath::filterMuonN_
private

Definition at line 85 of file HLTTauDQMPath.h.

Referenced by getFilterNMuons(), HLTTauDQMPath(), and offlineMatching().

std::vector<int> HLTTauDQMPath::filterTauN_
private

Definition at line 83 of file HLTTauDQMPath.h.

Referenced by getFilterNTaus(), HLTTauDQMPath(), and offlineMatching().

const std::string HLTTauDQMPath::hltProcess_
private

Definition at line 79 of file HLTTauDQMPath.h.

Referenced by getFilterObjects().

bool HLTTauDQMPath::isFirstL1Seed_
private

Definition at line 92 of file HLTTauDQMPath.h.

Referenced by HLTTauDQMPath(), isFirstFilterL1Seed(), and offlineMatching().

bool HLTTauDQMPath::isValid_
private

Definition at line 93 of file HLTTauDQMPath.h.

Referenced by HLTTauDQMPath(), and isValid().

constexpr size_t HLTTauDQMPath::kInvalidIndex = std::numeric_limits<size_t>::max()
static

Definition at line 30 of file HLTTauDQMPath.h.

Referenced by hasL2Taus(), hasL3Taus(), and HLTTauDQMPath().

constexpr size_t HLTTauDQMPath::kModuleIndex = 1
static

Definition at line 29 of file HLTTauDQMPath.h.

constexpr size_t HLTTauDQMPath::kName = 0
static

Definition at line 28 of file HLTTauDQMPath.h.

size_t HLTTauDQMPath::lastFilterBeforeL2TauIndex_
private

Definition at line 88 of file HLTTauDQMPath.h.

Referenced by getLastFilterBeforeL2TauIndex(), and HLTTauDQMPath().

size_t HLTTauDQMPath::lastFilterBeforeL3TauIndex_
private

Definition at line 90 of file HLTTauDQMPath.h.

Referenced by getLastFilterBeforeL3TauIndex(), and HLTTauDQMPath().

size_t HLTTauDQMPath::lastL2TauFilterIndex_
private

Definition at line 89 of file HLTTauDQMPath.h.

Referenced by getLastL2TauFilterIndex(), hasL2Taus(), and HLTTauDQMPath().

size_t HLTTauDQMPath::lastL3TauFilterIndex_
private

Definition at line 91 of file HLTTauDQMPath.h.

Referenced by getLastL3TauFilterIndex(), hasL3Taus(), and HLTTauDQMPath().

const unsigned int HLTTauDQMPath::pathIndex_
private

Definition at line 87 of file HLTTauDQMPath.h.

Referenced by fired(), getPathIndex(), and lastPassedFilter().

const std::string HLTTauDQMPath::pathName_
private

Definition at line 86 of file HLTTauDQMPath.h.

Referenced by getPathName(), and HLTTauDQMPath().