CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
GEMCoPadProcessor Class Reference

#include <GEMCoPadProcessor.h>

Public Types

enum  { MAX_CoPad_BINS = 3 }
 

Public Member Functions

void clear ()
 
void declusterize (const GEMPadDigiClusterCollection *, GEMPadDigiCollection &) const
 
 GEMCoPadProcessor ()
 
 GEMCoPadProcessor (unsigned region, unsigned station, unsigned chamber, const edm::ParameterSet &copad)
 
const std::vector< GEMCoPadDigi > & readoutCoPads () const
 
std::vector< GEMCoPadDigirun (const GEMPadDigiClusterCollection *)
 
std::vector< GEMCoPadDigirun (const GEMPadDigiCollection *)
 

Private Attributes

std::vector< GEMCoPadDigigemCoPadV
 
unsigned int infoV
 
unsigned int maxDeltaBX_
 
unsigned int maxDeltaPad_
 
unsigned int maxDeltaRoll_
 
const int theChamber
 
const int theRegion
 
const int theStation
 

Detailed Description

Author
Sven Dildick (TAMU)

Definition at line 17 of file GEMCoPadProcessor.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Maximum number of time bins.

Enumerator
MAX_CoPad_BINS 

Definition at line 37 of file GEMCoPadProcessor.h.

37 { MAX_CoPad_BINS = 3 };

Constructor & Destructor Documentation

◆ GEMCoPadProcessor() [1/2]

GEMCoPadProcessor::GEMCoPadProcessor ( unsigned  region,
unsigned  station,
unsigned  chamber,
const edm::ParameterSet copad 
)

Normal constructor.

Definition at line 11 of file GEMCoPadProcessor.cc.

13  // Verbosity level, set to 0 (no print) by default.
14  infoV = copad.getParameter<unsigned int>("verbosity");
15  maxDeltaPad_ = copad.getParameter<unsigned int>("maxDeltaPad");
16  maxDeltaRoll_ = copad.getParameter<unsigned int>("maxDeltaRoll");
17  maxDeltaBX_ = copad.getParameter<unsigned int>("maxDeltaBX");
18 }

References edm::ParameterSet::getParameter(), infoV, maxDeltaBX_, maxDeltaPad_, and maxDeltaRoll_.

◆ GEMCoPadProcessor() [2/2]

GEMCoPadProcessor::GEMCoPadProcessor ( )

Default constructor. Used for testing.

Definition at line 20 of file GEMCoPadProcessor.cc.

20  : theRegion(1), theStation(1), theChamber(1) {
21  infoV = 0;
22  maxDeltaPad_ = 0;
23  maxDeltaRoll_ = 0;
24  maxDeltaBX_ = 0;
25 }

References infoV, maxDeltaBX_, maxDeltaPad_, and maxDeltaRoll_.

Member Function Documentation

◆ clear()

void GEMCoPadProcessor::clear ( void  )

Clear copad vector

Definition at line 27 of file GEMCoPadProcessor.cc.

27 { gemCoPadV.clear(); }

References gemCoPadV.

Referenced by run().

◆ declusterize()

void GEMCoPadProcessor::declusterize ( const GEMPadDigiClusterCollection in_clusters,
GEMPadDigiCollection out_pads 
) const

Definition at line 99 of file GEMCoPadProcessor.cc.

100  {
101  for (auto detUnitIt = in_clusters->begin(); detUnitIt != in_clusters->end(); ++detUnitIt) {
102  const GEMDetId& id = (*detUnitIt).first;
103  const auto& range = (*detUnitIt).second;
104  for (auto digiIt = range.first; digiIt != range.second; ++digiIt) {
105  // coincidence pads are not built for ME0
106  if (id.isME0())
107  continue;
108 
109  // same chamber (no restriction on the roll number)
110  if (id.region() != theRegion or id.station() != theStation or id.chamber() != theChamber)
111  continue;
112 
113  // ignore 16-partition GE2/1 pads
114  if (id.isGE21() and digiIt->nPartitions() == GEMPadDigiCluster::GE21SplitStrip)
115  continue;
116 
117  // only consider valid clusters
118  if (!digiIt->isValid())
119  continue;
120 
121  for (const auto& p : digiIt->pads()) {
122  out_pads.insertDigi(id, GEMPadDigi(p, digiIt->bx()));
123  }
124  }
125  }
126 }

References GEMPadDigiCluster::GE21SplitStrip, GeomDetEnumerators::isME0(), or, AlCaHLTBitMon_ParallelJobs::p, FastTimerService_cff::range, HLT_FULL_cff::region, theChamber, theRegion, and theStation.

Referenced by run().

◆ readoutCoPads()

const std::vector< GEMCoPadDigi > & GEMCoPadProcessor::readoutCoPads ( ) const

Returns vector of CoPads in the read-out time window, if any.

Definition at line 97 of file GEMCoPadProcessor.cc.

97 { return gemCoPadV; }

References gemCoPadV.

◆ run() [1/2]

std::vector< GEMCoPadDigi > GEMCoPadProcessor::run ( const GEMPadDigiClusterCollection in_clusters)

Runs the CoPad processor code. Called in normal running – gets info from a collection of pad digi clusters.

Definition at line 91 of file GEMCoPadProcessor.cc.

91  {
92  std::unique_ptr<GEMPadDigiCollection> out_pads(new GEMPadDigiCollection());
93  declusterize(in_clusters, *out_pads);
94  return run(out_pads.get());
95 }

References declusterize(), and run().

◆ run() [2/2]

std::vector< GEMCoPadDigi > GEMCoPadProcessor::run ( const GEMPadDigiCollection in_pads)

Runs the CoPad processor code. Called in normal running – gets info from a collection of pad digis.

Definition at line 29 of file GEMCoPadProcessor.cc.

29  {
30  clear();
31 
32  // Build coincidences
33  for (auto det_range = in_pads->begin(); det_range != in_pads->end(); ++det_range) {
34  const GEMDetId& id = (*det_range).first;
35 
36  // coincidence pads are not built for ME0
37  if (id.isME0())
38  continue;
39 
40  // same chamber (no restriction on the roll number)
41  if (id.region() != theRegion or id.station() != theStation or id.chamber() != theChamber)
42  continue;
43 
44  // all coincidences detIDs will have layer=1
45  if (id.layer() != 1)
46  continue;
47 
48  // find all corresponding ids with layer 2 and same roll that differs at most maxDeltaRoll_
49  for (unsigned int roll = id.roll() - maxDeltaRoll_; roll <= id.roll() + maxDeltaRoll_; ++roll) {
50  GEMDetId co_id(id.region(), id.ring(), id.station(), 2, id.chamber(), roll);
51 
52  auto co_pads_range = in_pads->get(co_id);
53 
54  // empty range = no possible coincidence pads
55  if (co_pads_range.first == co_pads_range.second)
56  continue;
57 
58  // now let's correlate the pads in two layers of this partition
59  const auto& pads_range = (*det_range).second;
60  for (auto p = pads_range.first; p != pads_range.second; ++p) {
61  // ignore 16-partition GE2/1 pads
62  if (id.isGE21() and p->nPartitions() == GEMPadDigi::GE21SplitStrip)
63  continue;
64 
65  // only consider valid pads
66  if (!p->isValid())
67  continue;
68 
69  for (auto co_p = co_pads_range.first; co_p != co_pads_range.second; ++co_p) {
70  // only consider valid pads
71  if (!co_p->isValid())
72  continue;
73 
74  // check the match in pad
75  if ((unsigned)std::abs(p->pad() - co_p->pad()) > maxDeltaPad_)
76  continue;
77 
78  // check the match in BX
79  if ((unsigned)std::abs(p->bx() - co_p->bx()) > maxDeltaBX_)
80  continue;
81 
82  // make a new coincidence pad digi
83  gemCoPadV.push_back(GEMCoPadDigi(id.roll(), *p, *co_p));
84  }
85  }
86  }
87  }
88  return gemCoPadV;
89 }

References funct::abs(), relativeConstraints::chamber, clear(), GEMPadDigi::GE21SplitStrip, gemCoPadV, GeomDetEnumerators::isME0(), phase1PixelTopology::layer, maxDeltaBX_, maxDeltaPad_, maxDeltaRoll_, or, AlCaHLTBitMon_ParallelJobs::p, HLT_FULL_cff::region, relativeConstraints::ring, relativeConstraints::station, theChamber, theRegion, and theStation.

Referenced by run().

Member Data Documentation

◆ gemCoPadV

std::vector<GEMCoPadDigi> GEMCoPadProcessor::gemCoPadV
private

Definition at line 61 of file GEMCoPadProcessor.h.

Referenced by clear(), readoutCoPads(), and run().

◆ infoV

unsigned int GEMCoPadProcessor::infoV
private

Verbosity level: 0: no print (default). 1: print only CoPads found. 2: info at every step of the algorithm. 3: add special-purpose prints.

Definition at line 55 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor().

◆ maxDeltaBX_

unsigned int GEMCoPadProcessor::maxDeltaBX_
private

Definition at line 57 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor(), and run().

◆ maxDeltaPad_

unsigned int GEMCoPadProcessor::maxDeltaPad_
private

Definition at line 56 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor(), and run().

◆ maxDeltaRoll_

unsigned int GEMCoPadProcessor::maxDeltaRoll_
private

Definition at line 58 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor(), and run().

◆ theChamber

const int GEMCoPadProcessor::theChamber
private

Definition at line 49 of file GEMCoPadProcessor.h.

Referenced by declusterize(), and run().

◆ theRegion

const int GEMCoPadProcessor::theRegion
private

Chamber id (trigger-type labels).

Definition at line 47 of file GEMCoPadProcessor.h.

Referenced by declusterize(), and run().

◆ theStation

const int GEMCoPadProcessor::theStation
private

Definition at line 48 of file GEMCoPadProcessor.h.

Referenced by declusterize(), and run().

FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
GEMCoPadProcessor::maxDeltaPad_
unsigned int maxDeltaPad_
Definition: GEMCoPadProcessor.h:56
GEMPadDigi
Definition: GEMPadDigi.h:17
relativeConstraints.station
station
Definition: relativeConstraints.py:67
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
GEMPadDigiCollection
MuonDigiCollection< GEMDetId, GEMPadDigi > GEMPadDigiCollection
Definition: GEMPadDigiCollection.h:13
GEMCoPadProcessor::clear
void clear()
Definition: GEMCoPadProcessor.cc:27
GEMCoPadProcessor::theRegion
const int theRegion
Definition: GEMCoPadProcessor.h:47
GEMCoPadProcessor::run
std::vector< GEMCoPadDigi > run(const GEMPadDigiCollection *)
Definition: GEMCoPadProcessor.cc:29
GEMPadDigi::GE21SplitStrip
Definition: GEMPadDigi.h:22
GEMCoPadProcessor::declusterize
void declusterize(const GEMPadDigiClusterCollection *, GEMPadDigiCollection &) const
Definition: GEMCoPadProcessor.cc:99
GEMCoPadProcessor::theChamber
const int theChamber
Definition: GEMCoPadProcessor.h:49
GEMCoPadProcessor::theStation
const int theStation
Definition: GEMCoPadProcessor.h:48
GEMCoPadProcessor::gemCoPadV
std::vector< GEMCoPadDigi > gemCoPadV
Definition: GEMCoPadProcessor.h:61
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
GEMCoPadDigi
Definition: GEMCoPadDigi.h:16
GEMDetId
Definition: GEMDetId.h:18
HLT_FULL_cff.region
region
Definition: HLT_FULL_cff.py:88267
GEMCoPadProcessor::MAX_CoPad_BINS
Definition: GEMCoPadProcessor.h:37
GeomDetEnumerators::isME0
bool isME0(GeomDetEnumerators::SubDetector m)
Definition: GeomDetEnumerators.cc:96
GEMCoPadProcessor::maxDeltaRoll_
unsigned int maxDeltaRoll_
Definition: GEMCoPadProcessor.h:58
GEMPadDigiCluster::GE21SplitStrip
Definition: GEMPadDigiCluster.h:24
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
or
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< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
GEMCoPadProcessor::maxDeltaBX_
unsigned int maxDeltaBX_
Definition: GEMCoPadProcessor.h:57
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
GEMCoPadProcessor::infoV
unsigned int infoV
Definition: GEMCoPadProcessor.h:55