CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTCalibValidation.h
Go to the documentation of this file.
1 #ifndef DTCalibValidation_H
2 #define DTCalibValidation_H
3 
16 
22 
23 #include <string>
24 #include <map>
25 #include <vector>
26 
27 
28 // To remove into CMSSW versions before 20X
29 class DQMStore;
30 // To add into CMSSW versions before 20X
31 //class DaqMonitorBEInterface;
32 
33 class MonitorElement;
34 class DTGeometry;
35 class DTChamber;
36 
37 
39  public:
42 
44  virtual ~DTCalibValidation();
45 
47  void beginJob();
48 
50  void beginRun(const edm::Run&, const edm::EventSetup&);
51 
53  void endJob();
54 
55  // Operations
56  void analyze(const edm::Event& event, const edm::EventSetup& setup);
57 
58 
59  protected:
60 
61  private:
62 
63  // To remove into CMSSW versions before 20X
65  // To add into CMSSW versions before 20X
66  //DaqMonitorBEInterface* theDbe;
67 
68  // Switch for verbosity
69  //bool debug;
73  int nevent;
74  // the analysis type
76  // the geometry
78 
79  // Lable of 1D rechits in the event
81  // Lable of 2D segments in the event
83  // Lable of 4D segments in the event
85 
86  // Return a map between DTRecHit1DPair and wireId
87  std::map<DTWireId, std::vector<DTRecHit1DPair> >
88  map1DRecHitsPerWire(const DTRecHitCollection* dt1DRecHitPairs);
89 
90  // Return a map between DTRecHit1D and wireId
91  std::map<DTWireId, std::vector<DTRecHit1D> >
93 
94  // Return a map between DTRecHit1D and wireId
95  std::map<DTWireId, std::vector<DTRecHit1D> >
97 
98  template <typename type>
99  const type*
100  findBestRecHit(const DTLayer* layer,
101  DTWireId wireId,
102  const std::vector<type>& recHits,
103  const float simHitDist);
104 
105  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
106  float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer);
107  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
108  float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer);
109  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1DPair
110  float recHitPosition(const DTRecHit1DPair& hitPair, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
111  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1D
112  float recHitPosition(const DTRecHit1D& recHit, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
113 
114  // Does the real job
115  template <typename type>
116  void compute(const DTGeometry *dtGeom,
117  const DTRecSegment4D& segment,
118  const std::map<DTWireId, std::vector<type> >& recHitsPerWire,
119  int step);
120 
121  // Book a set of histograms for a give chamber
122  void bookHistos(DTSuperLayerId slId, int step);
123  // Fill a set of histograms for a give chamber
124  void fillHistos(DTSuperLayerId slId,
125  float distance,
126  float residualOnDistance,
127  float position,
128  float residualOnPosition,
129  int step);
130 
131  std::map<std::pair<DTSuperLayerId,int>, std::vector<MonitorElement*> > histosPerSL;
132 
133 };
134 #endif
135 
136 
137 
138 
139 /* Local Variables: */
140 /* show-trailing-whitespace: t */
141 /* truncate-lines: t */
142 /* End: */
type
Definition: HCALResponse.h:21
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
void endJob()
Endjob.
void beginRun(const edm::Run &, const edm::EventSetup &)
BeginRun.
edm::ESHandle< DTGeometry > dtGeom
void beginJob()
BeginJob.
void compute(const DTGeometry *dtGeom, const DTRecSegment4D &segment, const std::map< DTWireId, std::vector< type > > &recHitsPerWire, int step)
std::map< std::pair< DTSuperLayerId, int >, std::vector< MonitorElement * > > histosPerSL
edm::EDGetTokenT< DTRecSegment4DCollection > segment4DToken_
std::map< DTWireId, std::vector< DTRecHit1DPair > > map1DRecHitsPerWire(const DTRecHitCollection *dt1DRecHitPairs)
void fillHistos(DTSuperLayerId slId, float distance, float residualOnDistance, float position, float residualOnPosition, int step)
void analyze(const edm::Event &event, const edm::EventSetup &setup)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
virtual ~DTCalibValidation()
Destructor.
edm::EDGetTokenT< DTRecHitCollection > recHits1DToken_
void bookHistos(DTSuperLayerId slId, int step)
static int position[264][3]
Definition: ReadPGInfo.cc:509
DTCalibValidation(const edm::ParameterSet &pset)
Constructor.
edm::ParameterSet parameters
float recHitPosition(const DTRecHit1DPair &hitPair, const DTLayer *layer, const DTChamber *chamber, float segmPos, int sl)
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Definition: Run.h:41
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_