ATLAS Offline Software
|
#include <BunchCrossingCondData.h>
Classes | |
struct | bunchTrain_t |
Public Types | |
enum | BunchCrossingType { Empty = 0, FirstEmpty = 1, MiddleEmpty = 2, Single = 100, Front = 200, Middle = 201, Tail = 202, Unpaired = 300 } |
Enumeration type for a given bunch crossing. More... | |
enum | BunchDistanceType { NanoSec, BunchCrossings, FilledBunches } |
Enumeration specifying the units in which to expect the bunch distance type. More... | |
typedef unsigned int | bcid_type |
Public Member Functions | |
bool | isFilled (const bcid_type bcid) const |
The simplest query: Is the bunch crossing filled or not? More... | |
bool | isInTrain (const bcid_type bcid) const |
Function deciding if a given bunch crossing is in a filled train. More... | |
bool | isUnpaired (const bcid_type bcid) const |
Function deciding if a given bunch crossing has an unpaired bunch. More... | |
bool | isBeam1 (const bcid_type bcid) const |
Function deciding if there was a bunch from "beam 1" in this bunch crossing. More... | |
bool | isBeam2 (const bcid_type bcid) const |
Function deciding if there was a bunch from "beam 2" in this bunch crossing. More... | |
BunchCrossingType | bcType (const bcid_type bcid) const |
Convenience function for the type of the specific bunch crossing. More... | |
int | gapBeforeTrain (bcid_type bcid=0, BunchDistanceType type=NanoSec) const |
Gap before the train this BCID is in. More... | |
int | gapBeforeBunch (bcid_type bcid=0, BunchDistanceType type=NanoSec) const |
Get the distance of the specified bunch crossing to the preceeding filled bunch. More... | |
int | gapAfterTrain (bcid_type bcid=0, BunchDistanceType type=NanoSec) const |
Gap after the train this BCID is in. More... | |
int | gapAfterBunch (bcid_type bcid=0, BunchDistanceType type=NanoSec) const |
Get the distance of the specified bunch crossing to the next filled bunch. More... | |
int | distanceFromFront (const bcid_type bcid, const BunchDistanceType type=NanoSec) const |
The distance of the specific bunch crossing from the front of the train. More... | |
int | distanceFromTail (const bcid_type bcid, const BunchDistanceType type=NanoSec) const |
The distance of the specific bunch crossing from the tail of the train. More... | |
unsigned int | numberOfFilledBunches () const |
Gap before the train this BCID is in. More... | |
unsigned int | numberOfUnpairedBunches () const |
Get the number of unpaired bunches in the current configuration. More... | |
unsigned int | numberOfBunchTrains () const |
Get the number of the bunch trains in the current configuration. More... | |
std::pair< unsigned, unsigned > | bunchTrainPopulation (const bcid_type bcid) const |
Get colliding and total bcids in a train. More... | |
Static Public Attributes | |
static constexpr int | m_MAX_BCID =3564 |
static constexpr int | m_BUNCH_SPACING = 25 |
Private Member Functions | |
const bunchTrain_t * | findTrain (const bcid_type bcid) const |
Helper method to find the train of a bcid (nullptr if bcd is not in a train) More... | |
unsigned | countColliding (int from, int to) const |
Helper method to count colliding bunches in the range from-to. More... | |
Private Attributes | |
std::bitset< m_MAX_BCID > | m_beam1 |
std::bitset< m_MAX_BCID > | m_beam2 |
std::bitset< m_MAX_BCID > | m_luminous |
std::vector< bunchTrain_t > | m_trains |
unsigned | m_nTrains {} |
Static Private Attributes | |
static const int | m_headTailLength = 300 |
Friends | |
class | BunchCrossingCondAlg |
Definition at line 23 of file BunchCrossingCondData.h.
typedef unsigned int BunchCrossingCondData::bcid_type |
Definition at line 27 of file BunchCrossingCondData.h.
Enumeration type for a given bunch crossing.
This enumeration can specify what kind of bunch crossing one BCID belongs to. The types could easily be extended later on.
Definition at line 100 of file BunchCrossingCondData.h.
Enumeration specifying the units in which to expect the bunch distance type.
To make it clear for the following functions what units to interpret their return values in, it is possible to request their return values in different units.
Enumerator | |
---|---|
NanoSec | Distance in nanoseconds. |
BunchCrossings | Distance in units of 25 nanoseconds. |
FilledBunches | Distance in units of filled bunches (depends on filling scheme) |
Definition at line 130 of file BunchCrossingCondData.h.
BunchCrossingCondData::BunchCrossingType BunchCrossingCondData::bcType | ( | const bcid_type | bcid | ) | const |
Convenience function for the type of the specific bunch crossing.
This function could be used as a single entry point to this data in principle. It gives a summary about a specific BCID. Remember however that the exact meaning of many of the return values of this function are configuration dependent.
bcid | The bcid that should be checked |
Definition at line 198 of file BunchCrossingCondData.cxx.
std::pair< unsigned, unsigned > BunchCrossingCondData::bunchTrainPopulation | ( | const bcid_type | bcid | ) | const |
Get colliding and total bcids in a train.
This function gives the number of colliding bunches and the total number of bcids in a given train
bcid | The bcid whose train should be investigated |
Definition at line 93 of file BunchCrossingCondData.cxx.
|
private |
Helper method to count colliding bunches in the range from-to.
Definition at line 105 of file BunchCrossingCondData.cxx.
int BunchCrossingCondData::distanceFromFront | ( | const bcid_type | bcid, |
const BunchDistanceType | type = NanoSec |
||
) | const |
The distance of the specific bunch crossing from the front of the train.
Get the distance of the specified bunch crossing from the front of the bunch train. If the specified bunch crossing is not part of a bunch train, then the function returns -1.
The distance can be returned in multiple units. By default it is returned in nanoseconds. If one specifies BunchCrossings, then the distance is returned in nanosec_distance / 25. Finally, if one specifies FilledBunches, then the distance is returned in the units of the bunch spacing within the train.
bcid | The bcid that should be checked |
type | The type of the requested return value |
Definition at line 38 of file BunchCrossingCondData.cxx.
int BunchCrossingCondData::distanceFromTail | ( | const bcid_type | bcid, |
const BunchDistanceType | type = NanoSec |
||
) | const |
The distance of the specific bunch crossing from the tail of the train.
Get the distance of the specified bunch crossing from the tail of the bunch train. If the specified bunch crossing is not part of a bunch train, then the function returns -1.
The distance can be returned in multiple units. By default it is returned in nanoseconds. If one specifies BunchCrossings, then the distance is returned in nanosec_distance / 25. Finally, if one specifies FilledBunches, then the distance is returned in the units of the bunch spacing within the train.
bcid | The bcid that should be checked |
type | The type of the requested return value |
Definition at line 63 of file BunchCrossingCondData.cxx.
|
private |
Helper method to find the train of a bcid (nullptr if bcd is not in a train)
Definition at line 8 of file BunchCrossingCondData.cxx.
int BunchCrossingCondData::gapAfterBunch | ( | bcid_type | bcid = 0 , |
BunchDistanceType | type = NanoSec |
||
) | const |
Get the distance of the specified bunch crossing to the next filled bunch.
The distance can be returned in multiple units. By default it is returned in nanoseconds. If one specifies BunchCrossings, then the distance is returned in nanosec_distance / 25. Finally, if one specifies FilledBunches, then the distance is returned in the units of the bunch spacing within the train.
bcid | The bcid that should be checked |
type | The type of the requested return value |
Definition at line 176 of file BunchCrossingCondData.cxx.
int BunchCrossingCondData::gapAfterTrain | ( | bcid_type | bcid = 0 , |
BunchDistanceType | type = NanoSec |
||
) | const |
Gap after the train this BCID is in.
Get the gap that's between the train that the specified BCID is in, and the next train. This is a useful number for some jet/MET studies.
Note that the function doesn't work with the FilledBunches type, as the size of the gaps doesn't have to be a multiple of the bunch distance within the trains.
Returns "-1" when there's no right answer to the question. (BCID not part of a train.)
bcid | The bcid whose train should be investigated |
type | The type of the requested return value |
Definition at line 167 of file BunchCrossingCondData.cxx.
int BunchCrossingCondData::gapBeforeBunch | ( | bcid_type | bcid = 0 , |
BunchDistanceType | type = NanoSec |
||
) | const |
Get the distance of the specified bunch crossing to the preceeding filled bunch.
The distance can be returned in multiple units. By default it is returned in nanoseconds. If one specifies BunchCrossings, then the distance is returned in nanosec_distance / 25. Finally, if one specifies FilledBunches, then the distance is returned in the units of the bunch spacing within the train.
bcid | The bcid that should be checked |
type | The type of the requested return value |
Definition at line 141 of file BunchCrossingCondData.cxx.
int BunchCrossingCondData::gapBeforeTrain | ( | bcid_type | bcid = 0 , |
BunchDistanceType | type = NanoSec |
||
) | const |
Gap before the train this BCID is in.
Get the gap that's between the train that the specified BCID is in, and the previous train. This is a useful number for some jet/MET studies.
Note that the function doesn't work with the FilledBunches type, as the size of the gaps doesn't have to be a multiple of the bunch distance within the trains.
Returns "-1" when there's no right answer to the question. (BCID not part of a train.)
bcid | The bcid whose train should be investigated |
type | The type of the requested return value |
Definition at line 130 of file BunchCrossingCondData.cxx.
Function deciding if there was a bunch from "beam 1" in this bunch crossing.
This function is useful for differentiating the unpaired bunch crossings based on which beam provided the unpaired bunch.
bcid | The bcid that should be checked |
true
if the bcid contained a bunch from beam 1, false
otherwise Definition at line 345 of file BunchCrossingCondData.h.
Function deciding if there was a bunch from "beam 2" in this bunch crossing.
This function is useful for differentiating the unpaired bunch crossings based on which beam provided the unpaired bunch.
bcid | The bcid that should be checked |
true
if the bcid contained a bunch from beam 2, false
otherwise Definition at line 351 of file BunchCrossingCondData.h.
The simplest query: Is the bunch crossing filled or not?
This is the simplest question that one can ask the configuration: Was the current BCID coming from a collision or not? If people properly use the triggers to select their events, then this function is not too useful, but for some special analyses it might be a good idea to have it.
bcid | The bcid that should be checked |
true
if the bcid was a collision bunch crossing, false
otherwise Definition at line 339 of file BunchCrossingCondData.h.
Function deciding if a given bunch crossing is in a filled train.
Most of the functionality of the interface only makes sense for bunches which were in trains. So this function can be checked at the beginning of the analysis code, to make sure that the BC in question is interesting.
bcid | The bcid that should be checked |
true
if the bcid is part of a bunch train, false
otherwise Definition at line 376 of file BunchCrossingCondData.h.
Function deciding if a given bunch crossing has an unpaired bunch.
This function can be used to quickly decide whether the current event came from an unpaired bunch. Note that the function doesn't make a difference between "isolated" and "non isolated" unpaired bunches. You have to use the gapBeforeBunch
function to decide how isolated an unpaired bunch is.
bcid | The bcid that should be checked |
true
if the bcid belongs to an unpaired bunch, false
otherwise Definition at line 358 of file BunchCrossingCondData.h.
|
inline |
Get the number of the bunch trains in the current configuration.
This function gives the total number of bunch trains that were identified in the current configuration. This could come in handy in some circumstances.
Definition at line 371 of file BunchCrossingCondData.h.
|
inline |
Gap before the train this BCID is in.
Get the gap that's between the train that the specified BCID is in, and the previous train. This is a useful number for some jet/MET studies.
Note that the function doesn't work with the FilledBunches type, as the size of the gaps doesn't have to be a multiple of the bunch distance within the trains.
Returns "-1" when there's no right answer to the question. (BCID not part of a train.)
bcid | The bcid whose train should be investigated |
type | The type of the requested return value |
Definition at line 365 of file BunchCrossingCondData.h.
unsigned BunchCrossingCondData::numberOfUnpairedBunches | ( | ) | const |
Get the number of unpaired bunches in the current configuration.
This function gives the total number of unpaired bunches in the current configuration. This could come in handy in some circumstances.
Definition at line 88 of file BunchCrossingCondData.cxx.
|
friend |
Definition at line 306 of file BunchCrossingCondData.h.
|
private |
Definition at line 310 of file BunchCrossingCondData.h.
|
private |
Definition at line 311 of file BunchCrossingCondData.h.
|
staticconstexpr |
Definition at line 29 of file BunchCrossingCondData.h.
|
staticprivate |
Definition at line 313 of file BunchCrossingCondData.h.
|
private |
Definition at line 312 of file BunchCrossingCondData.h.
|
staticconstexpr |
Definition at line 28 of file BunchCrossingCondData.h.
|
private |
Definition at line 325 of file BunchCrossingCondData.h.
|
private |
Definition at line 323 of file BunchCrossingCondData.h.