CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CSCOfflineMonitor.h
Go to the documentation of this file.
1 #ifndef RecoLocalMuon_CSCOfflineMonitor_H
2 #define RecoLocalMuon_CSCOfflineMonitor_H
3 
16 // user include files
29 
38 
44 
50 
52 
55 
57 public:
60 
62  virtual ~CSCOfflineMonitor();
63 
64  // Operations
65  void beginJob(void);
66  void endJob(void);
67 
68 
70  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
71 
72 
73 protected:
74 
75 private:
76 
82 
83 
84  // some useful functions
85 
86  // modules:
99 
100  // used by modules:
101  float fitX(CLHEP::HepMatrix sp, CLHEP::HepMatrix ep);
102  float getSignal(const CSCStripDigiCollection& stripdigis, CSCDetId idRH, int centerStrip);
103  int typeIndex(CSCDetId id, int flag = 1);
104  int chamberSerial(CSCDetId id);
105 
106  // for efficiency calculation
107  // these functions handle Stoyan's efficiency code
108  void fillEfficiencyHistos(int bin, int flag);
109  void getEfficiency(float bin, float Norm, std::vector<float> &eff);
110  void histoEfficiency(TH1F *readHisto, MonitorElement *writeHisto);
111  double lineParametrization(double z1Position, double z2Position, double z1Direction){
112  double parameterLine = (z2Position-z1Position)/z1Direction;
113  return parameterLine;
114  }
115  double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine){
116  double extrapolatedPosition = initPosition + initDirection*parameterOfTheLine;
117  return extrapolatedPosition;
118  }
119  bool withinSensitiveRegion(LocalPoint localPos, const std::vector<float> layerBounds,
120  int station, int ring, float shiftFromEdge, float shiftFromDeadZone);
121 
122 
123 
124  // DQM
126 
127  // Wire digis
129  std::vector<MonitorElement*> hWireTBin;
130  std::vector<MonitorElement*> hWireNumber;
131 
132  // Strip Digis
134  std::vector<MonitorElement*> hStripNumber;
135  std::vector<MonitorElement*> hStripPed;
136 
137  // recHits
139  std::vector<MonitorElement*> hRHGlobal;
140  std::vector<MonitorElement*> hRHSumQ;
141  std::vector<MonitorElement*> hRHTiming;
142  std::vector<MonitorElement*> hRHRatioQ;
143  std::vector<MonitorElement*> hRHstpos;
144  std::vector<MonitorElement*> hRHsterr;
145 
146  // Segments
149  std::vector<MonitorElement*> hSnhits;
151  std::vector<MonitorElement*> hSChiSq;
153  std::vector<MonitorElement*> hSChiSqProb;
156 
157  // Resolution
158  std::vector<MonitorElement*> hSResid;
159 
160  // occupancy histos
170 
171  // Efficiency
172  TH1F *hSSTE;
173  TH1F *hRHSTE;
176  TH2F *hSSTE2;
177  TH2F *hRHSTE2;
178  TH2F *hStripSTE2;
179  TH2F *hWireSTE2;
186 
187 
188 
189 };
190 #endif
MonitorElement * hOSegmentsSerial
void doPedestalNoise(edm::Handle< CSCStripDigiCollection > strips)
MonitorElement * hOWireSerial
long int flag
Definition: mlp_lapack.h:47
MonitorElement * hSensitiveAreaEvt
MonitorElement * hOStrips
int chamberSerial(CSCDetId id)
MonitorElement * hWireEff2
MonitorElement * hORecHits
void histoEfficiency(TH1F *readHisto, MonitorElement *writeHisto)
void doResolution(edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
MonitorElement * hRHEff
std::vector< MonitorElement * > hRHGlobal
MonitorElement * hORecHitsSerial
std::vector< MonitorElement * > hSChiSq
float getSignal(const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip)
MonitorElement * hWirenGroupsTotal
MonitorElement * hOStripSerial
edm::ParameterSet param
std::vector< MonitorElement * > hWireNumber
edm::InputTag cscSegTag_
MonitorElement * hSGlobalPhi
std::vector< MonitorElement * > hSnhits
CSCOfflineMonitor(const edm::ParameterSet &pset)
Constructor.
MonitorElement * hOWires
MonitorElement * hSnSegments
std::vector< MonitorElement * > hRHSumQ
MonitorElement * hOSegments
std::vector< MonitorElement * > hStripPed
int typeIndex(CSCDetId id, int flag=1)
MonitorElement * hSnhitsAll
std::vector< MonitorElement * > hRHTiming
MonitorElement * hSGlobalTheta
tuple pset
Definition: CrabTask.py:85
std::vector< MonitorElement * > hRHsterr
void fillEfficiencyHistos(int bin, int flag)
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 getEfficiency(float bin, float Norm, std::vector< float > &eff)
bool withinSensitiveRegion(LocalPoint localPos, const std::vector< float > layerBounds, int station, int ring, float shiftFromEdge, float shiftFromDeadZone)
void doSegments(edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
Perform the real analysis.
MonitorElement * hSEff2
void doOccupancies(edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments)
MonitorElement * hSChiSqAll
MonitorElement * hCSCOccupancy
void doWireDigis(edm::Handle< CSCWireDigiCollection > wires)
edm::InputTag stripDigiTag_
MonitorElement * hSEff
std::vector< MonitorElement * > hStripNumber
MonitorElement * hRHEff2
float fitX(CLHEP::HepMatrix sp, CLHEP::HepMatrix ep)
std::vector< MonitorElement * > hWireTBin
std::vector< MonitorElement * > hRHstpos
void doStripDigis(edm::Handle< CSCStripDigiCollection > strips)
MonitorElement * hStripNFired
edm::InputTag wireDigiTag_
std::vector< MonitorElement * > hSResid
MonitorElement * hStripEff2
MonitorElement * hRHnrechits
edm::InputTag cscRecHitTag_
double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine)
std::vector< MonitorElement * > hSChiSqProb
double lineParametrization(double z1Position, double z2Position, double z1Direction)
void doEfficiencies(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
virtual ~CSCOfflineMonitor()
Destructor.
MonitorElement * hSChiSqProbAll
void doRecHits(edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCStripDigiCollection > strips, edm::ESHandle< CSCGeometry > cscGeom)
std::vector< MonitorElement * > hRHRatioQ