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 ME0PadDigiClusterCollection *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 pad clusters

Author
Sven Dildick (TAMU)

Definition at line 19 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 40 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 7 of file ME0TriggerBuilder.cc.

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

8 {
9  config_ = conf;
10 
11  for (int endc = 0; endc < 2; endc++)
12  {
13  for (int cham = 0; cham < 18; cham++)
14  {
15  if ((endc <= 0 || endc > MAX_ENDCAPS) ||
16  (cham <= 0 || cham > MAX_CHAMBERS))
17  {
18  edm::LogError("L1ME0TPEmulatorSetupError")
19  << "+++ trying to instantiate TMB of illegal ME0 id ["
20  << " endcap = " << endc
21  << " chamber = " << cham
22  << "]; skipping it... +++\n";
23  continue;
24  }
25  tmb_[endc][cham].reset( new ME0Motherboard(endc, cham, config_) );
26  }
27  }
28 }
edm::ParameterSet config_
std::unique_ptr< ME0Motherboard > tmb_[MAX_ENDCAPS][MAX_CHAMBERS]
ME0TriggerBuilder::~ME0TriggerBuilder ( )

Definition at line 30 of file ME0TriggerBuilder.cc.

31 {
32 }

Member Function Documentation

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

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

Definition at line 34 of file ME0TriggerBuilder.cc.

References relativeConstraints::cham, ME0Geometry::chamber(), LogTrace, me0_g, ME0Motherboard::readoutTriggers(), ME0Motherboard::run(), ME0Motherboard::setME0Geometry(), and tmb_.

36 {
37  for (int endc = 0; endc < 2; endc++)
38  {
39  for (int cham = 0; cham < 18; cham++)
40  {
41  ME0Motherboard* tmb = tmb_[endc][cham].get();
42  tmb->setME0Geometry(me0_g);
43 
44  // 0th layer means whole chamber.
45  const int region(endc == 0 ? -1 : 1);
46  ME0DetId detid(region, 0, cham, 0);
47 
48  // Run processors only if chamber exists in geometry.
49  if (tmb == nullptr || me0_g->chamber(detid) == nullptr) continue;
50 
51  tmb->run(me0Pads);
52 
53  std::vector<ME0TriggerDigi> trigV = tmb->readoutTriggers();
54 
55  if (!trigV.empty()) {
56  LogTrace("L1ME0Trigger")
57  << "ME0TriggerBuilder got results in " <<detid
58  << std::endl
59  << "Put " << trigV.size() << " Trigger digi"
60  << ((trigV.size() > 1) ? "s " : " ") << "in collection\n";
61  oc_trig.put(std::make_pair(trigV.begin(),trigV.end()), detid);
62  }
63  }
64  }
65 }
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
Definition: ME0Geometry.cc:73
void setME0Geometry(const ME0Geometry *g)
#define LogTrace(id)
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 35 of file ME0TriggerBuilder.h.

References g, and me0_g.

35 { 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 51 of file ME0TriggerBuilder.h.

Referenced by ME0TriggerBuilder().

const int ME0TriggerBuilder::max_chamber
staticprivate

Definition at line 47 of file ME0TriggerBuilder.h.

const int ME0TriggerBuilder::max_endcap
staticprivate

Definition at line 45 of file ME0TriggerBuilder.h.

const ME0Geometry* ME0TriggerBuilder::me0_g
private

Definition at line 49 of file ME0TriggerBuilder.h.

Referenced by build(), and setME0Geometry().

const int ME0TriggerBuilder::min_chamber
staticprivate

Definition at line 46 of file ME0TriggerBuilder.h.

const int ME0TriggerBuilder::min_endcap
staticprivate

Definition at line 44 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 54 of file ME0TriggerBuilder.h.

Referenced by build(), and ME0TriggerBuilder().