The MC implementation of Trig::IBunchCrossingTool. More...
#include <MCBunchCrossingTool.h>
Public Member Functions | |
MCBunchCrossingTool (const std::string &type, const std::string &name, const IInterface *parent) | |
Standard AlgTool constructor. | |
virtual StatusCode | initialize () |
Regular AlgTool initialization function. | |
virtual bool | isFilled (bcid_type bcid) const |
The simplest query: Is the bunch crossing filled or not? | |
virtual bool | isBeam1 (bcid_type bcid=0) const |
Function deciding if there was a bunch from "beam 1" in this bunch crossing. | |
virtual bool | isBeam2 (bcid_type bcid=0) const |
Function deciding if there was a bunch from "beam 2" in this bunch crossing. | |
virtual float | bcIntensity (bcid_type bcid, BeamType type=Crossing) const |
Function returning the "intensity" of a given bunch crossing. | |
virtual BunchCrossingType | bcType (bcid_type bcid) const |
Get the type of the specific bunch crossing. | |
virtual int | gapBeforeBunch (bcid_type bcid, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const |
Gap before a particular bunch. | |
virtual int | gapAfterBunch (bcid_type bcid, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const |
Gap after a particular bunch. | |
virtual std::vector< bool > | bunchesInFront (bcid_type bcid, int bunches=10) const |
Function returning whether the previous bunches were filled, and how. | |
virtual std::vector< bool > | bunchesAfter (bcid_type bcid, int bunches=10) const |
Function returning whether the following bunches were filled, and how. | |
virtual std::vector< float > | bunchIntInFront (bcid_type bcid, int bunches=10, BeamType type=Crossing) const |
Function returning the intensities of the bunch crossings before the reference. | |
virtual std::vector< float > | bunchIntAfter (bcid_type bcid, int bunches=10, BeamType type=Crossing) const |
Function returning the intensities of the bunch crossings after the reference. | |
virtual unsigned int | numberOfFilledBunches () const |
Get the number of filled bunches in the current configuration. | |
virtual configid_type | configID () const |
Unique identifier for the current configuration. | |
virtual std::vector< int > | configuredBCIDs () const |
Function providing the BCIDs of the configured colliding bunches. | |
virtual std::vector< float > | configuredIntensitiesBeam1 () const |
Function providing the intensities of the configured colliding bunches. | |
virtual std::vector< float > | configuredIntensitiesBeam2 () const |
Function providing the intensities of the configured colliding bunches. |
The MC implementation of Trig::IBunchCrossingTool.
This implementation of the IBunchCrossingTool interface can read the metadata from pileup MC samples, and present the information to the analyst in the same way as the other tools represent the information for real data.
It also acts as a bunch crossing configuration provider, implementing the Trig::IBunchCrossingConfProvider interface.
float Trig::MCBunchCrossingTool::bcIntensity | ( | bcid_type | bcid, | |
BeamType | type = Crossing | |||
) | const [virtual] |
Function returning the "intensity" of a given bunch crossing.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
IBunchCrossingTool::BunchCrossingType Trig::MCBunchCrossingTool::bcType | ( | bcid_type | bcid | ) | const [virtual] |
Get the type of the specific bunch crossing.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
std::vector< bool > Trig::MCBunchCrossingTool::bunchesAfter | ( | bcid_type | bcid, | |
int | bunches = 10 | |||
) | const [virtual] |
Function returning whether the following bunches were filled, and how.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
std::vector< bool > Trig::MCBunchCrossingTool::bunchesInFront | ( | bcid_type | bcid, | |
int | bunches = 10 | |||
) | const [virtual] |
Function returning whether the previous bunches were filled, and how.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
std::vector< float > Trig::MCBunchCrossingTool::bunchIntAfter | ( | bcid_type | bcid, | |
int | bunches = 10 , |
|||
BeamType | type = Crossing | |||
) | const [virtual] |
Function returning the intensities of the bunch crossings after the reference.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
std::vector< float > Trig::MCBunchCrossingTool::bunchIntInFront | ( | bcid_type | bcid, | |
int | bunches = 10 , |
|||
BeamType | type = Crossing | |||
) | const [virtual] |
Function returning the intensities of the bunch crossings before the reference.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
IBunchCrossingConfProvider::configid_type Trig::MCBunchCrossingTool::configID | ( | ) | const [virtual] |
Unique identifier for the current configuration.
This tool returns a hash created from the string version of the bunch configuration. Luckily the MC files contain the full configuration in an std::string, so it's quite easy to create a unique ID from them.
Implements Trig::IBunchCrossingConfProvider.
std::vector< int > Trig::MCBunchCrossingTool::configuredBCIDs | ( | ) | const [virtual] |
Function providing the BCIDs of the configured colliding bunches.
This function is re-implemented from the base class to take into account whether the tool managed to find the configuration or not. In Athena running the tool will report all bunches as single empty bunches when it's not "configured". So the base class would give a configuration with all the bunches filled.
Instead this function returns an empty vector when the configuration is not available, and only lets the base class do it's work when the configuration was found.
Reimplemented from Trig::BunchCrossingConfProviderBase.
std::vector< float > Trig::MCBunchCrossingTool::configuredIntensitiesBeam1 | ( | ) | const [virtual] |
Function providing the intensities of the configured colliding bunches.
This function is re-implemented from the base class to take into account whether the tool managed to find the configuration or not. In Athena running the tool will report all bunches as single empty bunches when it's not "configured". So the base class would give a configuration with all the bunches filled.
Instead this function returns an empty vector when the configuration is not available, and only lets the base class do it's work when the configuration was found.
When the configuration is available, we still can't use the base class's function, as it would be asking for the Beam1 intensities instead of the collision intensities.
Reimplemented from Trig::BunchCrossingConfProviderBase.
std::vector< float > Trig::MCBunchCrossingTool::configuredIntensitiesBeam2 | ( | ) | const [virtual] |
Function providing the intensities of the configured colliding bunches.
The MC meta-data stores relative bunch luminosities. That value is stores in the Beam1 variable by convention, and this variable is left empty.
Reimplemented from Trig::BunchCrossingConfProviderBase.
int Trig::MCBunchCrossingTool::gapAfterBunch | ( | bcid_type | bcid, | |
BunchDistanceType | dtype = NanoSec , |
|||
BunchFillType | ftype = CollidingBunch | |||
) | const [virtual] |
Gap after a particular bunch.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
int Trig::MCBunchCrossingTool::gapBeforeBunch | ( | bcid_type | bcid, | |
BunchDistanceType | dtype = NanoSec , |
|||
BunchFillType | ftype = CollidingBunch | |||
) | const [virtual] |
Gap before a particular bunch.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
bool Trig::MCBunchCrossingTool::isBeam1 | ( | bcid_type | bcid = 0 |
) | const [virtual] |
Function deciding if there was a bunch from "beam 1" in this bunch crossing.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
bool Trig::MCBunchCrossingTool::isBeam2 | ( | bcid_type | bcid = 0 |
) | const [virtual] |
Function deciding if there was a bunch from "beam 2" in this bunch crossing.
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
bool Trig::MCBunchCrossingTool::isFilled | ( | bcid_type | bcid | ) | const [virtual] |
The simplest query: Is the bunch crossing filled or not?
Function re-implemented to give meaningful answers for non-pileup MC files as well.
Reimplemented from Trig::BunchCrossingToolBase.
unsigned int Trig::MCBunchCrossingTool::numberOfFilledBunches | ( | ) | const [virtual] |
Get the number of filled bunches in the current configuration.
In case the tool is not configured (we're not processing a pileup MC file) it should not report 0 filled bunches, but 1. The override of this function makes sure that this is what happens...
Reimplemented from Trig::BunchCrossingToolBase.