CMS 3D CMS Logo

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

#include <GEMCoPadProcessor.h>

Public Types

enum  { MAX_CoPad_BINS = 3 }
 

Public Member Functions

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

Private Member Functions

void declusterize (const GEMPadDigiClusterCollection *, GEMPadDigiCollection &)
 

Private Attributes

std::vector< GEMCoPadDigigemCoPadV
 
unsigned int infoV
 
unsigned int maxDeltaBX_
 
unsigned int maxDeltaPadGE11_
 
unsigned int maxDeltaPadGE21_
 
const int theChamber
 
const int theEndcap
 
const int theRing
 
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 40 of file GEMCoPadProcessor.h.

Constructor & Destructor Documentation

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

Normal constructor.

Definition at line 11 of file GEMCoPadProcessor.cc.

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

15  :
17 {
18  // Verbosity level, set to 0 (no print) by default.
19  infoV = copad.getParameter<unsigned int>("verbosity");
20  maxDeltaPadGE11_ = copad.getParameter<unsigned int>("maxDeltaPadGE11");
21  maxDeltaPadGE21_ = copad.getParameter<unsigned int>("maxDeltaPadGE21");
22  maxDeltaBX_ = copad.getParameter<unsigned int>("maxDeltaBX");
23 }
T getParameter(std::string const &) const
unsigned int maxDeltaPadGE21_
unsigned int maxDeltaPadGE11_
unsigned int maxDeltaBX_
GEMCoPadProcessor::GEMCoPadProcessor ( )

Default constructor. Used for testing.

Definition at line 25 of file GEMCoPadProcessor.cc.

References infoV, maxDeltaBX_, maxDeltaPadGE11_, and maxDeltaPadGE21_.

25  :
26  theEndcap(1), theStation(1), theRing(1), theChamber(1)
27 {
28  infoV = 0;
29  maxDeltaPadGE11_ = 0;
30  maxDeltaPadGE21_ = 0;
31  maxDeltaBX_ = 0;
32 }
unsigned int maxDeltaPadGE21_
unsigned int maxDeltaPadGE11_
unsigned int maxDeltaBX_

Member Function Documentation

void GEMCoPadProcessor::clear ( void  )

Clear copad vector

Definition at line 35 of file GEMCoPadProcessor.cc.

References gemCoPadV.

36 {
37  gemCoPadV.clear();
38 }
std::vector< GEMCoPadDigi > gemCoPadV
void GEMCoPadProcessor::declusterize ( const GEMPadDigiClusterCollection in_clusters,
GEMPadDigiCollection out_pads 
)
private

Definition at line 100 of file GEMCoPadProcessor.cc.

References AlCaHLTBitMon_ParallelJobs::p.

Referenced by run().

102 {
104  for (detUnitIt = in_clusters->begin();detUnitIt != in_clusters->end(); ++detUnitIt) {
105  const GEMDetId& id = (*detUnitIt).first;
106  const GEMPadDigiClusterCollection::Range& range = (*detUnitIt).second;
107  for (GEMPadDigiClusterCollection::const_iterator digiIt = range.first; digiIt!=range.second; ++digiIt) {
108  for (auto p: digiIt->pads()){
109  out_pads.insertDigi(id, GEMPadDigi(p, digiIt->bx()));
110  }
111  }
112  }
113 }
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 94 of file GEMCoPadProcessor.cc.

References gemCoPadV.

95 {
96  return gemCoPadV;
97 }
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 41 of file GEMCoPadProcessor.cc.

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

Referenced by run().

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

References declusterize(), and run().

86 {
87  std::unique_ptr<GEMPadDigiCollection> out_pads(new GEMPadDigiCollection());
88  declusterize(in_clusters, *out_pads);
89  return run(out_pads.get());
90 }
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 59 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 60 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor(), and run().

unsigned int GEMCoPadProcessor::maxDeltaPadGE21_
private

Definition at line 61 of file GEMCoPadProcessor.h.

Referenced by GEMCoPadProcessor(), and run().

const int GEMCoPadProcessor::theChamber
private

Definition at line 53 of file GEMCoPadProcessor.h.

Referenced by run().

const int GEMCoPadProcessor::theEndcap
private

Chamber id (trigger-type labels).

Definition at line 50 of file GEMCoPadProcessor.h.

Referenced by run().

const int GEMCoPadProcessor::theRing
private

Definition at line 52 of file GEMCoPadProcessor.h.

Referenced by run().

const int GEMCoPadProcessor::theStation
private

Definition at line 51 of file GEMCoPadProcessor.h.

Referenced by run().