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 {
40  public:
41 
44 
45  /* CSC trigger geometry */
46  void setGeometry(const CSCGeometry* csc_g) {cscGeometry_= csc_g;}
47 
48  /* option to discretize the fitted stub phi */
50 
51  /* use key layer radius */
53 
54  /* fit a straight line to the digis */
55  void fit(const CSCDetId& ch_id, const CSCCorrelatedLCTDigi&,
57  std::vector<float>& fit_phi_layers,
58  std::vector<float>& fit_z_layers, float& keyRadius);
59 
60  private:
61 
62  /* collect the comparator digis that match the LCT pattern
63  from the comparator digi collection */
64  void matchingComparatorDigisLCT(const CSCDetId& ch_id,
65  const CSCCorrelatedLCTDigi&,
67 
68  /* collect the coordinates of comparators */
69  void getComparatorDigiCoordinates(const CSCDetId& ch_id,
70  const CSCCorrelatedLCTDigi& stub);
71 
72  /* is this comparator in the LCT pattern? */
73  bool comparatorInLCTPattern(int keyStrip, int pattern, int layer, int halfStrip) const;
74 
75  // calculate slope and intercept of fit
76  void calculateSlopeIntercept(float& alpha, float& beta);
77 
78  /* width of the CSC half strips in this detId */
79  float cscHalfStripWidth(const CSCDetId& id) const;
80 
81  /* pointer to the CSC geometry */
83 
84  /* number of bits allocated to the strip number after fit */
86 
88 
89  /* coordinates of the comparators */
90  std::vector<float> phis_;
91  std::vector<float> zs_;
92  std::vector<float> ephis_;
93  std::vector<float> ezs_;
94  float radius_;
96 
97  // number of strips and chamber width for each chamber type
98  // ME1a ME1b ME12 ME13 ME21 ME22 ME31 ME32 ME41 ME42
99  const std::vector<int> strips_ = {48,64,80,64, 80,80,80,80,80,80};
100  const std::vector<float> degrees_ = {10.,10.,10.,10.,20.,10.,20.,10.,20.,10.};
101 };
102 
103 #endif
float alpha
Definition: AMPTWrapper.h:95
std::vector< std::pair< CSCDetId, CSCComparatorDigiContainer > > CSCComparatorDigiContainerIds
void useKeyRadius(bool useKeyRadius)
const std::vector< int > strips_
void getComparatorDigiCoordinates(const CSCDetId &ch_id, const CSCCorrelatedLCTDigi &stub)
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
std::vector< CSCComparatorDigi > CSCComparatorDigiContainer
float cscHalfStripWidth(const CSCDetId &id) const
const std::vector< float > degrees_
void fit(const CSCDetId &ch_id, const CSCCorrelatedLCTDigi &, const CSCComparatorDigiCollection &, std::vector< float > &fit_phi_layers, std::vector< float > &fit_z_layers, float &keyRadius)
CSCComparatorDigiContainerIds compDigisIds_
void matchingComparatorDigisLCT(const CSCDetId &ch_id, const CSCCorrelatedLCTDigi &, const CSCComparatorDigiCollection &)
const CSCGeometry * cscGeometry_
bool comparatorInLCTPattern(int keyStrip, int pattern, int layer, int halfStrip) const
void calculateSlopeIntercept(float &alpha, float &beta)
void setGeometry(const CSCGeometry *csc_g)