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 ()
 
void declusterize (const ME0PadDigiClusterCollection *, ME0PadDigiCollection &)
 
std::vector< ME0TriggerDigigetTriggers ()
 
 ME0Motherboard (unsigned endcap, unsigned chamber, const edm::ParameterSet &conf)
 
 ME0Motherboard ()
 
std::vector< ME0TriggerDigireadoutTriggers ()
 
void run (const ME0PadDigiCollection *)
 
void run (const ME0PadDigiClusterCollection *)
 
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 19 of file ME0Motherboard.h.

Member Enumeration Documentation

anonymous enum
private

Maximum number of time bins.

Enumerator
MAX_TRIGGER_BINS 
MAX_TRIGGERS 

Definition at line 66 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  :
9 {
10  edm::ParameterSet tmbParams = conf.getParameter<edm::ParameterSet>("tmbParam");
11  infoV = tmbParams.getParameter<int>("verbosity");
12 }
T getParameter(std::string const &) const
const unsigned theEndcap
const unsigned theChamber
ME0Motherboard::ME0Motherboard ( )

Constructor for use during testing.

Definition at line 14 of file ME0Motherboard.cc.

References infoV.

14  :
15  theEndcap(1), theChamber(1)
16 {
17  infoV = 2;
18 }
const unsigned theEndcap
const unsigned theChamber
ME0Motherboard::~ME0Motherboard ( )

Default destructor.

Definition at line 20 of file ME0Motherboard.cc.

20  {
21 }

Member Function Documentation

void ME0Motherboard::clear ( void  )

Clears Triggers.

Definition at line 23 of file ME0Motherboard.cc.

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

Referenced by run(), and setME0Geometry().

24 {
25  for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
26  for (int i = 0; i < MAX_TRIGGERS; i++) {
27  Triggers[bx][i].clear();
28  }
29  }
30 }
void clear()
clear this Trigger
ME0TriggerDigi Triggers[MAX_TRIGGER_BINS][MAX_TRIGGERS]
void ME0Motherboard::declusterize ( const ME0PadDigiClusterCollection in_clusters,
ME0PadDigiCollection out_pads 
)

Definition at line 89 of file ME0Motherboard.cc.

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by run(), and setME0Geometry().

91 {
92  for (auto detUnitIt = in_clusters->begin();detUnitIt != in_clusters->end(); ++detUnitIt) {
93  const ME0DetId& id = (*detUnitIt).first;
94  const auto& range = (*detUnitIt).second;
95  for (auto digiIt = range.first; digiIt!=range.second; ++digiIt) {
96  for (const auto& p: digiIt->pads()){
97  out_pads.insertDigi(id, ME0PadDigi(p, digiIt->bx()));
98  }
99  }
100  }
101 }
std::vector< ME0TriggerDigi > ME0Motherboard::getTriggers ( )

Returns vector of all found correlated Triggers, if any.

Definition at line 60 of file ME0Motherboard.cc.

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

Referenced by readoutTriggers(), and setME0Geometry().

61 {
62  std::vector<ME0TriggerDigi> tmpV;
63 
64  for (int bx = 0; bx < MAX_TRIGGER_BINS; bx++) {
65  for (int i = 0; i < MAX_TRIGGERS; i++) {
66  tmpV.push_back(Triggers[bx][i]);
67  }
68  }
69  return tmpV;
70 }
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 47 of file ME0Motherboard.cc.

References getTriggers().

Referenced by ME0TriggerBuilder::build(), and setME0Geometry().

48 {
49  std::vector<ME0TriggerDigi> tmpV;
50 
51  std::vector<ME0TriggerDigi> all_trigs = getTriggers();
52  for (const auto& ptrig : all_trigs) {
53  // in the future, add a selection on the BX
54  tmpV.push_back(ptrig);
55  }
56  return tmpV;
57 }
std::vector< ME0TriggerDigi > getTriggers()
void ME0Motherboard::run ( const ME0PadDigiCollection )

Run function for normal usage.

Definition at line 39 of file ME0Motherboard.cc.

References clear().

Referenced by ME0TriggerBuilder::build(), run(), and setME0Geometry().

40 {
41  clear();
42 }
void ME0Motherboard::run ( const ME0PadDigiClusterCollection me0Clusters)

Build Triggers from single pads in each chamber and fill them into output collections.

Definition at line 32 of file ME0Motherboard.cc.

References declusterize(), and run().

33 {
34  std::unique_ptr<ME0PadDigiCollection> me0Pads(new ME0PadDigiCollection());
35  declusterize(me0Clusters, *me0Pads);
36  run(me0Pads.get());
37 }
MuonDigiCollection< ME0DetId, ME0PadDigi > ME0PadDigiCollection
void declusterize(const ME0PadDigiClusterCollection *, ME0PadDigiCollection &)
void run(const ME0PadDigiCollection *)
void ME0Motherboard::setME0Geometry ( const ME0Geometry g)
inline

set geometry for the matching needs

Definition at line 33 of file ME0Motherboard.h.

References clear(), declusterize(), g, getTriggers(), me0_g, readoutTriggers(), and run().

Referenced by ME0TriggerBuilder::build().

33 { 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 79 of file ME0Motherboard.cc.

80 {
81  // todo: In the future I plan a member to be added to ME0TriggerDigi, getME0Dphi().
82  // That function will derive the bending angle from the pattern.
83  // The ME0TriggerDigi pattterns are at this point not defined yet.
84  return true;
85 }
bool ME0Motherboard::sortByQuality ( const ME0TriggerDigi trig1,
const ME0TriggerDigi trig2 
)
staticprivate

Definition at line 73 of file ME0Motherboard.cc.

References ME0TriggerDigi::getQuality().

74 {
75  return trig1.getQuality() > trig2.getQuality();
76 }
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 57 of file ME0Motherboard.h.

Referenced by ME0Motherboard().

const ME0Geometry* ME0Motherboard::me0_g
private

Definition at line 63 of file ME0Motherboard.h.

Referenced by setME0Geometry().

const unsigned ME0Motherboard::theChamber
private

Definition at line 61 of file ME0Motherboard.h.

const unsigned ME0Motherboard::theEndcap
private

Chamber id (trigger-type labels).

Definition at line 60 of file ME0Motherboard.h.

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

Container for Triggers.

Definition at line 69 of file ME0Motherboard.h.

Referenced by clear(), and getTriggers().