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  //Get DT Geometry
68 
69  // Root file name
74  ;
75 
80 
81  // Switches for analysis at various steps
82  bool doStep1_;
83  bool doStep2_;
84  bool doStep3_;
85  bool local_;
86  bool doall_;
87 
88  // Return a map between DTRecHit1DPair and wireId
89  std::map<DTWireId, std::vector<DTRecHit1DPair>> map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs) const;
90 
91  // Return a map between DTRecHit1D and wireId
92  std::map<DTWireId, std::vector<DTRecHit1D>> map1DRecHitsPerWire(const DTRecSegment2DCollection *segment2Ds) const;
93 
94  // Return a map between DTRecHit1D and wireId
95  std::map<DTWireId, std::vector<DTRecHit1D>> map1DRecHitsPerWire(const DTRecSegment4DCollection *segment4Ds) const;
96 
97  // Compute SimHit distance from wire (cm)
98  float simHitDistFromWire(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const;
99 
100  // Compute SimHit impact angle (in direction perp to wire)
101  float simHitImpactAngle(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const;
102 
103  // Compute SimHit distance from FrontEnd
104  float simHitDistFromFE(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const;
105 
106  // Find the RecHit closest to the muon SimHit
107  // const DTRecHit1DPair*
108  // findBestRecHit(const DTLayer* layer,
109  // DTWireId wireId,
110  // const std::vector<DTRecHit1DPair>& recHits,
111  // const float simHitDist) const;
112  template <typename type>
113  const type *findBestRecHit(const DTLayer *layer,
114  const DTWireId &wireId,
115  const std::vector<type> &recHits,
116  float simHitDist) const;
117 
118  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
119  float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer) const;
120  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
121  float recHitDistFromWire(const DTRecHit1D &recHit, const DTLayer *layer) const;
122 
123  // Return the error on the measured (cm) coordinate
124  float recHitPositionError(const DTRecHit1DPair &recHit) const;
125  float recHitPositionError(const DTRecHit1D &recHit) const;
126 
127  // Does the real job
128  template <typename type>
129  void compute(const DTGeometry &dtGeom,
130  const std::map<DTWireId, std::vector<PSimHit>> &simHitsPerWire,
131  const std::map<DTWireId, std::vector<type>> &recHitsPerWire,
133  int step) const;
134 };
135 
136 #endif // Validation_DTRecHits_DTRecHitQuality_h
DTRecSegment2DCollection.h
DTGeometry
Definition: DTGeometry.h:28
DTRecHitQuality::recHitDistFromWire
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer) const
Definition: DTRecHitQuality.cc:403
DTRecHitQuality::simHitToken_
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken_
Definition: DTRecHitQuality.h:70
DTRecHitCollection.h
DTRecHitQuality::segment2DLabel_
edm::InputTag segment2DLabel_
Definition: DTRecHitQuality.h:78
step
step
Definition: StallMonitor.cc:94
DTRecHitQuality::debug_
bool debug_
Definition: DTRecHitQuality.h:64
edm::Run
Definition: Run.h:45
HEff1DHit
A set of histograms fo efficiency computation for 1D RecHits (producer)
Definition: Histograms.h:138
edm::EDGetTokenT< edm::PSimHitContainer >
DTRecHitQuality::simHitImpactAngle
float simHitImpactAngle(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
Definition: DTRecHitQuality.cc:364
edm
HLT enums.
Definition: AlignableModifier.h:19
DTRecHitQuality::doall_
bool doall_
Definition: DTRecHitQuality.h:86
PSimHitContainer.h
DTRecHitQuality::DTRecHitQuality
DTRecHitQuality(const edm::ParameterSet &pset)
Constructor.
Definition: DTRecHitQuality.cc:87
DTRecHit1D
Definition: DTRecHit1D.h:25
DTRecHitQuality::compute
void compute(const DTGeometry &dtGeom, const std::map< DTWireId, std::vector< PSimHit >> &simHitsPerWire, const std::map< DTWireId, std::vector< type >> &recHitsPerWire, dtrechit::Histograms const &histograms, int step) const
Definition: DTRecHitQuality.cc:414
DTRecHitQuality::recHitLabel_
edm::InputTag recHitLabel_
Definition: DTRecHitQuality.h:77
DTRecHitQuality::simHitLabel_
edm::InputTag simHitLabel_
Definition: DTRecHitQuality.h:74
DTRecHitQuality::segment2DToken_
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_
Definition: DTRecHitQuality.h:72
dtrechit
Definition: DTRecHitQuality.cc:23
DTRecHitQuality
Definition: DTRecHitQuality.h:47
DTRecHitQuality::recHitToken_
edm::EDGetTokenT< DTRecHitCollection > recHitToken_
Definition: DTRecHitQuality.h:71
DTRecHitQuality::segment4DToken_
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
Definition: DTRecHitQuality.h:73
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
DTRecHitQuality::doStep1_
bool doStep1_
Definition: DTRecHitQuality.h:82
DTRecHitCollection
DTWireId
Definition: DTWireId.h:12
DTRecHitQuality::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &, dtrechit::Histograms &) const override
Book the DQM plots.
Definition: DTRecHitQuality.cc:110
DTRecHitQuality::recHitPositionError
float recHitPositionError(const DTRecHit1DPair &recHit) const
Definition: DTRecHitQuality.cc:697
DTRecHit1DPair
Definition: DTRecHit1DPair.h:26
Event
DTRecSegment4DCollection
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
DTRecHitQuality::map1DRecHitsPerWire
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs) const
Definition: DTRecHitQuality.cc:302
HRes1DHit
A set of histograms of residuals and pulls for 1D RecHits.
Definition: Histograms.h:44
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
DTRecHitQuality::dqmAnalyze
void dqmAnalyze(edm::Event const &, edm::EventSetup const &, dtrechit::Histograms const &) const override
Perform the real analysis.
Definition: DTRecHitQuality.cc:211
DTRecHitQuality::doStep3_
bool doStep3_
Definition: DTRecHitQuality.h:84
DTRecHitQuality::local_
bool local_
Definition: DTRecHitQuality.h:85
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
edm::EventSetup
Definition: EventSetup.h:58
DTRecHitQuality::doStep2_
bool doStep2_
Definition: DTRecHitQuality.h:83
histograms
Definition: histograms.py:1
edm::ESGetToken< DTGeometry, MuonGeometryRecord >
DTLayer
Definition: DTLayer.h:25
InputTag.h
DTRecHitQuality::muonGeomToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Definition: DTRecHitQuality.h:67
DTWireId.h
DTRecHitQuality::simHitDistFromFE
float simHitDistFromFE(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
Definition: DTRecHitQuality.cc:372
DTRecHitQuality::simHitDistFromWire
float simHitDistFromWire(const DTLayer *layer, const DTWireId &wireId, const PSimHit &hit) const
Definition: DTRecHitQuality.cc:353
dtrechit::Histograms
Definition: DTRecHitQuality.cc:24
DTRecHitQuality::segment4DLabel_
edm::InputTag segment4DLabel_
Definition: DTRecHitQuality.h:79
dqm::implementation::IBooker
Definition: DQMStore.h:43
DQMGlobalEDAnalyzer
Definition: DQMGlobalEDAnalyzer.h:76
genParticles_cff.map
map
Definition: genParticles_cff.py:11
EventSetup
PSimHit
Definition: PSimHit.h:15
MuonGeometryRecord.h
edm::Event
Definition: Event.h:73
DTRecHitQuality::findBestRecHit
const type * findBestRecHit(const DTLayer *layer, const DTWireId &wireId, const std::vector< type > &recHits, float simHitDist) const
Definition: DTRecHitQuality.cc:384
edm::InputTag
Definition: InputTag.h:15
DTRecSegment2DCollection
hit
Definition: SiStripHitEffFromCalibTree.cc:88
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DTRecSegment4DCollection.h
DQMGlobalEDAnalyzer.h