00001
00002
00003 #ifndef TRIGANALYSISINTERFACES_IBUNCHCROSSINGTOOL_H
00004 #define TRIGANALYSISINTERFACES_IBUNCHCROSSINGTOOL_H
00005
00006
00007 #include <vector>
00008
00009
00010 #include "AsgTools/IAsgTool.h"
00011
00021 namespace Trig {
00022
00035 class IBunchCrossingTool : public virtual asg::IAsgTool {
00036
00038 ASG_TOOL_INTERFACE( Trig::IBunchCrossingTool )
00039
00040 public:
00042 typedef unsigned int bcid_type;
00043
00045
00056 virtual bool isFilled( bcid_type bcid = 0 ) const = 0;
00057
00059
00068 virtual bool isInTrain( bcid_type bcid = 0 ) const = 0;
00069
00071
00082 virtual bool isUnpaired( bcid_type bcid = 0 ) const = 0;
00083
00085
00093 virtual bool isBeam1( bcid_type bcid = 0 ) const = 0;
00094
00096
00104 virtual bool isBeam2( bcid_type bcid = 0 ) const = 0;
00105
00107
00113 enum BeamType {
00114 Beam1 = 0,
00115 Beam2 = 1,
00116 Crossing = 2
00117 };
00118
00120
00132 virtual float bcIntensity( bcid_type bcid = 0,
00133 BeamType type = Crossing ) const = 0;
00134
00136
00140 enum BunchCrossingType {
00141 Empty = 0,
00142 FirstEmpty = 1,
00143 MiddleEmpty = 2,
00144 Single = 100,
00145 Front = 200,
00146 Middle = 201,
00147 Tail = 202,
00148 Unpaired = 300
00149 };
00150
00152
00161 virtual BunchCrossingType bcType( bcid_type bcid = 0 ) const = 0;
00162
00164
00169 enum BunchDistanceType {
00170 NanoSec,
00171 BunchCrossings,
00172
00173 FilledBunches
00174 };
00175
00177
00193 virtual
00194 int distanceFromFront( bcid_type bcid = 0,
00195 BunchDistanceType type = NanoSec ) const = 0;
00197
00213 virtual
00214 int distanceFromTail( bcid_type bcid = 0,
00215 BunchDistanceType type = NanoSec ) const = 0;
00216
00218
00233 virtual int gapBeforeTrain( bcid_type bcid = 0,
00234 BunchDistanceType type = NanoSec ) const = 0;
00236
00251 virtual int gapAfterTrain( bcid_type bcid = 0,
00252 BunchDistanceType type = NanoSec ) const = 0;
00253
00255
00269 enum BunchFillType {
00271 CollidingBunch = 0,
00273 UnpairedBunch = 1,
00275 EmptyBunch = 2,
00278 UnpairedBeam1 = 3,
00281 UnpairedBeam2 = 4
00282 };
00283
00285
00294 virtual
00295 int gapBeforeBunch( bcid_type bcid = 0,
00296 BunchDistanceType dtype = NanoSec,
00297 BunchFillType ftype = CollidingBunch ) const = 0;
00298
00300
00309 virtual
00310 int gapAfterBunch( bcid_type bcid = 0,
00311 BunchDistanceType dtype = NanoSec,
00312 BunchFillType ftype = CollidingBunch ) const = 0;
00313
00315
00333 virtual std::vector< bool > bunchesInFront( bcid_type bcid = 0,
00334 int bunches = 10 ) const = 0;
00335
00337
00355 virtual std::vector< bool > bunchesAfter( bcid_type bcid = 0,
00356 int bunches = 10 ) const = 0;
00357
00360
00376 virtual std::vector< float >
00377 bunchIntInFront( bcid_type bcid = 0,
00378 int bunches = 10,
00379 BeamType type = Crossing ) const = 0;
00380
00383
00399 virtual std::vector< float >
00400 bunchIntAfter( bcid_type bcid = 0,
00401 int bunches = 10,
00402 BeamType type = Crossing ) const = 0;
00403
00405
00412 virtual unsigned int numberOfFilledBunches() const = 0;
00413
00415
00421 virtual unsigned int numberOfUnpairedBunches() const = 0;
00422
00424
00431 virtual unsigned int numberOfBunchTrains() const = 0;
00432
00434
00445 virtual
00446 int bunchTrainSpacing( BunchDistanceType type = NanoSec ) const = 0;
00447
00448 };
00449
00450 }
00451
00452 #endif // TRIGANALYSISINTERFACES_IBUNCHCROSSINGTOOL_H