1 #ifndef DataFormats_PatCandidates_TriggerObjectStandAlone_h 2 #define DataFormats_PatCandidates_TriggerObjectStandAlone_h 60 static const char wildcard_ =
'*';
65 bool hasAnyName(
const std::string &
name,
const std::vector<std::string> &nameVec)
const;
68 if (!hasFilterOrCondition(name))
69 filterLabels_.push_back(name);
72 void addPathOrAlgorithm(
const std::string &
name,
bool pathLastFilterAccepted,
bool pathL3FilterAccepted);
75 checkIfFiltersAreUnpacked();
79 std::vector<std::string> pathsOrAlgorithms(
bool pathLastFilterAccepted,
bool pathL3FilterAccepted)
const;
81 bool hasFilterOrCondition(
const std::string &name)
const;
83 bool hasPathOrAlgorithm(
const std::string &name,
bool pathLastFilterAccepted,
bool pathL3FilterAccepted)
const;
86 return (!pathLastFilterAccepted_.empty() && pathLastFilterAccepted_.size() == pathNames_.size());
89 return (!pathL3FilterAccepted_.empty() && pathL3FilterAccepted_.size() == pathNames_.size());
93 bool checkIfPathsAreUnpacked(
bool throwIfPacked =
true)
const;
95 bool checkIfFiltersAreUnpacked(
bool throwIfPacked =
true)
const;
126 bool pathLastFilterAccepted =
true,
127 bool pathL3FilterAccepted =
true) {
128 addPathOrAlgorithm(pathName, pathLastFilterAccepted, pathL3FilterAccepted);
132 addPathOrAlgorithm(algorithmName, algoCondAccepted,
false);
135 const std::vector<std::string> &
filterLabels()
const {
return filtersOrConditions(); };
137 const std::vector<std::string> &
conditionNames()
const {
return filtersOrConditions(); };
139 std::vector<std::string>
pathNames(
bool pathLastFilterAccepted =
false,
bool pathL3FilterAccepted =
true)
const {
140 return pathsOrAlgorithms(pathLastFilterAccepted, pathL3FilterAccepted);
144 return pathsOrAlgorithms(algoCondAccepted,
false);
154 bool pathLastFilterAccepted =
false,
155 bool pathL3FilterAccepted =
true)
const {
156 return hasPathOrAlgorithm(pathName, pathLastFilterAccepted, pathL3FilterAccepted);
160 return hasPathOrAlgorithm(algorithmName, algoCondAccepted,
false);
177 bool cond(
const std::string &conditionName)
const {
return hasConditionName(conditionName); };
180 unsigned pathLastFilterAccepted = 0,
181 unsigned pathL3FilterAccepted = 1)
const {
182 return hasPathName(pathName,
bool(pathLastFilterAccepted),
bool(pathL3FilterAccepted));
186 return hasAlgorithmName(algorithmName,
bool(algoCondAccepted));
189 bool coll(
const std::string &collName)
const override {
return hasCollection(collName); };
bool hasPathName(const std::string &pathName, bool pathLastFilterAccepted=false, bool pathL3FilterAccepted=true) const
Checks, if a certain HLT path name is assigned.
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
std::vector< uint16_t > filterLabelIndices_
bool algo(const std::string &algorithmName, unsigned algoCondAccepted=1) const
Calls 'hasAlgorithmName(...)'.
void addAlgorithmName(const std::string &algorithmName, bool algoCondAccepted=true)
Adds a new L1 algorithm name.
const std::string names[nVars_]
void addConditionName(const std::string &conditionName)
Adds a new L1 condition name.
void addFilterLabel(const std::string &filterLabel)
Adds a new HLT filter label.
TriggerObjectStandAlone copy() const
Methods.
edm::RefVectorIterator< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefVectorIterator
Const iterator over vector of persistent references to items in the same TriggerObjectStandAloneColle...
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.
const std::vector< std::string > & filtersOrConditions() const
Gets all HLT filter labels or L1 condition names.
bool coll(const std::string &collName) const override
Calls 'hasCollection(...)' (method override)
void setPSetID(const edm::ParameterSetID &psetId)
set the psetid of the trigger process
edm::RefProd< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefProd
Persistent reference to a TriggerObjectStandAloneCollection product.
bool hasPathLastFilterAccepted() const
Checks, if the usage indicator vector has been filled.
std::vector< bool > pathLastFilterAccepted_
bool hasPathL3FilterAccepted() const
bool hasLastFilter() const
Check, if the usage indicator vectors have been filled.
const std::vector< std::string > & filterLabels() const
Gets all HLT filter labels.
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.
edm::Ref< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRef
Persistent reference to an item in a TriggerObjectStandAloneCollection.
bool cond(const std::string &conditionName) const
Calls 'hasConditionName(...)'.
std::vector< std::string > pathNames_
Vector of names of all HLT paths or L1 algorithms the trigger objects has been used in...
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(...)'.
std::vector< std::string > filterLabels_
Vector of labels of all HLT filters or names of L1 conditions the trigger objects has been used in...
edm::RefVector< TriggerObjectStandAloneCollection > TriggerObjectStandAloneRefVector
Vector of persistent references to items in the same TriggerObjectStandAloneCollection.
edm::Association< TriggerObjectStandAloneCollection > TriggerObjectStandAloneMatch
Association of TriggerObjectStandAlones to store matches to Candidates.
edm::ParameterSetID psetId_
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
const std::vector< std::string > & conditionNames() const
Gets all L1 condition names.
bool hasAlgoCondAccepted() const
bool hasCollection(const edm::InputTag &collName) const override
std::vector< std::string > pathNames(bool pathLastFilterAccepted=false, bool pathL3FilterAccepted=true) const
Gets all HLT path names.
math::XYZTLorentzVector LorentzVector
Lorentz vector.
std::vector< uint16_t > pathIndices_
std::vector< bool > pathL3FilterAccepted_
std::vector< std::string > algorithmNames(bool algoCondAccepted=true) const
Gets all L1 algorithm names.
Analysis-level trigger object class (stand-alone)
~TriggerObjectStandAlone() override
Destructor.