ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
BunchCrossingCondData Class Reference

#include <BunchCrossingCondData.h>

Collaboration diagram for BunchCrossingCondData:

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_tfindTrain (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_BCIDm_beam1
 
std::bitset< m_MAX_BCIDm_beam2
 
std::bitset< m_MAX_BCIDm_luminous
 
std::vector< bunchTrain_tm_trains
 
unsigned m_nTrains
 

Static Private Attributes

static const int m_headTailLength = 300
 

Friends

class BunchCrossingCondAlg
 

Detailed Description

Definition at line 23 of file BunchCrossingCondData.h.

Member Typedef Documentation

◆ bcid_type

typedef unsigned int BunchCrossingCondData::bcid_type

Definition at line 27 of file BunchCrossingCondData.h.

Member Enumeration Documentation

◆ BunchCrossingType

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.

Enumerator
Empty 

An empty bunch far away from filled bunches.

FirstEmpty 

The first empty bunch after a train.

MiddleEmpty 

An empty BCID in the middle of a train.

Single 

This is a filled, single bunch (not in a train)

Front 

The BCID belongs to the first few bunches in a train.

Middle 

The BCID belongs to the middle bunches in a train.

Tail 

The BCID belongs to the last few bunces in a train.

Unpaired 

This is an unpaired bunch (either beam1 or beam2)

Definition at line 100 of file BunchCrossingCondData.h.

101  {
102  Empty = 0,
103  FirstEmpty = 1,
104  MiddleEmpty = 2,
105  Single = 100,
106  Front = 200,
107  Middle = 201,
108  Tail = 202,
109  Unpaired = 300
110  };

◆ BunchDistanceType

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.

130  {
131  NanoSec,
135  };

Member Function Documentation

◆ bcType()

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.

Parameters
bcidThe bcid that should be checked
Returns
The type of the bcid in question

Definition at line 195 of file BunchCrossingCondData.cxx.

195  {
196  // First the obvious check:
197  if (!isFilled(bcid))
198  {
199  // Check if it's an unpaired bunch:
200  if (isUnpaired(bcid))
201  {
202  return Unpaired;
203  }
204  // If the previous bunch crossing is the tail of a bunch train:
206  {
207  return FirstEmpty;
208  }
209  // Check if it's in the middle of a bunch train:
210  if (findTrain(bcid) != nullptr) {
211  return MiddleEmpty;
212  }
213  // If none of the above are true, it has to be a "simple" empty bunch:
214  return Empty;
215  }
216 
217  // Now we know that the bunch has to be a filled one...
218 
219  // If it's not in a train, it has to be a single filled bunch:
220  if (!isInTrain(bcid))
221  return Single;
222 
223  // Let's check if it is close to the front of a bunch train:
225  if ((distance >= 0) && (distance <= m_headTailLength))
226  {
227  return Front;
228  }
229  // Now let's check if it's close to the tail of a bunch train:
231  if ((distance >= 0) && (distance <= m_headTailLength))
232  {
233  return Tail;
234  }
235 
236  // If none of the above are true, it has to be in the middle of a train:
237  return Middle;
238 }

◆ bunchTrainPopulation()

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

Parameters
bcidThe bcid whose train should be investigated
Returns
a pair<colliding,total> bcids in this train

Definition at line 90 of file BunchCrossingCondData.cxx.

90  {
91 
92  const bunchTrain_t* bt=findTrain(bcid);
93  if (!bt) {
94  return std::pair<unsigned,unsigned>(0,0);
95  }
96  else {
97  return std::pair<unsigned,unsigned>(bt->m_nColl,(bt->m_last-bt->m_first));
98  }
99 }

◆ countColliding()

unsigned BunchCrossingCondData::countColliding ( int  from,
int  to 
) const
private

Helper method to count colliding bunches in the range from-to.

Definition at line 102 of file BunchCrossingCondData.cxx.

102  {
103  unsigned ncoll=0;
104 
105  if (from<0) {
106  //wrap-around ...
107  for (int idx=m_MAX_BCID-from;idx<0;++idx) {
108  if (m_luminous.test(idx)) ++ncoll;
109  }
110  from=0;
111  }
112 
113  if (to>m_MAX_BCID) {
114  for (int idx=0;idx<m_MAX_BCID-to;++idx) {
115  if (m_luminous.test(idx)) ++ncoll;
116  }
117  to=m_MAX_BCID;
118  }
119 
120  for (int idx=from;idx<to;++idx) {
121  if (m_luminous.test(idx)) ++ncoll;
122  }
123  return ncoll;
124 }

◆ distanceFromFront()

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.

Parameters
bcidThe bcid that should be checked
typeThe type of the requested return value
Returns
The distance of the bcid in question from the front of its bunch train

Definition at line 35 of file BunchCrossingCondData.cxx.

36  {
37 
38  const bunchTrain_t* bt=findTrain(bcid);
39  if (!bt) {
40  return -1;
41  }
42 
43  const int dist=bcid-bt->m_first;
44 
45  switch( type ) {
46  case NanoSec:
47  return dist*m_BUNCH_SPACING;
48  break;
49  case BunchCrossings:
50  return dist;
51  case FilledBunches:
52  return countColliding(bt->m_first,bt->m_last);
53  default:
54  MsgStream msg(Athena::getMessageSvc(),"BunchCrossingCondData::distanceFromFront");
55  msg << MSG::ERROR << "BunchDistanceType not understood!" << endmsg;
56  return -1;
57  }//end switch
58 }

◆ distanceFromTail()

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.

Parameters
bcidThe bcid that should be checked
typeThe type of the requested return value
Returns
The distance of the bcid in question from the tail of its bunch train

Definition at line 60 of file BunchCrossingCondData.cxx.

61  {
62 
63  const bunchTrain_t* bt=findTrain(bcid);
64  if (!bt) {
65  return -1;
66  }
67 
68  const int dist=bt->m_last-bcid;
69 
70  switch( type ) {
71  case NanoSec:
72  return dist*m_BUNCH_SPACING;
73  break;
74  case BunchCrossings:
75  return dist;
76  case FilledBunches:
77  return countColliding(bt->m_first,bt->m_last);
78  default:
79  MsgStream msg(Athena::getMessageSvc(),"BunchCrossingCondData::distanceFromTail");
80  msg << MSG::ERROR << "BunchDistanceType not understood!" << endmsg;
81  return -1;
82  }//end switch
83 }

◆ findTrain()

const BunchCrossingCondData::bunchTrain_t * BunchCrossingCondData::findTrain ( const bcid_type  bcid) const
private

Helper method to find the train of a bcid (nullptr if bcd is not in a train)

Definition at line 5 of file BunchCrossingCondData.cxx.

5  {
6 
7  const int bcidi=static_cast<int>(bcid);
8  const auto it=std::find_if(m_trains.begin(),m_trains.end(),[&bcidi](const bunchTrain_t& bt){return (bt.m_first<=bcidi && bt.m_last>=bcidi);});
9 
10  if (it==m_trains.end()) {
11  return nullptr;
12  }
13  else {
14  return &(*it);
15  }
16 
17  /*
18  auto& it=std::lower_bound(m_trains.begin(),m_trains.end(),bunchTrain_t(bcid,0,0));
19  if (it==m_trains.end() || it==m_trains.begin()) return nullptr;
20 
21  //it points now tho the train that starts after the bcid we are looking for
22  //if the bcid is in a train, it must be the train before.
23  it--;
24  if (it->m_first>=bcid && it->m_last<=bcid) {
25  return &(*it);
26  }
27  else {
28  return nullptr;
29  }
30  */
31 
32 
33 }

◆ gapAfterBunch()

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.

Parameters
bcidThe bcid that should be checked
typeThe type of the requested return value
Returns
The gap after the train of the specified bcid

Definition at line 173 of file BunchCrossingCondData.cxx.

174  {
175  int index=bcid+1;
176  if (index>=m_MAX_BCID) {
177  index=0;
178  }
179  int result=0;
180  while (!m_luminous.test(index) && result<m_MAX_BCID) {
181  result++;
182  index++;
183  if (index>=m_MAX_BCID) {
184  index=0;
185  }
186  }
187 
188  if (type==NanoSec) {
190  }
191 
192  return result;
193 }

◆ gapAfterTrain()

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.)

Parameters
bcidThe bcid whose train should be investigated
typeThe type of the requested return value
Returns
The gap after the train of the specified bcid

Definition at line 164 of file BunchCrossingCondData.cxx.

165  {
166  const bunchTrain_t* bt=findTrain(bcid);
167  if (bt==nullptr) {
168  return -1;
169  }
170  return gapAfterBunch(bt->m_last,type);
171 }

◆ gapBeforeBunch()

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.

Parameters
bcidThe bcid that should be checked
typeThe type of the requested return value
Returns
Distance of the bcid to the preceeding filled bunch

Definition at line 138 of file BunchCrossingCondData.cxx.

139  {
140  int index=bcid-1;
141  if (index<0) {
142  index=m_MAX_BCID-1;
143  }
144 
145  int result=0;
146 
147  while (!m_luminous.test(index) && result<m_MAX_BCID) {
148  result++;
149  index--;
150  if (index<0) {
151  index=m_MAX_BCID-1;
152  }
153  }
154 
155  if (type==NanoSec) {
157  }
158 
159  return result;
160 }

◆ gapBeforeTrain()

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.)

Parameters
bcidThe bcid whose train should be investigated
typeThe type of the requested return value
Returns
The gap before the train of the specified bcid

Definition at line 127 of file BunchCrossingCondData.cxx.

128  {
129 
130  const bunchTrain_t* bt=findTrain(bcid);
131  if (bt==nullptr) {
132  return -1;
133  }
134 
135  return gapBeforeBunch(bt->m_first,type);
136 }

◆ isBeam1()

bool BunchCrossingCondData::isBeam1 ( const bcid_type  bcid) const
inline

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.

Parameters
bcidThe bcid that should be checked
Returns
true if the bcid contained a bunch from beam 1, false otherwise

Definition at line 345 of file BunchCrossingCondData.h.

345  {
346  if (ATH_UNLIKELY(bcid>=m_MAX_BCID)) return false;
347  return m_beam1.test(bcid);
348 }

◆ isBeam2()

bool BunchCrossingCondData::isBeam2 ( const bcid_type  bcid) const
inline

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.

Parameters
bcidThe bcid that should be checked
Returns
true if the bcid contained a bunch from beam 2, false otherwise

Definition at line 351 of file BunchCrossingCondData.h.

351  {
352  if (ATH_UNLIKELY(bcid>=m_MAX_BCID)) return false;
353  return m_beam2.test(bcid);
354 }

◆ isFilled()

bool BunchCrossingCondData::isFilled ( const bcid_type  bcid) const
inline

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.

Parameters
bcidThe bcid that should be checked
Returns
true if the bcid was a collision bunch crossing, false otherwise

Definition at line 339 of file BunchCrossingCondData.h.

339  {
340  if (ATH_UNLIKELY(bcid>=m_MAX_BCID)) return false;
341  return m_luminous.test(bcid);
342 }

◆ isInTrain()

bool BunchCrossingCondData::isInTrain ( const bcid_type  bcid) const
inline

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.

Parameters
bcidThe bcid that should be checked
Returns
true if the bcid is part of a bunch train, false otherwise

Definition at line 376 of file BunchCrossingCondData.h.

376  {
377  return (findTrain(bcid) != nullptr);
378 }

◆ isUnpaired()

bool BunchCrossingCondData::isUnpaired ( const bcid_type  bcid) const
inline

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.

Parameters
bcidThe bcid that should be checked
Returns
true if the bcid belongs to an unpaired bunch, false otherwise

Definition at line 358 of file BunchCrossingCondData.h.

358  {
359  if (ATH_UNLIKELY(bcid>=m_MAX_BCID)) return false;
360  return ((m_beam1.test(bcid) || m_beam2.test(bcid)) && !m_luminous.test(bcid));
361 
362 }

◆ numberOfBunchTrains()

unsigned int BunchCrossingCondData::numberOfBunchTrains ( ) const
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.

Returns
The total number of bunch trains in the machine

Definition at line 371 of file BunchCrossingCondData.h.

371  {
372  return m_trains.size();
373 }

◆ numberOfFilledBunches()

unsigned BunchCrossingCondData::numberOfFilledBunches ( ) const
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.)

Parameters
bcidThe bcid whose train should be investigated
typeThe type of the requested return value
Returns
The gap before the train of the specified bcid

Definition at line 365 of file BunchCrossingCondData.h.

365  {
366  return m_luminous.count();
367 }

◆ numberOfUnpairedBunches()

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.

Returns
The total number of unpaired bunches in the machine

Definition at line 85 of file BunchCrossingCondData.cxx.

85  {
86  return ((m_beam1 | m_beam2) & ~m_luminous).count();
87 }

Friends And Related Function Documentation

◆ BunchCrossingCondAlg

friend class BunchCrossingCondAlg
friend

Definition at line 306 of file BunchCrossingCondData.h.

Member Data Documentation

◆ m_beam1

std::bitset<m_MAX_BCID> BunchCrossingCondData::m_beam1
private

Definition at line 310 of file BunchCrossingCondData.h.

◆ m_beam2

std::bitset<m_MAX_BCID> BunchCrossingCondData::m_beam2
private

Definition at line 311 of file BunchCrossingCondData.h.

◆ m_BUNCH_SPACING

constexpr int BunchCrossingCondData::m_BUNCH_SPACING = 25
staticconstexpr

Definition at line 29 of file BunchCrossingCondData.h.

◆ m_headTailLength

const int BunchCrossingCondData::m_headTailLength = 300
staticprivate

Definition at line 313 of file BunchCrossingCondData.h.

◆ m_luminous

std::bitset<m_MAX_BCID> BunchCrossingCondData::m_luminous
private

Definition at line 312 of file BunchCrossingCondData.h.

◆ m_MAX_BCID

constexpr int BunchCrossingCondData::m_MAX_BCID =3564
staticconstexpr

Definition at line 28 of file BunchCrossingCondData.h.

◆ m_nTrains

unsigned BunchCrossingCondData::m_nTrains
private

Definition at line 325 of file BunchCrossingCondData.h.

◆ m_trains

std::vector<bunchTrain_t> BunchCrossingCondData::m_trains
private

Definition at line 323 of file BunchCrossingCondData.h.


The documentation for this class was generated from the following files:
BunchCrossingCondData::gapAfterBunch
int gapAfterBunch(bcid_type bcid=0, BunchDistanceType type=NanoSec) const
Get the distance of the specified bunch crossing to the next filled bunch.
Definition: BunchCrossingCondData.cxx:173
BunchCrossingCondData::distanceFromTail
int distanceFromTail(const bcid_type bcid, const BunchDistanceType type=NanoSec) const
The distance of the specific bunch crossing from the tail of the train.
Definition: BunchCrossingCondData.cxx:60
BunchCrossingCondData::m_BUNCH_SPACING
static constexpr int m_BUNCH_SPACING
Definition: BunchCrossingCondData.h:29
BunchCrossingCondData::m_headTailLength
static const int m_headTailLength
Definition: BunchCrossingCondData.h:313
BunchCrossingCondData::isUnpaired
bool isUnpaired(const bcid_type bcid) const
Function deciding if a given bunch crossing has an unpaired bunch.
Definition: BunchCrossingCondData.h:358
get_generator_info.result
result
Definition: get_generator_info.py:21
BunchCrossingCondData::NanoSec
@ NanoSec
Distance in nanoseconds.
Definition: BunchCrossingCondData.h:131
index
Definition: index.py:1
skel.it
it
Definition: skel.GENtoEVGEN.py:423
BunchCrossingCondData::m_trains
std::vector< bunchTrain_t > m_trains
Definition: BunchCrossingCondData.h:323
ATH_UNLIKELY
#define ATH_UNLIKELY(x)
Definition: AthUnlikelyMacros.h:17
BunchCrossingCondData::m_beam1
std::bitset< m_MAX_BCID > m_beam1
Definition: BunchCrossingCondData.h:310
BunchCrossingCondData::m_luminous
std::bitset< m_MAX_BCID > m_luminous
Definition: BunchCrossingCondData.h:312
BunchCrossingCondData::gapBeforeBunch
int gapBeforeBunch(bcid_type bcid=0, BunchDistanceType type=NanoSec) const
Get the distance of the specified bunch crossing to the preceeding filled bunch.
Definition: BunchCrossingCondData.cxx:138
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
BunchCrossingCondData::FirstEmpty
@ FirstEmpty
The first empty bunch after a train.
Definition: BunchCrossingCondData.h:103
BunchCrossingCondData::Tail
@ Tail
The BCID belongs to the last few bunces in a train.
Definition: BunchCrossingCondData.h:108
BunchCrossingCondData::m_MAX_BCID
static constexpr int m_MAX_BCID
Definition: BunchCrossingCondData.h:28
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
BunchCrossingCondData::BunchCrossings
@ BunchCrossings
Distance in units of 25 nanoseconds.
Definition: BunchCrossingCondData.h:132
BunchCrossingCondData::MiddleEmpty
@ MiddleEmpty
An empty BCID in the middle of a train.
Definition: BunchCrossingCondData.h:104
BunchCrossingCondData::distanceFromFront
int distanceFromFront(const bcid_type bcid, const BunchDistanceType type=NanoSec) const
The distance of the specific bunch crossing from the front of the train.
Definition: BunchCrossingCondData.cxx:35
BunchCrossingCondData::countColliding
unsigned countColliding(int from, int to) const
Helper method to count colliding bunches in the range from-to.
Definition: BunchCrossingCondData.cxx:102
BunchCrossingCondData::FilledBunches
@ FilledBunches
Distance in units of filled bunches (depends on filling scheme)
Definition: BunchCrossingCondData.h:134
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
BunchCrossingCondData::Front
@ Front
The BCID belongs to the first few bunches in a train.
Definition: BunchCrossingCondData.h:106
CxxUtils::to
CONT to(RANGE &&r)
Definition: ranges.h:32
BunchCrossingCondData::isInTrain
bool isInTrain(const bcid_type bcid) const
Function deciding if a given bunch crossing is in a filled train.
Definition: BunchCrossingCondData.h:376
BunchCrossingCondData::Single
@ Single
This is a filled, single bunch (not in a train)
Definition: BunchCrossingCondData.h:105
BunchCrossingCondData::Unpaired
@ Unpaired
This is an unpaired bunch (either beam1 or beam2)
Definition: BunchCrossingCondData.h:109
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
LArNewCalib_DelayDump_OFC_Cali.idx
idx
Definition: LArNewCalib_DelayDump_OFC_Cali.py:69
BunchCrossingCondData::findTrain
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)
Definition: BunchCrossingCondData.cxx:5
BunchCrossingCondData::m_beam2
std::bitset< m_MAX_BCID > m_beam2
Definition: BunchCrossingCondData.h:311
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
python.AutoConfigFlags.msg
msg
Definition: AutoConfigFlags.py:7
BunchCrossingCondData::Middle
@ Middle
The BCID belongs to the middle bunches in a train.
Definition: BunchCrossingCondData.h:107
BunchCrossingCondData::isFilled
bool isFilled(const bcid_type bcid) const
The simplest query: Is the bunch crossing filled or not?
Definition: BunchCrossingCondData.h:339
BunchCrossingCondData::Empty
@ Empty
An empty bunch far away from filled bunches.
Definition: BunchCrossingCondData.h:102