CMS 3D CMS Logo

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

#include <HLTTauDQMFilter.h>

Public Member Functions

std::vector< edm::ParameterSetgetPSets (HLTConfigProvider const &HLTCP)
 
edm::ParameterSet getRefPSet ()
 
edm::ParameterSet getSummaryPSet (HLTConfigProvider const &HLTCP)
 
 HLTTauDQMFilter (std::string const &name, int initialPrescale, std::string hltTauDQMProcess, double L1MatchDeltaR, double HLTMatchDeltaR)
 
 HLTTauDQMFilter (std::string const &name, std::string const &alias, int initialPrescale, std::string hltTauDQMProcess, double L1MatchDeltaR, double HLTMatchDeltaR, int nRefTaus=-1, int nRefElectrons=-1, int nRefMuons=-1)
 
int initialPrescale () const
 
std::map< int, std::string > interestingModules (HLTConfigProvider const &HLTCP)
 
int leadingElectron () const
 
int leadingHT () const
 
int leadingMET () const
 
int leadingMuon () const
 
int leadingPFMHT () const
 
int leadingQuadJet () const
 
int leadingTau () const
 
std::string name () const
 
int NReferenceLeptons () const
 
int NReferenceTaus () const
 
void print ()
 
HLTTauDQMFilter const & select (HLTTauDQMFilter const &filter, bool &swapped)
 
std::string type () const
 
virtual ~HLTTauDQMFilter ()
 

Private Member Functions

bool insertUniqueValue (std::map< int, std::string > &container, std::pair< int, std::string > const &value)
 
void regexSearch ()
 
void setType ()
 
bool string2int (const char *digit, int &result)
 

Private Attributes

std::string alias_
 
unsigned int count_electrons_
 
unsigned int count_hts_
 
unsigned int count_mets_
 
unsigned int count_muons_
 
unsigned int count_pfmhts_
 
unsigned int count_quadjets_
 
unsigned int count_taus_
 
std::multimap< int, std::string > electrons_
 
double HLTMatchDeltaR_
 
std::string hltTauDQMProcess_
 
std::multimap< int, std::string > ht_
 
int initialPrescale_
 
double L1MatchDeltaR_
 
std::multimap< int, std::string > mets_
 
std::multimap< int, std::string > muons_
 
std::string name_
 
std::multimap< int, std::string > pfmht_
 
std::multimap< int, std::string > quadjets_
 
std::multimap< int, std::string > taus_
 
std::string type_
 

Detailed Description

Definition at line 10 of file HLTTauDQMFilter.h.

Constructor & Destructor Documentation

HLTTauDQMFilter::HLTTauDQMFilter ( std::string const &  name,
int  initialPrescale,
std::string  hltTauDQMProcess,
double  L1MatchDeltaR,
double  HLTMatchDeltaR 
)

Definition at line 5 of file HLTTauDQMFilter.cc.

References alias_, count_electrons_, count_hts_, count_mets_, count_muons_, count_pfmhts_, count_quadjets_, count_taus_, HLTMatchDeltaR_, HLTMonTau_cfi::hltTauDQMProcess, hltTauDQMProcess_, initialPrescale(), initialPrescale_, L1MatchDeltaR_, name(), name_, regexSearch(), and setType().

5  {
6  name_ = name;
7  alias_ = "";
10  L1MatchDeltaR_ = L1MatchDeltaR;
11  HLTMatchDeltaR_ = HLTMatchDeltaR;
12  count_taus_ = 0;
13  count_muons_ = 0;
14  count_electrons_ = 0;
15  count_mets_ = 0;
16  count_quadjets_ = 0;
17  count_pfmhts_ = 0;
18  count_hts_ = 0;
19  regexSearch();
20  setType();
21 }
unsigned int count_electrons_
unsigned int count_quadjets_
unsigned int count_taus_
std::string name_
string hltTauDQMProcess
Definition: HLTMonTau_cfi.py:3
unsigned int count_hts_
unsigned int count_muons_
std::string hltTauDQMProcess_
unsigned int count_pfmhts_
unsigned int count_mets_
int initialPrescale() const
std::string alias_
std::string name() const
HLTTauDQMFilter::HLTTauDQMFilter ( std::string const &  name,
std::string const &  alias,
int  initialPrescale,
std::string  hltTauDQMProcess,
double  L1MatchDeltaR,
double  HLTMatchDeltaR,
int  nRefTaus = -1,
int  nRefElectrons = -1,
int  nRefMuons = -1 
)

Definition at line 23 of file HLTTauDQMFilter.cc.

References alias_, count_electrons_, count_hts_, count_mets_, count_muons_, count_pfmhts_, count_quadjets_, count_taus_, HLTMatchDeltaR_, HLTMonTau_cfi::hltTauDQMProcess, hltTauDQMProcess_, initialPrescale(), initialPrescale_, L1MatchDeltaR_, name(), name_, regexSearch(), and setType().

23  {
24  name_ = name;
25  alias_ = alias;
28  L1MatchDeltaR_ = L1MatchDeltaR;
29  HLTMatchDeltaR_ = HLTMatchDeltaR;
30  count_taus_ = 0;
31  count_muons_ = 0;
32  count_electrons_ = 0;
33  count_mets_ = 0;
34  count_quadjets_ = 0;
35  count_pfmhts_ = 0;
36  count_hts_ = 0;
37  regexSearch();
38  setType();
39  if (nRefTaus != -1) count_taus_ = nRefTaus;
40  if (nRefElectrons != -1) count_electrons_ = nRefElectrons;
41  if (nRefMuons != -1) count_muons_ = nRefMuons;
42 }
unsigned int count_electrons_
unsigned int count_quadjets_
unsigned int count_taus_
std::string name_
string hltTauDQMProcess
Definition: HLTMonTau_cfi.py:3
unsigned int count_hts_
unsigned int count_muons_
std::string hltTauDQMProcess_
unsigned int count_pfmhts_
unsigned int count_mets_
int initialPrescale() const
std::string alias_
std::string name() const
HLTTauDQMFilter::~HLTTauDQMFilter ( )
virtual

Definition at line 44 of file HLTTauDQMFilter.cc.

44  {
45 }

Member Function Documentation

std::vector< edm::ParameterSet > HLTTauDQMFilter::getPSets ( HLTConfigProvider const &  HLTCP)

Definition at line 343 of file HLTTauDQMFilter.cc.

References edm::ParameterSet::addUntrackedParameter(), count_electrons_, count_muons_, count_taus_, HLTMatchDeltaR_, hltTauDQMProcess_, interestingModules(), L1MatchDeltaR_, HLTConfigProvider::moduleType(), tmp, trigger::TriggerElectron, trigger::TriggerL1IsoEG, trigger::TriggerL1Mu, trigger::TriggerL1TauJet, trigger::TriggerMuon, and trigger::TriggerTau.

Referenced by getSummaryPSet().

343  {
344  std::vector<edm::ParameterSet> psets;
345  std::map<int,std::string> modules = interestingModules(HLTCP);
346 
347  boost::regex reElectron(".*Electron.*");
348  boost::regex reMuon(".*Muon.*");
349 
350  for ( std::map<int,std::string>::const_iterator imodule = modules.begin(); imodule != modules.end(); ++imodule ) {
352  tmp.addUntrackedParameter<edm::InputTag>( "FilterName", edm::InputTag(imodule->second,"",hltTauDQMProcess_) );
353 
354  if ( HLTCP.moduleType(imodule->second) == "HLTLevel1GTSeed" ) {
355  tmp.addUntrackedParameter<double>( "MatchDeltaR", L1MatchDeltaR_ );
356  if ( count_taus_ == 2 && count_muons_ == 0 && count_electrons_ == 0 ) { //DoubleTau
357  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", 2 );
358  tmp.addUntrackedParameter<int>( "TauType", trigger::TriggerL1TauJet );
359  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", 0 );
360  tmp.addUntrackedParameter<int>( "LeptonType", 0 );
361  } else if ( count_taus_ == 1 && count_muons_ == 0 && count_electrons_ == 0 ) { //SingleTau
362  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", 1 );
363  tmp.addUntrackedParameter<int>( "TauType", trigger::TriggerL1TauJet );
364  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", 0 );
365  tmp.addUntrackedParameter<int>( "LeptonType", 0 );
366  } else if ( count_taus_ == 1 && count_muons_ == 0 && count_electrons_ == 1 ) { //EleTau
367  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", 0 );
368  tmp.addUntrackedParameter<int>( "TauType", 0 );
369  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", 1 );
370  tmp.addUntrackedParameter<int>( "LeptonType", trigger::TriggerL1IsoEG );
371  } else if ( count_taus_ == 1 && count_muons_ == 1 && count_electrons_ == 0 ) { //MuTau
372  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", 0 );
373  tmp.addUntrackedParameter<int>( "TauType", 0 );
374  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", 1 );
375  tmp.addUntrackedParameter<int>( "LeptonType", trigger::TriggerL1Mu );
376  } else { //Unknown
377  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", 0 );
378  tmp.addUntrackedParameter<int>( "TauType", 0 );
379  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", 0 );
380  tmp.addUntrackedParameter<int>( "LeptonType", 0 );
381  }
382  } else if ( HLTCP.moduleType(imodule->second) == "HLT1Tau" || HLTCP.moduleType(imodule->second) == "HLT1PFTau" || HLTCP.moduleType(imodule->second) == "HLT1SmartTau" ) {
383  tmp.addUntrackedParameter<double>( "MatchDeltaR", HLTMatchDeltaR_ );
384  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", count_taus_ );
385  tmp.addUntrackedParameter<int>( "TauType", trigger::TriggerTau );
386  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", 0 );
387  tmp.addUntrackedParameter<int>( "LeptonType", 0 );
388  } else if ( HLTCP.moduleType(imodule->second) == "HLT2ElectronTau" || HLTCP.moduleType(imodule->second) == "HLT2ElectronPFTau" ) {
389  tmp.addUntrackedParameter<double>( "MatchDeltaR", HLTMatchDeltaR_ );
390  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", count_taus_ );
391  tmp.addUntrackedParameter<int>( "TauType", trigger::TriggerTau );
392  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", count_electrons_ );
393  tmp.addUntrackedParameter<int>( "LeptonType", trigger::TriggerElectron );
394  } else if ( HLTCP.moduleType(imodule->second) == "HLT2MuonTau" || HLTCP.moduleType(imodule->second) == "HLT2MuonPFTau" ) {
395  tmp.addUntrackedParameter<double>( "MatchDeltaR", HLTMatchDeltaR_ );
396  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", count_taus_ );
397  tmp.addUntrackedParameter<int>( "TauType", trigger::TriggerTau );
398  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", count_muons_ );
399  tmp.addUntrackedParameter<int>( "LeptonType", trigger::TriggerMuon );
400  } else if ( boost::regex_match(HLTCP.moduleType(imodule->second), reElectron) ) {
401  tmp.addUntrackedParameter<double>( "MatchDeltaR", HLTMatchDeltaR_ );
402  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", 0 );
403  tmp.addUntrackedParameter<int>( "TauType", 0 );
404  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", count_electrons_ );
405  tmp.addUntrackedParameter<int>( "LeptonType", trigger::TriggerElectron );
406  } else if ( boost::regex_match(HLTCP.moduleType(imodule->second), reMuon) ) {
407  tmp.addUntrackedParameter<double>( "MatchDeltaR", HLTMatchDeltaR_ );
408  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", 0 );
409  tmp.addUntrackedParameter<int>( "TauType", 0 );
410  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", count_muons_ );
411  tmp.addUntrackedParameter<int>( "LeptonType", trigger::TriggerMuon );
412  }
413  psets.push_back(tmp);
414  }
415 
416  return psets;
417 }
unsigned int count_electrons_
std::map< int, std::string > interestingModules(HLTConfigProvider const &HLTCP)
enum start value shifted to 81 so as to avoid clashes with PDG codes
unsigned int count_taus_
unsigned int count_muons_
std::string hltTauDQMProcess_
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:209
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
edm::ParameterSet HLTTauDQMFilter::getRefPSet ( )

Definition at line 419 of file HLTTauDQMFilter.cc.

References edm::ParameterSet::addUntrackedParameter(), NReferenceLeptons(), NReferenceTaus(), and tmp.

419  {
421  tmp.addUntrackedParameter<unsigned int>( "NTriggeredTaus", NReferenceTaus() );
422  tmp.addUntrackedParameter<unsigned int>( "NTriggeredLeptons", NReferenceLeptons() );
423 
424  return tmp;
425 }
int NReferenceTaus() const
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:209
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
int NReferenceLeptons() const
edm::ParameterSet HLTTauDQMFilter::getSummaryPSet ( HLTConfigProvider const &  HLTCP)

Definition at line 427 of file HLTTauDQMFilter.cc.

References edm::ParameterSet::addUntrackedParameter(), getPSets(), edm::ParameterSet::getUntrackedParameter(), tmp, trigger::TriggerElectron, trigger::TriggerMuon, and type().

427  {
429  std::vector<edm::ParameterSet> modules = getPSets(HLTCP);
430  if (modules.size() > 0) {
431  tmp = modules.back();
432  tmp.addUntrackedParameter<std::string>( "Alias", type() );
433  tmp.addUntrackedParameter<int>( "TauType", 15 );
434  if ( tmp.getUntrackedParameter<int>( "LeptonType" ) == trigger::TriggerElectron ) {
435  tmp.addUntrackedParameter<int>( "LeptonType", 11 );
436  } else if ( tmp.getUntrackedParameter<int>( "LeptonType" ) == trigger::TriggerMuon ) {
437  tmp.addUntrackedParameter<int>( "LeptonType", 13 );
438  }
439  }
440  return tmp;
441 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< edm::ParameterSet > getPSets(HLTConfigProvider const &HLTCP)
void addUntrackedParameter(std::string const &name, T const &value)
Definition: ParameterSet.h:209
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
std::string type() const
int HLTTauDQMFilter::initialPrescale ( ) const
inline

Definition at line 16 of file HLTTauDQMFilter.h.

References initialPrescale_.

Referenced by HLTTauDQMFilter(), and select().

16 { return initialPrescale_; }
bool HLTTauDQMFilter::insertUniqueValue ( std::map< int, std::string > &  container,
std::pair< int, std::string > const &  value 
)
private

Definition at line 331 of file HLTTauDQMFilter.cc.

Referenced by interestingModules().

331  {
332  bool unique = true;
333  for ( std::map<int,std::string>::const_iterator iter = container.begin(); iter != container.end(); ++iter ) {
334  if ( iter->second == value.second ) {
335  unique = false;
336  break;
337  }
338  }
339  if ( unique ) container.insert(value);
340  return unique;
341 }
std::map< int, std::string > HLTTauDQMFilter::interestingModules ( HLTConfigProvider const &  HLTCP)

Definition at line 274 of file HLTTauDQMFilter.cc.

References alias_, spr::find(), edm::ParameterSet::getParameter(), HLTConfigProvider::inited(), input1, input2, insertUniqueValue(), edm::InputTag::label(), HLTConfigProvider::moduleLabels(), HLTConfigProvider::modulePSet(), HLTConfigProvider::moduleType(), name_, and relativeConstraints::value.

Referenced by getPSets().

274  {
275  std::map<int,std::string> modules;
276  if ( HLTCP.inited() ) {
277  boost::regex rePFTau(".*PFTau.*");
278  boost::regex rePFIsoTau(".*PFIsoTau.*");
279 
280  const std::vector<std::string>& moduleLabels = HLTCP.moduleLabels(name_);
281  for ( std::vector<std::string>::const_iterator imodule = moduleLabels.begin(); imodule != moduleLabels.end(); ++imodule ) {
282  int idx = imodule - moduleLabels.begin();
283 
284  if ( HLTCP.moduleType(*imodule) == "HLTLevel1GTSeed" ) {
285  insertUniqueValue(modules, std::make_pair(idx,*imodule));
286  } else if ( HLTCP.moduleType(*imodule) == "HLT1Tau" || HLTCP.moduleType(*imodule) == "HLT1PFTau" || HLTCP.moduleType(*imodule) == "HLT1SmartTau" ) {
287  if ( boost::regex_match(*imodule, rePFTau) || boost::regex_match(*imodule, rePFIsoTau) ) {
288  insertUniqueValue(modules, std::make_pair(idx,*imodule));
289  }
290  } else if ( HLTCP.moduleType(*imodule) == "HLT2ElectronTau" || HLTCP.moduleType(*imodule) == "HLT2ElectronPFTau" || HLTCP.moduleType(*imodule) == "HLT2MuonTau" || HLTCP.moduleType(*imodule) == "HLT2MuonPFTau" ) {
291  if ( boost::regex_match(*imodule, rePFTau) || boost::regex_match(*imodule, rePFIsoTau) ) {
292  insertUniqueValue(modules, std::make_pair(idx,*imodule));
293 
294  std::string input1 = HLTCP.modulePSet(*imodule).getParameter<edm::InputTag>("inputTag1").label();
295  int idx1 = std::find(moduleLabels.begin(), moduleLabels.end(), input1) - moduleLabels.begin();
296 
297  std::string input2 = HLTCP.modulePSet(*imodule).getParameter<edm::InputTag>("inputTag2").label();
298  int idx2 = std::find(moduleLabels.begin(), moduleLabels.end(), input2) - moduleLabels.begin();
299 
300  if ( HLTCP.moduleType(input1) == "HLT1Tau" || HLTCP.moduleType(input1) == "HLT1PFTau" || HLTCP.moduleType(input1) == "HLT1SmartTau" ) {
301  if ( boost::regex_match(input1, rePFTau) || boost::regex_match(input1, rePFIsoTau) ) {
302  insertUniqueValue(modules, std::make_pair(idx1,input1));
303  }
304  } else {
305  insertUniqueValue(modules, std::make_pair(idx1,input1));
306  }
307 
308  if ( HLTCP.moduleType(input2) == "HLT1Tau" || HLTCP.moduleType(input2) == "HLT1PFTau" || HLTCP.moduleType(input2) == "HLT1SmartTau" ) {
309  if ( boost::regex_match(input2, rePFTau) || boost::regex_match(input2, rePFIsoTau) ) {
310  insertUniqueValue(modules, std::make_pair(idx2,input2));
311  }
312  } else {
313  insertUniqueValue(modules, std::make_pair(idx2,input2));
314  }
315  }
316  }
317  }
318  }
319  if ( alias_ != "" ) {
320  for ( std::map<int,std::string>::iterator iter = modules.begin(); iter != modules.end(); ) {
321  std::map<int,std::string>::iterator tempItr = iter++;
322  std::string const& value = HLTCP.moduleType(tempItr->second);
323  if ( value != "HLT1Tau" && value != "HLT1PFTau" && value != "HLT1SmartTau" ) {
324  modules.erase(tempItr);
325  }
326  }
327  }
328  return modules;
329 }
std::string name_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
bool insertUniqueValue(std::map< int, std::string > &container, std::pair< int, std::string > const &value)
#define input2
Definition: AMPTWrapper.h:149
#define input1
Definition: AMPTWrapper.h:129
std::string const & label() const
Definition: InputTag.h:25
std::string alias_
int HLTTauDQMFilter::leadingElectron ( ) const

Definition at line 76 of file HLTTauDQMFilter.cc.

References electrons_.

Referenced by select().

76  {
77  if ( electrons_.size() > 0 ) {
78  std::multimap<int,std::string>::const_iterator iter = electrons_.end(); --iter;
79  return iter->first;
80  }
81  return 0;
82 }
std::multimap< int, std::string > electrons_
int HLTTauDQMFilter::leadingHT ( ) const

Definition at line 108 of file HLTTauDQMFilter.cc.

References ht_.

Referenced by select().

108  {
109  if ( ht_.size() > 0 ) {
110  std::multimap<int,std::string>::const_iterator iter = ht_.end(); --iter;
111  return iter->first;
112  }
113  return 0;
114 }
std::multimap< int, std::string > ht_
int HLTTauDQMFilter::leadingMET ( ) const

Definition at line 84 of file HLTTauDQMFilter.cc.

References mets_.

Referenced by select().

84  {
85  if ( mets_.size() > 0 ) {
86  std::multimap<int,std::string>::const_iterator iter = mets_.end(); --iter;
87  return iter->first;
88  }
89  return 0;
90 }
std::multimap< int, std::string > mets_
int HLTTauDQMFilter::leadingMuon ( ) const

Definition at line 68 of file HLTTauDQMFilter.cc.

References muons_.

Referenced by select().

68  {
69  if ( muons_.size() > 0 ) {
70  std::multimap<int,std::string>::const_iterator iter = muons_.end(); --iter;
71  return iter->first;
72  }
73  return 0;
74 }
std::multimap< int, std::string > muons_
int HLTTauDQMFilter::leadingPFMHT ( ) const

Definition at line 100 of file HLTTauDQMFilter.cc.

References pfmht_.

Referenced by select().

100  {
101  if ( pfmht_.size() > 0 ) {
102  std::multimap<int,std::string>::const_iterator iter = pfmht_.end(); --iter;
103  return iter->first;
104  }
105  return 0;
106 }
std::multimap< int, std::string > pfmht_
int HLTTauDQMFilter::leadingQuadJet ( ) const

Definition at line 92 of file HLTTauDQMFilter.cc.

References quadjets_.

Referenced by select().

92  {
93  if ( quadjets_.size() > 0 ) {
94  std::multimap<int,std::string>::const_iterator iter = quadjets_.end(); --iter;
95  return iter->first;
96  }
97  return 0;
98 }
std::multimap< int, std::string > quadjets_
int HLTTauDQMFilter::leadingTau ( ) const

Definition at line 60 of file HLTTauDQMFilter.cc.

References taus_.

Referenced by select().

60  {
61  if ( taus_.size() > 0 ) {
62  std::multimap<int,std::string>::const_iterator iter = taus_.end(); --iter;
63  return iter->first;
64  }
65  return 0;
66 }
std::multimap< int, std::string > taus_
std::string HLTTauDQMFilter::name ( void  ) const
inline

Definition at line 15 of file HLTTauDQMFilter.h.

References name_.

Referenced by HLTTauDQMFilter(), and Vispa.Views.PropertyView.Property::valueChanged().

15 { return name_; }
std::string name_
int HLTTauDQMFilter::NReferenceLeptons ( ) const
inline

Definition at line 31 of file HLTTauDQMFilter.h.

References count_electrons_, and count_muons_.

Referenced by getRefPSet().

unsigned int count_electrons_
unsigned int count_muons_
int HLTTauDQMFilter::NReferenceTaus ( ) const
inline

Definition at line 30 of file HLTTauDQMFilter.h.

References count_taus_.

Referenced by getRefPSet().

30 { return count_taus_; }
unsigned int count_taus_
void HLTTauDQMFilter::print ( void  )

Definition at line 47 of file HLTTauDQMFilter.cc.

References count_electrons_, count_hts_, count_mets_, count_muons_, count_pfmhts_, count_quadjets_, count_taus_, gather_cfg::cout, initialPrescale_, name_, and type().

47  {
48  std::cout << "HLTTauDQMFilter '" << name_ << "':" << std::endl;
49  std::cout << " initial prescale: " << initialPrescale_ << std::endl;
50  std::cout << " " << count_taus_ << " tau(s)" << std::endl;
51  std::cout << " " << count_muons_ << " muon(s)" << std::endl;
52  std::cout << " " << count_electrons_ << " electron(s)" << std::endl;
53  std::cout << " " << count_mets_ << " MET(s)" << std::endl;
54  std::cout << " " << count_quadjets_ << " QuadJet(s)" << std::endl;
55  std::cout << " " << count_pfmhts_ << " PFMHT(s)" << std::endl;
56  std::cout << " " << count_hts_ << " HT(s)" << std::endl;
57  std::cout << " --> type: " << type() << std::endl;
58 }
unsigned int count_electrons_
unsigned int count_quadjets_
unsigned int count_taus_
std::string name_
unsigned int count_hts_
unsigned int count_muons_
unsigned int count_pfmhts_
unsigned int count_mets_
tuple cout
Definition: gather_cfg.py:121
std::string type() const
void HLTTauDQMFilter::regexSearch ( )
private

Definition at line 134 of file HLTTauDQMFilter.cc.

References count_electrons_, count_hts_, count_mets_, count_muons_, count_pfmhts_, count_quadjets_, count_taus_, electrons_, end, relval_parameters_module::energy, ht_, mets_, muons_, name_, pfmht_, quadjets_, errorMatrix2Lands_multiChannel::start, string2int(), and taus_.

Referenced by HLTTauDQMFilter().

134  {
135  boost::regex exprTau("([a-zA-Z]*?)IsoPFTau([0-9]+)_");
136  boost::smatch what;
137  std::string::const_iterator start = name_.begin();
138  std::string::const_iterator end = name_.end();
139  while ( boost::regex_search(start, end, what, exprTau) ) {
140  int energy = 0;
141  string2int(what[2].str().c_str(),energy);
142  if (std::string(what[1]) == "Double" || std::string(what[1]) == "DoubleLoose" || std::string(what[1]) == "DoubleMedium" || std::string(what[1]) == "DoubleTight") {
143  taus_.insert(std::pair<int,std::string>(energy,""));
144  taus_.insert(std::pair<int,std::string>(energy,""));
145  count_taus_ += 2;
146  } else {
147  taus_.insert(std::pair<int,std::string>(energy,what[1]));
148  count_taus_++;
149  }
150 
151  // update search position:
152  start = what[0].second;
153  }
154 
155  boost::regex exprMuon("([a-zA-Z]*?)Mu([0-9]+)");
156  start = name_.begin();
157  while ( boost::regex_search(start, end, what, exprMuon) ) {
158  int energy = 0;
159  string2int(what[2].str().c_str(),energy);
160  muons_.insert(std::pair<int,std::string>(energy,what[1]));
161  count_muons_++;
162 
163  // update search position:
164  start = what[0].second;
165  }
166 
167  boost::regex exprElectron("([a-zA-Z]*?)Ele([0-9]+)");
168  start = name_.begin();
169  while ( boost::regex_search(start, end, what, exprElectron) ) {
170  int energy = 0;
171  string2int(what[2].str().c_str(),energy);
172  electrons_.insert(std::pair<int,std::string>(energy,what[1]));
174 
175  // update search position:
176  start = what[0].second;
177  }
178 
179  boost::regex exprMET("([a-zA-Z]*?)MET([0-9]+)");
180  start = name_.begin();
181  while ( boost::regex_search(start, end, what, exprMET) ) {
182  int energy = 0;
183  string2int(what[2].str().c_str(),energy);
184  mets_.insert(std::pair<int,std::string>(energy,what[1]));
185  count_mets_++;
186 
187  // update search position:
188  start = what[0].second;
189  }
190 
191  boost::regex exprQuadJet("([a-zA-Z]*?)QuadJet([0-9]+)");
192  start = name_.begin();
193  while ( boost::regex_search(start, end, what, exprQuadJet) ) {
194  int energy = 0;
195  string2int(what[2].str().c_str(),energy);
196  quadjets_.insert(std::pair<int,std::string>(energy,what[1]));
197  count_quadjets_++;
198 
199  // update search position:
200  start = what[0].second;
201  }
202 
203  boost::regex exprPFMHT("([a-zA-Z]*?)PFMHT([0-9]+)");
204  start = name_.begin();
205  while ( boost::regex_search(start, end, what, exprPFMHT) ) {
206  int energy = 0;
207  string2int(what[2].str().c_str(),energy);
208  pfmht_.insert(std::pair<int,std::string>(energy,what[1]));
209  count_pfmhts_++;
210 
211  // update search position:
212  start = what[0].second;
213  }
214 
215  boost::regex exprHT("_HT([0-9]+)");
216  start = name_.begin();
217  while ( boost::regex_search(start, end, what, exprHT) ) {
218  int energy = 0;
219  string2int(what[1].str().c_str(),energy);
220  ht_.insert(std::pair<int,std::string>(energy,""));
221  count_hts_++;
222 
223  // update search position:
224  start = what[0].second;
225  }
226 }
unsigned int count_electrons_
unsigned int count_quadjets_
unsigned int count_taus_
std::multimap< int, std::string > quadjets_
std::string name_
std::multimap< int, std::string > electrons_
unsigned int count_hts_
unsigned int count_muons_
#define end
Definition: vmac.h:38
std::multimap< int, std::string > mets_
std::multimap< int, std::string > pfmht_
unsigned int count_pfmhts_
bool string2int(const char *digit, int &result)
unsigned int count_mets_
std::multimap< int, std::string > muons_
std::multimap< int, std::string > ht_
std::multimap< int, std::string > taus_
HLTTauDQMFilter const & HLTTauDQMFilter::select ( HLTTauDQMFilter const &  filter,
bool &  swapped 
)

Definition at line 116 of file HLTTauDQMFilter.cc.

References alcazmumu_cfi::filter, initialPrescale(), leadingElectron(), leadingHT(), leadingMET(), leadingMuon(), leadingPFMHT(), leadingQuadJet(), and leadingTau().

Referenced by Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Views.LineDecayView.LineDecayContainer::mousePressEvent(), Vispa.Gui.PortConnection.PointToPointConnection::mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget::mousePressEvent(), and Vispa.Views.AbstractView.AbstractView::restoreSelection().

116  {
117  if ( filter.initialPrescale() > 0 ) {
118  if ( filter.initialPrescale() <= initialPrescale() ) {
119  if ( leadingTau() > filter.leadingTau() ) {
120  swapped = true;
121  return filter;
122  } else if ( leadingTau() == filter.leadingTau() ) {
123  if ( leadingMuon() > filter.leadingMuon() || leadingElectron() > filter.leadingElectron() || leadingMET() > filter.leadingMET() || leadingQuadJet() > filter.leadingQuadJet() || leadingPFMHT() > filter.leadingPFMHT() || leadingHT() > filter.leadingHT() ) {
124  swapped = true;
125  return filter;
126  }
127  }
128  }
129  }
130  swapped = false;
131  return *this;
132 }
int leadingMuon() const
int leadingMET() const
int leadingElectron() const
int leadingQuadJet() const
int leadingPFMHT() const
int leadingTau() const
int initialPrescale() const
int leadingHT() const
void HLTTauDQMFilter::setType ( )
private

Definition at line 228 of file HLTTauDQMFilter.cc.

References alias_, count_electrons_, count_hts_, count_mets_, count_muons_, count_pfmhts_, count_quadjets_, count_taus_, taus_, and type_.

Referenced by HLTTauDQMFilter().

228  {
229  if ( alias_ != "" ) {
230  type_ = alias_;
231  } else {
232  if ( count_taus_ == 2 && count_muons_ == 0 && count_electrons_ == 0 && count_mets_ == 0 && count_quadjets_ == 0 && count_pfmhts_ == 0 && count_hts_ == 0 ) {
233  type_ = "DoubleTau";
234  } else if ( count_taus_ == 1 && count_muons_ == 0 && count_electrons_ == 0 && count_mets_ == 0 && count_quadjets_ == 0 && count_pfmhts_ == 0 && count_hts_ == 0 ) {
235  std::multimap<int,std::string>::const_iterator iter = taus_.end(); --iter;
236  type_ = "Single" + iter->second + "Tau";
237  } else if ( count_taus_ == 1 && count_muons_ == 0 && count_electrons_ == 0 && count_mets_ == 1 && count_quadjets_ == 0 && count_pfmhts_ == 0 && count_hts_ == 0 ) {
238  std::multimap<int,std::string>::const_iterator iter = taus_.end(); --iter;
239  type_ = "Single" + iter->second + "Tau_MET";
240  } else if ( count_taus_ == 1 && count_muons_ == 0 && count_electrons_ == 1 && count_mets_ == 0 && count_quadjets_ == 0 && count_pfmhts_ == 0 && count_hts_ == 0 ) {
241  std::multimap<int,std::string>::const_iterator iter = taus_.end(); --iter;
242  type_ = "Ele" + iter->second + "Tau";
243  } else if ( count_taus_ == 1 && count_muons_ == 1 && count_electrons_ == 0 && count_mets_ == 0 && count_quadjets_ == 0 && count_pfmhts_ == 0 && count_hts_ == 0 ) {
244  std::multimap<int,std::string>::const_iterator iter = taus_.end(); --iter;
245  type_ = "Mu" + iter->second + "Tau";
246  } else if ( count_taus_ == 1 && count_muons_ == 0 && count_electrons_ == 0 && count_mets_ == 0 && count_quadjets_ == 1 && count_pfmhts_ == 0 && count_hts_ == 0 ) {
247  std::multimap<int,std::string>::const_iterator iter = taus_.end(); --iter;
248  type_ = "QuadJet_Single" + iter->second + "Tau";
249  } else if ( count_taus_ == 2 && count_muons_ == 0 && count_electrons_ == 0 && count_mets_ == 0 && count_quadjets_ == 0 && count_pfmhts_ == 1 && count_hts_ == 1 ) {
250  type_ = "HT_DoubleTau_PFMHT";
251  } else {
252  type_ = "Unknown";
253  }
254  }
255 }
unsigned int count_electrons_
unsigned int count_quadjets_
unsigned int count_taus_
unsigned int count_hts_
unsigned int count_muons_
unsigned int count_pfmhts_
unsigned int count_mets_
std::string alias_
std::string type_
std::multimap< int, std::string > taus_
bool HLTTauDQMFilter::string2int ( const char *  digit,
int &  result 
)
private

Definition at line 257 of file HLTTauDQMFilter.cc.

Referenced by regexSearch().

257  {
258  result = 0;
259 
260  //--- Convert each digit char and add into result.
261  while (*digit >= '0' && *digit <='9') {
262  result = (result * 10) + (*digit - '0');
263  digit++;
264  }
265 
266  //--- Check that there were no non-digits at end.
267  if (*digit != 0) {
268  return false;
269  }
270 
271  return true;
272 }
tuple result
Definition: query.py:137
std::string HLTTauDQMFilter::type ( ) const
inline

Member Data Documentation

std::string HLTTauDQMFilter::alias_
private

Definition at line 57 of file HLTTauDQMFilter.h.

Referenced by HLTTauDQMFilter(), interestingModules(), and setType().

unsigned int HLTTauDQMFilter::count_electrons_
private
unsigned int HLTTauDQMFilter::count_hts_
private

Definition at line 54 of file HLTTauDQMFilter.h.

Referenced by HLTTauDQMFilter(), print(), regexSearch(), and setType().

unsigned int HLTTauDQMFilter::count_mets_
private

Definition at line 48 of file HLTTauDQMFilter.h.

Referenced by HLTTauDQMFilter(), print(), regexSearch(), and setType().

unsigned int HLTTauDQMFilter::count_muons_
private
unsigned int HLTTauDQMFilter::count_pfmhts_
private

Definition at line 52 of file HLTTauDQMFilter.h.

Referenced by HLTTauDQMFilter(), print(), regexSearch(), and setType().

unsigned int HLTTauDQMFilter::count_quadjets_
private

Definition at line 50 of file HLTTauDQMFilter.h.

Referenced by HLTTauDQMFilter(), print(), regexSearch(), and setType().

unsigned int HLTTauDQMFilter::count_taus_
private

Definition at line 42 of file HLTTauDQMFilter.h.

Referenced by getPSets(), HLTTauDQMFilter(), NReferenceTaus(), print(), regexSearch(), and setType().

std::multimap<int,std::string> HLTTauDQMFilter::electrons_
private

Definition at line 45 of file HLTTauDQMFilter.h.

Referenced by leadingElectron(), and regexSearch().

double HLTTauDQMFilter::HLTMatchDeltaR_
private

Definition at line 62 of file HLTTauDQMFilter.h.

Referenced by getPSets(), and HLTTauDQMFilter().

std::string HLTTauDQMFilter::hltTauDQMProcess_
private

Definition at line 60 of file HLTTauDQMFilter.h.

Referenced by getPSets(), and HLTTauDQMFilter().

std::multimap<int,std::string> HLTTauDQMFilter::ht_
private

Definition at line 53 of file HLTTauDQMFilter.h.

Referenced by leadingHT(), and regexSearch().

int HLTTauDQMFilter::initialPrescale_
private

Definition at line 59 of file HLTTauDQMFilter.h.

Referenced by HLTTauDQMFilter(), initialPrescale(), and print().

double HLTTauDQMFilter::L1MatchDeltaR_
private

Definition at line 61 of file HLTTauDQMFilter.h.

Referenced by getPSets(), and HLTTauDQMFilter().

std::multimap<int,std::string> HLTTauDQMFilter::mets_
private

Definition at line 47 of file HLTTauDQMFilter.h.

Referenced by leadingMET(), and regexSearch().

std::multimap<int,std::string> HLTTauDQMFilter::muons_
private

Definition at line 43 of file HLTTauDQMFilter.h.

Referenced by leadingMuon(), and regexSearch().

std::string HLTTauDQMFilter::name_
private

Definition at line 56 of file HLTTauDQMFilter.h.

Referenced by HLTTauDQMFilter(), interestingModules(), name(), print(), and regexSearch().

std::multimap<int,std::string> HLTTauDQMFilter::pfmht_
private

Definition at line 51 of file HLTTauDQMFilter.h.

Referenced by leadingPFMHT(), and regexSearch().

std::multimap<int,std::string> HLTTauDQMFilter::quadjets_
private

Definition at line 49 of file HLTTauDQMFilter.h.

Referenced by leadingQuadJet(), and regexSearch().

std::multimap<int,std::string> HLTTauDQMFilter::taus_
private

Definition at line 41 of file HLTTauDQMFilter.h.

Referenced by leadingTau(), regexSearch(), and setType().

std::string HLTTauDQMFilter::type_
private