ATLAS Offline Software
IBunchCrossingTool.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id: IBunchCrossingTool.h 618301 2014-09-24 08:53:05Z krasznaa $
8 #ifndef TRIGANALYSISINTERFACES_IBUNCHCROSSINGTOOL_H
9 #define TRIGANALYSISINTERFACES_IBUNCHCROSSINGTOOL_H
10 
11 // STL include(s):
12 #include <vector>
13 
14 // Gaudi/Athena include(s):
15 #include "AsgTools/IAsgTool.h"
16 
26 namespace Trig {
27 
40  class IBunchCrossingTool : public virtual asg::IAsgTool {
41 
44 
45  public:
47  typedef unsigned int bcid_type;
48 
50 
61  virtual bool isFilled( bcid_type bcid = 0 ) const = 0;
62 
64 
73  virtual bool isInTrain( bcid_type bcid = 0 ) const = 0;
74 
76 
87  virtual bool isUnpaired( bcid_type bcid = 0 ) const = 0;
88 
90 
98  virtual bool isBeam1( bcid_type bcid = 0 ) const = 0;
99 
101 
109  virtual bool isBeam2( bcid_type bcid = 0 ) const = 0;
110 
112 
118  enum BeamType {
119  Beam1 = 0,
120  Beam2 = 1,
121  Crossing = 2
122  };
123 
125 
137  virtual float bcIntensity( bcid_type bcid = 0,
138  BeamType type = Crossing ) const = 0;
139 
141 
146  Empty = 0,
149  Single = 100,
150  Front = 200,
151  Middle = 201,
152  Tail = 202,
153  Unpaired = 300
154  };
155 
157 
166  virtual BunchCrossingType bcType( bcid_type bcid = 0 ) const = 0;
167 
169 
179  };
180 
182 
198  virtual
200  BunchDistanceType type = NanoSec ) const = 0;
202 
218  virtual
220  BunchDistanceType type = NanoSec ) const = 0;
221 
223 
238  virtual int gapBeforeTrain( bcid_type bcid = 0,
239  BunchDistanceType type = NanoSec ) const = 0;
241 
256  virtual int gapAfterTrain( bcid_type bcid = 0,
257  BunchDistanceType type = NanoSec ) const = 0;
258 
260 
286  UnpairedBeam2 = 4
287  };
288 
290 
299  virtual
302  BunchFillType ftype = CollidingBunch ) const = 0;
303 
305 
314  virtual
317  BunchFillType ftype = CollidingBunch ) const = 0;
318 
320 
338  virtual std::vector< bool > bunchesInFront( bcid_type bcid = 0,
339  int bunches = 10 ) const = 0;
340 
342 
360  virtual std::vector< bool > bunchesAfter( bcid_type bcid = 0,
361  int bunches = 10 ) const = 0;
362 
365 
381  virtual std::vector< float >
383  int bunches = 10,
384  BeamType type = Crossing ) const = 0;
385 
388 
404  virtual std::vector< float >
406  int bunches = 10,
407  BeamType type = Crossing ) const = 0;
408 
410 
417  virtual unsigned int numberOfFilledBunches() const = 0;
418 
420 
426  virtual unsigned int numberOfUnpairedBunches() const = 0;
427 
429 
436  virtual unsigned int numberOfBunchTrains() const = 0;
437 
439 
450  virtual
452 
453  }; // class IBunchCrossingTool
454 
455 } // namespace Trig
456 
457 #endif // TRIGANALYSISINTERFACES_IBUNCHCROSSINGTOOL_H
Trig::IBunchCrossingTool::numberOfUnpairedBunches
virtual unsigned int numberOfUnpairedBunches() const =0
Get the number of unpaired bunches in the current configuration.
Trig::IBunchCrossingTool::gapBeforeTrain
virtual int gapBeforeTrain(bcid_type bcid=0, BunchDistanceType type=NanoSec) const =0
Gap before the train this BCID is in.
Trig::IBunchCrossingTool
Interface for all the bunch crossing tools.
Definition: IBunchCrossingTool.h:40
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
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.
PlotCalibFromCool.dtype
dtype
Definition: PlotCalibFromCool.py:495
asg::IAsgTool
Base class for the dual-use tool interface classes.
Definition: IAsgTool.h:41
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::distanceFromTail
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.
Trig::IBunchCrossingTool::UnpairedBeam2
@ UnpairedBeam2
The gap should be calculated wrt.
Definition: IBunchCrossingTool.h:286
Trig::IBunchCrossingTool::numberOfBunchTrains
virtual unsigned int numberOfBunchTrains() const =0
Get the number of the bunch trains in the current configuration.
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
Trig::IBunchCrossingTool::gapBeforeBunch
virtual int gapBeforeBunch(bcid_type bcid=0, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const =0
Gap before a particular bunch.
Trig::IBunchCrossingTool::distanceFromFront
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.
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::BunchCrossingType
BunchCrossingType
Simplified type for a given bunch crossing.
Definition: IBunchCrossingTool.h:145
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::bunchIntInFront
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.
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
Trig::IBunchCrossingTool::bunchesInFront
virtual std::vector< bool > bunchesInFront(bcid_type bcid=0, int bunches=10) const =0
Function returning whether the previous bunches were filled, and how.
IAsgTool.h
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::gapAfterBunch
virtual int gapAfterBunch(bcid_type bcid=0, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const =0
Gap after a particular bunch.
Trig::IBunchCrossingTool::bunchTrainSpacing
virtual int bunchTrainSpacing(BunchDistanceType type=NanoSec) const =0
Get the bunch spacing in the trains.
Trig::IBunchCrossingTool::NanoSec
@ NanoSec
Distance in nanoseconds.
Definition: IBunchCrossingTool.h:175
Trig::IBunchCrossingTool::bcid_type
unsigned int bcid_type
Declare the interface that this class provides.
Definition: IBunchCrossingTool.h:47
Trig::IBunchCrossingTool::EmptyBunch
@ EmptyBunch
The gap should be calculated wrt. the closest empty bunch.
Definition: IBunchCrossingTool.h:280
Trig::IBunchCrossingTool::BeamType
BeamType
Types of the return values of the bcIntensity function.
Definition: IBunchCrossingTool.h:118
Trig::IBunchCrossingTool::gapAfterTrain
virtual int gapAfterTrain(bcid_type bcid=0, BunchDistanceType type=NanoSec) const =0
Gap after the train this BCID is in.
Trig::IBunchCrossingTool::isInTrain
virtual bool isInTrain(bcid_type bcid=0) const =0
Function deciding if a given bunch crossing is in a filled train.
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
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.
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trig::IBunchCrossingTool::Beam1
@ Beam1
The returned intensity should be for "beam 1".
Definition: IBunchCrossingTool.h:119
Trig::IBunchCrossingTool::bcType
virtual BunchCrossingType bcType(bcid_type bcid=0) const =0
Get the type of the specific bunch crossing.
Trig::IBunchCrossingTool::MiddleEmpty
@ MiddleEmpty
An empty BCID in the middle of a train.
Definition: IBunchCrossingTool.h:148
Trig::IBunchCrossingTool::BunchDistanceType
BunchDistanceType
Enumeration specifying the units in which to expect the bunch distance type.
Definition: IBunchCrossingTool.h:174
Trig::IBunchCrossingTool::Middle
@ Middle
The BCID belongs to the middle bunches in a train.
Definition: IBunchCrossingTool.h:151
Trig::IBunchCrossingTool::numberOfFilledBunches
virtual unsigned int numberOfFilledBunches() const =0
Get the number of filled bunches in the current configuration.
Trig::IBunchCrossingTool::bunchIntAfter
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.
Trig::IBunchCrossingTool::bunchesAfter
virtual std::vector< bool > bunchesAfter(bcid_type bcid=0, int bunches=10) const =0
Function returning whether the following bunches were filled, and how.
Trig::IBunchCrossingTool::BunchFillType
BunchFillType
Enumeration specifying what kind of bunch to use in the gap functions.
Definition: IBunchCrossingTool.h:274