File indexing completed on 2024-09-07 04:34:56
0001 #ifndef DTTMax_H
0002 #define DTTMax_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #include "DataFormats/MuonDetId/interface/DTWireId.h"
0013 #include "DataFormats/DTRecHit/interface/DTRecHit1D.h"
0014 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0015 #include "DataFormats/GeometryVector/interface/GlobalVector.h"
0016 #include "Histogram.h"
0017
0018 #include <string>
0019 #include <vector>
0020
0021 class DTSuperLayer;
0022 class DTSuperLayerId;
0023 class DTTTrigBaseSync;
0024
0025 namespace dttmaxenums {
0026 enum TMaxCells { c123, c124, c134, c234, notInit };
0027 enum SigmaFactor { r32, r72, r78, noR };
0028 enum SegDir { L, R };
0029 }
0030
0031 class DTTMax {
0032 public:
0033 typedef dttmaxenums::TMaxCells TMaxCells;
0034 typedef dttmaxenums::SegDir SegDir;
0035 typedef dttmaxenums::SigmaFactor SigmaFactor;
0036
0037
0038 DTTMax(const std::vector<DTRecHit1D>& hits,
0039 const DTSuperLayer& isl,
0040 GlobalVector dir,
0041 GlobalPoint pos,
0042 const DTTTrigBaseSync& sync,
0043 dtcalibration::Histograms& hist);
0044
0045
0046 virtual ~DTTMax();
0047
0048
0049 struct TMax {
0050 TMax(float t_, TMaxCells cells_, std::string type_, SigmaFactor sigma_, unsigned t0Factor_, unsigned hSubGroup_)
0051 : t(t_), cells(cells_), type(type_), sigma(sigma_), t0Factor(t0Factor_), hSubGroup(hSubGroup_) {}
0052
0053 float t;
0054 TMaxCells cells;
0055 std::string type;
0056 SigmaFactor sigma;
0057
0058 unsigned t0Factor;
0059 unsigned hSubGroup;
0060 };
0061
0062
0063 struct InfoLayer {
0064 InfoLayer(
0065 const DTRecHit1D& rh_, const DTSuperLayer& isl, GlobalVector dir, GlobalPoint pos, const DTTTrigBaseSync& sync);
0066 DTRecHit1D rh;
0067 DTWireId idWire;
0068 DTEnums::DTCellSide lr;
0069 float wireX;
0070 float time;
0071 };
0072
0073
0074 std::vector<const TMax*> getTMax(const DTWireId& idWire);
0075
0076
0077 std::vector<const TMax*> getTMax(const DTSuperLayerId& isl);
0078
0079
0080 const TMax* getTMax(TMaxCells cCase);
0081
0082
0083 InfoLayer*& getInfoLayer(int layer) { return theInfoLayers[layer - 1]; }
0084
0085 private:
0086 DTTMax() {}
0087
0088
0089 bool debug;
0090
0091 std::vector<InfoLayer*> theInfoLayers;
0092 std::vector<TMax*> theTMaxes;
0093 SegDir theSegDir;
0094 std::string theSegType;
0095 };
0096 #endif