test
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 
2 #ifndef DTCalibValidation_H
3 #define DTCalibValidation_H
4 
17 
21 
27 
28 #include <string>
29 #include <map>
30 #include <vector>
31 
32 
33 // To remove into CMSSW versions before 20X
34 class DQMStore;
35 // To add into CMSSW versions before 20X
36 //class DaqMonitorBEInterface;
37 
38 class MonitorElement;
39 class DTGeometry;
40 class DTChamber;
41 
42 // FR class DTCalibValidation: public edm::EDAnalyzer{
44 
45  public:
48 
50  virtual ~DTCalibValidation();
51 
53  void dqmBeginRun(const edm::Run& r, const edm::EventSetup& c) ;
54 
55  // Operations
56  void analyze(const edm::Event& event, const edm::EventSetup& setup);
57 
58 
59  protected:
60  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &);
61 
62 
63  private:
64 
65  // Switch for verbosity
66  //bool debug;
70  int nevent;
71  // the analysis type
73  // the geometry
75 
76  // Lable of 1D rechits in the event
78  // Lable of 2D segments in the event
80  // Lable of 4D segments in the event
82 
83  // Return a map between DTRecHit1DPair and wireId
84  std::map<DTWireId, std::vector<DTRecHit1DPair> >
85  map1DRecHitsPerWire(const DTRecHitCollection* dt1DRecHitPairs);
86 
87  // Return a map between DTRecHit1D and wireId
88  std::map<DTWireId, std::vector<DTRecHit1D> >
90 
91  // Return a map between DTRecHit1D and wireId
92  std::map<DTWireId, std::vector<DTRecHit1D> >
94 
95  template <typename type>
96  const type*
97  findBestRecHit(const DTLayer* layer,
98  DTWireId wireId,
99  const std::vector<type>& recHits,
100  const float simHitDist);
101 
102  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
103  float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer);
104  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
105  float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer);
106  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1DPair
107  float recHitPosition(const DTRecHit1DPair& hitPair, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
108  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1D
109  float recHitPosition(const DTRecHit1D& recHit, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
110 
111  // Does the real job
112  template <typename type>
113  void compute(const DTGeometry *dtGeom,
114  const DTRecSegment4D& segment,
115  const std::map<DTWireId, std::vector<type> >& recHitsPerWire,
116  int step);
117 
118  // Book a set of histograms for a give chamber
119  void bookHistos(DTSuperLayerId slId, int step);
120  // Fill a set of histograms for a give chamber
121  void fillHistos(DTSuperLayerId slId,
122  float distance,
123  float residualOnDistance,
124  float position,
125  float residualOnPosition,
126  int step);
127 
128  std::map<std::pair<DTSuperLayerId,int>, std::vector<MonitorElement*> > histosPerSL;
129 
130 };
131 #endif
132 
133 
134 /* Local Variables: */
135 /* show-trailing-whitespace: t */
136 /* truncate-lines: t */
137 /* End: */
type
Definition: HCALResponse.h:21
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &)
edm::ESHandle< DTGeometry > dtGeom
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
void dqmBeginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
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:43
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)
edm::EDGetTokenT< DTRecSegment2DCollection > segment2DToken_