ATLAS Offline Software
BunchCrossingConfProviderBase.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // $Id: BunchCrossingConfProviderBase.cxx 748399 2016-05-19 14:55:47Z krasznaa $
6 
7 // Local include(s):
10 
11 namespace Trig {
12 
13  //
14  // Initialize the static variable(s):
15  //
16  const std::string
18 
27  std::vector< int >
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  }
39 
47  std::vector< float >
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  }
59 
67  std::vector< float >
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  }
79 
87  std::vector< int >
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  }
99 
107  std::vector< int >
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  }
119 
127  std::vector< float >
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  }
139 
147  std::vector< float >
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  }
159 
160 } // namespace Trig
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
The common trigger namespace for trigger analysis tools.
Definition: CaloTowerVecMon.h:44
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::BunchCrossingConfProviderBase::configuredIntensitiesBeam1
virtual std::vector< float > configuredIntensitiesBeam1() const
Function providing the intensities of the configured colliding bunches.
Definition: BunchCrossingConfProviderBase.cxx:48
BunchCrossingConfProviderBase.h
Trig::IBunchCrossingTool::Beam2
@ Beam2
The returned intensity should be for "beam 2".
Definition: IBunchCrossingTool.h:120
Trig::BunchCrossingConfProviderBase::configuredUnpairedBCIDsBeam1
virtual std::vector< int > configuredUnpairedBCIDsBeam1() const
Function providing the BCIDs of the configured unpaired bunches.
Definition: BunchCrossingConfProviderBase.cxx:88
BunchCrossing.h
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::BunchCrossingConfProviderBase::BUNCH_CONFIG_INCIDENT_NAME
static const std::string BUNCH_CONFIG_INCIDENT_NAME
Type name for the incident that such tools should emit.
Definition: BunchCrossingConfProviderBase.h:52
Trig::BunchCrossingConfProviderBase::configuredUnpairedBCIDsBeam2
virtual std::vector< int > configuredUnpairedBCIDsBeam2() const
Function providing the BCIDs of the configured unpaired bunches.
Definition: BunchCrossingConfProviderBase.cxx:108
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::isFilled
virtual bool isFilled(bcid_type bcid=0) const =0
The simplest query: Is the bunch crossing filled or not?
Trig::BunchCrossingConfProviderBase::configuredUnpairedIntensitiesBeam2
virtual std::vector< float > configuredUnpairedIntensitiesBeam2() const
Function providing the intensities of the configured unpaired bunches.
Definition: BunchCrossingConfProviderBase.cxx:148
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::BunchCrossingConfProviderBase::configuredIntensitiesBeam2
virtual std::vector< float > configuredIntensitiesBeam2() const
Function providing the intensities of the configured colliding bunches.
Definition: BunchCrossingConfProviderBase.cxx:68
Trig::BunchCrossingConfProviderBase::configuredUnpairedIntensitiesBeam1
virtual std::vector< float > configuredUnpairedIntensitiesBeam1() const
Function providing the intensities of the configured unpaired bunches.
Definition: BunchCrossingConfProviderBase.cxx:128
Trig::IBunchCrossingTool::Beam1
@ Beam1
The returned intensity should be for "beam 1".
Definition: IBunchCrossingTool.h:119
Trig::BunchCrossingConfProviderBase::configuredBCIDs
virtual std::vector< int > configuredBCIDs() const
Function providing the BCIDs of the configured colliding bunches.
Definition: BunchCrossingConfProviderBase.cxx:28