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