CMS 3D CMS Logo

DTCalibValidation.h
Go to the documentation of this file.
1 
2 #ifndef DTCalibValidation_H
3 #define DTCalibValidation_H
4 
17 
20 
26 
28 
29 #include <string>
30 #include <map>
31 #include <vector>
32 
33 // To remove into CMSSW versions before 20X
34 // To add into CMSSW versions before 20X
35 //class DaqMonitorBEInterface;
36 
37 class DTGeometry;
38 class DTChamber;
39 
40 // FR class DTCalibValidation: public edm::EDAnalyzer{
42 public:
45 
47  ~DTCalibValidation() override;
48 
50  void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) override;
51 
52  // Operations
53  void analyze(const edm::Event& event, const edm::EventSetup& setup) override;
54 
55 protected:
56  void bookHistograms(DQMStore::IBooker&, edm::Run const&, edm::EventSetup const&) override;
57 
58 private:
59  // Switch for verbosity
60  //bool debug;
64  int nevent;
65  // the analysis type
67  // the geometry
70 
71  // Lable of 1D rechits in the event
73  // Lable of 2D segments in the event
75  // Lable of 4D segments in the event
77 
78  // Return a map between DTRecHit1DPair and wireId
79  std::map<DTWireId, std::vector<DTRecHit1DPair> > map1DRecHitsPerWire(const DTRecHitCollection* dt1DRecHitPairs);
80 
81  // Return a map between DTRecHit1D and wireId
82  std::map<DTWireId, std::vector<DTRecHit1D> > map1DRecHitsPerWire(const DTRecSegment2DCollection* segment2Ds);
83 
84  // Return a map between DTRecHit1D and wireId
85  std::map<DTWireId, std::vector<DTRecHit1D> > map1DRecHitsPerWire(const DTRecSegment4DCollection* segment4Ds);
86 
87  template <typename type>
88  const type* findBestRecHit(const DTLayer* layer,
89  DTWireId wireId,
90  const std::vector<type>& recHits,
91  const float simHitDist);
92 
93  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
94  float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer);
95  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
96  float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer);
97  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1DPair
98  float recHitPosition(
99  const DTRecHit1DPair& hitPair, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
100  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1D
101  float recHitPosition(const DTRecHit1D& recHit, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
102 
103  // Does the real job
104  template <typename type>
105  void compute(const DTGeometry* dtGeom,
106  const DTRecSegment4D& segment,
107  const std::map<DTWireId, std::vector<type> >& recHitsPerWire,
108  int step);
109 
110  // Book a set of histograms for a give chamber
111  void bookHistos(DTSuperLayerId slId, int step);
112  // Fill a set of histograms for a give chamber
113  void fillHistos(DTSuperLayerId slId,
114  float distance,
115  float residualOnDistance,
116  float position,
117  float residualOnPosition,
118  int step);
119 
120  std::map<std::pair<DTSuperLayerId, int>, std::vector<MonitorElement*> > histosPerSL;
121 };
122 #endif
123 
124 /* Local Variables: */
125 /* show-trailing-whitespace: t */
126 /* truncate-lines: t */
127 /* End: */
DTRecSegment2DCollection.h
DTGeometry
Definition: DTGeometry.h:28
DTSuperLayerId
Definition: DTSuperLayerId.h:12
DTRecSegment4D
Definition: DTRecSegment4D.h:23
ESHandle.h
DTRecHitCollection.h
step
step
Definition: StallMonitor.cc:94
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< DTRecHitCollection >
LuminosityBlock.h
DTCalibValidation::segment2DToken_
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_
Definition: DTCalibValidation.h:74
DTChamber
Definition: DTChamber.h:24
DTRecHit1D
Definition: DTRecHit1D.h:25
DQMStore.h
EDAnalyzer.h
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
DTCalibValidation::compute
void compute(const DTGeometry *dtGeom, const DTRecSegment4D &segment, const std::map< DTWireId, std::vector< type > > &recHitsPerWire, int step)
Definition: DTCalibValidation.cc:241
DTCalibValidation::bookHistograms
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: DTCalibValidation.cc:374
DTRecHitCollection
DTWireId
Definition: DTWireId.h:12
DTCalibValidation::~DTCalibValidation
~DTCalibValidation() override
Destructor.
Definition: DTCalibValidation.cc:55
DTRecHit1DPair
Definition: DTRecHit1DPair.h:26
DTRecSegment4DCollection
DQMEDAnalyzer.h
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
DTCalibValidation::map1DRecHitsPerWire
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
Definition: DTCalibValidation.cc:115
DTCalibValidation::fillHistos
void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance, float position, float residualOnPosition, int step)
Definition: DTCalibValidation.cc:455
FastTrackerRecHitMaskProducer_cfi.recHits
recHits
Definition: FastTrackerRecHitMaskProducer_cfi.py:8
DQMEDAnalyzer
Definition: DQMEDAnalyzer.py:1
edm::ParameterSet
Definition: ParameterSet.h:47
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
DTCalibValidation::segment4DToken_
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
Definition: DTCalibValidation.h:76
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
DTCalibValidation::muonGeomToken_
edm::ESGetToken< DTGeometry, MuonGeometryRecord > muonGeomToken_
Definition: DTCalibValidation.h:68
DTCalibValidation::analyze
void analyze(const edm::Event &event, const edm::EventSetup &setup) override
Definition: DTCalibValidation.cc:67
DTCalibValidation::nevent
int nevent
Definition: DTCalibValidation.h:64
edm::EventSetup
Definition: EventSetup.h:58
DTCalibValidation::DTCalibValidation
DTCalibValidation(const edm::ParameterSet &pset)
Constructor.
Definition: DTCalibValidation.cc:30
edm::ESGetToken< DTGeometry, MuonGeometryRecord >
DTCalibValidation::parameters
edm::ParameterSet parameters
Definition: DTCalibValidation.h:61
DTLayer
Definition: DTLayer.h:25
alignCSCRings.r
r
Definition: alignCSCRings.py:93
DTCalibValidation::bookHistos
void bookHistos(DTSuperLayerId slId, int step)
DTCalibValidation::detailedAnalysis
bool detailedAnalysis
Definition: DTCalibValidation.h:66
DTCalibValidation::dqmBeginRun
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c) override
BeginRun.
Definition: DTCalibValidation.cc:62
DTWireId.h
DTCalibValidation::histosPerSL
std::map< std::pair< DTSuperLayerId, int >, std::vector< MonitorElement * > > histosPerSL
Definition: DTCalibValidation.h:120
Frameworkfwd.h
DTCalibValidation::wrongSegment
int wrongSegment
Definition: DTCalibValidation.h:62
DTCalibValidation::recHits1DToken_
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
Definition: DTCalibValidation.h:72
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
dqm::implementation::IBooker
Definition: DQMStore.h:43
DTCalibValidation::rightSegment
int rightSegment
Definition: DTCalibValidation.h:63
genParticles_cff.map
map
Definition: genParticles_cff.py:11
ParameterSet.h
DTSuperLayerId.h
MuonGeometryRecord.h
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:56
event
Definition: event.py:1
edm::Event
Definition: Event.h:73
HLT_FULL_cff.distance
distance
Definition: HLT_FULL_cff.py:7746
DTCalibValidation::dtGeom
const DTGeometry * dtGeom
Definition: DTCalibValidation.h:69
DTCalibValidation::findBestRecHit
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
Definition: DTCalibValidation.cc:170
DTCalibValidation::recHitDistFromWire
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
Definition: DTCalibValidation.cc:189
DTCalibValidation::recHitPosition
float recHitPosition(const DTRecHit1DPair &hitPair, const DTLayer *layer, const DTChamber *chamber, float segmPos, int sl)
Definition: DTCalibValidation.cc:199
DTRecSegment2DCollection
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
DTCalibValidation
Definition: DTCalibValidation.h:41
DTRecSegment4DCollection.h