16 std::string
join(
const std::vector<std::string> &parts,
const std::string &piece)
21 auto itr =
parts.begin();
23 for (++itr; itr !=
parts.end(); ++itr)
28 const std::regex &legHeadRegex()
95 return !(*
this == other);
114 m_itr = std::string::const_iterator();
115 m_end = std::string::const_iterator();
142 return m_itr == std::string::const_iterator();
147 std::string::const_iterator next = std::find(
m_itr,
m_end,
'_');
149 if (std::regex_match(
m_itr, next,
match, legHeadRegex()))
152 if (
match.str(1).empty())
157 if (
match.str(3).empty())
165 else if (next ==
m_end)
184 std::size_t pos =
m_chain.rfind(
"_L1");
185 if (pos == std::string::npos)
188 return "L1_" +
m_chain.substr(pos+3);
193 const static std::vector<std::string>
signatures{
194 "e",
"g",
"j",
"dispjet",
"mu",
"tau",
"xe",
"xs",
"te",
"ht",
"noalg",
"mb",
"hi",
"eb",
195 "l1calocalib",
"lar",
"zdc",
"lumipeb",
"alfacalib",
"calibAFP",
"afp",
"distrk",
196 "hitdvjet",
"isotrk",
"dedxtrk",
"l1topoPh1debug",
"caloclustermon",
"fslrt",
197 "beamspot",
"cosmic",
"timeburner",
"mistimemonj400",
"larsupercellmon",
"larnoiseburst",
198 "acceptedevts",
"larpsall",
"larpsallem",
"idcalib",
"metcalo",
"mettrk",
205 const static std::vector<std::string> postfixQualifiers{
206 "noL1",
"vtx",
"c",
"C",
"f",
"a"
208 return postfixQualifiers;
213 const static std::set<std::string> singleLegIDs{
214 "noalg",
"acceptedevts"
237 std::vector<std::string>
signatures(
const std::string &chain)
const boost::regex re(r_e)
std::string l1Item() const
Read the L1 item from the chain. Returns the empty string if the L1 item isn't in the chain name.
Iterate over the legs of a chain.
std::string m_peekSignature
bool exhausted() const
Whether the iterator is exhausted.
LegInfoIterator & operator++()
pre-increment operator
LegInfoIterator()=default
Default constructor creates a past-the-end iterator.
pointer operator->() const
std::string::const_iterator m_itr
const value_type & reference
reference operator*() const
Dereference the iterator.
std::string::const_iterator m_end
std::size_t m_peekMultiplicity
const value_type * pointer
bool operator!=(const LegInfoIterator &other) const
bool operator==(const LegInfoIterator &other) const
Check (in)equality against another iterator.
int count(std::string s, const std::string ®x)
count how many occurances of a regx are in a string
bool match(std::string s1, std::string s2)
match the individual directories of two strings
const std::set< std::string > & singleLegIdentifiers()
A set of identifiers which are actually single leg, even if followed by other identifiers.
std::vector< int > multiplicities(const std::string &chain)
const std::vector< std::string > & allSignatures()
A list of all signature names.
std::string legHeadPattern()
const std::vector< std::string > & allSignaturePostfixQualifiers()
A list of all post-fix qualifiers which may come immediately after the "XSigY" pattern,...
std::vector< std::string > signatures(const std::string &chain)
std::string join(const std::vector< std::string > &v, const char c=',')
ObjectType
Type of objects that have a representation in the xAOD EDM.
@ TrackParticle
The object is a charged track particle.
@ Jet
The object is a jet.
@ Photon
The object is a photon.
@ Other
An object not falling into any of the other categories.
@ CaloCluster
The object is a calorimeter cluster.
@ Muon
The object is a muon.
@ Electron
The object is an electron.
@ Tau
The object is a tau (jet)
std::size_t multiplicity
The multiplicity of the leg (number of objects returned by the leg)
xAODType::ObjectType type() const
The type of xAOD IParticle produced by this signature if relevant.
std::vector< std::string > legParts
All the parts of the leg.
std::string legName() const
The name of the leg.
int threshold
The threshold on the object.
std::string signature
The HLT signature responsible for creating the object.