CMS 3D CMS Logo

DTRecHitQuality.h
Go to the documentation of this file.
1 #ifndef Validation_DTRecHits_DTRecHitQuality_h
2 #define Validation_DTRecHits_DTRecHitQuality_h
3 
18 #include <map>
19 #include <string>
20 #include <vector>
21 
30 
31 namespace edm {
32  class ParameterSet;
33  class Event;
34  class EventSetup;
35 }
36 
37 class PSimHit;
38 class DTLayer;
39 class DTWireId;
40 class DTGeometry;
41 class HRes1DHit;
42 class HEff1DHit;
43 struct Histograms;
44 
45 class DTRecHitQuality : public DQMGlobalEDAnalyzer<Histograms> {
46 public:
49 
50 private:
52  void bookHistograms(DQMStore::ConcurrentBooker &, edm::Run const&, edm::EventSetup const&, Histograms &) const override;
53 
55  void dqmAnalyze(edm::Event const&, edm::EventSetup const&, Histograms const&) const override;
56 
57 
58 private:
59  // Switch for debug output
60  bool debug_;
61 
62  // Root file name
67 
72 
73  // Switches for analysis at various steps
74  bool doStep1_;
75  bool doStep2_;
76  bool doStep3_;
77  bool local_;
78  bool doall_;
79 
80  // Return a map between DTRecHit1DPair and wireId
81  std::map<DTWireId, std::vector<DTRecHit1DPair>>
82  map1DRecHitsPerWire(const DTRecHitCollection* dt1DRecHitPairs) const;
83 
84  // Return a map between DTRecHit1D and wireId
85  std::map<DTWireId, std::vector<DTRecHit1D>>
86  map1DRecHitsPerWire(const DTRecSegment2DCollection* segment2Ds) const;
87 
88  // Return a map between DTRecHit1D and wireId
89  std::map<DTWireId, std::vector<DTRecHit1D>>
90  map1DRecHitsPerWire(const DTRecSegment4DCollection* segment4Ds) const;
91 
92  // Compute SimHit distance from wire (cm)
93  float simHitDistFromWire(const DTLayer* layer,
94  const DTWireId& wireId,
95  const PSimHit& hit) const;
96 
97  // Compute SimHit impact angle (in direction perp to wire)
98  float simHitImpactAngle(const DTLayer* layer,
99  const DTWireId& wireId,
100  const PSimHit& hit) const;
101 
102  // Compute SimHit distance from FrontEnd
103  float simHitDistFromFE(const DTLayer* layer,
104  const DTWireId& wireId,
105  const PSimHit& hit) const;
106 
107  // Find the RecHit closest to the muon SimHit
108 // const DTRecHit1DPair*
109 // findBestRecHit(const DTLayer* layer,
110 // DTWireId wireId,
111 // const std::vector<DTRecHit1DPair>& recHits,
112 // const float simHitDist) const;
113  template <typename type>
114  const type*
115  findBestRecHit(const DTLayer* layer,
116  const DTWireId& wireId,
117  const std::vector<type>& recHits,
118  float simHitDist) const;
119 
120  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
121  float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer) const;
122  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
123  float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer) const;
124 
125  // Return the error on the measured (cm) coordinate
126  float recHitPositionError(const DTRecHit1DPair& recHit) const;
127  float recHitPositionError(const DTRecHit1D& recHit) const;
128 
129  // Does the real job
130  template <typename type>
131  void compute(const DTGeometry *dtGeom,
132  const std::map<DTWireId, std::vector<PSimHit>>& simHitsPerWire,
133  const std::map<DTWireId, std::vector<type>>& recHitsPerWire,
134  Histograms const& histograms, int step) const;
135 
136 };
137 
138 #endif // Validation_DTRecHits_DTRecHitQuality_h
type
Definition: HCALResponse.h:21
edm::InputTag recHitLabel_
edm::EDGetTokenT< DTRecHitCollection > recHitToken_
edm::InputTag segment4DLabel_
virtual example_global void dqmAnalyze(edm::Event const &,@example_global edm::EventSetup const &,@example_global Histograms___class__ const &) const override
A set of histograms fo efficiency computation for 1D RecHits (producer)
Definition: Histograms.h:133
edm::InputTag simHitLabel_
edm::InputTag segment2DLabel_
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_
virtual example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
A set of histograms of residuals and pulls for 1D RecHits.
Definition: Histograms.h:46
def compute(min, max)
HLT enums.
step
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken_
Definition: Run.h:43