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 233 of file HLTTauDQMPath.cc.

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

233  :
234  hltProcess_(hltProcess),
235  doRefAnalysis_(doRefAnalysis),
240  isFirstL1Seed_(false),
241  isValid_(false)
242 {
243 #ifdef EDM_ML_DEBUG
244  std::stringstream ss;
245  ss << "HLTTauDQMPath: " << pathName_ << "\n";
246 #endif
247 
248  // Get the filters
249  HLTPath thePath(pathName_);
250  filterIndices_ = thePath.interestingFilters(HLTCP, doRefAnalysis_);
251  if(filterIndices_.empty()) {
252  edm::LogInfo("HLTTauDQMOffline") << "HLTTauDQMPath: " << pathName_ << " no interesting filters found";
253  return;
254  }
255  isFirstL1Seed_ = HLTCP.moduleType(std::get<kName>(filterIndices_[0])) == "HLTLevel1GTSeed";
256 #ifdef EDM_ML_DEBUG
257  ss << " Interesting filters (preceded by the module index in the path)";
258 #endif
259  // Set the filter multiplicity counts
260  filterTauN_.clear();
261  filterElectronN_.clear();
262  filterMuonN_.clear();
263  filterTauN_.reserve(filterIndices_.size());
264  filterElectronN_.reserve(filterIndices_.size());
265  filterMuonN_.reserve(filterIndices_.size());
266  for(size_t i=0; i<filterIndices_.size(); ++i) {
267  const std::string& filterName = std::get<kName>(filterIndices_[i]);
268  const std::string& moduleType = HLTCP.moduleType(filterName);
269 
270  TauLeptonMultiplicity n = inferTauLeptonMultiplicity(HLTCP, filterName, moduleType, pathName_);
271  filterTauN_.push_back(n.tau);
272  filterElectronN_.push_back(n.electron);
273  filterMuonN_.push_back(n.muon);
274 
275 #ifdef EDM_ML_DEBUG
276  ss << "\n " << std::get<kModuleIndex>(filterIndices_[i])
277  << " " << filterName
278  << " " << moduleType
279  << " ntau " << n.tau
280  << " nele " << n.electron
281  << " nmu " << n.muon;
282 #endif
283 
284  }
285 #ifdef EDM_ML_DEBUG
286  LogDebug("HLTTauDQMOffline") << ss.str();
287 #endif
288 
289 
290  // Find the position of tau producer, use filters with taus before
291  // it for L2 tau efficiency, and filters with taus after it for L3
292  // tau efficiency. Here we have to take into account that for
293  // reference-matched case filterIndices_ contains only those filters
294  // that have saveTags=True, while for searching the first L3 tau
295  // filter we have to consider all filters
296  const size_t firstL3TauFilterIndex = thePath.firstL3TauFilterIndex(HLTCP);
297  if(firstL3TauFilterIndex == kInvalidIndex) {
298  edm::LogInfo("HLTTauDQMOffline") << "Did not find a filter with L3 tau producer as input in path " << pathName_;
299  }
300 
305  size_t i = 0;
306  for(; i<filtersSize() && getFilterIndex(i) < firstL3TauFilterIndex; ++i) {
309  if(getFilterNTaus(i) > 0 && getFilterNElectrons(i) == 0 && getFilterNMuons(i) == 0)
311  }
313  for(; i<filtersSize(); ++i) {
316  if(getFilterNTaus(i) > 0 && getFilterNElectrons(i) == 0 && getFilterNMuons(i) == 0)
318  }
319  LogDebug("HLTTauDQMOffline") << "lastFilterBeforeL2 " << lastFilterBeforeL2TauIndex_
320  << " lastL2TauFilter " << lastL2TauFilterIndex_
321  << " lastFilterBeforeL3 " << lastFilterBeforeL3TauIndex_
322  << " lastL3TauFilter " << lastL3TauFilterIndex_;
323  isValid_ = true;
324 }
#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 326 of file HLTTauDQMPath.cc.

326 {}

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 329 of file HLTTauDQMPath.cc.

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

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

329  {
330  return triggerResults.accept(pathIndex_);
331 }
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 353 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().

353  {
354  trigger::size_type filterIndex = triggerEvent.filterIndex(edm::InputTag(getFilterName(i), "", hltProcess_));
355  if(filterIndex != triggerEvent.sizeFilters()) {
356  const trigger::Keys& keys = triggerEvent.filterKeys(filterIndex);
357  const trigger::Vids& ids = triggerEvent.filterIds(filterIndex);
358  const trigger::TriggerObjectCollection& triggerObjects = triggerEvent.getObjects();
359  //std::cout << "Filter name " << getFilterName(i) << std::endl;
360  for(size_t i=0; i<keys.size(); ++i) {
361  const trigger::TriggerObject& object = triggerObjects[keys[i]];
362  retval.emplace_back(Object{object, ids[i]});
363  //std::cout << " object id " << object.id() << std::endl;
364  }
365  }
366 }
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 430 of file HLTTauDQMPath.cc.

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

Referenced by HLTTauDQMPathSummaryPlotter::analyze().

430  {
431  return (static_cast<size_t>(getFilterNTaus(i)) <= offlineObjects.taus.size() &&
432  static_cast<size_t>(getFilterNElectrons(i)) <= offlineObjects.electrons.size() &&
433  static_cast<size_t>(getFilterNMuons(i)) <= offlineObjects.muons.size());
434 }
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().

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

Definition at line 333 of file HLTTauDQMPath.cc.

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

Referenced by HLTTauDQMPathPlotter::analyze().

333  {
334  if(fired(triggerResults)) {
335  //std::cout << "Event passed" << std::endl;
336  return filterIndices_.size()-1;
337  }
338 
339  unsigned int firstFailedFilter = triggerResults.index(pathIndex_);
340  int lastPassedFilter = -1;
341  for(size_t i=0; i<filterIndices_.size(); ++i) {
342  if(std::get<kModuleIndex>(filterIndices_[i]) < firstFailedFilter) {
343  lastPassedFilter = i;
344  }
345  else {
346  //std::cout << "Decision-making filter " << firstFailedFilter << " this " << std::get<kModuleIndex>(filterIndices_[i]) << std::endl;
347  break;
348  }
349  }
350  return lastPassedFilter;
351 }
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 368 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, and trigger::TriggerTau.

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

368  {
369  bool isL1 = (i==0 && isFirstL1Seed_);
370  std::vector<bool> offlineMask;
371  if(filterTauN_[i] > 0) {
372  int matchedObjects = 0;
373  offlineMask.resize(offlineObjects.taus.size());
374  std::fill(offlineMask.begin(), offlineMask.end(), true);
375  for(const Object& trgObj: triggerObjects) {
376  //std::cout << "trigger object id " << trgObj.id << std::endl;
377  if(! ((isL1 && (trgObj.id == trigger::TriggerL1TauJet || trgObj.id == trigger::TriggerL1CenJet))
378  || trgObj.id == trigger::TriggerTau) )
379  continue;
380  if(deltaRmatch(trgObj.object, offlineObjects.taus, dR, offlineMask, matchedOfflineObjects.taus)) {
381  ++matchedObjects;
382  matchedTriggerObjects.emplace_back(trgObj);
383  }
384  }
385  if(matchedObjects < filterTauN_[i])
386  return false;
387  }
388  if(filterElectronN_[i] > 0) {
389  int matchedObjects = 0;
390  offlineMask.resize(offlineObjects.electrons.size());
391  std::fill(offlineMask.begin(), offlineMask.end(), true);
392  for(const Object& trgObj: triggerObjects) {
393  //std::cout << "trigger object id " << trgObj.id << std::endl;
394  if(! ((isL1 && (trgObj.id == trigger::TriggerL1NoIsoEG || trgObj.id == trigger::TriggerL1IsoEG))
395  || trgObj.id == trigger::TriggerElectron) )
396  continue;
397  if(deltaRmatch(trgObj.object, offlineObjects.electrons, dR, offlineMask, matchedOfflineObjects.electrons)) {
398  ++matchedObjects;
399  matchedTriggerObjects.emplace_back(trgObj);
400  }
401  }
402  if(matchedObjects < filterElectronN_[i])
403  return false;
404  }
405  if(filterMuonN_[i] > 0) {
406  int matchedObjects = 0;
407  offlineMask.resize(offlineObjects.muons.size());
408  std::fill(offlineMask.begin(), offlineMask.end(), true);
409  for(const Object& trgObj: triggerObjects) {
410  //std::cout << "trigger object id " << trgObj.id << std::endl;
411  if(! ((isL1 && trgObj.id == trigger::TriggerL1Mu)
412  || trgObj.id == trigger::TriggerMuon) )
413  continue;
414  if(deltaRmatch(trgObj.object, offlineObjects.muons, dR, offlineMask, matchedOfflineObjects.muons)) {
415  ++matchedObjects;
416  matchedTriggerObjects.emplace_back(trgObj);
417  }
418  }
419  if(matchedObjects < filterMuonN_[i])
420  return false;
421  }
422  // Sort offline objects by pt
423  std::sort(matchedOfflineObjects.taus.begin(), matchedOfflineObjects.taus.end(), [](const LV& a, const LV&b) { return a.pt() > b.pt();});
424  std::sort(matchedOfflineObjects.electrons.begin(), matchedOfflineObjects.electrons.end(), [](const LV& a, const LV&b) { return a.pt() > b.pt();});
425  std::sort(matchedOfflineObjects.muons.begin(), matchedOfflineObjects.muons.end(), [](const LV& a, const LV&b) { return a.pt() > b.pt();});
426 
427  return true;
428 }
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().