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 &)
 
 GEMCoPadProcessor (unsigned endcap, unsigned station, unsigned chamber, const edm::ParameterSet &copad)
 
 GEMCoPadProcessor ()
 
const std::vector< GEMCoPadDigi > & readoutCoPads ()
 
std::vector< GEMCoPadDigirun (const GEMPadDigiCollection *)
 
std::vector< GEMCoPadDigirun (const GEMPadDigiClusterCollection *)
 

Private Attributes

std::vector< GEMCoPadDigigemCoPadV
 
unsigned int infoV
 
unsigned int maxDeltaBX_
 
unsigned int maxDeltaPadGE11_
 
unsigned int maxDeltaPadGE21_
 
unsigned int maxDeltaRollGE11_
 
unsigned int maxDeltaRollGE21_
 
const int theChamber
 
const int theEndcap
 
const int theStation
 

Detailed Description

Author
Sven Dildick (TAMU)

Definition at line 17 of file GEMCoPadProcessor.h.

Member Enumeration Documentation

anonymous enum

Maximum number of time bins.

Enumerator
MAX_CoPad_BINS 

Definition at line 39 of file GEMCoPadProcessor.h.

Constructor & Destructor Documentation

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

Normal constructor.

Definition at line 11 of file GEMCoPadProcessor.cc.

References edm::ParameterSet::getParameter(), infoV, maxDeltaBX_, maxDeltaPadGE11_, maxDeltaPadGE21_, maxDeltaRollGE11_, and maxDeltaRollGE21_.

14  :
16 {
17  // Verbosity level, set to 0 (no print) by default.
18  infoV = config.getParameter<unsigned int>("verbosity");
19  maxDeltaPadGE11_ = config.getParameter<unsigned int>("maxDeltaPadGE11");
20  maxDeltaPadGE21_ = config.getParameter<unsigned int>("maxDeltaPadGE21");
21  maxDeltaRollGE11_ = config.getParameter<unsigned int>("maxDeltaRollGE11");
22  maxDeltaRollGE21_ = config.getParameter<unsigned int>("maxDeltaRollGE21");
23  maxDeltaBX_ = config.getParameter<unsigned int>("maxDeltaBX");
24 }
Definition: config.py:1
unsigned int maxDeltaRollGE21_
unsigned int maxDeltaPadGE21_
unsigned int maxDeltaPadGE11_
unsigned int maxDeltaBX_
unsigned int maxDeltaRollGE11_
GEMCoPadProcessor::GEMCoPadProcessor ( )

Default constructor. Used for testing.

Definition at line 26 of file GEMCoPadProcessor.cc.

References infoV, maxDeltaBX_, maxDeltaPadGE11_, maxDeltaPadGE21_, maxDeltaRollGE11_, and maxDeltaRollGE21_.

26  :
28 {
29  infoV = 0;
30  maxDeltaPadGE11_ = 0;
31  maxDeltaPadGE21_ = 0;
34  maxDeltaBX_ = 0;
35 }
unsigned int maxDeltaRollGE21_
unsigned int maxDeltaPadGE21_
unsigned int maxDeltaPadGE11_
unsigned int maxDeltaBX_
unsigned int maxDeltaRollGE11_

Member Function Documentation

void GEMCoPadProcessor::clear ( void  )

Clear copad vector

Definition at line 38 of file GEMCoPadProcessor.cc.

References gemCoPadV.

Referenced by run().

39 {
40  gemCoPadV.clear();
41 }
std::vector< GEMCoPadDigi > gemCoPadV
void GEMCoPadProcessor::declusterize ( const GEMPadDigiClusterCollection in_clusters,
GEMPadDigiCollection out_pads 
)

Definition at line 113 of file GEMCoPadProcessor.cc.

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by run().

115 {
117  for (detUnitIt = in_clusters->begin();detUnitIt != in_clusters->end(); ++detUnitIt) {
118  const GEMDetId& id = (*detUnitIt).first;
119  const GEMPadDigiClusterCollection::Range& range = (*detUnitIt).second;
120  for (GEMPadDigiClusterCollection::const_iterator digiIt = range.first; digiIt!=range.second; ++digiIt) {
121  for (auto p: digiIt->pads()){
122  out_pads.insertDigi(id, GEMPadDigi(p, digiIt->bx()));
123  }
124  }
125  }
126 }
std::vector< GEMPadDigiCluster >::const_iterator const_iterator
std::pair< const_iterator, const_iterator > Range
const std::vector< GEMCoPadDigi > & GEMCoPadProcessor::readoutCoPads ( )

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

Definition at line 107 of file GEMCoPadProcessor.cc.

References gemCoPadV.

108 {
109  return gemCoPadV;
110 }
std::vector< GEMCoPadDigi > gemCoPadV
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 44 of file GEMCoPadProcessor.cc.

References funct::abs(), relativeConstraints::chamber, clear(), gemCoPadV, maxDeltaBX_, maxDeltaPadGE11_, maxDeltaPadGE21_, or, AlCaHLTBitMon_ParallelJobs::p, relativeConstraints::ring, relativeConstraints::station, theChamber, theEndcap, and theStation.

Referenced by run().

45 {
46  const int region((theEndcap == 1) ? 1: -1);
47 
48  clear();
49  // Build coincidences
50  for (auto det_range = in_pads->begin(); det_range != in_pads->end(); ++det_range) {
51  const auto& pads_range1 = (*det_range).second;
52  for (auto p = pads_range1.first; p != pads_range1.second; ++p) {
53  }
54 
55  const GEMDetId& id = (*det_range).first;
56  // same chamber (no restriction on the roll number)
57  if (id.region() != region or
58  id.station() != theStation or
59  id.chamber() != theChamber) continue;
60 
61  // all coincidences detIDs will have layer=1
62  if (id.layer() != 1) continue;
63 
64  // find all corresponding ids with layer 2 and same roll number
65  // or a roll number that differs at most +/-1
66 
67  for (int roll = id.roll() - 1; roll <= id.roll() +1; ++roll){
68 
69  GEMDetId co_id(id.region(), id.ring(), id.station(), 2, id.chamber(), roll);
70 
71  auto co_pads_range = in_pads->get(co_id);
72  // empty range = no possible coincidence pads
73  if (co_pads_range.first == co_pads_range.second) continue;
74 
75  // now let's correlate the pads in two layers of this partition
76  const auto& pads_range = (*det_range).second;
77  for (auto p = pads_range.first; p != pads_range.second; ++p) {
78  for (auto co_p = co_pads_range.first; co_p != co_pads_range.second; ++co_p) {
79 
80  const unsigned int deltaPad(std::abs(p->pad() - co_p->pad()));
81  // check the match in pad
82  if ((theStation==1 and deltaPad > maxDeltaPadGE11_) or
83  (theStation==2 and deltaPad > maxDeltaPadGE21_)) continue;
84 
85  // check the match in BX
86  if ((unsigned)std::abs(p->bx() - co_p->bx()) > maxDeltaBX_) continue;
87 
88  // make a new coincidence pad digi
89  gemCoPadV.push_back(GEMCoPadDigi(id.roll(),*p,*co_p));
90  }
91  }
92  }
93  }
94  return gemCoPadV;
95 }
std::vector< GEMCoPadDigi > gemCoPadV
unsigned int maxDeltaPadGE21_
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
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
unsigned int maxDeltaPadGE11_
unsigned int maxDeltaBX_
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 98 of file GEMCoPadProcessor.cc.

References declusterize(), and run().

99 {
100  std::unique_ptr<GEMPadDigiCollection> out_pads(new GEMPadDigiCollection());
101  declusterize(in_clusters, *out_pads);
102  return run(out_pads.get());
103 }
std::vector< GEMCoPadDigi > run(const GEMPadDigiCollection *)
void declusterize(const GEMPadDigiClusterCollection *, GEMPadDigiCollection &)
MuonDigiCollection< GEMDetId, GEMPadDigi > GEMPadDigiCollection

Member Data Documentation

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

Definition at line 65 of file GEMCoPadProcessor.h.

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

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 57 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor().

unsigned int GEMCoPadProcessor::maxDeltaBX_
private

Definition at line 62 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor(), and run().

unsigned int GEMCoPadProcessor::maxDeltaPadGE11_
private

Definition at line 58 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor(), and run().

unsigned int GEMCoPadProcessor::maxDeltaPadGE21_
private

Definition at line 59 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor(), and run().

unsigned int GEMCoPadProcessor::maxDeltaRollGE11_
private

Definition at line 60 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor().

unsigned int GEMCoPadProcessor::maxDeltaRollGE21_
private

Definition at line 61 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor().

const int GEMCoPadProcessor::theChamber
private

Definition at line 51 of file GEMCoPadProcessor.h.

Referenced by run().

const int GEMCoPadProcessor::theEndcap
private

Chamber id (trigger-type labels).

Definition at line 49 of file GEMCoPadProcessor.h.

Referenced by run().

const int GEMCoPadProcessor::theStation
private

Definition at line 50 of file GEMCoPadProcessor.h.

Referenced by run().