ATLAS Offline Software
Public Types | Public Member Functions | Static Protected Attributes | List of all members
Trig::BunchCrossingConfProviderBase Class Referenceabstract

Common implementation of the IBunchCrossingConfProvider interface. More...

#include <BunchCrossingConfProviderBase.h>

Inheritance diagram for Trig::BunchCrossingConfProviderBase:
Collaboration diagram for Trig::BunchCrossingConfProviderBase:

Public Types

typedef unsigned int configid_type
 Declare the interface that this class provides. More...
 
enum  BeamType { Beam1 = 0, Beam2 = 1, Crossing = 2 }
 Types of the return values of the bcIntensity function. More...
 
enum  BunchCrossingType {
  Empty = 0, FirstEmpty = 1, MiddleEmpty = 2, Single = 100,
  Front = 200, Middle = 201, Tail = 202, Unpaired = 300
}
 Simplified 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...
 
enum  BunchFillType {
  CollidingBunch = 0, UnpairedBunch = 1, EmptyBunch = 2, UnpairedBeam1 = 3,
  UnpairedBeam2 = 4
}
 Enumeration specifying what kind of bunch to use in the gap functions. More...
 
typedef unsigned int bcid_type
 Declare the interface that this class provides. More...
 

Public Member Functions

virtual std::vector< int > configuredBCIDs () const
 Function providing the BCIDs of the configured colliding bunches. More...
 
virtual std::vector< float > configuredIntensitiesBeam1 () const
 Function providing the intensities of the configured colliding bunches. More...
 
virtual std::vector< float > configuredIntensitiesBeam2 () const
 Function providing the intensities of the configured colliding bunches. More...
 
virtual std::vector< int > configuredUnpairedBCIDsBeam1 () const
 Function providing the BCIDs of the configured unpaired bunches. More...
 
virtual std::vector< int > configuredUnpairedBCIDsBeam2 () const
 Function providing the BCIDs of the configured unpaired bunches. More...
 
virtual std::vector< float > configuredUnpairedIntensitiesBeam1 () const
 Function providing the intensities of the configured unpaired bunches. More...
 
virtual std::vector< float > configuredUnpairedIntensitiesBeam2 () const
 Function providing the intensities of the configured unpaired bunches. More...
 
virtual configid_type configID () const =0
 Unique identifier for the current configuration. More...
 
virtual void print () const =0
 Print the state of the tool. More...
 
virtual bool isFilled (bcid_type bcid=0) const =0
 The simplest query: Is the bunch crossing filled or not? More...
 
virtual bool isInTrain (bcid_type bcid=0) const =0
 Function deciding if a given bunch crossing is in a filled train. More...
 
virtual bool isUnpaired (bcid_type bcid=0) const =0
 Function deciding if a given bunch crossing has an unpaired bunch. More...
 
virtual bool isBeam1 (bcid_type bcid=0) const =0
 Function deciding if there was a bunch from "beam 1" in this bunch crossing. More...
 
virtual bool isBeam2 (bcid_type bcid=0) const =0
 Function deciding if there was a bunch from "beam 2" in this bunch crossing. More...
 
virtual float bcIntensity (bcid_type bcid=0, BeamType type=Crossing) const =0
 Function returning the "intensity" of a given bunch(-crossing) More...
 
virtual BunchCrossingType bcType (bcid_type bcid=0) const =0
 Get the type of the specific bunch crossing. More...
 
virtual int distanceFromFront (bcid_type bcid=0, BunchDistanceType type=NanoSec) const =0
 The distance of the specific bunch crossing from the front of the train. More...
 
virtual int distanceFromTail (bcid_type bcid=0, BunchDistanceType type=NanoSec) const =0
 The distance of the specific bunch crossing from the tail of the train. More...
 
virtual int gapBeforeTrain (bcid_type bcid=0, BunchDistanceType type=NanoSec) const =0
 Gap before the train this BCID is in. More...
 
virtual int gapAfterTrain (bcid_type bcid=0, BunchDistanceType type=NanoSec) const =0
 Gap after the train this BCID is in. More...
 
virtual int gapBeforeBunch (bcid_type bcid=0, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const =0
 Gap before a particular bunch. More...
 
virtual int gapAfterBunch (bcid_type bcid=0, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const =0
 Gap after a particular bunch. More...
 
virtual std::vector< bool > bunchesInFront (bcid_type bcid=0, int bunches=10) const =0
 Function returning whether the previous bunches were filled, and how. More...
 
virtual std::vector< bool > bunchesAfter (bcid_type bcid=0, int bunches=10) const =0
 Function returning whether the following bunches were filled, and how. More...
 
virtual std::vector< float > bunchIntInFront (bcid_type bcid=0, int bunches=10, BeamType type=Crossing) const =0
 Function returning the intensities of the bunch crossings before the reference. More...
 
virtual std::vector< float > bunchIntAfter (bcid_type bcid=0, int bunches=10, BeamType type=Crossing) const =0
 Function returning the intensities of the bunch crossings after the reference. More...
 
virtual unsigned int numberOfFilledBunches () const =0
 Get the number of filled bunches in the current configuration. More...
 
virtual unsigned int numberOfUnpairedBunches () const =0
 Get the number of unpaired bunches in the current configuration. More...
 
virtual unsigned int numberOfBunchTrains () const =0
 Get the number of the bunch trains in the current configuration. More...
 
virtual int bunchTrainSpacing (BunchDistanceType type=NanoSec) const =0
 Get the bunch spacing in the trains. More...
 

Static Protected Attributes

static const std::string BUNCH_CONFIG_INCIDENT_NAME = "BunchConfig"
 Type name for the incident that such tools should emit. More...
 

Detailed Description

Common implementation of the IBunchCrossingConfProvider interface.

   Implementing the IBunchCrossingConfProvider interface is quite
   simple actually, and it can be done in a common way. So it doesn't
   make sense to do it separately for all the tool implementations.
Author
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Revision
748399
Date
2016-05-19 16:55:47 +0200 (Thu, 19 May 2016)

Definition at line 29 of file BunchCrossingConfProviderBase.h.

Member Typedef Documentation

◆ bcid_type

typedef unsigned int Trig::IBunchCrossingTool::bcid_type
inherited

Declare the interface that this class provides.

Convenience type definition

Definition at line 47 of file IBunchCrossingTool.h.

◆ configid_type

typedef unsigned int Trig::IBunchCrossingConfProvider::configid_type
inherited

Declare the interface that this class provides.

Type for the unique identifier

Definition at line 60 of file IBunchCrossingConfProvider.h.

Member Enumeration Documentation

◆ BeamType

Types of the return values of the bcIntensity function.

The different information sources provide the "bunch intensity" information in quite different ways, and the information can mean different things actually. This enumeration is used to specify what exact type of information the user is looking for.

Enumerator
Beam1 

The returned intensity should be for "beam 1".

Beam2 

The returned intensity should be for "beam 2".

Crossing 

The returned intensity should describe the BC.

Definition at line 118 of file IBunchCrossingTool.h.

118  {
119  Beam1 = 0,
120  Beam2 = 1,
121  Crossing = 2
122  };

◆ BunchCrossingType

Simplified 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 145 of file IBunchCrossingTool.h.

145  {
146  Empty = 0,
147  FirstEmpty = 1,
148  MiddleEmpty = 2,
149  Single = 100,
150  Front = 200,
151  Middle = 201,
152  Tail = 202,
153  Unpaired = 300
154  };

◆ 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 174 of file IBunchCrossingTool.h.

174  {
175  NanoSec,
179  };

◆ BunchFillType

Enumeration specifying what kind of bunch to use in the gap functions.

The following functions can be used to calculate the gap before and after a specific BCID to some other bunch type. The gap can actually be wrt. two different types of bunches. The user may be interested between the space of two filled bunches, the space between an unpaired bunch and the previous filled bunch, the space between two unpaired bunches, or the space between a filled bunch and the previous unpaired bunch.

The empty type is just put here for completeness. Maybe once we'll be using 25 ns spacing in the bunch trains, this will be a useful parameter as well.

This enumeration helps in answeing all of these questions.

Enumerator
CollidingBunch 

The gap should be calculated wrt. the closest colling bunch.

UnpairedBunch 

The gap should be calculated wrt. the closest unpaired bunch.

EmptyBunch 

The gap should be calculated wrt. the closest empty bunch.

UnpairedBeam1 

The gap should be calculated wrt.

the closest unpaired bunch from beam 1

UnpairedBeam2 

The gap should be calculated wrt.

the closest unpaired bunch from beam 2

Definition at line 274 of file IBunchCrossingTool.h.

274  {
276  CollidingBunch = 0,
278  UnpairedBunch = 1,
280  EmptyBunch = 2,
283  UnpairedBeam1 = 3,
286  UnpairedBeam2 = 4
287  };

Member Function Documentation

◆ bcIntensity()

virtual float Trig::IBunchCrossingTool::bcIntensity ( bcid_type  bcid = 0,
BeamType  type = Crossing 
) const
pure virtualinherited

Function returning the "intensity" of a given bunch(-crossing)

Some imeplementations are able to return an "intensity" per BCID. The exact meaning of this intensity is actually context sensitive, as it could mean quite different things for pile-up MC and data samples.

The tool implementations that don't know about the bunch intensities will return 1.0 for filled bunch crossings and 0.0 for empty ones.

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

Implemented in Trig::BunchCrossingToolBase.

◆ bcType()

virtual BunchCrossingType Trig::IBunchCrossingTool::bcType ( bcid_type  bcid = 0) const
pure virtualinherited

Get the type of the specific bunch crossing.

This function could be used as a single entry point to this tool 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

Implemented in Trig::BunchCrossingToolBase.

◆ bunchesAfter()

virtual std::vector< bool > Trig::IBunchCrossingTool::bunchesAfter ( bcid_type  bcid = 0,
int  bunches = 10 
) const
pure virtualinherited

Function returning whether the following bunches were filled, and how.

This function is here to provide uniformity between the python and C++ implementations. It works pretty much like the bunchesInFron(...) function.

The indexing is such that return[0] means the reference bunch, return[1] means the first bunch after that one, etc. The boolean value true means that the bunch was filled, false means that is was empty.

It's really just another way of getting the same information as what isFilled(...) is providing...

Parameters
bcidThe bcid that should be checked
bunchesThe number of bunches about which the return value should have info
Returns
The bunch pattern after the reference bunch

Implemented in Trig::BunchCrossingToolBase.

◆ bunchesInFront()

virtual std::vector< bool > Trig::IBunchCrossingTool::bunchesInFront ( bcid_type  bcid = 0,
int  bunches = 10 
) const
pure virtualinherited

Function returning whether the previous bunches were filled, and how.

To get a concrete idea of how the bunch structure looks like in front of the bcid under investigation, this function returns a vector representing the previous bunches.

The indexing is such that return[0] means the reference bunch, return[1] means the first bunch before that one, etc. The boolean value true means that the bunch was filled, false means that is was empty.

It's really just another way of getting the same information as what isFilled(...) is providing...

Parameters
bcidThe bcid that should be checked
bunchesThe number of bunches about which the return value should have info
Returns
The bunch pattern before the reference bunch

Implemented in Trig::BunchCrossingToolBase.

◆ bunchIntAfter()

virtual std::vector< float > Trig::IBunchCrossingTool::bunchIntAfter ( bcid_type  bcid = 0,
int  bunches = 10,
BeamType  type = Crossing 
) const
pure virtualinherited

Function returning the intensities of the bunch crossings after the reference.

In some cases one does not only want to know if the following bunches were filled, but also their intensities. This intensity has a context sensitive meaning, as the MC and data bunch intensities can't be directly compared in general, but in both cases the intensities are described by floating point numbers.

The indexing is the same as with the bunchesAfter(...) function.

Parameters
bcidThe bcid that should be checked
bunchesThe number of bunches about which the return value should have info
typeThe intensity "type" the user is interested in
Returns
The intensities of the bunch crossings after of the reference BC

Implemented in Trig::BunchCrossingToolBase.

◆ bunchIntInFront()

virtual std::vector< float > Trig::IBunchCrossingTool::bunchIntInFront ( bcid_type  bcid = 0,
int  bunches = 10,
BeamType  type = Crossing 
) const
pure virtualinherited

Function returning the intensities of the bunch crossings before the reference.

In some cases one does not only want to know if the previous bunches were filled, but also their intensities. This intensity has a context sensitive meaning, as the MC and data bunch intensities can't be directly compared in general, but in both cases the intensities are described by floating point numbers.

The indexing is the same as with the bunchesInFront(...) function.

Parameters
bcidThe bcid that should be checked
bunchesThe number of bunches about which the return value should have info
typeThe intensity "type" the user is interested in
Returns
The intensities of the bunch crossings in front of the reference BC

Implemented in Trig::BunchCrossingToolBase.

◆ bunchTrainSpacing()

virtual int Trig::IBunchCrossingTool::bunchTrainSpacing ( BunchDistanceType  type = NanoSec) const
pure virtualinherited

Get the bunch spacing in the trains.

This function can be used to easily find out what was the bunch spacing in the bunch trains. This could come in handy in some circumstances.

Note that a return value type of FilledBunches makes no sense, so the code will complain if you request the value with that parameter.

Parameters
typeThe type of the requested return value
Returns
The bunch spacing in the requested units

Implemented in Trig::BunchCrossingToolBase.

◆ configID()

virtual configid_type Trig::IBunchCrossingConfProvider::configID ( ) const
pure virtualinherited

Unique identifier for the current configuration.

This is a tricky part of the interface. In order to be able to save the bunch pattern configuration for many different setups in a meaningful way, we have to uniquely identify each differing configuration.

For some backends this is easy. When reading the configuration from the trigger database, the unique identifier can be the bunch group key (BGK). But when reading the configuration of a MC file, the situation is a bit more tricky.

In the end the only requirement with this function is that it should return the same ID for two identical configurations, and that it should return a differiod ID with a "high enough" period for different configurations.

Returns
A unique identifier for the currently loaded configuration

Implemented in Trig::TrigConfBunchCrossingTool.

◆ configuredBCIDs()

std::vector< int > Trig::BunchCrossingConfProviderBase::configuredBCIDs ( ) const
virtual

Function providing the BCIDs of the configured colliding bunches.

The implementation just loops over all the possible BCIDs and puts the IDs of the ones which are reported to be filled, into the output vector.

See also
BunchCrossingConfProviderBase::configuredIntensitiesBeam1()
BunchCrossingConfProviderBase::configuredIntensitiesBeam2()

Implements Trig::IBunchCrossingConfProvider.

Definition at line 28 of file BunchCrossingConfProviderBase.cxx.

28  {
29 
30  std::vector< int > bunches;
31  for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
32  if( isFilled( i ) ) {
33  bunches.push_back( i );
34  }
35  }
36 
37  return bunches;
38  }

◆ configuredIntensitiesBeam1()

std::vector< float > Trig::BunchCrossingConfProviderBase::configuredIntensitiesBeam1 ( ) const
virtual

Function providing the intensities of the configured colliding bunches.

The implementation just loops over all the possible BCIDs, and puts the intensities of the filled ones into the output vector.

This way the result is in sync with the output of configuredBCIDs().

See also
BunchCrossingConfProviderBase::configuredBCIDs()

Implements Trig::IBunchCrossingConfProvider.

Reimplemented in Trig::TrigConfBunchCrossingTool.

Definition at line 48 of file BunchCrossingConfProviderBase.cxx.

48  {
49 
50  std::vector< float > intensities;
51  for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
52  if( isFilled( i ) ) {
53  intensities.push_back( bcIntensity( i, Beam1 ) );
54  }
55  }
56 
57  return intensities;
58  }

◆ configuredIntensitiesBeam2()

std::vector< float > Trig::BunchCrossingConfProviderBase::configuredIntensitiesBeam2 ( ) const
virtual

Function providing the intensities of the configured colliding bunches.

The implementation just loops over all the possible BCIDs, and puts the intensities of the filled ones into the output vector.

This way the result is in sync with the output of configuredBCIDs().

See also
BunchCrossingConfProviderBase::configuredBCIDs()

Implements Trig::IBunchCrossingConfProvider.

Reimplemented in Trig::TrigConfBunchCrossingTool.

Definition at line 68 of file BunchCrossingConfProviderBase.cxx.

68  {
69 
70  std::vector< float > intensities;
71  for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
72  if( isFilled( i ) ) {
73  intensities.push_back( bcIntensity( i, Beam2 ) );
74  }
75  }
76 
77  return intensities;
78  }

◆ configuredUnpairedBCIDsBeam1()

std::vector< int > Trig::BunchCrossingConfProviderBase::configuredUnpairedBCIDsBeam1 ( ) const
virtual

Function providing the BCIDs of the configured unpaired bunches.

The implementation just loops over all the possible BCIDs and puts the IDs of the ones which are reported to be unpaired, into the output vector.

See also
BunchCrossingConfProviderBase::configuredUnpairedIntensitiesBeam1()

Implements Trig::IBunchCrossingConfProvider.

Definition at line 88 of file BunchCrossingConfProviderBase.cxx.

88  {
89 
90  std::vector< int > bunches;
91  for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
92  if( isUnpaired( i ) && isBeam1( i ) ) {
93  bunches.push_back( i );
94  }
95  }
96 
97  return bunches;
98  }

◆ configuredUnpairedBCIDsBeam2()

std::vector< int > Trig::BunchCrossingConfProviderBase::configuredUnpairedBCIDsBeam2 ( ) const
virtual

Function providing the BCIDs of the configured unpaired bunches.

The implementation just loops over all the possible BCIDs and puts the IDs of the ones which are reported to be unpaired, into the output vector.

See also
BunchCrossingConfProviderBase::configuredUnpairedIntensitiesBeam2()

Implements Trig::IBunchCrossingConfProvider.

Definition at line 108 of file BunchCrossingConfProviderBase.cxx.

108  {
109 
110  std::vector< int > bunches;
111  for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
112  if( isUnpaired( i ) && isBeam2( i ) ) {
113  bunches.push_back( i );
114  }
115  }
116 
117  return bunches;
118  }

◆ configuredUnpairedIntensitiesBeam1()

std::vector< float > Trig::BunchCrossingConfProviderBase::configuredUnpairedIntensitiesBeam1 ( ) const
virtual

Function providing the intensities of the configured unpaired bunches.

The implementation just loops over all the possible BCIDs, and puts the intensities of the unpaired ones into the output vector.

This way the result is in sync with the output of configuredUnpairedBCIDsBeam1().

See also
BunchCrossingConfProviderBase::configuredUnpairedBCIDsBeam1()

Implements Trig::IBunchCrossingConfProvider.

Reimplemented in Trig::TrigConfBunchCrossingTool.

Definition at line 128 of file BunchCrossingConfProviderBase.cxx.

128  {
129 
130  std::vector< float > intensities;
131  for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
132  if( isUnpaired( i ) && isBeam1( i ) ) {
133  intensities.push_back( bcIntensity( i, Beam1 ) );
134  }
135  }
136 
137  return intensities;
138  }

◆ configuredUnpairedIntensitiesBeam2()

std::vector< float > Trig::BunchCrossingConfProviderBase::configuredUnpairedIntensitiesBeam2 ( ) const
virtual

Function providing the intensities of the configured unpaired bunches.

The implementation just loops over all the possible BCIDs, and puts the intensities of the unpaired ones into the output vector.

This way the result is in sync with the output of configuredUnpairedBCIDsBeam2().

See also
BunchCrossingConfProviderBase::configuredUnpairedBCIDsBeam2()

Implements Trig::IBunchCrossingConfProvider.

Reimplemented in Trig::TrigConfBunchCrossingTool.

Definition at line 148 of file BunchCrossingConfProviderBase.cxx.

148  {
149 
150  std::vector< float > intensities;
151  for( int i = 0; i < BunchCrossing::MAX_BCID; ++i ) {
152  if( isUnpaired( i ) && isBeam2( i ) ) {
153  intensities.push_back( bcIntensity( i, Beam2 ) );
154  }
155  }
156 
157  return intensities;
158  }

◆ distanceFromFront()

virtual int Trig::IBunchCrossingTool::distanceFromFront ( bcid_type  bcid = 0,
BunchDistanceType  type = NanoSec 
) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ distanceFromTail()

virtual int Trig::IBunchCrossingTool::distanceFromTail ( bcid_type  bcid = 0,
BunchDistanceType  type = NanoSec 
) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ gapAfterBunch()

virtual int Trig::IBunchCrossingTool::gapAfterBunch ( bcid_type  bcid = 0,
BunchDistanceType  dtype = NanoSec,
BunchFillType  ftype = CollidingBunch 
) const
pure virtualinherited

Gap after a particular bunch.

The function tells you how far the BCID in question is from the next colliding bunch crossing.

Parameters
bcidThe bcid that should be investigated
dtypeThe type of the requested return value
ftypeThe type of the previous bunch to consider
Returns
The gap after the specified bcid

Implemented in Trig::BunchCrossingToolBase.

◆ gapAfterTrain()

virtual int Trig::IBunchCrossingTool::gapAfterTrain ( bcid_type  bcid = 0,
BunchDistanceType  type = NanoSec 
) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ gapBeforeBunch()

virtual int Trig::IBunchCrossingTool::gapBeforeBunch ( bcid_type  bcid = 0,
BunchDistanceType  dtype = NanoSec,
BunchFillType  ftype = CollidingBunch 
) const
pure virtualinherited

Gap before a particular bunch.

The function tells you how far the BCID in question is from the previous colliding bunch crossing.

Parameters
bcidThe bcid that should be investigated
dtypeThe type of the requested return value
ftypeThe type of the previous bunch to consider
Returns
The gap before the specified bcid

Implemented in Trig::BunchCrossingToolBase.

◆ gapBeforeTrain()

virtual int Trig::IBunchCrossingTool::gapBeforeTrain ( bcid_type  bcid = 0,
BunchDistanceType  type = NanoSec 
) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ isBeam1()

virtual bool Trig::IBunchCrossingTool::isBeam1 ( bcid_type  bcid = 0) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ isBeam2()

virtual bool Trig::IBunchCrossingTool::isBeam2 ( bcid_type  bcid = 0) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ isFilled()

virtual bool Trig::IBunchCrossingTool::isFilled ( bcid_type  bcid = 0) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ isInTrain()

virtual bool Trig::IBunchCrossingTool::isInTrain ( bcid_type  bcid = 0) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ isUnpaired()

virtual bool Trig::IBunchCrossingTool::isUnpaired ( bcid_type  bcid = 0) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ numberOfBunchTrains()

virtual unsigned int Trig::IBunchCrossingTool::numberOfBunchTrains ( ) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ numberOfFilledBunches()

virtual unsigned int Trig::IBunchCrossingTool::numberOfFilledBunches ( ) const
pure virtualinherited

Get the number of filled bunches in the current configuration.

This function gives the total number of filled (colliding) bunches in the current configuration. This could come in handy in some circumstances.

Returns
The total number of filled (colliding) bunches in the machine

Implemented in Trig::BunchCrossingToolBase.

◆ numberOfUnpairedBunches()

virtual unsigned int Trig::IBunchCrossingTool::numberOfUnpairedBunches ( ) const
pure virtualinherited

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

Implemented in Trig::BunchCrossingToolBase.

◆ print()

virtual void asg::IAsgTool::print ( ) const
pure virtualinherited

Member Data Documentation

◆ BUNCH_CONFIG_INCIDENT_NAME

const std::string Trig::BunchCrossingConfProviderBase::BUNCH_CONFIG_INCIDENT_NAME = "BunchConfig"
staticprotected

Type name for the incident that such tools should emit.

Definition at line 52 of file BunchCrossingConfProviderBase.h.


The documentation for this class was generated from the following files:
Trig::BunchCrossing::MAX_BCID
static const int MAX_BCID
The maximum number of bunches that can be in the LHC.
Definition: BunchCrossing.h:50
Trig::IBunchCrossingTool::isBeam1
virtual bool isBeam1(bcid_type bcid=0) const =0
Function deciding if there was a bunch from "beam 1" in this bunch crossing.
Trig::IBunchCrossingTool::Tail
@ Tail
The BCID belongs to the last few bunces in a train.
Definition: IBunchCrossingTool.h:152
Trig::IBunchCrossingTool::Empty
@ Empty
An empty bunch far away from filled bunches.
Definition: IBunchCrossingTool.h:146
Trig::IBunchCrossingTool::Single
@ Single
This is a filled, single bunch (not in a train)
Definition: IBunchCrossingTool.h:149
Trig::IBunchCrossingTool::FilledBunches
@ FilledBunches
Distance in units of filled bunches (depends on filling scheme)
Definition: IBunchCrossingTool.h:178
Trig::IBunchCrossingTool::Unpaired
@ Unpaired
This is an unpaired bunch (either beam1 or beam2)
Definition: IBunchCrossingTool.h:153
Trig::IBunchCrossingTool::UnpairedBunch
@ UnpairedBunch
The gap should be calculated wrt. the closest unpaired bunch.
Definition: IBunchCrossingTool.h:278
Trig::IBunchCrossingTool::Crossing
@ Crossing
The returned intensity should describe the BC.
Definition: IBunchCrossingTool.h:121
Trig::IBunchCrossingTool::UnpairedBeam2
@ UnpairedBeam2
The gap should be calculated wrt.
Definition: IBunchCrossingTool.h:286
Trig::IBunchCrossingTool::Beam2
@ Beam2
The returned intensity should be for "beam 2".
Definition: IBunchCrossingTool.h:120
Trig::IBunchCrossingTool::UnpairedBeam1
@ UnpairedBeam1
The gap should be calculated wrt.
Definition: IBunchCrossingTool.h:283
lumiFormat.i
int i
Definition: lumiFormat.py:92
Trig::IBunchCrossingTool::isUnpaired
virtual bool isUnpaired(bcid_type bcid=0) const =0
Function deciding if a given bunch crossing has an unpaired bunch.
Trig::IBunchCrossingTool::FirstEmpty
@ FirstEmpty
The first empty bunch after a train.
Definition: IBunchCrossingTool.h:147
Trig::IBunchCrossingTool::CollidingBunch
@ CollidingBunch
The gap should be calculated wrt. the closest colling bunch.
Definition: IBunchCrossingTool.h:276
Trig::IBunchCrossingTool::BunchCrossings
@ BunchCrossings
Distance in units of 25 nanoseconds.
Definition: IBunchCrossingTool.h:176
Trig::IBunchCrossingTool::bcIntensity
virtual float bcIntensity(bcid_type bcid=0, BeamType type=Crossing) const =0
Function returning the "intensity" of a given bunch(-crossing)
Trig::IBunchCrossingTool::Front
@ Front
The BCID belongs to the first few bunches in a train.
Definition: IBunchCrossingTool.h:150
Trig::IBunchCrossingTool::isFilled
virtual bool isFilled(bcid_type bcid=0) const =0
The simplest query: Is the bunch crossing filled or not?
Trig::IBunchCrossingTool::NanoSec
@ NanoSec
Distance in nanoseconds.
Definition: IBunchCrossingTool.h:175
Trig::IBunchCrossingTool::EmptyBunch
@ EmptyBunch
The gap should be calculated wrt. the closest empty bunch.
Definition: IBunchCrossingTool.h:280
Trig::IBunchCrossingTool::isBeam2
virtual bool isBeam2(bcid_type bcid=0) const =0
Function deciding if there was a bunch from "beam 2" in this bunch crossing.
Trig::IBunchCrossingTool::Beam1
@ Beam1
The returned intensity should be for "beam 1".
Definition: IBunchCrossingTool.h:119
Trig::IBunchCrossingTool::MiddleEmpty
@ MiddleEmpty
An empty BCID in the middle of a train.
Definition: IBunchCrossingTool.h:148
Trig::IBunchCrossingTool::Middle
@ Middle
The BCID belongs to the middle bunches in a train.
Definition: IBunchCrossingTool.h:151