CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Attributes | Static Private Attributes
ME0TriggerBuilder Class Reference

#include <ME0TriggerBuilder.h>

Public Types

enum  trig_me0s { MAX_ENDCAPS = 2, MAX_CHAMBERS = 18 }
 

Public Member Functions

void build (const ME0PadDigiCollection *me0Pads, ME0TriggerDigiCollection &oc_trig)
 
 ME0TriggerBuilder (const edm::ParameterSet &)
 
void setME0Geometry (const ME0Geometry *g)
 
 ~ME0TriggerBuilder ()
 

Private Attributes

edm::ParameterSet config_
 
const ME0Geometryme0_g
 
std::unique_ptr< ME0Motherboardtmb_ [MAX_ENDCAPS][MAX_CHAMBERS]
 

Static Private Attributes

static const int max_chamber
 
static const int max_endcap
 
static const int min_chamber
 
static const int min_endcap
 

Detailed Description

Does pattern recognition of ME0 pads to build ME0 triggers

Author
Sven Dildick (TAMU)

Builds ME0 trigger objects from ME0 pads

Author
Sven Dildick (TAMU)

Definition at line 20 of file ME0TriggerBuilder.h.

Member Enumeration Documentation

Max values of trigger labels for all ME0s; used to construct TMB processors.

Enumerator
MAX_ENDCAPS 
MAX_CHAMBERS 

Definition at line 39 of file ME0TriggerBuilder.h.

Constructor & Destructor Documentation

ME0TriggerBuilder::ME0TriggerBuilder ( const edm::ParameterSet conf)
explicit

Configure the algorithm via constructor. Receives ParameterSet percolated down from EDProducer which owns this Builder.

Definition at line 5 of file ME0TriggerBuilder.cc.

References relativeConstraints::cham, config_, MAX_CHAMBERS, MAX_ENDCAPS, and tmb_.

5  {
6  config_ = conf;
7 
8  for (int endc = 0; endc < MAX_ENDCAPS; endc++) {
9  for (int cham = 0; cham < MAX_CHAMBERS; cham++) {
10  tmb_[endc][cham] = std::make_unique<ME0Motherboard>(endc, cham, config_);
11  }
12  }
13 }
edm::ParameterSet config_
std::unique_ptr< ME0Motherboard > tmb_[MAX_ENDCAPS][MAX_CHAMBERS]
ME0TriggerBuilder::~ME0TriggerBuilder ( )

Definition at line 15 of file ME0TriggerBuilder.cc.

15 {}

Member Function Documentation

void ME0TriggerBuilder::build ( const ME0PadDigiCollection me0Pads,
ME0TriggerDigiCollection oc_trig 
)

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

Definition at line 17 of file ME0TriggerBuilder.cc.

References relativeConstraints::cham, ME0Geometry::chamber(), LogTrace, ME0DetId::maxChamberId, me0_g, ME0DetId::minChamberId, ME0Motherboard::readoutTriggers(), HLT_FULL_cff::region, ME0Motherboard::run(), ME0Motherboard::setME0Geometry(), and tmb_.

17  {
18  for (int endc = 0; endc < 2; endc++) {
20  ME0Motherboard* tmb = tmb_[endc][cham].get();
21  tmb->setME0Geometry(me0_g);
22 
23  // 0th layer means whole chamber.
24  const int region(endc == 0 ? -1 : 1);
25  ME0DetId detid(region, 0, cham + 1, 0);
26 
27  // Run processors only if chamber exists in geometry.
28  if (tmb == nullptr || me0_g->chamber(detid) == nullptr)
29  continue;
30 
31  tmb->run(me0Pads);
32 
33  const std::vector<ME0TriggerDigi>& trigV = tmb->readoutTriggers();
34 
35  if (!trigV.empty()) {
36  LogTrace("L1ME0Trigger") << "ME0TriggerBuilder got results in " << detid << std::endl
37  << "Put " << trigV.size() << " Trigger digi" << ((trigV.size() > 1) ? "s " : " ")
38  << "in collection\n";
39  oc_trig.put(std::make_pair(trigV.begin(), trigV.end()), detid);
40  }
41  }
42  }
43 }
static constexpr int maxChamberId
Definition: ME0DetId.h:67
#define LogTrace(id)
static constexpr int minChamberId
Definition: ME0DetId.h:66
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
Definition: ME0Geometry.cc:43
void setME0Geometry(const ME0Geometry *g)
std::vector< ME0TriggerDigi > readoutTriggers()
const ME0Geometry * me0_g
std::unique_ptr< ME0Motherboard > tmb_[MAX_ENDCAPS][MAX_CHAMBERS]
void run(const ME0PadDigiCollection *)
void ME0TriggerBuilder::setME0Geometry ( const ME0Geometry g)
inline

set geometry for the matching needs

Definition at line 34 of file ME0TriggerBuilder.h.

References g, and me0_g.

34 { 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

Member Data Documentation

edm::ParameterSet ME0TriggerBuilder::config_
private

Definition at line 49 of file ME0TriggerBuilder.h.

Referenced by ME0TriggerBuilder().

const int ME0TriggerBuilder::max_chamber
staticprivate

Definition at line 45 of file ME0TriggerBuilder.h.

const int ME0TriggerBuilder::max_endcap
staticprivate

Definition at line 43 of file ME0TriggerBuilder.h.

const ME0Geometry* ME0TriggerBuilder::me0_g
private

Definition at line 47 of file ME0TriggerBuilder.h.

Referenced by build(), and setME0Geometry().

const int ME0TriggerBuilder::min_chamber
staticprivate

Definition at line 44 of file ME0TriggerBuilder.h.

const int ME0TriggerBuilder::min_endcap
staticprivate

Definition at line 42 of file ME0TriggerBuilder.h.

std::unique_ptr<ME0Motherboard> ME0TriggerBuilder::tmb_[MAX_ENDCAPS][MAX_CHAMBERS]
private

Pointers to TMB processors for all possible chambers.

Definition at line 52 of file ME0TriggerBuilder.h.

Referenced by build(), and ME0TriggerBuilder().