CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes
DTConfigSectColl Class Reference

#include <DTConfigSectColl.h>

Inheritance diagram for DTConfigSectColl:
DTConfig

Public Member Functions

int CoarseSync (int istat) const
 Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) More...
 
bool debug () const
 Return the debug flag. More...
 
 DTConfigSectColl (const edm::ParameterSet &ps)
 Constructor. More...
 
 DTConfigSectColl ()
 Constructor. More...
 
void print () const
 Print the setup. More...
 
bool SCGetCarryFlag (int istat) const
 Return carry in Sector Collector for station istat (1 means enabled, 0 disabled) More...
 
void setCoarseSync (int sccsp, int istat)
 Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) More...
 
void setDebug (bool debug)
 Set debug flag. More...
 
void setSCCarryFlag (bool scecf, int istat)
 Set carry in Sector Collector for station istat (1 means enabled, 0 disabled) More...
 
 ~DTConfigSectColl () override
 Destructor. More...
 
- Public Member Functions inherited from DTConfig
 DTConfig ()
 Constructor. More...
 
virtual ~DTConfig ()
 Destructor. More...
 

Static Public Attributes

static const int NDTSC = 4
 Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector. More...
 
static const int NTSPSC = 5
 
static const int NTSTSC = 3
 Constants: number of TSTheta/TSPhi in input to Sector Collector. More...
 
- Static Public Attributes inherited from DTConfig
static const int NBTITC = 4
 
static const int NSTEPF = 9
 
static const int NSTEPL = 24
 Constants: first and last step to start trigger finding. More...
 
static const int NTCTSS = 4
 Constant: number of TRACOs in input to a TSS. More...
 

Private Member Functions

void setDefaults (const edm::ParameterSet &ps)
 Load pset values into class variables. More...
 

Private Attributes

bool m_debug
 
int m_sccsp [5]
 
bool m_scecf [4]
 

Detailed Description

Configurable parameters and constants for Level-1 Muon DT Trigger - SectorCollector

Author
c. Battilana

Definition at line 37 of file DTConfigSectColl.h.

Constructor & Destructor Documentation

◆ DTConfigSectColl() [1/2]

DTConfigSectColl::DTConfigSectColl ( const edm::ParameterSet ps)

Constructor.

Definition at line 39 of file DTConfigSectColl.cc.

References debug(), print(), and setDefaults().

39  {
40  setDefaults(ps);
41  if (debug())
42  print();
43 }
void print() const
Print the setup.
bool debug() const
Return the debug flag.
void setDefaults(const edm::ParameterSet &ps)
Load pset values into class variables.

◆ DTConfigSectColl() [2/2]

DTConfigSectColl::DTConfigSectColl ( )

Constructor.

Definition at line 31 of file DTConfigSectColl.cc.

References mps_fire::i, m_debug, setCoarseSync(), and setSCCarryFlag().

31  {
32  m_debug = false;
33  for (int i = 1; i < 4; i++)
34  setSCCarryFlag(false, i);
35  for (int i = 1; i < 5; i++)
36  setCoarseSync(0, i);
37 }
void setSCCarryFlag(bool scecf, int istat)
Set carry in Sector Collector for station istat (1 means enabled, 0 disabled)
void setCoarseSync(int sccsp, int istat)
Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) ...

◆ ~DTConfigSectColl()

DTConfigSectColl::~DTConfigSectColl ( )
override

Destructor.

Definition at line 48 of file DTConfigSectColl.cc.

48 {}

Member Function Documentation

◆ CoarseSync()

int DTConfigSectColl::CoarseSync ( int  istat) const
inline

Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station)

Definition at line 67 of file DTConfigSectColl.h.

References Exception, and m_sccsp.

Referenced by DTSectCollThCand::CoarseSync(), DTSectCollPhCand::CoarseSync(), and print().

67  {
68  if (istat < 1 || istat > 5) {
69  throw cms::Exception("DTTPG") << "DTConfigSectColl::CoarseSync: station number out of range: istat=" << istat
70  << std::endl;
71  }
72  return m_sccsp[istat - 1];
73  }

◆ debug()

bool DTConfigSectColl::debug ( ) const
inline

Return the debug flag.

Definition at line 55 of file DTConfigSectColl.h.

References m_debug.

Referenced by DTConfigSectColl(), print(), and setDebug().

55 { return m_debug; }

◆ print()

void DTConfigSectColl::print ( void  ) const

Print the setup.

Definition at line 110 of file DTConfigSectColl.cc.

References CoarseSync(), gather_cfg::cout, debug(), and SCGetCarryFlag().

Referenced by DTConfigTester::analyze(), and DTConfigSectColl().

110  {
111  std::cout << "******************************************************************************" << std::endl;
112  std::cout << "* DTTrigger configuration : SectorCollector chips *" << std::endl;
113  std::cout << "******************************************************************************" << std::endl
114  << std::endl;
115  std::cout << "Debug flag : " << debug() << std::endl;
116  std::cout << "SCECF1 :" << SCGetCarryFlag(1) << std::endl;
117  std::cout << "SCECF2 :" << SCGetCarryFlag(2) << std::endl;
118  std::cout << "SCECF3 :" << SCGetCarryFlag(3) << std::endl;
119  std::cout << "SCECF4 :" << SCGetCarryFlag(4) << std::endl;
120  std::cout << "SCCSP1 :" << CoarseSync(1) << std::endl;
121  std::cout << "SCCSP2 :" << CoarseSync(2) << std::endl;
122  std::cout << "SCCSP3 :" << CoarseSync(3) << std::endl;
123  std::cout << "SCCSP4 :" << CoarseSync(4) << std::endl;
124  std::cout << "SCCSP5 :" << CoarseSync(5) << std::endl;
125  std::cout << "******************************************************************************" << std::endl;
126 }
bool SCGetCarryFlag(int istat) const
Return carry in Sector Collector for station istat (1 means enabled, 0 disabled)
int CoarseSync(int istat) const
Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) ...
bool debug() const
Return the debug flag.

◆ SCGetCarryFlag()

bool DTConfigSectColl::SCGetCarryFlag ( int  istat) const
inline

Return carry in Sector Collector for station istat (1 means enabled, 0 disabled)

Definition at line 58 of file DTConfigSectColl.h.

References Exception, and m_scecf.

Referenced by print().

58  {
59  if (istat < 1 || istat > 4) {
60  throw cms::Exception("DTTPG") << "DTConfigSectColl::SCGetCarryFlag: station number out of range: istat=" << istat
61  << std::endl;
62  }
63  return m_scecf[istat - 1];
64  }

◆ setCoarseSync()

void DTConfigSectColl::setCoarseSync ( int  sccsp,
int  istat 
)

Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station)

Definition at line 62 of file DTConfigSectColl.cc.

References Exception, and m_sccsp.

Referenced by DTConfigSectColl(), and setDefaults().

62  {
63  if (istat < 1 || istat > 5) {
64  throw cms::Exception("DTTPG") << "DTConfigSectColl::setCoarseSync: station number out of range: istat=" << istat
65  << std::endl;
66  }
67  if (sccsp < 0 || sccsp > 7) {
68  throw cms::Exception("DTTPG") << "DTConfigSectColl::setCoarseSync: wrong SCCSP" << istat << " value!" << std::endl;
69  }
70  m_sccsp[istat - 1] = sccsp;
71 }

◆ setDebug()

void DTConfigSectColl::setDebug ( bool  debug)
inline

Set debug flag.

Definition at line 77 of file DTConfigSectColl.h.

References debug(), and m_debug.

Referenced by DTConfigDBProducer::readDTCCBConfig().

77 { m_debug = debug; }
bool debug() const
Return the debug flag.

◆ setDefaults()

void DTConfigSectColl::setDefaults ( const edm::ParameterSet ps)
private

Load pset values into class variables.

Definition at line 73 of file DTConfigSectColl.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), m_debug, m_scecf, and setCoarseSync().

Referenced by DTConfigSectColl().

73  {
74  // Debug flag
75  m_debug = ps.getUntrackedParameter<bool>("Debug");
76 
77  // Enabling Carry in Sector Collector for MB1 (1 means enabled, 0 disabled)
78  m_scecf[0] = ps.getParameter<bool>("SCECF1");
79 
80  // Enabling Carry in Sector Collector for MB2 (1 means enabled, 0 disabled)
81  m_scecf[1] = ps.getParameter<bool>("SCECF2");
82 
83  // Enabling Carry in Sector Collector for MB3 (1 means enabled, 0 disabled)
84  m_scecf[2] = ps.getParameter<bool>("SCECF3");
85 
86  // Enabling Carry in Sector Collector for MB4 (1 means enabled, 0 disabled)
87  m_scecf[3] = ps.getParameter<bool>("SCECF4");
88 
89  // Progammable Coars Sync parameter in Sector Collector for MB1 (possible values [0-7])
90  int mycsp = ps.getParameter<int>("SCCSP1");
91  setCoarseSync(mycsp, 1);
92 
93  // Progammable Coars Sync parameter in Sector Collector for MB2 (possible values [0-7])
94  mycsp = ps.getParameter<int>("SCCSP2");
95  setCoarseSync(mycsp, 2);
96 
97  // Progammable Coars Sync parameter in Sector Collector for MB3 (possible values [0-7])
98  mycsp = ps.getParameter<int>("SCCSP3");
99  setCoarseSync(mycsp, 3);
100 
101  // Progammable Coars Sync parameter in Sector Collector for firts MB4 station (possible values [0-7])
102  mycsp = ps.getParameter<int>("SCCSP4");
103  setCoarseSync(mycsp, 4);
104 
105  // Progammable Coars Sync parameter in Sector Collector for second MB4 station (sectors 4 & 10) (possible values [0-7])
106  mycsp = ps.getParameter<int>("SCCSP5");
107  setCoarseSync(mycsp, 5);
108 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
T getUntrackedParameter(std::string const &, T const &) const
void setCoarseSync(int sccsp, int istat)
Return coarsesync parameter in Sector Collector for station istat (5 is second MB4 station) ...

◆ setSCCarryFlag()

void DTConfigSectColl::setSCCarryFlag ( bool  scecf,
int  istat 
)

Set carry in Sector Collector for station istat (1 means enabled, 0 disabled)

Definition at line 54 of file DTConfigSectColl.cc.

References Exception, and m_scecf.

Referenced by DTConfigSectColl().

54  {
55  if (istat < 1 || istat > 4) {
56  throw cms::Exception("DTTPG") << "DTConfigSectColl::setSCCarryFlag: station number out of range: istat=" << istat
57  << std::endl;
58  }
59  m_scecf[istat - 1] = scecf;
60 }

Member Data Documentation

◆ m_debug

bool DTConfigSectColl::m_debug
private

Definition at line 92 of file DTConfigSectColl.h.

Referenced by debug(), DTConfigSectColl(), setDebug(), and setDefaults().

◆ m_sccsp

int DTConfigSectColl::m_sccsp[5]
private

Definition at line 94 of file DTConfigSectColl.h.

Referenced by CoarseSync(), and setCoarseSync().

◆ m_scecf

bool DTConfigSectColl::m_scecf[4]
private

Definition at line 93 of file DTConfigSectColl.h.

Referenced by SCGetCarryFlag(), setDefaults(), and setSCCarryFlag().

◆ NDTSC

const int DTConfigSectColl::NDTSC = 4
static

Constant: maximum number of Sector Collector sorting Chip in input to Sector Collector.

Definition at line 43 of file DTConfigSectColl.h.

◆ NTSPSC

const int DTConfigSectColl::NTSPSC = 5
static

Definition at line 40 of file DTConfigSectColl.h.

◆ NTSTSC

const int DTConfigSectColl::NTSTSC = 3
static

Constants: number of TSTheta/TSPhi in input to Sector Collector.

Definition at line 40 of file DTConfigSectColl.h.