1 #ifndef DataFormats_PatCandidates_TriggerObjectStandAlone_h 2 #define DataFormats_PatCandidates_TriggerObjectStandAlone_h 28 namespace edm {
class TriggerNames; }
61 static const char wildcard_ =
'*';
66 bool hasAnyName(
const std::string &
name,
const std::vector< std::string > & nameVec )
const;
70 void addPathOrAlgorithm(
const std::string &
name,
bool pathLastFilterAccepted,
bool pathL3FilterAccepted );
72 const std::vector< std::string > &
filtersOrConditions()
const { checkIfFiltersAreUnpacked();
return filterLabels_; };
74 std::vector< std::string > pathsOrAlgorithms(
bool pathLastFilterAccepted,
bool pathL3FilterAccepted )
const;
76 bool hasFilterOrCondition(
const std::string & name )
const;
78 bool hasPathOrAlgorithm(
const std::string & name,
bool pathLastFilterAccepted,
bool pathL3FilterAccepted )
const;
80 bool hasLastFilter()
const {
return ( pathLastFilterAccepted_.size() > 0 && pathLastFilterAccepted_.size() == pathNames_.size() ); };
81 bool hasL3Filter()
const {
return ( pathL3FilterAccepted_.size() > 0 && pathL3FilterAccepted_.size() == pathNames_.size() ); };
84 bool checkIfPathsAreUnpacked(
bool throwIfPacked=
true)
const ;
86 bool checkIfFiltersAreUnpacked(
bool throwIfPacked=
true)
const ;
114 void addPathName(
const std::string & pathName,
bool pathLastFilterAccepted =
true,
bool pathL3FilterAccepted =
true ) { addPathOrAlgorithm( pathName, pathLastFilterAccepted, pathL3FilterAccepted ); };
116 void addAlgorithmName(
const std::string & algorithmName,
bool algoCondAccepted =
true ) { addPathOrAlgorithm( algorithmName, algoCondAccepted,
false ); };
118 const std::vector< std::string > &
filterLabels()
const {
return filtersOrConditions(); };
120 const std::vector< std::string > &
conditionNames()
const {
return filtersOrConditions(); };
122 std::vector< std::string >
pathNames(
bool pathLastFilterAccepted =
false,
bool pathL3FilterAccepted =
true )
const {
return pathsOrAlgorithms( pathLastFilterAccepted, pathL3FilterAccepted ); };
124 std::vector< std::string >
algorithmNames(
bool algoCondAccepted =
true )
const {
return pathsOrAlgorithms( algoCondAccepted,
false ); };
132 bool hasPathName(
const std::string & pathName,
bool pathLastFilterAccepted =
false,
bool pathL3FilterAccepted =
true )
const {
return hasPathOrAlgorithm( pathName, pathLastFilterAccepted, pathL3FilterAccepted ); };
134 bool hasAlgorithmName(
const std::string & algorithmName,
bool algoCondAccepted =
true )
const {
return hasPathOrAlgorithm( algorithmName, algoCondAccepted,
false ); };
136 virtual bool hasCollection(
const std::string & collName )
const;
150 bool cond(
const std::string & conditionName )
const {
return hasConditionName( conditionName ); };
152 bool path(
const std::string & pathName,
unsigned pathLastFilterAccepted = 0,
unsigned pathL3FilterAccepted = 1 )
const {
return hasPathName( pathName,
bool( pathLastFilterAccepted ),
bool( pathL3FilterAccepted ) ); };
154 bool algo(
const std::string & algorithmName,
unsigned algoCondAccepted = 1 )
const {
return hasAlgorithmName( algorithmName,
bool( algoCondAccepted ) ); };
156 virtual bool coll(
const std::string & collName )
const {
return hasCollection( collName ); };
172 void unpackFilterLabels(
const std::vector<std::string> &labels) ;
edm::RefVector< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefVector
Vector of persistent references to items in the same TriggerObjectStandAloneCollection.
bool hasPathName(const std::string &pathName, bool pathLastFilterAccepted=false, bool pathL3FilterAccepted=true) const
Checks, if a certain HLT path name is assigned.
static const HistoName names[]
edm::RefVectorIterator< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefVectorIterator
Const iterator over vector of persistent references to items in the same TriggerObjectStandAloneColle...
bool algo(const std::string &algorithmName, unsigned algoCondAccepted=1) const
Calls 'hasAlgorithmName(...)'.
std::vector< std::string > pathNames_
Vector of names of all HLT paths or L1 algorithms the trigger objects has been used in...
const std::vector< std::string > & filterLabels() const
Gets all HLT filter labels.
std::vector< std::string > algorithmNames(bool algoCondAccepted=true) const
Gets all L1 algorithm names.
std::vector< std::string > filterLabels_
Vector of labels of all HLT filters or names of L1 conditions the trigger objects has been used in...
void addAlgorithmName(const std::string &algorithmName, bool algoCondAccepted=true)
Adds a new L1 algorithm name.
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
std::vector< std::string > pathNames(bool pathLastFilterAccepted=false, bool pathL3FilterAccepted=true) const
Gets all HLT path names.
void addConditionName(const std::string &conditionName)
Adds a new L1 condition name.
void addFilterLabel(const std::string &filterLabel)
Methods.
Single trigger physics object (e.g., an isolated muon)
bool path(const std::string &pathName, unsigned pathLastFilterAccepted=0, unsigned pathL3FilterAccepted=1) const
Calls 'hasPathName(...)'.
bool hasAlgorithmName(const std::string &algorithmName, bool algoCondAccepted=true) const
Checks, if a certain L1 algorithm name is assigned.
void addPathName(const std::string &pathName, bool pathLastFilterAccepted=true, bool pathL3FilterAccepted=true)
Adds a new HLT path name.
void setPSetID(const edm::ParameterSetID &psetId)
set the psetid of the trigger process
edm::Association< TriggerObjectStandAloneCollection > TriggerObjectStandAloneMatch
Association of TriggerObjectStandAlones to store matches to Candidates.
bool hasPathLastFilterAccepted() const
Checks, if the usage indicator vector has been filled.
const std::vector< std::string > & filtersOrConditions() const
Gets all HLT filter labels or L1 condition names.
bool hasPathL3FilterAccepted() const
bool hasLastFilter() const
Check, if the usage indicator vectors have been filled.
bool hasFilterLabel(const std::string &filterLabel) const
Checks, if a certain HLT filter label is assigned.
bool hasConditionName(const std::string &conditionName) const
Checks, if a certain L1 condition name is assigned.
std::vector< bool > pathL3FilterAccepted_
const std::vector< std::string > & conditionNames() const
Gets all L1 condition names.
bool cond(const std::string &conditionName) const
Calls 'hasConditionName(...)'.
void addFilterOrCondition(const std::string &name)
Adds a new HLT filter label or L1 condition name.
const edm::ParameterSetID & psetID() const
bool filter(const std::string &filterLabel) const
Calls 'hasFilterLabel(...)'.
edm::ParameterSetID psetId_
std::vector< uint16_t > pathIndices_
edm::RefProd< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefProd
Persistent reference to a TriggerObjectStandAloneCollection product.
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
std::vector< uint16_t > filterLabelIndices_
virtual bool coll(const std::string &collName) const
Calls 'hasCollection(...)' (method override)
bool hasAlgoCondAccepted() const
virtual bool hasCollection(const edm::InputTag &collName) const
virtual ~TriggerObjectStandAlone()
Destructor.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< bool > pathLastFilterAccepted_
Analysis-level trigger object class (stand-alone)
edm::Ref< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRef
Persistent reference to an item in a TriggerObjectStandAloneCollection.