CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 (unsigned endcap, unsigned chamber, const edm::ParameterSet &conf)
 
 ME0Motherboard ()
 
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
private

Maximum number of time bins.

Enumerator
MAX_TRIGGER_BINS 
MAX_TRIGGERS 

Definition at line 56 of file ME0Motherboard.h.

Constructor & Destructor Documentation

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

Normal constructor.

Definition at line 6 of file ME0Motherboard.cc.

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

7  : theEndcap(endcap), theChamber(chamber) {
8  edm::ParameterSet tmbParams = conf.getParameter<edm::ParameterSet>("tmbParam");
9  infoV = tmbParams.getParameter<int>("verbosity");
10 }
const unsigned theEndcap
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const unsigned theChamber
ME0Motherboard::ME0Motherboard ( )

Constructor for use during testing.

Definition at line 12 of file ME0Motherboard.cc.

References infoV.

12 : theEndcap(1), theChamber(1) { infoV = 2; }
const unsigned theEndcap
const unsigned theChamber
ME0Motherboard::~ME0Motherboard ( )

Default destructor.

Definition at line 14 of file ME0Motherboard.cc.

14 {}

Member Function Documentation

void ME0Motherboard::clear ( void  )

Clears Triggers.

Definition at line 16 of file ME0Motherboard.cc.

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

Referenced by run().

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 }
void clear()
clear this Trigger
ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
std::vector< ME0TriggerDigi > ME0Motherboard::getTriggers ( )

Returns vector of all found correlated Triggers, if any.

Definition at line 42 of file ME0Motherboard.cc.

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

Referenced by readoutTriggers().

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 }
ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
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.

References getTriggers().

Referenced by ME0TriggerBuilder::build().

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 }
std::vector< ME0TriggerDigi > getTriggers()
void ME0Motherboard::run ( const ME0PadDigiCollection )

Run function for normal usage.

Definition at line 24 of file ME0Motherboard.cc.

References clear().

Referenced by ME0TriggerBuilder::build().

24 { clear(); }
void ME0Motherboard::setME0Geometry ( const ME0Geometry g)
inline

set geometry for the matching needs

Definition at line 30 of file ME0Motherboard.h.

References g, and me0_g.

Referenced by ME0TriggerBuilder::build().

30 { me0_g = 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
const ME0Geometry * me0_g
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 }
bool ME0Motherboard::sortByQuality ( const ME0TriggerDigi trig1,
const ME0TriggerDigi trig2 
)
staticprivate

Definition at line 54 of file ME0Motherboard.cc.

References ME0TriggerDigi::getQuality().

54  {
55  return trig1.getQuality() > trig2.getQuality();
56 }
int getQuality() const
return the Quality

Member Data Documentation

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().

const ME0Geometry* ME0Motherboard::me0_g
private

Definition at line 53 of file ME0Motherboard.h.

Referenced by setME0Geometry().

const unsigned ME0Motherboard::theChamber
private

Definition at line 51 of file ME0Motherboard.h.

const unsigned ME0Motherboard::theEndcap
private

Chamber id (trigger-type labels).

Definition at line 50 of file ME0Motherboard.h.

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().