CMS 3D CMS Logo

LHCInfo.cc
Go to the documentation of this file.
3 #include <algorithm>
4 #include <iterator>
5 #include <vector>
6 #include <stdexcept>
7 
8 //helper function: returns the positions of the bits in the bitset that are set (i.e., have a value of 1).
9 static std::vector<unsigned short> bitsetToVector( std::bitset<LHCInfo::bunchSlots+1> const & bs ) {
10  std::vector<unsigned short> vec;
11  //reserve space only for the bits in the bitset that are set
12  vec.reserve( bs.count() );
13  for( size_t i = 0; i < bs.size(); ++i ) {
14  if( bs.test( i ) )
15  vec.push_back( (unsigned short) i );
16  }
17  return vec;
18 }
19 
20 //helper function: returns the enum for fill types in string type
21 static std::string fillTypeToString( LHCInfo::FillTypeId const & fillType ) {
22  std::string s_fillType( "UNKNOWN" );
23  switch( fillType ) {
24  case LHCInfo::UNKNOWN :
25  s_fillType = std::string( "UNKNOWN" );
26  break;
27  case LHCInfo::PROTONS :
28  s_fillType = std::string( "PROTONS" );
29  break;
30  case LHCInfo::IONS :
31  s_fillType = std::string( "IONS" );
32  break;
33  case LHCInfo::COSMICS :
34  s_fillType = std::string( "COSMICS" );
35  break;
36  case LHCInfo::GAP :
37  s_fillType = std::string( "GAP" );
38  break;
39  default :
40  s_fillType = std::string( "UNKNOWN" );
41  }
42  return s_fillType;
43 }
44 
45 //helper function: returns the enum for particle types in string type
47  std::string s_particleType( "NONE" );
48  switch( particleType ) {
49  case LHCInfo::NONE :
50  s_particleType = std::string( "NONE" );
51  break;
52  case LHCInfo::PROTON :
53  s_particleType = std::string( "PROTON" );
54  break;
55  case LHCInfo::PB82 :
56  s_particleType = std::string( "PB82" );
57  break;
58  case LHCInfo::AR18 :
59  s_particleType = std::string( "AR18" );
60  break;
61  case LHCInfo::D :
62  s_particleType = std::string( "D" );
63  break;
64  case LHCInfo::XE54 :
65  s_particleType = std::string( "XE54" );
66  break;
67  default :
68  s_particleType = std::string( "NONE" );
69  }
70  return s_particleType;
71 }
72 
73 LHCInfo::LHCInfo(): m_intParams( ISIZE )
74  , m_floatParams( FSIZE )
75  , m_timeParams( TSIZE )
76  , m_stringParams( SSIZE )
77 {
78  setFill(0, false);
79 }
80 
81 LHCInfo::LHCInfo( unsigned short const & lhcFill, bool const & fromData ): m_intParams( ISIZE )
82  , m_floatParams( FSIZE )
83  , m_timeParams( TSIZE )
85 {
86  setFill(lhcFill, fromData);
87 }
88 
90 }
91 
93  LHCInfo* ret = new LHCInfo();
94  ret->m_isData = m_isData;
95  if( !m_intParams[0].empty()){
96  for(size_t i=0;i<LUMI_SECTION; i++) ret->m_intParams[i]=m_intParams[i];
97  for(size_t i=0;i<DELIV_LUMI; i++) ret->m_floatParams[i]=m_floatParams[i];
98  for(size_t i=0;i<DIP_TIME; i++) ret->m_timeParams[i]=m_timeParams[i];
99  for(size_t i=0;i<LHC_STATE; i++) ret->m_stringParams[i]=m_stringParams[i];
100  }
101  return ret;
102 }
103 
104 //reset instance
105 void LHCInfo::setFill( unsigned short const & lhcFill, bool const & fromData ) {
106  m_isData = fromData;
107  m_intParams.resize( ISIZE, std::vector<unsigned int>(1,0) );
108  m_intParams[ LHC_FILL ] = std::vector<unsigned int>(1,lhcFill);
109  m_floatParams.resize( FSIZE, std::vector<float>(1,0.));
110  m_floatParams[ LUMI_PER_B ] = std::vector<float>(1, 0.);
111  m_floatParams[ BEAM1_VC ] = std::vector<float>(1, 0.);
112  m_floatParams[ BEAM2_VC ] = std::vector<float>(1, 0.);
113  m_floatParams[ BEAM1_RF ] = std::vector<float>(1, 0.);
114  m_floatParams[ BEAM2_RF ] = std::vector<float>(1, 0.);
115  m_timeParams.resize( TSIZE, std::vector<unsigned long long>(1,0ULL) );
116  m_stringParams.resize( SSIZE, std::vector<std::string>(1, "") );
117  m_stringParams[ INJECTION_SCHEME ].push_back( std::string("None") );
118  m_bunchConfiguration1.reset();
119  m_bunchConfiguration2.reset();
120 }
121 
122 namespace LHCInfoImpl {
123  template <typename T> const T& getParams( const std::vector<T>& params, size_t index ){
124  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
125  return params[index];
126  }
127 
128  template <typename T> const T& getOneParam( const std::vector< std::vector<T> >& params, size_t index ){
129  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
130  const std::vector<T>& inner = params[index];
131  if( inner.empty() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" has no value stored.");
132  return inner[ 0 ];
133  }
134 
135  template <typename T> void setOneParam( std::vector< std::vector<T> >& params, size_t index, const T& value ){
136  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
137  params[ index ] = std::vector<T>(1,value);
138  }
139 
140  template <typename T> void setParams( std::vector<T>& params, size_t index, const T& value ){
141  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
142  params[ index ] = value;
143  }
144 
145 }
146 
147 //getters
148 unsigned short const LHCInfo::fillNumber() const {
150 }
151 
152 bool const LHCInfo::isData() const {
153  return m_isData;
154 }
155 
156 unsigned short const LHCInfo::bunchesInBeam1() const {
158 }
159 
160 unsigned short const LHCInfo::bunchesInBeam2() const {
162 }
163 
164 unsigned short const LHCInfo::collidingBunches() const {
166 }
167 
168 unsigned short const LHCInfo::targetBunches() const {
170 }
171 
173  return static_cast<FillTypeId>(LHCInfoImpl::getOneParam( m_intParams, FILL_TYPE ));
174 }
175 
178 }
179 
182 }
183 
184 float const LHCInfo::crossingAngle() const {
186 }
187 
188 float const LHCInfo::betaStar() const {
190 }
191 
192 float const LHCInfo::intensityForBeam1() const {
194 }
195 
196 float const LHCInfo::intensityForBeam2() const {
198 }
199 
200 float const LHCInfo::energy() const {
202 }
203 
204 float const LHCInfo::delivLumi() const {
206 }
207 
208 float const LHCInfo::recLumi() const {
210 }
211 
212 float const LHCInfo::instLumi() const {
214 }
215 
216 float const LHCInfo::instLumiError() const {
218 }
219 
222 }
223 
226 }
227 
230 }
231 
234 }
235 
236 std::vector<float> const & LHCInfo::lumiPerBX() const {
238 }
239 
242 }
243 
246 }
247 
250 }
251 
252 unsigned int const & LHCInfo::lumiSection() const {
254 }
255 
256 std::vector<float> const & LHCInfo::beam1VC() const {
258 }
259 
260 std::vector<float> const & LHCInfo::beam2VC() const {
262 }
263 
264 std::vector<float> const & LHCInfo::beam1RF() const {
266 }
267 
268 std::vector<float> const & LHCInfo::beam2RF() const {
270 }
271 
272 //returns a boolean, true if the injection scheme has a leading 25ns
273 //TODO: parse the circulating bunch configuration, instead of the string.
275  const std::string prefix( "25ns" );
276  return std::equal( prefix.begin(), prefix.end(), injectionScheme().begin() );
277 }
278 
279 //returns a boolean, true if the bunch slot number is in the circulating bunch configuration
280 bool LHCInfo::isBunchInBeam1( size_t const & bunch ) const {
281  if( bunch == 0 )
282  throw std::out_of_range( "0 not allowed" ); //CMS starts counting bunch crossing from 1!
283  return m_bunchConfiguration1.test( bunch );
284 }
285 
286 bool LHCInfo::isBunchInBeam2( size_t const & bunch ) const {
287  if( bunch == 0 )
288  throw std::out_of_range( "0 not allowed" ); //CMS starts counting bunch crossing from 1!
289  return m_bunchConfiguration2.test( bunch );
290 }
291 
292 //member functions returning *by value* a vector with all filled bunch slots
293 std::vector<unsigned short> LHCInfo::bunchConfigurationForBeam1() const {
295 }
296 
297 std::vector<unsigned short> LHCInfo::bunchConfigurationForBeam2() const {
299 }
300 
301 //setters
302 void LHCInfo::setBunchesInBeam1( unsigned short const & bunches ) {
303  LHCInfoImpl::setOneParam( m_intParams, BUNCHES_1, static_cast<unsigned int>(bunches) );
304 }
305 
306 void LHCInfo::setBunchesInBeam2( unsigned short const & bunches ) {
307  LHCInfoImpl::setOneParam( m_intParams, BUNCHES_2, static_cast<unsigned int>(bunches) );
308 }
309 
310 void LHCInfo::setCollidingBunches( unsigned short const & collidingBunches ) {
311  LHCInfoImpl::setOneParam( m_intParams, COLLIDING_BUNCHES, static_cast<unsigned int>(collidingBunches) );
312 }
313 
314 void LHCInfo::setTargetBunches( unsigned short const & targetBunches ) {
315  LHCInfoImpl::setOneParam( m_intParams, TARGET_BUNCHES, static_cast<unsigned int>(targetBunches) );
316 }
317 
319  LHCInfoImpl::setOneParam( m_intParams, FILL_TYPE, static_cast<unsigned int>(fillType) );
320 }
321 
323  LHCInfoImpl::setOneParam( m_intParams, PARTICLES_1, static_cast<unsigned int>(particleType) );
324 }
325 
327  LHCInfoImpl::setOneParam( m_intParams, PARTICLES_2, static_cast<unsigned int>(particleType) );
328 }
329 
330 void LHCInfo::setCrossingAngle( float const & angle ) {
332 }
333 
334 void LHCInfo::setBetaStar( float const & betaStar ) {
336 }
337 
338 void LHCInfo::setIntensityForBeam1( float const & intensity ) {
340 }
341 
342 void LHCInfo::setIntensityForBeam2( float const & intensity ) {
344 }
345 
346 void LHCInfo::setEnergy( float const & energy ) {
348 }
349 
350 void LHCInfo::setDelivLumi( float const & delivLumi ) {
352 }
353 
354 void LHCInfo::setRecLumi( float const & recLumi ) {
356 }
357 
358 void LHCInfo::setInstLumi( float const & instLumi ) {
360 }
361 
364 }
365 
368 }
369 
372 }
373 
376 }
377 
380 }
381 
382 void LHCInfo::setLumiPerBX( std::vector<float> const & lumiPerBX) {
384 }
385 
388 }
389 
392 }
393 
396 }
397 
398 void LHCInfo::setLumiSection( unsigned int const & lumiSection) {
400 }
401 
402 void LHCInfo::setBeam1VC( std::vector<float> const & beam1VC) {
404 }
405 
406 void LHCInfo::setBeam2VC( std::vector<float> const & beam2VC) {
408 }
409 
410 void LHCInfo::setBeam1RF( std::vector<float> const & beam1RF) {
412 }
413 
414 void LHCInfo::setBeam2RF( std::vector<float> const & beam2RF) {
416 }
417 
418 //sets all values in one go
419 void LHCInfo::setInfo( unsigned short const & bunches1
420  ,unsigned short const & bunches2
421  ,unsigned short const & collidingBunches
422  ,unsigned short const & targetBunches
423  ,FillTypeId const & fillType
424  ,ParticleTypeId const & particleType1
425  ,ParticleTypeId const & particleType2
426  ,float const & angle
427  ,float const & beta
428  ,float const & intensity1
429  ,float const & intensity2
430  ,float const & energy
431  ,float const & delivLumi
432  ,float const & recLumi
433  ,float const & instLumi
434  ,float const & instLumiError
435  ,cond::Time_t const & createTime
436  ,cond::Time_t const & beginTime
437  ,cond::Time_t const & endTime
438  ,std::string const & scheme
439  ,std::vector<float> const & lumiPerBX
440  ,std::string const & lhcState
441  ,std::string const & lhcComment
442  ,std::string const & ctppsStatus
443  ,unsigned int const & lumiSection
444  ,std::vector<float> const & beam1VC
445  ,std::vector<float> const & beam2VC
446  ,std::vector<float> const & beam1RF
447  ,std::vector<float> const & beam2RF
448  ,std::bitset<bunchSlots+1> const & bunchConf1
449  ,std::bitset<bunchSlots+1> const & bunchConf2 ) {
450  this->setBunchesInBeam1( bunches1 );
451  this->setBunchesInBeam2( bunches2 );
452  this->setCollidingBunches( collidingBunches );
453  this->setTargetBunches( targetBunches );
454  this->setFillType( fillType );
455  this->setParticleTypeForBeam1( particleType1 );
456  this->setParticleTypeForBeam2( particleType2 );
457  this->setCrossingAngle( angle );
458  this->setBetaStar( beta );
459  this->setIntensityForBeam1( intensity1 );
460  this->setIntensityForBeam2( intensity2 );
461  this->setEnergy( energy );
462  this->setDelivLumi( delivLumi );
463  this->setRecLumi( recLumi );
464  this->setInstLumi( instLumi );
465  this->setInstLumiError( instLumiError );
466  this->setCreationTime( createTime );
467  this->setBeginTime( beginTime );
468  this->setEndTime( endTime );
469  this->setInjectionScheme( scheme );
470  this->setLumiPerBX( lumiPerBX );
471  this->setLhcState( lhcState );
472  this->setLhcComment( lhcComment );
473  this->setCtppsStatus( ctppsStatus );
474  this->setLumiSection( lumiSection );
475  this->setBeam1VC( beam1VC );
476  this->setBeam2VC( beam2VC );
477  this->setBeam1RF( beam1RF );
478  this->setBeam2RF( beam2RF );
479  this->setBunchBitsetForBeam1( bunchConf1 );
480  this->setBunchBitsetForBeam2( bunchConf2 );
481 }
482 
483 void LHCInfo::print( std::stringstream & ss ) const {
484  ss << "LHC fill: " << this->fillNumber() << std::endl
485  << "Bunches in Beam 1: " << this->bunchesInBeam1() << std::endl
486  << "Bunches in Beam 2: " << this->bunchesInBeam2() << std::endl
487  << "Colliding bunches at IP5: " << this->collidingBunches() << std::endl
488  << "Target bunches at IP5: " <<this->targetBunches() << std::endl
489  << "Fill type: " << fillTypeToString( static_cast<FillTypeId> (this->fillType() ) ) << std::endl
490  << "Particle type for Beam 1: " << particleTypeToString( static_cast<ParticleTypeId>( this->particleTypeForBeam1() ) ) << std::endl
491  << "Particle type for Beam 2: " << particleTypeToString( static_cast<ParticleTypeId>( this->particleTypeForBeam2() ) ) << std::endl
492  << "Crossing angle (urad): " << this->crossingAngle() << std::endl
493  << "Beta star (cm): " << this->betaStar() << std::endl
494  << "Average Intensity for Beam 1 (number of charges): " << this->intensityForBeam1() << std::endl
495  << "Average Intensity for Beam 2 (number of charges): " << this->intensityForBeam2() << std::endl
496  << "Energy (GeV): " << this->energy() << std::endl
497  << "Delivered Luminosity (max): " << this->delivLumi() << std::endl
498  << "Recorded Luminosity (max): " << this->recLumi() << std::endl
499  << "Instantaneous Luminosity: " << this->instLumi() << std::endl
500  << "Instantaneous Luminosity Error: " << this->instLumiError() << std::endl
501  << "Creation time of the fill: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( this->createTime() ) ) << std::endl
502  << "Begin time of Stable Beam flag: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( this->beginTime() ) ) << std::endl
503  << "End time of the fill: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( this->endTime() ) ) << std::endl
504  << "Injection scheme as given by LPC: " << this->injectionScheme() << std::endl
505  << "LHC State: " << this->lhcState() << std::endl
506  << "LHC Comments: " << this->lhcComment() << std::endl
507  << "CTPPS Status: " << this->ctppsStatus() << std::endl
508  << "Lumi sections: " << this->lumiSection() << std::endl;
509 
510  ss << "Luminosity per bunch (total " << this->lumiPerBX().size() << "): ";
511  std::copy( this->lumiPerBX().begin(), this->lumiPerBX().end(), std::ostream_iterator<float>( ss, ", " ) );
512  ss << std::endl;
513 
514  ss << "Beam 1 VC (total " << this->beam1VC().size() << "): ";
515  std::copy( this->beam1VC().begin(), this->beam1VC().end(), std::ostream_iterator<float>( ss, "\t" ) );
516  ss << std::endl;
517 
518  ss << "Beam 2 VC (total " << beam2VC().size() << "): ";
519  std::copy( beam2VC().begin(), beam2VC().end(), std::ostream_iterator<float>( ss, "\t" ) );
520  ss << std::endl;
521 
522  ss << "Beam 1 RF (total " << beam1RF().size() << "): ";
523  std::copy( beam1RF().begin(), beam1RF().end(), std::ostream_iterator<float>( ss, "\t" ) );
524  ss << std::endl;
525 
526  ss << "Beam 2 RF (total " << beam2RF().size() << "): ";
527  std::copy( beam2RF().begin(), beam2RF().end(), std::ostream_iterator<float>( ss, "\t" ) );
528  ss << std::endl;
529 
530  std::vector<unsigned short> bunchVector1 = this->bunchConfigurationForBeam1();
531  std::vector<unsigned short> bunchVector2 = this->bunchConfigurationForBeam2();
532  ss << "Bunches filled for Beam 1 (total " << bunchVector1.size() << "): ";
533  std::copy( bunchVector1.begin(), bunchVector1.end(), std::ostream_iterator<unsigned short>( ss, ", " ) );
534  ss << std::endl;
535  ss << "Bunches filled for Beam 2 (total " << bunchVector2.size() << "): ";
536  std::copy( bunchVector2.begin(), bunchVector2.end(), std::ostream_iterator<unsigned short>( ss, ", " ) );
537  ss << std::endl;
538 }
539 
540 //protected getters
541 std::bitset<LHCInfo::bunchSlots+1> const & LHCInfo::bunchBitsetForBeam1() const {
542  return m_bunchConfiguration1;
543 }
544 
545 std::bitset<LHCInfo::bunchSlots+1> const & LHCInfo::bunchBitsetForBeam2() const {
546  return m_bunchConfiguration2;
547 }
548 
549 //protected setters
550 void LHCInfo::setBunchBitsetForBeam1( std::bitset<LHCInfo::bunchSlots+1> const & bunchConfiguration ) {
551  m_bunchConfiguration1 = bunchConfiguration;
552 }
553 
554 void LHCInfo::setBunchBitsetForBeam2( std::bitset<LHCInfo::bunchSlots+1> const & bunchConfiguration ) {
555  m_bunchConfiguration2 = bunchConfiguration;
556 }
557 
558 std::ostream & operator<<( std::ostream & os, LHCInfo beamInfo ) {
559  std::stringstream ss;
560  beamInfo.print( ss );
561  os << ss.str();
562  return os;
563 }
564 
565 bool LHCInfo::equals( const LHCInfo& rhs ) const {
566  if( m_isData != rhs.m_isData ) return false;
567  if( m_intParams != rhs.m_intParams ) return false;
568  if( m_floatParams != rhs.m_floatParams ) return false;
569  if( m_timeParams != rhs.m_timeParams ) return false;
570  if( m_stringParams != rhs.m_stringParams ) return false;
571  if( m_bunchConfiguration1 != rhs.m_bunchConfiguration1 ) return false;
572  if( m_bunchConfiguration2 != rhs.m_bunchConfiguration2 ) return false;
573  return true;
574 }
575 
576 bool LHCInfo::empty() const {
577  return m_intParams[0].empty();
578 }
bool equals(const LHCInfo &rhs) const
Definition: LHCInfo.cc:565
const double beta
std::string const & lhcState() const
Definition: LHCInfo.cc:240
void setBeam1RF(std::vector< float > const &beam1RF)
Definition: LHCInfo.cc:410
cond::Time_t const beginTime() const
Definition: LHCInfo.cc:224
void setLumiSection(unsigned int const &lumiSection)
Definition: LHCInfo.cc:398
unsigned short const bunchesInBeam1() const
Definition: LHCInfo.cc:156
void setBeginTime(cond::Time_t const &beginTime)
Definition: LHCInfo.cc:370
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam1() const
Definition: LHCInfo.cc:541
void print(std::stringstream &ss) const
Definition: LHCInfo.cc:483
bool m_isData
Definition: LHCInfo.h:224
void setInstLumi(float const &instLumi)
Definition: LHCInfo.cc:358
void setEnergy(float const &energy)
Definition: LHCInfo.cc:346
FillTypeId const fillType() const
Definition: LHCInfo.cc:172
bool isBunchInBeam1(size_t const &bunch) const
Definition: LHCInfo.cc:280
def copy(args, dbName)
LHCInfo * cloneFill() const
Definition: LHCInfo.cc:92
void setInstLumiError(float const &instLumiError)
Definition: LHCInfo.cc:362
void setParticleTypeForBeam2(ParticleTypeId const &particleType)
Definition: LHCInfo.cc:326
unsigned short const targetBunches() const
Definition: LHCInfo.cc:168
std::string const & injectionScheme() const
Definition: LHCInfo.cc:232
std::bitset< bunchSlots+1 > m_bunchConfiguration1
Definition: LHCInfo.h:229
static std::string particleTypeToString(LHCInfo::ParticleTypeId const &particleType)
Definition: LHCInfo.cc:46
void setDelivLumi(float const &delivLumi)
Definition: LHCInfo.cc:350
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
Definition: LHCInfo.cc:128
void setParams(std::vector< T > &params, size_t index, const T &value)
Definition: LHCInfo.cc:140
std::string const & ctppsStatus() const
Definition: LHCInfo.cc:248
void setBeam1VC(std::vector< float > const &beam1VC)
Definition: LHCInfo.cc:402
std::vector< std::vector< float > > m_floatParams
Definition: LHCInfo.h:226
bool equal(const T &first, const T &second)
Definition: Equal.h:34
void setBunchesInBeam1(unsigned short const &bunches)
Definition: LHCInfo.cc:302
void setLhcComment(std::string const &lhcComment)
Definition: LHCInfo.cc:390
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
Definition: LHCInfo.cc:135
std::vector< std::vector< unsigned long long > > m_timeParams
Definition: LHCInfo.h:227
void setFill(unsigned short const &lhcFill, bool const &fromData)
Definition: LHCInfo.cc:105
float const delivLumi() const
Definition: LHCInfo.cc:204
float const crossingAngle() const
Definition: LHCInfo.cc:184
float const instLumiError() const
Definition: LHCInfo.cc:216
bool is25nsBunchSpacing() const
Definition: LHCInfo.cc:274
unsigned long long Time_t
Definition: Time.h:16
std::string const & lhcComment() const
Definition: LHCInfo.cc:244
void setBetaStar(float const &betaStar)
Definition: LHCInfo.cc:334
std::vector< float > const & beam1VC() const
Definition: LHCInfo.cc:256
std::vector< float > const & beam2RF() const
Definition: LHCInfo.cc:268
std::ostream & operator<<(std::ostream &os, LHCInfo beamInfo)
Definition: LHCInfo.cc:558
unsigned short const bunchesInBeam2() const
Definition: LHCInfo.cc:160
bool isBunchInBeam2(size_t const &bunch) const
Definition: LHCInfo.cc:286
void setLumiPerBX(std::vector< float > const &lumiPerBX)
Definition: LHCInfo.cc:382
void setBunchesInBeam2(unsigned short const &bunches)
Definition: LHCInfo.cc:306
std::vector< float > const & beam1RF() const
Definition: LHCInfo.cc:264
float const intensityForBeam2() const
Definition: LHCInfo.cc:196
#define end
Definition: vmac.h:39
void setBeam2RF(std::vector< float > const &beam2RF)
Definition: LHCInfo.cc:414
Definition: value.py:1
void setLhcState(std::string const &lhcState)
Definition: LHCInfo.cc:386
void setBeam2VC(std::vector< float > const &beam2VC)
Definition: LHCInfo.cc:406
void setCollidingBunches(unsigned short const &collidingBunches)
Definition: LHCInfo.cc:310
std::vector< std::vector< unsigned int > > m_intParams
Definition: LHCInfo.h:225
unsigned int const & lumiSection() const
Definition: LHCInfo.cc:252
bool const isData() const
Definition: LHCInfo.cc:152
bool empty() const
Definition: LHCInfo.cc:576
void setRecLumi(float const &recLumi)
Definition: LHCInfo.cc:354
ParticleType
Definition: LHCInfo.h:15
float const instLumi() const
Definition: LHCInfo.cc:212
cond::Time_t const endTime() const
Definition: LHCInfo.cc:228
static std::string fillTypeToString(LHCInfo::FillTypeId const &fillType)
Definition: LHCInfo.cc:21
void setInfo(unsigned short const &bunches1, unsigned short const &bunches2, unsigned short const &collidingBunches, unsigned short const &targetBunches, FillTypeId const &fillType, ParticleTypeId const &particleType1, ParticleTypeId const &particleType2, float const &angle, float const &beta, float const &intensity1, float const &intensity2, float const &energy, float const &delivLumi, float const &recLumi, float const &instLumi, float const &instLumiError, cond::Time_t const &createTime, cond::Time_t const &beginTime, cond::Time_t const &endTime, std::string const &scheme, std::vector< float > const &lumiPerBX, std::string const &lhcState, std::string const &lhcComment, std::string const &ctppsStatus, unsigned int const &lumiSection, std::vector< float > const &beam1VC, std::vector< float > const &beam2VC, std::vector< float > const &beam1RF, std::vector< float > const &beam2RF, std::bitset< bunchSlots+1 > const &bunchConf1, std::bitset< bunchSlots+1 > const &bunchConf2)
Definition: LHCInfo.cc:419
void setParticleTypeForBeam1(ParticleTypeId const &particleType)
Definition: LHCInfo.cc:322
void setInjectionScheme(std::string const &injectionScheme)
Definition: LHCInfo.cc:378
~LHCInfo()
Definition: LHCInfo.cc:89
std::vector< float > const & beam2VC() const
Definition: LHCInfo.cc:260
std::vector< float > const & lumiPerBX() const
Definition: LHCInfo.cc:236
ParticleTypeId const particleTypeForBeam1() const
Definition: LHCInfo.cc:176
void setCreationTime(cond::Time_t const &createTime)
Definition: LHCInfo.cc:366
void setTargetBunches(unsigned short const &targetBunches)
Definition: LHCInfo.cc:314
LHCInfo()
Definition: LHCInfo.cc:73
const T & getParams(const std::vector< T > &params, size_t index)
Definition: LHCInfo.cc:123
float const recLumi() const
Definition: LHCInfo.cc:208
void setCtppsStatus(std::string const &ctppsStatus)
Definition: LHCInfo.cc:394
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam2() const
Definition: LHCInfo.cc:545
unsigned short const collidingBunches() const
Definition: LHCInfo.cc:164
#define begin
Definition: vmac.h:32
float const betaStar() const
Definition: LHCInfo.cc:188
float const intensityForBeam1() const
Definition: LHCInfo.cc:192
float const energy() const
Definition: LHCInfo.cc:200
unsigned short const fillNumber() const
Definition: LHCInfo.cc:148
void setBunchBitsetForBeam1(std::bitset< bunchSlots+1 > const &bunchConfiguration)
Definition: LHCInfo.cc:550
void setBunchBitsetForBeam2(std::bitset< bunchSlots+1 > const &bunchConfiguration)
Definition: LHCInfo.cc:554
ParticleTypeId const particleTypeForBeam2() const
Definition: LHCInfo.cc:180
void setIntensityForBeam1(float const &intensity)
Definition: LHCInfo.cc:338
void setEndTime(cond::Time_t const &endTime)
Definition: LHCInfo.cc:374
long double T
void setIntensityForBeam2(float const &intensity)
Definition: LHCInfo.cc:342
std::bitset< bunchSlots+1 > m_bunchConfiguration2
Definition: LHCInfo.h:229
void setFillType(FillTypeId const &fillType)
Definition: LHCInfo.cc:318
cond::Time_t const createTime() const
Definition: LHCInfo.cc:220
void setCrossingAngle(float const &angle)
Definition: LHCInfo.cc:330
std::vector< unsigned short > bunchConfigurationForBeam2() const
Definition: LHCInfo.cc:297
boost::posix_time::ptime to_boost(Time_t iValue)
static std::vector< unsigned short > bitsetToVector(std::bitset< LHCInfo::bunchSlots+1 > const &bs)
Definition: LHCInfo.cc:9
std::vector< unsigned short > bunchConfigurationForBeam1() const
Definition: LHCInfo.cc:293
FillType
Definition: LHCInfo.h:14
std::vector< std::vector< std::string > > m_stringParams
Definition: LHCInfo.h:228
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11