ATLAS Offline Software
Loading...
Searching...
No Matches
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
26namespace 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,
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
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
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
#define ASG_TOOL_INTERFACE(CLASSNAME)
Interface for all the bunch crossing tools.
virtual std::vector< bool > bunchesInFront(bcid_type bcid=0, int bunches=10) const =0
Function returning whether the previous bunches were filled, and how.
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.
virtual unsigned int numberOfFilledBunches() const =0
Get the number of filled bunches in the current configuration.
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.
virtual int bunchTrainSpacing(BunchDistanceType type=NanoSec) const =0
Get the bunch spacing in the trains.
BunchFillType
Enumeration specifying what kind of bunch to use in the gap functions.
@ 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.
@ UnpairedBeam2
The gap should be calculated wrt.
unsigned int bcid_type
Declare the interface that this class provides.
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.
virtual bool isInTrain(bcid_type bcid=0) const =0
Function deciding if a given bunch crossing is in a filled train.
virtual int gapBeforeBunch(bcid_type bcid=0, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const =0
Gap before a particular bunch.
virtual int gapBeforeTrain(bcid_type bcid=0, BunchDistanceType type=NanoSec) const =0
Gap before the train this BCID is in.
virtual int gapAfterBunch(bcid_type bcid=0, BunchDistanceType dtype=NanoSec, BunchFillType ftype=CollidingBunch) const =0
Gap after a particular bunch.
virtual float bcIntensity(bcid_type bcid=0, BeamType type=Crossing) const =0
Function returning the "intensity" of a given bunch(-crossing)
virtual bool isBeam2(bcid_type bcid=0) const =0
Function deciding if there was a bunch from "beam 2" in this bunch crossing.
BunchDistanceType
Enumeration specifying the units in which to expect the bunch distance type.
@ BunchCrossings
Distance in units of 25 nanoseconds.
@ NanoSec
Distance in nanoseconds.
@ FilledBunches
Distance in units of filled bunches (depends on filling scheme)
virtual bool isFilled(bcid_type bcid=0) const =0
The simplest query: Is the bunch crossing filled or not?
virtual unsigned int numberOfBunchTrains() const =0
Get the number of the bunch trains in the current configuration.
virtual bool isUnpaired(bcid_type bcid=0) const =0
Function deciding if a given bunch crossing has an unpaired bunch.
virtual bool isBeam1(bcid_type bcid=0) const =0
Function deciding if there was a bunch from "beam 1" in this bunch crossing.
virtual BunchCrossingType bcType(bcid_type bcid=0) const =0
Get the type of the specific bunch crossing.
BunchCrossingType
Simplified type for a given bunch crossing.
@ Unpaired
This is an unpaired bunch (either beam1 or beam2)
@ FirstEmpty
The first empty bunch after a train.
@ Tail
The BCID belongs to the last few bunces in a train.
@ Empty
An empty bunch far away from filled bunches.
@ Front
The BCID belongs to the first few bunches in a train.
@ Middle
The BCID belongs to the middle bunches in a train.
@ Single
This is a filled, single bunch (not in a train)
@ MiddleEmpty
An empty BCID in the middle of a train.
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.
BeamType
Types of the return values of the bcIntensity function.
@ 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.
virtual int gapAfterTrain(bcid_type bcid=0, BunchDistanceType type=NanoSec) const =0
Gap after the train this BCID is in.
virtual unsigned int numberOfUnpairedBunches() const =0
Get the number of unpaired bunches in the current configuration.
virtual std::vector< bool > bunchesAfter(bcid_type bcid=0, int bunches=10) const =0
Function returning whether the following bunches were filled, and how.
Base class for the dual-use tool interface classes.
Definition IAsgTool.h:41
The common trigger namespace for trigger analysis tools.