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 
22 
25 
30 
31 #include <vector>
32 
33 typedef std::vector<CSCComparatorDigi> CSCComparatorDigiContainer;
34 typedef std::vector<std::pair<CSCDetId, CSCComparatorDigiContainer> > CSCComparatorDigiContainerIds;
35 
37 {
38  public:
39 
42 
43  /* CSC trigger geometry */
44  void setGeometry(const CSCGeometry* csc_g) {cscGeometry_= csc_g;}
45 
46  /* option to discretize the fitted stub phi */
48 
49  /* use key layer radius */
51 
52  /* fit a straight line to the digis */
53  void fit(const CSCDetId& ch_id, const CSCCorrelatedLCTDigi&,
55  std::vector<float>& fit_phi_layers,
56  std::vector<float>& fit_z_layers, float& keyRadius);
57 
58  private:
59 
60  /* collect the comparator digis that match the pattern */
62 
63  /* collect the coordinates of comparators */
64  void getComparatorDigiCoordinates(const CSCDetId& ch_id, const CSCCorrelatedLCTDigi& stub);
65 
66  /* is this comparator in the LCT pattern? */
67  bool comparatorInLCTPattern(int keyStrip, int pattern, int layer, int halfStrip) const;
68 
69  // calculate slope and intercept of fit
70  void calculateSlopeIntercept(float& alpha, float& beta);
71 
72  /* width of the CSC half strips in this detId */
73  float cscHalfStripWidth(const CSCDetId& id) const;
74 
77 
79  std::vector<float> phis_;
80  std::vector<float> zs_;
81  std::vector<float> ephis_;
82  std::vector<float> ezs_;
83  float radius_;
85 
86  // number of strips and chamber width for each chamber type
87  // ME1a ME1b ME12 ME13 ME21 ME22 ME31 ME32 ME41 ME42
88  const std::vector<int> strips_ = {48,64,80,64, 80,80,80,80,80,80};
89  const std::vector<float> degrees_ = {10.,10.,10.,10.,20.,10.,20.,10.,20.,10.};
90 };
91 
92 #endif
const double beta
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)