CMS 3D CMS Logo

CSCComparatorDigiFitter.h
Go to the documentation of this file.
1 #ifndef L1Trigger_CSCTriggerPrimitives_CSCComparatorDigiFitter_h
2 #define L1Trigger_CSCTriggerPrimitives_CSCComparatorDigiFitter_h
3 
4 /*
5  * class CSCComparatorDigiFitter
6  *
7  * Fits a straight line to the comparator digis beloning to a stub
8  *
9  * This is a helper class, to be used in the first prototype
10  * implementation of the displaced muon trigger. In due time,
11  * the fitting procedure will be integrated in the
12  * CSCCathodeLCTProcessor.
13  *
14  * authors: Sven Dildick (TAMU), Tao Huang (TAMU)
15  */
16 
24 
27 
32 
33 #include <vector>
34 
35 typedef std::vector<CSCComparatorDigi> CSCComparatorDigiContainer;
36 typedef std::vector<std::pair<CSCDetId, CSCComparatorDigiContainer> > CSCComparatorDigiContainerIds;
37 
39 public:
42 
43  /* CSC trigger geometry */
44  void setGeometry(const CSCGeometry* csc_g) { cscGeometry_ = csc_g; }
45 
46  /* option to discretize the fitted stub phi */
47  void setStripBits(int bits) { nStripBits_ = bits; }
48 
49  /* use key layer radius */
51 
52  /* fit a straight line to the digis */
53  void fit(const CSCDetId& ch_id,
54  const CSCCorrelatedLCTDigi&,
56  std::vector<float>& fit_phi_layers,
57  std::vector<float>& fit_z_layers,
58  float& keyRadius);
59 
60 private:
61  /* collect the comparator digis that match the LCT pattern
62  from the comparator digi collection */
63  void matchingComparatorDigisLCT(const CSCDetId& ch_id,
64  const CSCCorrelatedLCTDigi&,
66 
67  /* collect the coordinates of comparators */
68  void getComparatorDigiCoordinates(const CSCDetId& ch_id, const CSCCorrelatedLCTDigi& stub);
69 
70  /* is this comparator in the LCT pattern? */
71  bool comparatorInLCTPattern(int keyStrip, int pattern, int layer, int halfStrip) const;
72 
73  // calculate slope and intercept of fit
74  void calculateSlopeIntercept(float& alpha, float& beta);
75 
76  /* width of the CSC half strips in this detId */
77  float cscHalfStripWidth(const CSCDetId& id) const;
78 
79  /* pointer to the CSC geometry */
81 
82  /* number of bits allocated to the strip number after fit */
84 
86 
87  /* coordinates of the comparators */
88  std::vector<float> phis_;
89  std::vector<float> zs_;
90  std::vector<float> ephis_;
91  std::vector<float> ezs_;
92  float radius_;
94 
95  // number of strips and chamber width for each chamber type
96  // ME1a ME1b ME12 ME13 ME21 ME22 ME31 ME32 ME41 ME42
97  const std::vector<int> strips_ = {48, 64, 80, 64, 80, 80, 80, 80, 80, 80};
98  const std::vector<float> degrees_ = {10., 10., 10., 10., 20., 10., 20., 10., 20., 10.};
99 };
100 
101 #endif
CSCComparatorDigiFitter::radius_
float radius_
Definition: CSCComparatorDigiFitter.h:92
CSCCorrelatedLCTDigiCollection.h
MessageLogger.h
CSCComparatorDigiFitter::phis_
std::vector< float > phis_
Definition: CSCComparatorDigiFitter.h:88
CSCComparatorDigiFitter::CSCComparatorDigiFitter
CSCComparatorDigiFitter()
Definition: CSCComparatorDigiFitter.h:40
CSCComparatorDigiFitter::ephis_
std::vector< float > ephis_
Definition: CSCComparatorDigiFitter.h:90
ESHandle.h
CSCComparatorDigiFitter::calculateSlopeIntercept
void calculateSlopeIntercept(float &alpha, float &beta)
Definition: CSCComparatorDigiFitter.cc:213
zMuMuMuonUserData.alpha
alpha
zGenParticlesMatch = cms.InputTag(""),
Definition: zMuMuMuonUserData.py:9
CSCComparatorDigiFitter::setGeometry
void setGeometry(const CSCGeometry *csc_g)
Definition: CSCComparatorDigiFitter.h:44
zMuMuMuonUserData.beta
beta
Definition: zMuMuMuonUserData.py:10
CSCComparatorDigiFitter::~CSCComparatorDigiFitter
~CSCComparatorDigiFitter()
Definition: CSCComparatorDigiFitter.h:41
CSCDetId.h
CSCComparatorDigiFitter::fit
void fit(const CSCDetId &ch_id, const CSCCorrelatedLCTDigi &, const CSCComparatorDigiCollection &, std::vector< float > &fit_phi_layers, std::vector< float > &fit_z_layers, float &keyRadius)
Definition: CSCComparatorDigiFitter.cc:150
CSCGeometry
Definition: CSCGeometry.h:24
CSCComparatorDigiFitter::degrees_
const std::vector< float > degrees_
Definition: CSCComparatorDigiFitter.h:98
CSCComparatorDigiFitter::cscHalfStripWidth
float cscHalfStripWidth(const CSCDetId &id) const
Definition: CSCComparatorDigiFitter.cc:235
CSCComparatorDigiFitter::useKeyRadius
void useKeyRadius(bool useKeyRadius)
Definition: CSCComparatorDigiFitter.h:50
CSCComparatorDigiFitter
Definition: CSCComparatorDigiFitter.h:38
CSCLayerGeometry.h
CSCComparatorDigiFitter::matchingComparatorDigisLCT
void matchingComparatorDigisLCT(const CSCDetId &ch_id, const CSCCorrelatedLCTDigi &, const CSCComparatorDigiCollection &)
Definition: CSCComparatorDigiFitter.cc:64
Event.h
CSCComparatorDigiFitter::getComparatorDigiCoordinates
void getComparatorDigiCoordinates(const CSCDetId &ch_id, const CSCCorrelatedLCTDigi &stub)
Definition: CSCComparatorDigiFitter.cc:94
CSCComparatorDigiFitter::strips_
const std::vector< int > strips_
Definition: CSCComparatorDigiFitter.h:97
CSCDetId
Definition: CSCDetId.h:26
CSCComparatorDigiFitter::useKeyRadius_
bool useKeyRadius_
Definition: CSCComparatorDigiFitter.h:93
topSingleLeptonDQM_PU_cfi.pattern
pattern
Definition: topSingleLeptonDQM_PU_cfi.py:39
CSCComparatorDigiFitter::ezs_
std::vector< float > ezs_
Definition: CSCComparatorDigiFitter.h:91
CSCComparatorDigiCollection
CSCComparatorDigiFitter::compDigisIds_
CSCComparatorDigiContainerIds compDigisIds_
Definition: CSCComparatorDigiFitter.h:85
CSCComparatorDigiFitter::setStripBits
void setStripBits(int bits)
Definition: CSCComparatorDigiFitter.h:47
InputTag.h
bits
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision bits
Definition: EventSelector-behavior.doc:35
CSCComparatorDigiFitter::comparatorInLCTPattern
bool comparatorInLCTPattern(int keyStrip, int pattern, int layer, int halfStrip) const
Definition: CSCComparatorDigiFitter.cc:243
Frameworkfwd.h
EventSetup.h
CSCComparatorDigiCollection.h
CSCComparatorDigiContainer
std::vector< CSCComparatorDigi > CSCComparatorDigiContainer
Definition: CSCComparatorDigiFitter.h:35
CSCComparatorDigiContainerIds
std::vector< std::pair< CSCDetId, CSCComparatorDigiContainer > > CSCComparatorDigiContainerIds
Definition: CSCComparatorDigiFitter.h:36
CSCComparatorDigiFitter::nStripBits_
int nStripBits_
Definition: CSCComparatorDigiFitter.h:83
ParameterSet.h
CSCComparatorDigiFitter::zs_
std::vector< float > zs_
Definition: CSCComparatorDigiFitter.h:89
CSCComparatorDigiFitter::cscGeometry_
const CSCGeometry * cscGeometry_
Definition: CSCComparatorDigiFitter.h:80
GlobalPoint.h
CSCCorrelatedLCTDigi
Definition: CSCCorrelatedLCTDigi.h:19
CSCGeometry.h