CMS 3D CMS Logo

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

#include <ME0Motherboard.h>

Public Member Functions

void clear ()
 
std::vector< ME0TriggerDigigetTriggers ()
 
 ME0Motherboard ()
 
 ME0Motherboard (unsigned endcap, unsigned chamber, const edm::ParameterSet &conf)
 
std::vector< ME0TriggerDigireadoutTriggers ()
 
void run (const ME0PadDigiCollection *)
 
void setME0Geometry (const ME0Geometry *g)
 
 ~ME0Motherboard ()
 

Private Types

enum  { MAX_TRIGGER_BINS = 1, MAX_TRIGGERS = 8 }
 

Static Private Member Functions

static bool sortByME0Dphi (const ME0TriggerDigi &, const ME0TriggerDigi &)
 
static bool sortByQuality (const ME0TriggerDigi &, const ME0TriggerDigi &)
 

Private Attributes

int infoV
 
const ME0Geometryme0_g
 
const unsigned theChamber
 
const unsigned theEndcap
 
ME0TriggerDigi Triggers [MAX_TRIGGER_BINS][MAX_TRIGGERS]
 

Detailed Description

Definition at line 18 of file ME0Motherboard.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private

Maximum number of time bins.

Enumerator
MAX_TRIGGER_BINS 
MAX_TRIGGERS 

Definition at line 56 of file ME0Motherboard.h.

56 { MAX_TRIGGER_BINS = 1, MAX_TRIGGERS = 8 };

Constructor & Destructor Documentation

◆ ME0Motherboard() [1/2]

ME0Motherboard::ME0Motherboard ( unsigned  endcap,
unsigned  chamber,
const edm::ParameterSet conf 
)

Normal constructor.

Definition at line 6 of file ME0Motherboard.cc.

9  infoV = tmbParams.getParameter<int>("verbosity");
10 }

References edm::ParameterSet::getParameter(), and infoV.

◆ ME0Motherboard() [2/2]

ME0Motherboard::ME0Motherboard ( )

Constructor for use during testing.

Definition at line 12 of file ME0Motherboard.cc.

12 : theEndcap(1), theChamber(1) { infoV = 2; }

References infoV.

◆ ~ME0Motherboard()

ME0Motherboard::~ME0Motherboard ( )

Default destructor.

Definition at line 14 of file ME0Motherboard.cc.

14 {}

Member Function Documentation

◆ clear()

void ME0Motherboard::clear ( void  )

Clears Triggers.

Definition at line 16 of file ME0Motherboard.cc.

16  {
17  for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
18  for (int i = 0; i < MAX_TRIGGERS; i++) {
19  Triggers[bx][i].clear();
20  }
21  }
22 }

References l1GtPatternGenerator_cfi::bx, ME0TriggerDigi::clear(), mps_fire::i, MAX_TRIGGER_BINS, MAX_TRIGGERS, and Triggers.

Referenced by run().

◆ getTriggers()

std::vector< ME0TriggerDigi > ME0Motherboard::getTriggers ( )

Returns vector of all found correlated Triggers, if any.

Definition at line 42 of file ME0Motherboard.cc.

42  {
43  std::vector<ME0TriggerDigi> tmpV;
44 
45  for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
46  for (int i = 0; i < MAX_TRIGGERS; i++) {
47  tmpV.push_back(Triggers[bx][i]);
48  }
49  }
50  return tmpV;
51 }

References l1GtPatternGenerator_cfi::bx, mps_fire::i, MAX_TRIGGER_BINS, MAX_TRIGGERS, and Triggers.

Referenced by readoutTriggers().

◆ readoutTriggers()

std::vector< ME0TriggerDigi > ME0Motherboard::readoutTriggers ( )

Returns vector of Triggers in the read-out time window, if any.

Definition at line 29 of file ME0Motherboard.cc.

29  {
30  std::vector<ME0TriggerDigi> tmpV;
31 
32  std::vector<ME0TriggerDigi> all_trigs = getTriggers();
33  tmpV.reserve(all_trigs.size());
34  for (const auto& ptrig : all_trigs) {
35  // in the future, add a selection on the BX
36  tmpV.push_back(ptrig);
37  }
38  return tmpV;
39 }

References getTriggers().

Referenced by ME0TriggerBuilder::build().

◆ run()

void ME0Motherboard::run ( const ME0PadDigiCollection )

Run function for normal usage.

Definition at line 24 of file ME0Motherboard.cc.

24 { clear(); }

References clear().

Referenced by ME0TriggerBuilder::build().

◆ setME0Geometry()

void ME0Motherboard::setME0Geometry ( const ME0Geometry g)
inline

set geometry for the matching needs

Definition at line 30 of file ME0Motherboard.h.

30 { me0_g = g; }

References g, and me0_g.

Referenced by ME0TriggerBuilder::build().

◆ sortByME0Dphi()

bool ME0Motherboard::sortByME0Dphi ( const ME0TriggerDigi trig1,
const ME0TriggerDigi trig2 
)
staticprivate

Definition at line 59 of file ME0Motherboard.cc.

59  {
60  // todo: In the future I plan a member to be added to ME0TriggerDigi, getME0Dphi().
61  // That function will derive the bending angle from the pattern.
62  // The ME0TriggerDigi pattterns are at this point not defined yet.
63  return true;
64 }

◆ sortByQuality()

bool ME0Motherboard::sortByQuality ( const ME0TriggerDigi trig1,
const ME0TriggerDigi trig2 
)
staticprivate

Definition at line 54 of file ME0Motherboard.cc.

54  {
55  return trig1.getQuality() > trig2.getQuality();
56 }

References ME0TriggerDigi::getQuality().

Member Data Documentation

◆ infoV

int ME0Motherboard::infoV
private

Verbosity level: 0: no print (default). 1: print Triggers found.

Definition at line 47 of file ME0Motherboard.h.

Referenced by ME0Motherboard().

◆ me0_g

const ME0Geometry* ME0Motherboard::me0_g
private

Definition at line 53 of file ME0Motherboard.h.

Referenced by setME0Geometry().

◆ theChamber

const unsigned ME0Motherboard::theChamber
private

Definition at line 51 of file ME0Motherboard.h.

◆ theEndcap

const unsigned ME0Motherboard::theEndcap
private

Chamber id (trigger-type labels).

Definition at line 50 of file ME0Motherboard.h.

◆ Triggers

ME0TriggerDigi ME0Motherboard::Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
private

Container for Triggers.

Definition at line 59 of file ME0Motherboard.h.

Referenced by clear(), and getTriggers().

ME0Motherboard::infoV
int infoV
Definition: ME0Motherboard.h:47
mps_fire.i
i
Definition: mps_fire.py:428
ME0Motherboard::theEndcap
const unsigned theEndcap
Definition: ME0Motherboard.h:50
ME0Motherboard::Triggers
ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
Definition: ME0Motherboard.h:59
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
makeMuonMisalignmentScenario.endcap
endcap
Definition: makeMuonMisalignmentScenario.py:320
ME0Motherboard::MAX_TRIGGER_BINS
Definition: ME0Motherboard.h:56
ME0Motherboard::clear
void clear()
Definition: ME0Motherboard.cc:16
ME0Motherboard::getTriggers
std::vector< ME0TriggerDigi > getTriggers()
Definition: ME0Motherboard.cc:42
ME0TriggerDigi::getQuality
int getQuality() const
return the Quality
Definition: ME0TriggerDigi.h:53
tmbParams
Definition: tmbParams.py:1
edm::ParameterSet
Definition: ParameterSet.h:47
ME0Motherboard::MAX_TRIGGERS
Definition: ME0Motherboard.h:56
ME0Motherboard::me0_g
const ME0Geometry * me0_g
Definition: ME0Motherboard.h:53
ME0TriggerDigi::clear
void clear()
clear this Trigger
Definition: ME0TriggerDigi.cc:24
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ME0Motherboard::theChamber
const unsigned theChamber
Definition: ME0Motherboard.h:51
g
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4