CMS 3D CMS Logo

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