CMS 3D CMS Logo

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

◆ trig_me0s

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.

39 { MAX_ENDCAPS = 2, MAX_CHAMBERS = 18 };

Constructor & Destructor Documentation

◆ ME0TriggerBuilder()

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.

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 }

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

◆ ~ME0TriggerBuilder()

ME0TriggerBuilder::~ME0TriggerBuilder ( )

Definition at line 15 of file ME0TriggerBuilder.cc.

15 {}

Member Function Documentation

◆ build()

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.

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 }

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

◆ setME0Geometry()

void ME0TriggerBuilder::setME0Geometry ( const ME0Geometry g)
inline

set geometry for the matching needs

Definition at line 34 of file ME0TriggerBuilder.h.

34 { me0_g = g; }

References g, and me0_g.

Member Data Documentation

◆ config_

edm::ParameterSet ME0TriggerBuilder::config_
private

Definition at line 49 of file ME0TriggerBuilder.h.

Referenced by ME0TriggerBuilder().

◆ max_chamber

const int ME0TriggerBuilder::max_chamber
staticprivate

Definition at line 45 of file ME0TriggerBuilder.h.

◆ max_endcap

const int ME0TriggerBuilder::max_endcap
staticprivate

Definition at line 43 of file ME0TriggerBuilder.h.

◆ me0_g

const ME0Geometry* ME0TriggerBuilder::me0_g
private

Definition at line 47 of file ME0TriggerBuilder.h.

Referenced by build(), and setME0Geometry().

◆ min_chamber

const int ME0TriggerBuilder::min_chamber
staticprivate

Definition at line 44 of file ME0TriggerBuilder.h.

◆ min_endcap

const int ME0TriggerBuilder::min_endcap
staticprivate

Definition at line 42 of file ME0TriggerBuilder.h.

◆ tmb_

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

ME0Motherboard::readoutTriggers
std::vector< ME0TriggerDigi > readoutTriggers()
Definition: ME0Motherboard.cc:29
relativeConstraints.cham
cham
Definition: relativeConstraints.py:69
ME0DetId::maxChamberId
static constexpr int maxChamberId
Definition: ME0DetId.h:67
ME0Geometry::chamber
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
Definition: ME0Geometry.cc:43
ME0TriggerBuilder::config_
edm::ParameterSet config_
Definition: ME0TriggerBuilder.h:49
ME0Motherboard::run
void run(const ME0PadDigiCollection *)
Definition: ME0Motherboard.cc:24
ME0DetId::minChamberId
static constexpr int minChamberId
Definition: ME0DetId.h:66
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88286
ME0TriggerBuilder::MAX_CHAMBERS
Definition: ME0TriggerBuilder.h:39
ME0DetId
Definition: ME0DetId.h:16
ME0Motherboard::setME0Geometry
void setME0Geometry(const ME0Geometry *g)
Definition: ME0Motherboard.h:30
ME0TriggerBuilder::MAX_ENDCAPS
Definition: ME0TriggerBuilder.h:39
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:234
ME0TriggerBuilder::me0_g
const ME0Geometry * me0_g
Definition: ME0TriggerBuilder.h:47
ME0TriggerBuilder::tmb_
std::unique_ptr< ME0Motherboard > tmb_[MAX_ENDCAPS][MAX_CHAMBERS]
Definition: ME0TriggerBuilder.h:52
ME0Motherboard
Definition: ME0Motherboard.h:18
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