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