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 
18 
24 
25 #include <string>
26 #include <map>
27 #include <vector>
28 
29 
30 // To remove into CMSSW versions before 20X
31 class DQMStore;
32 // To add into CMSSW versions before 20X
33 //class DaqMonitorBEInterface;
34 
35 class MonitorElement;
36 class DTGeometry;
37 class DTChamber;
38 
39 
41  public:
44 
46  virtual ~DTCalibValidation();
47 
49  void beginJob();
50 
52  void beginRun(const edm::Run&, const edm::EventSetup&);
53 
55  void endJob();
56 
57  // Operations
58  void analyze(const edm::Event& event, const edm::EventSetup& setup);
59 
60 
61  protected:
62 
63  private:
64 
65  // To remove into CMSSW versions before 20X
67  // To add into CMSSW versions before 20X
68  //DaqMonitorBEInterface* theDbe;
69 
70  // Switch for verbosity
71  //bool debug;
75  int nevent;
76  // the analysis type
78  // the geometry
80 
81  // Lable of 1D rechits in the event
83  // Lable of 2D segments in the event
85  // Lable of 4D segments in the event
87 
88  // Return a map between DTRecHit1DPair and wireId
89  std::map<DTWireId, std::vector<DTRecHit1DPair> >
90  map1DRecHitsPerWire(const DTRecHitCollection* dt1DRecHitPairs);
91 
92  // Return a map between DTRecHit1D and wireId
93  std::map<DTWireId, std::vector<DTRecHit1D> >
95 
96  // Return a map between DTRecHit1D and wireId
97  std::map<DTWireId, std::vector<DTRecHit1D> >
99 
100  template <typename type>
101  const type*
102  findBestRecHit(const DTLayer* layer,
103  DTWireId wireId,
104  const std::vector<type>& recHits,
105  const float simHitDist);
106 
107  // Compute the distance from wire (cm) of a hits in a DTRecHit1DPair
108  float recHitDistFromWire(const DTRecHit1DPair& hitPair, const DTLayer* layer);
109  // Compute the distance from wire (cm) of a hits in a DTRecHit1D
110  float recHitDistFromWire(const DTRecHit1D& recHit, const DTLayer* layer);
111  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1DPair
112  float recHitPosition(const DTRecHit1DPair& hitPair, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
113  // Compute the position with respect to the wire (cm) of a hits in a DTRecHit1D
114  float recHitPosition(const DTRecHit1D& recHit, const DTLayer* layer, const DTChamber* chamber, float segmPos, int sl);
115 
116  // Does the real job
117  template <typename type>
118  void compute(const DTGeometry *dtGeom,
119  const DTRecSegment4D& segment,
120  std::map<DTWireId, std::vector<type> > recHitsPerWire,
121  int step);
122 
123  // Book a set of histograms for a give chamber
124  void bookHistos(DTSuperLayerId slId, int step);
125  // Fill a set of histograms for a give chamber
126  void fillHistos(DTSuperLayerId slId,
127  float distance,
128  float residualOnDistance,
129  float position,
130  float residualOnPosition,
131  int step);
132 
133  std::map<std::pair<DTSuperLayerId,int>, std::vector<MonitorElement*> > histosPerSL;
134 
135 };
136 #endif
137 
138 
139 
type
Definition: HCALResponse.h:21
float recHitDistFromWire(const DTRecHit1DPair &hitPair, const DTLayer *layer)
void endJob()
Endjob.
static int position[TOTALCHAMBERS][3]
Definition: ReadPGInfo.cc:509
dictionary map
Definition: Association.py:205
void beginRun(const edm::Run &, const edm::EventSetup &)
BeginRun.
edm::ESHandle< DTGeometry > dtGeom
void beginJob()
BeginJob.
void compute(const DTGeometry *dtGeom, const DTRecSegment4D &segment, std::map< DTWireId, std::vector< type > > recHitsPerWire, int step)
std::map< std::pair< DTSuperLayerId, int >, std::vector< MonitorElement * > > histosPerSL
std::string recHits1DLabel
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.
std::string segment2DLabel
void bookHistos(DTSuperLayerId slId, int step)
DTCalibValidation(const edm::ParameterSet &pset)
Constructor.
std::string segment4DLabel
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:36
const type * findBestRecHit(const DTLayer *layer, DTWireId wireId, const std::vector< type > &recHits, const float simHitDist)