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 3 of file ME0TriggerBuilder.cc.

3  {
4  config_ = conf;
5 
6  for (int endc = 0; endc < MAX_ENDCAPS; endc++) {
7  for (int cham = 0; cham < MAX_CHAMBERS; cham++) {
8  tmb_[endc][cham].reset(new ME0Motherboard(endc, cham, config_));
9  }
10  }
11 }

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

◆ ~ME0TriggerBuilder()

ME0TriggerBuilder::~ME0TriggerBuilder ( )

Definition at line 13 of file ME0TriggerBuilder.cc.

13 {}

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 15 of file ME0TriggerBuilder.cc.

15  {
16  for (int endc = 0; endc < 2; endc++) {
18  ME0Motherboard* tmb = tmb_[endc][cham].get();
19  tmb->setME0Geometry(me0_g);
20 
21  // 0th layer means whole chamber.
22  const int region(endc == 0 ? -1 : 1);
23  ME0DetId detid(region, 0, cham + 1, 0);
24 
25  // Run processors only if chamber exists in geometry.
26  if (tmb == nullptr || me0_g->chamber(detid) == nullptr)
27  continue;
28 
29  tmb->run(me0Pads);
30 
31  const std::vector<ME0TriggerDigi>& trigV = tmb->readoutTriggers();
32 
33  if (!trigV.empty()) {
34  LogTrace("L1ME0Trigger") << "ME0TriggerBuilder got results in " << detid << std::endl
35  << "Put " << trigV.size() << " Trigger digi" << ((trigV.size() > 1) ? "s " : " ")
36  << "in collection\n";
37  oc_trig.put(std::make_pair(trigV.begin(), trigV.end()), detid);
38  }
39  }
40  }
41 }

References relativeConstraints::cham, ME0Geometry::chamber(), LogTrace, ME0DetId::maxChamberId, me0_g, ME0DetId::minChamberId, ME0Motherboard::readoutTriggers(), HLT_2018_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 const 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
ME0DetId::minChamberId
static const int minChamberId
Definition: ME0DetId.h:66
ME0Motherboard::run
void run(const ME0PadDigiCollection *)
Definition: ME0Motherboard.cc:24
ME0TriggerBuilder::MAX_CHAMBERS
Definition: ME0TriggerBuilder.h:39
ME0DetId
Definition: ME0DetId.h:16
ME0Motherboard::setME0Geometry
void setME0Geometry(const ME0Geometry *g)
Definition: ME0Motherboard.h:30
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
ME0TriggerBuilder::MAX_ENDCAPS
Definition: ME0TriggerBuilder.h:39
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671
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