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 198 of file BunchCrossingCondData.cxx.

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

◆ 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 93 of file BunchCrossingCondData.cxx.

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

◆ countColliding()

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

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

Definition at line 105 of file BunchCrossingCondData.cxx.

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

◆ 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 38 of file BunchCrossingCondData.cxx.

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

◆ 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 63 of file BunchCrossingCondData.cxx.

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

◆ 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 8 of file BunchCrossingCondData.cxx.

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

◆ 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 176 of file BunchCrossingCondData.cxx.

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

◆ 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 167 of file BunchCrossingCondData.cxx.

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

◆ 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 141 of file BunchCrossingCondData.cxx.

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

◆ 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 130 of file BunchCrossingCondData.cxx.

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

◆ 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 88 of file BunchCrossingCondData.cxx.

88  {
89  return ((m_beam1 | m_beam2) & ~m_luminous).count();
90 }

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:176
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:63
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:396
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:141
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:38
BunchCrossingCondData::countColliding
unsigned countColliding(int from, int to) const
Helper method to count colliding bunches in the range from-to.
Definition: BunchCrossingCondData.cxx:105
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:39
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:8
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