CMS 3D CMS Logo

CSCHitFromStripOnly.h
Go to the documentation of this file.
1 #ifndef CSCRecHitD_CSCHitFromStripOnly_h
2 #define CSCRecHitD_CSCHitFromStripOnly_h
3 
16 
21 
23 
26 
27 #include <vector>
28 #include <array>
29 
30 class CSCLayer;
31 class CSCStripDigi;
32 class CSCPedestalChoice;
33 
35 public:
36  typedef std::array<CSCStripData, 100> PulseHeightMap;
37 
38  explicit CSCHitFromStripOnly(const edm::ParameterSet& ps);
39 
41 
42  std::vector<CSCStripHit> runStrip(const CSCDetId& id,
43  const CSCLayer* layer,
44  const CSCStripDigiCollection::Range& rstripd);
45 
47 
48  bool ganged() { return ganged_; }
49  void setGanged(bool ig) { ganged_ = ig; }
50 
51 private:
54 
56  void findMaxima(const CSCDetId& id);
57  // What we call a peak
58  bool isPeakOK(int iStrip, float heightCluster);
59 
61  float makeCluster(int centerStrip);
62 
64  CSCStripHitData makeStripData(int centerStrip, int offset);
65 
67  bool isNearDeadStrip(const CSCDetId& id, int centralStrip, int nstrips);
68 
70  bool isDeadStrip(const CSCDetId& id, int centralStrip, int nstrips);
71 
73  float findHitOnStripPosition(const std::vector<CSCStripHitData>& data, const int& centerStrip);
74 
75  // MEMBER DATA
76 
77  // Hold pointers to current layer, conditions data
79  const CSCLayer* layer_;
81  // Number of strips in layer
82  unsigned nstrips_;
83  // gain correction weights and crosstalks read in from conditions database.
84  float gainWeight[80];
85 
86  // The specific pedestal calculator
88 
89  // The cuts for forming the strip hits are described in the config file
90  bool useCalib;
91  static const int theClusterSize = 3;
94 
95  // working buffer for sca pulseheights
97 
98  std::vector<int> theMaxima;
99  std::vector<int> theConsecutiveStrips; //... with charge for a given maximum
100  std::vector<int> theClosestMaximum; // this is number of strips to the closest other maximum
101 
102  // Variables entering the CSCStripHit construction:
103  int tmax_cluster; // Peaking time for strip hit, in time bin units
105  std::vector<float> strips_adc;
106  std::vector<float> strips_adcRaw;
107  std::vector<int> theStrips;
108 
109  bool ganged_; // only True if ME1/1A AND it is ganged
110 };
111 
112 #endif
CSCHitFromStripOnly::PulseHeightMap
std::array< CSCStripData, 100 > PulseHeightMap
Definition: CSCHitFromStripOnly.h:36
CSCHitFromStripOnly::ganged
bool ganged()
Definition: CSCHitFromStripOnly.h:48
CSCHitFromStripOnly::id_
CSCDetId id_
Definition: CSCHitFromStripOnly.h:78
CSCHitFromStripOnly::CSCHitFromStripOnly
CSCHitFromStripOnly(const edm::ParameterSet &ps)
Definition: CSCHitFromStripOnly.cc:22
CSCRecoConditions.h
CSCHitFromStripOnly::gainWeight
float gainWeight[80]
Definition: CSCHitFromStripOnly.h:84
CSCHitFromStripOnly::useCalib
bool useCalib
Definition: CSCHitFromStripOnly.h:90
CSCHitFromStripOnly::ganged_
bool ganged_
Definition: CSCHitFromStripOnly.h:109
CSCHitFromStripOnly::theThresholdForCluster
float theThresholdForCluster
Definition: CSCHitFromStripOnly.h:93
CSCHitFromStripOnly::isDeadStrip
bool isDeadStrip(const CSCDetId &id, int centralStrip, int nstrips)
Is the strip 'bad'?
Definition: CSCHitFromStripOnly.cc:602
CSCLayer
Definition: CSCLayer.h:24
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
CSCHitFromStripOnly::setGanged
void setGanged(bool ig)
Definition: CSCHitFromStripOnly.h:49
CSCDetId.h
CSCStripHitData.h
CSCHitFromStripOnly::runStrip
std::vector< CSCStripHit > runStrip(const CSCDetId &id, const CSCLayer *layer, const CSCStripDigiCollection::Range &rstripd)
Definition: CSCHitFromStripOnly.cc:54
CSCHitFromStripOnly::clusterSize
int clusterSize
Definition: CSCHitFromStripOnly.h:104
CSCHitFromStripOnly::tmax_cluster
int tmax_cluster
Definition: CSCHitFromStripOnly.h:103
CSCHitFromStripOnly::~CSCHitFromStripOnly
~CSCHitFromStripOnly()
Definition: CSCHitFromStripOnly.cc:46
CSCStripHitData
Definition: CSCStripHitData.h:16
CSCHitFromStripOnly::findMaxima
void findMaxima(const CSCDetId &id)
Find local maxima.
Definition: CSCHitFromStripOnly.cc:411
CSCHitFromStripOnly::recoConditions_
const CSCRecoConditions * recoConditions_
Definition: CSCHitFromStripOnly.h:80
CSCHitFromStripOnly::findHitOnStripPosition
float findHitOnStripPosition(const std::vector< CSCStripHitData > &data, const int &centerStrip)
Find position of hit in strip cluster in terms of strip #.
Definition: CSCHitFromStripOnly.cc:546
CSCHitFromStripOnly::theMaxima
std::vector< int > theMaxima
Definition: CSCHitFromStripOnly.h:98
CSCHitFromStripOnly::theConsecutiveStrips
std::vector< int > theConsecutiveStrips
Definition: CSCHitFromStripOnly.h:99
CSCHitFromStripOnly::makeCluster
float makeCluster(int centerStrip)
Make clusters using local maxima.
Definition: CSCHitFromStripOnly.cc:211
CSCHitFromStripOnly::isPeakOK
bool isPeakOK(int iStrip, float heightCluster)
Definition: CSCHitFromStripOnly.cc:534
CSCHitFromStripOnly::theStrips
std::vector< int > theStrips
Definition: CSCHitFromStripOnly.h:107
CSCHitFromStripOnly::strips_adc
std::vector< float > strips_adc
Definition: CSCHitFromStripOnly.h:105
CSCHitFromStripOnly::thePulseHeightMap
PulseHeightMap thePulseHeightMap
Definition: CSCHitFromStripOnly.h:96
CSCHitFromStripOnly::strips_adcRaw
std::vector< float > strips_adcRaw
Definition: CSCHitFromStripOnly.h:106
CSCHitFromStripOnly::theThresholdForAPeak
float theThresholdForAPeak
Definition: CSCHitFromStripOnly.h:92
CSCHitFromStripOnly::layer_
const CSCLayer * layer_
Definition: CSCHitFromStripOnly.h:79
CSCHitFromStripOnly::calcped_
CSCPedestalChoice * calcped_
Definition: CSCHitFromStripOnly.h:87
edm::ParameterSet
Definition: ParameterSet.h:47
CSCHitFromStripOnly::theClusterSize
static const int theClusterSize
Definition: CSCHitFromStripOnly.h:91
CSCPedestalChoice
Definition: CSCPedestalChoice.h:14
CSCDetId
Definition: CSCDetId.h:26
CSCHitFromStripOnly::fillPulseHeights
void fillPulseHeights(const CSCStripDigiCollection::Range &rstripd)
Store SCA pulseheight information from strips in digis of one layer.
Definition: CSCHitFromStripOnly.cc:350
CSCStripHit.h
CSCStripDigiCollection.h
CSCHitFromStripOnly::setConditions
void setConditions(const CSCRecoConditions *reco)
Definition: CSCHitFromStripOnly.h:46
CSCStripDigi
Definition: CSCStripDigi.h:17
CSCRecoConditions
Definition: CSCRecoConditions.h:25
Frameworkfwd.h
CSCHitFromStripOnly::makeStripData
CSCStripHitData makeStripData(int centerStrip, int offset)
Definition: CSCHitFromStripOnly.cc:241
dt_dqm_sourceclient_common_cff.reco
reco
Definition: dt_dqm_sourceclient_common_cff.py:110
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
CSCHitFromStripOnly::isNearDeadStrip
bool isNearDeadStrip(const CSCDetId &id, int centralStrip, int nstrips)
Is either neighbour 'bad'?
Definition: CSCHitFromStripOnly.cc:596
ParameterSet.h
CSCHitFromStripOnly::nstrips_
unsigned nstrips_
Definition: CSCHitFromStripOnly.h:82
CSCHitFromStripOnly
Definition: CSCHitFromStripOnly.h:34
CSCStripData.h
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
CSCHitFromStripOnly::theClosestMaximum
std::vector< int > theClosestMaximum
Definition: CSCHitFromStripOnly.h:100