CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1TMuon::DTCollector Class Reference

#include <DTCollector.h>

Inheritance diagram for L1TMuon::DTCollector:
L1TMuon::SubsystemCollector

Public Member Functions

 DTCollector (const edm::ParameterSet &)
 
void extractPrimitives (const edm::Event &, const edm::EventSetup &, std::vector< TriggerPrimitive > &) const override
 
 ~DTCollector () override
 
- Public Member Functions inherited from L1TMuon::SubsystemCollector
 SubsystemCollector (const edm::ParameterSet &)
 
virtual ~SubsystemCollector ()
 

Private Member Functions

int findBTIGroupForThetaDigi (const L1MuDTChambThDigi &, const int position) const
 
TriggerPrimitive processDigis (const L1MuDTChambPhDigi &, const int &segment_number) const
 
TriggerPrimitive processDigis (const L1MuDTChambThDigi &, const int bti_group) const
 
TriggerPrimitive processDigis (const L1MuDTChambPhDigi &, const L1MuDTChambThDigi &, const int bti_group) const
 

Private Attributes

std::unique_ptr< DTBunchCrossingCleaner_bxc
 
const int bx_max
 
const int bx_min
 

Additional Inherited Members

- Protected Attributes inherited from L1TMuon::SubsystemCollector
edm::InputTag _src
 

Detailed Description

Definition at line 22 of file DTCollector.h.

Constructor & Destructor Documentation

DTCollector::DTCollector ( const edm::ParameterSet ps)

Definition at line 13 of file DTCollector.cc.

References _bxc, edm::ParameterSet::getParameter(), and edm::ParameterSet::getParameterSet().

14  : SubsystemCollector(ps), bx_min(ps.getParameter<int>("BX_min")), bx_max(ps.getParameter<int>("BX_max")) {
15  if (ps.getParameter<bool>("runBunchCrossingCleaner")) {
16  const edm::ParameterSet& bxccfg = ps.getParameterSet("bxCleanerCfg");
17  _bxc.reset(new DTBunchCrossingCleaner(bxccfg));
18  } else {
19  _bxc.reset(nullptr);
20  }
21 }
T getParameter(std::string const &) const
std::unique_ptr< DTBunchCrossingCleaner > _bxc
Definition: DTCollector.h:35
ParameterSet const & getParameterSet(std::string const &) const
SubsystemCollector(const edm::ParameterSet &)
L1TMuon::DTCollector::~DTCollector ( )
inlineoverride

Definition at line 25 of file DTCollector.h.

References extractPrimitives(), findBTIGroupForThetaDigi(), position, and processDigis().

25 {}

Member Function Documentation

void DTCollector::extractPrimitives ( const edm::Event ,
const edm::EventSetup ,
std::vector< TriggerPrimitive > &   
) const
overridevirtual

Implements L1TMuon::SubsystemCollector.

Definition at line 23 of file DTCollector.cc.

References _bxc, L1TMuon::SubsystemCollector::_src, l1GtPatternGenerator_cfi::bx, bx_max, bx_min, L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), L1MuDTChambThContainer::chThetaSegm(), findBTIGroupForThetaDigi(), edm::Event::getByLabel(), processDigis(), relativeConstraints::station, groupFilesInBlocks::temp, and makeMuonMisalignmentScenario::wheel.

Referenced by ~DTCollector().

25  {
26  TriggerPrimitiveCollection cleaned, temp, chamb_list;
29  ev.getByLabel(_src, phiDigis);
30  ev.getByLabel(_src, thetaDigis);
31  for (int wheel = -2; wheel <= 2; ++wheel) {
32  for (int station = 1; station <= 4; ++station) {
33  for (int sector = 0; sector <= 11; ++sector) {
34  chamb_list.clear();
35  for (int bx = bx_min; bx <= bx_max; ++bx) {
36  std::unique_ptr<const L1MuDTChambPhDigi> phi_segm_1(phiDigis->chPhiSegm1(wheel, station, sector, bx));
37  std::unique_ptr<const L1MuDTChambPhDigi> phi_segm_2(phiDigis->chPhiSegm2(wheel, station, sector, bx));
38  std::unique_ptr<const L1MuDTChambThDigi> theta_segm(thetaDigis->chThetaSegm(wheel, station, sector, bx));
39 
40  int bti_group_1 = -1, bti_group_2 = -1;
41 
42  if (theta_segm) {
43  bti_group_1 = findBTIGroupForThetaDigi(*theta_segm, 1);
44  bti_group_2 = findBTIGroupForThetaDigi(*theta_segm, 2);
45  }
46 
47  if (phi_segm_1 && bti_group_1 != -1) {
48  chamb_list.push_back(processDigis(*phi_segm_1, *theta_segm, bti_group_1));
49  } else if (phi_segm_1 && bti_group_1 == -1) {
50  chamb_list.push_back(processDigis(*phi_segm_1, 1));
51  } else if (!phi_segm_1 && bti_group_1 != -1) {
52  chamb_list.push_back(processDigis(*theta_segm, bti_group_1));
53  }
54 
55  if (phi_segm_2 && bti_group_2 != -1) {
56  chamb_list.push_back(processDigis(*phi_segm_2, *theta_segm, bti_group_2));
57  } else if (phi_segm_2 && bti_group_2 == -1) {
58  chamb_list.push_back(processDigis(*phi_segm_2, 2));
59  } else if (!phi_segm_2 && bti_group_2 != -1) {
60  chamb_list.push_back(processDigis(*phi_segm_2, bti_group_2));
61  }
62 
63  phi_segm_1.release();
64  phi_segm_2.release();
65  theta_segm.release();
66  }
67  if (_bxc) {
68  temp = _bxc->clean(chamb_list);
69  cleaned.insert(cleaned.end(), temp.begin(), temp.end());
70  } else {
71  cleaned.insert(cleaned.end(), chamb_list.begin(), chamb_list.end());
72  }
73  }
74  }
75  }
76  out.insert(out.end(), cleaned.begin(), cleaned.end());
77 }
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
bool ev
std::unique_ptr< DTBunchCrossingCleaner > _bxc
Definition: DTCollector.h:35
int findBTIGroupForThetaDigi(const L1MuDTChambThDigi &, const int position) const
Definition: DTCollector.cc:96
TriggerPrimitive processDigis(const L1MuDTChambPhDigi &, const int &segment_number) const
Definition: DTCollector.cc:79
std::vector< TriggerPrimitive > TriggerPrimitiveCollection
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
int DTCollector::findBTIGroupForThetaDigi ( const L1MuDTChambThDigi digi,
const int  position 
) const
private

Definition at line 96 of file DTCollector.cc.

References DEFINE_EDM_PLUGIN, mps_fire::i, L1MuDTChambThDigi::position(), and mps_fire::result.

Referenced by extractPrimitives(), and ~DTCollector().

96  {
97  //if( digi.stNum() == 4 ) return -1; // there is no theta layer there
98  int result = -1;
99  for (int i = 0; i < 7; ++i) {
100  if (digi.position(i) == pos)
101  result = i;
102  }
103  return result;
104 }
int position(const int i) const
TriggerPrimitive DTCollector::processDigis ( const L1MuDTChambPhDigi digi,
const int &  segment_number 
) const
private

Definition at line 79 of file DTCollector.cc.

References L1MuDTChambPhDigi::scNum(), L1MuDTChambPhDigi::stNum(), and L1MuDTChambPhDigi::whNum().

Referenced by extractPrimitives(), and ~DTCollector().

79  {
80  DTChamberId detid(digi.whNum(), digi.stNum(), digi.scNum() + 1);
81  return TriggerPrimitive(detid, digi, segment_number);
82 }
L1TMuon::TriggerPrimitive TriggerPrimitive
Definition: Common.h:33
TriggerPrimitive DTCollector::processDigis ( const L1MuDTChambThDigi digi_th,
const int  bti_group 
) const
private

Definition at line 84 of file DTCollector.cc.

References L1MuDTChambThDigi::scNum(), L1MuDTChambThDigi::stNum(), and L1MuDTChambThDigi::whNum().

84  {
85  DTChamberId detid(digi_th.whNum(), digi_th.stNum(), digi_th.scNum() + 1);
86  return TriggerPrimitive(detid, digi_th, bti_group);
87 }
L1TMuon::TriggerPrimitive TriggerPrimitive
Definition: Common.h:33
TriggerPrimitive DTCollector::processDigis ( const L1MuDTChambPhDigi digi_phi,
const L1MuDTChambThDigi digi_theta,
const int  bti_group 
) const
private

Definition at line 89 of file DTCollector.cc.

References L1MuDTChambPhDigi::scNum(), L1MuDTChambPhDigi::stNum(), and L1MuDTChambPhDigi::whNum().

91  {
92  DTChamberId detid(digi_phi.whNum(), digi_phi.stNum(), digi_phi.scNum() + 1);
93  return TriggerPrimitive(detid, digi_phi, digi_theta, bti_group);
94 }
L1TMuon::TriggerPrimitive TriggerPrimitive
Definition: Common.h:33

Member Data Documentation

std::unique_ptr<DTBunchCrossingCleaner> L1TMuon::DTCollector::_bxc
private

Definition at line 35 of file DTCollector.h.

Referenced by DTCollector(), and extractPrimitives().

const int L1TMuon::DTCollector::bx_max
private

Definition at line 34 of file DTCollector.h.

Referenced by extractPrimitives().

const int L1TMuon::DTCollector::bx_min
private

Definition at line 34 of file DTCollector.h.

Referenced by extractPrimitives().