CMS 3D CMS Logo

DTTMax.h
Go to the documentation of this file.
1 #ifndef DTTMax_H
2 #define DTTMax_H
3 
16 #include "Histogram.h"
17 
18 #include <string>
19 #include <vector>
20 
21 class DTSuperLayer;
22 class DTSuperLayerId;
23 class DTTTrigBaseSync;
24 
25 namespace dttmaxenums {
27  enum SigmaFactor { r32, r72, r78, noR };
28  enum SegDir { L, R };
29 } // namespace dttmaxenums
30 
31 class DTTMax {
32 public:
36 
38  DTTMax(const std::vector<DTRecHit1D>& hits,
39  const DTSuperLayer& isl,
42  const DTTTrigBaseSync& sync,
44 
46  virtual ~DTTMax();
47 
49  struct TMax {
50  TMax(float t_, TMaxCells cells_, std::string type_, SigmaFactor sigma_, unsigned t0Factor_, unsigned hSubGroup_)
51  : t(t_), cells(cells_), type(type_), sigma(sigma_), t0Factor(t0Factor_), hSubGroup(hSubGroup_) {}
52 
53  float t;
55  std::string type; // LLR, LRL,...
56  SigmaFactor sigma; // factor relating the width of the Tmax distribution
57  // and the cell resolution
58  unsigned t0Factor; // "quantity" of Delta(t0) included in the tmax formula
59  unsigned hSubGroup; //different t0 hists (one hit within a given distance from the wire)
60  };
61 
62  // All information on one of the layers crossed by the segment
63  struct InfoLayer {
64  InfoLayer(
65  const DTRecHit1D& rh_, const DTSuperLayer& isl, GlobalVector dir, GlobalPoint pos, const DTTTrigBaseSync& sync);
69  float wireX;
70  float time;
71  };
72 
73  // Return the three TMax for a given cell
74  std::vector<const TMax*> getTMax(const DTWireId& idWire);
75 
76  // Return the four TMaxes of the SL
77  std::vector<const TMax*> getTMax(const DTSuperLayerId& isl);
78 
79  // Return one of the four TMaxes of the SL
80  const TMax* getTMax(TMaxCells cCase);
81 
82  // Get InfoLayer (r/w) from layer number
84 
85 private:
86  DTTMax(){}; // Hide default constructor
87 
88  //debug flag
89  bool debug;
90 
91  std::vector<InfoLayer*> theInfoLayers;
92  std::vector<TMax*> theTMaxes;
94  std::string theSegType; // LRLR, LRLL, ....
95 };
96 #endif
SegDir theSegDir
Definition: DTTMax.h:93
unsigned t0Factor
Definition: DTTMax.h:58
float t
Definition: DTTMax.h:53
InfoLayer(const DTRecHit1D &rh_, const DTSuperLayer &isl, GlobalVector dir, GlobalPoint pos, const DTTTrigBaseSync &sync)
Definition: DTTMax.cc:21
Definition: DTTMax.h:31
Information on each of the four TMax values in a SL.
Definition: DTTMax.h:49
dttmaxenums::TMaxCells TMaxCells
Definition: DTTMax.h:33
unsigned hSubGroup
Definition: DTTMax.h:59
DTCellSide
Which side of the DT cell.
Definition: DTEnums.h:15
virtual ~DTTMax()
Destructor.
Definition: DTTMax.cc:342
std::vector< const TMax * > getTMax(const DTWireId &idWire)
Definition: DTTMax.cc:303
DTRecHit1D rh
Definition: DTTMax.h:66
bool debug
Definition: DTTMax.h:86
dttmaxenums::SegDir SegDir
Definition: DTTMax.h:34
DTTMax()
Definition: DTTMax.h:86
TMax(float t_, TMaxCells cells_, std::string type_, SigmaFactor sigma_, unsigned t0Factor_, unsigned hSubGroup_)
Definition: DTTMax.h:50
dttmaxenums::SigmaFactor SigmaFactor
Definition: DTTMax.h:35
DTEnums::DTCellSide lr
Definition: DTTMax.h:68
InfoLayer *& getInfoLayer(int layer)
Definition: DTTMax.h:83
std::string type
Definition: DTTMax.h:55
TMaxCells cells
Definition: DTTMax.h:54
DTWireId idWire
Definition: DTTMax.h:67
SigmaFactor sigma
Definition: DTTMax.h:56
std::vector< TMax * > theTMaxes
Definition: DTTMax.h:92
std::vector< InfoLayer * > theInfoLayers
Definition: DTTMax.h:91
std::string theSegType
Definition: DTTMax.h:94