Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
multiplicity.hh File Reference

Go to the source code of this file.

Functions

int get_multiplicity (const Evt &event)
 Retrieve bundle multiplicity of given event.
 

Function Documentation

◆ get_multiplicity()

int get_multiplicity ( const Evt & event)
inline

Retrieve bundle multiplicity of given event.

Parameters
eventevent

Definition at line 13 of file multiplicity.hh.

14{
15 using namespace std;
16
17 // Bundle multiplicity is stored in the `len` member variable for `track_bundle`s.
18
19 for ( auto& t : event.mc_trks ) {
20 if ( t.status == TRK_ST_MUONBUNDLE ) { return (int) t.len; }
21 }
22
23 ostream& out = Exception::getOstream();
24 out << "get_multiplicity(): The following event does not correspond to a muon bundle:" << endl;
25 event.print(out);
26 throw Exception(static_cast<ostringstream&>(out).str());
27}
General exception.
Definition Exception.hh:13
static std::ostream & getOstream()
Get output stream for conversion of exception.
Definition Exception.hh:63
std::vector< Trk > mc_trks
MC: list of MC truth tracks.
Definition Evt.hh:49
static const int TRK_ST_MUONBUNDLE
initial state muon bundle (mupage)
Definition trkmembers.hh:18