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 L1MuDTChambPhDigi &, const L1MuDTChambThDigi &, const int bti_group) const
 
TriggerPrimitive processDigis (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::DTCollector ( const edm::ParameterSet ps)

Definition at line 15 of file DTCollector.cc.

16  : SubsystemCollector(ps), bx_min(ps.getParameter<int>("BX_min")), bx_max(ps.getParameter<int>("BX_max")) {
17  if (ps.getParameter<bool>("runBunchCrossingCleaner")) {
18  const edm::ParameterSet& bxccfg = ps.getParameterSet("bxCleanerCfg");
19  _bxc = std::make_unique<DTBunchCrossingCleaner>(bxccfg);
20  } else {
21  _bxc.reset(nullptr);
22  }
23 }

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

◆ ~DTCollector()

L1TMuon::DTCollector::~DTCollector ( )
inlineoverride

Definition at line 25 of file DTCollector.h.

25 {}

Member Function Documentation

◆ extractPrimitives()

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

Implements L1TMuon::SubsystemCollector.

Definition at line 25 of file DTCollector.cc.

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

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

◆ findBTIGroupForThetaDigi()

int DTCollector::findBTIGroupForThetaDigi ( const L1MuDTChambThDigi digi,
const int  position 
) const
private

Definition at line 98 of file DTCollector.cc.

98  {
99  //if( digi.stNum() == 4 ) return -1; // there is no theta layer there
100  int result = -1;
101  for (int i = 0; i < 7; ++i) {
102  if (digi.position(i) == pos)
103  result = i;
104  }
105  return result;
106 }

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

Referenced by extractPrimitives().

◆ processDigis() [1/3]

TriggerPrimitive DTCollector::processDigis ( const L1MuDTChambPhDigi digi,
const int &  segment_number 
) const
private

Definition at line 81 of file DTCollector.cc.

81  {
82  DTChamberId detid(digi.whNum(), digi.stNum(), digi.scNum() + 1);
83  return TriggerPrimitive(detid, digi, segment_number);
84 }

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

Referenced by extractPrimitives().

◆ processDigis() [2/3]

TriggerPrimitive DTCollector::processDigis ( const L1MuDTChambPhDigi digi_phi,
const L1MuDTChambThDigi digi_theta,
const int  bti_group 
) const
private

Definition at line 91 of file DTCollector.cc.

93  {
94  DTChamberId detid(digi_phi.whNum(), digi_phi.stNum(), digi_phi.scNum() + 1);
95  return TriggerPrimitive(detid, digi_phi, digi_theta, bti_group);
96 }

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

◆ processDigis() [3/3]

TriggerPrimitive DTCollector::processDigis ( const L1MuDTChambThDigi digi_th,
const int  bti_group 
) const
private

Definition at line 86 of file DTCollector.cc.

86  {
87  DTChamberId detid(digi_th.whNum(), digi_th.stNum(), digi_th.scNum() + 1);
88  return TriggerPrimitive(detid, digi_th, bti_group);
89 }

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

Member Data Documentation

◆ _bxc

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

Definition at line 35 of file DTCollector.h.

Referenced by DTCollector(), and extractPrimitives().

◆ bx_max

const int L1TMuon::DTCollector::bx_max
private

Definition at line 34 of file DTCollector.h.

Referenced by extractPrimitives().

◆ bx_min

const int L1TMuon::DTCollector::bx_min
private

Definition at line 34 of file DTCollector.h.

Referenced by extractPrimitives().

mps_fire.i
i
Definition: mps_fire.py:428
L1MuDTChambThDigi::position
int position(const int i) const
Definition: L1MuDTChambThDigi.cc:90
L1MuDTChambPhDigi::stNum
int stNum() const
Definition: L1MuDTChambPhDigi.cc:72
L1MuDTChambPhContainer::chPhiSegm1
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:67
relativeConstraints.station
station
Definition: relativeConstraints.py:67
pos
Definition: PixelAliasList.h:18
L1MuDTChambPhDigi::whNum
int whNum() const
Definition: L1MuDTChambPhDigi.cc:70
l1GtPatternGenerator_cfi.bx
bx
Definition: l1GtPatternGenerator_cfi.py:18
L1MuDTChambThDigi::whNum
int whNum() const
Definition: L1MuDTChambThDigi.cc:79
edm::Handle< L1MuDTChambPhContainer >
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
L1TMuon::TriggerPrimitiveCollection
std::vector< TriggerPrimitive > TriggerPrimitiveCollection
Definition: MuonTriggerPrimitiveFwd.h:10
TriggerPrimitive
L1TMuon::TriggerPrimitive TriggerPrimitive
Definition: Common.h:31
L1MuDTChambThDigi::scNum
int scNum() const
Definition: L1MuDTChambThDigi.cc:80
edm::ParameterSet
Definition: ParameterSet.h:47
L1MuDTChambPhContainer::chPhiSegm2
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambPhContainer.cc:78
makeMuonMisalignmentScenario.wheel
wheel
Definition: makeMuonMisalignmentScenario.py:319
L1MuDTChambPhDigi::scNum
int scNum() const
Definition: L1MuDTChambPhDigi.cc:71
L1MuDTChambThContainer::chThetaSegm
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
Definition: L1MuDTChambThContainer.cc:65
L1TMuon::DTCollector::findBTIGroupForThetaDigi
int findBTIGroupForThetaDigi(const L1MuDTChambThDigi &, const int position) const
Definition: DTCollector.cc:98
L1MuDTChambThDigi::stNum
int stNum() const
Definition: L1MuDTChambThDigi.cc:81
L1TMuon::SubsystemCollector::_src
edm::InputTag _src
Definition: SubsystemCollector.h:31
L1TMuon::SubsystemCollector::SubsystemCollector
SubsystemCollector(const edm::ParameterSet &)
Definition: SubsystemCollector.cc:6
L1TMuon::DTCollector::bx_max
const int bx_max
Definition: DTCollector.h:34
ev
bool ev
Definition: Hydjet2Hadronizer.cc:97
L1TMuon::DTCollector::bx_min
const int bx_min
Definition: DTCollector.h:34
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1TMuon::DTCollector::_bxc
std::unique_ptr< DTBunchCrossingCleaner > _bxc
Definition: DTCollector.h:35
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
mps_fire.result
result
Definition: mps_fire.py:311
DTChamberId
Definition: DTChamberId.h:14
L1TMuon::DTCollector::processDigis
TriggerPrimitive processDigis(const L1MuDTChambPhDigi &, const int &segment_number) const
Definition: DTCollector.cc:81
edm::ParameterSet::getParameterSet
ParameterSet const & getParameterSet(std::string const &) const
Definition: ParameterSet.cc:2128