test
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 
25 
38 
44 
50 
52 
55 
61 
69 
71 public:
72 
74  virtual ~CSCOfflineMonitor() { };
75 
76  virtual void beginRun( edm::Run const &, edm::EventSetup const & );
77  virtual void endRun( edm::Run const &, edm::EventSetup const & ) ; // call finialize()
78  virtual void endJob() ; // call finalize()
79  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
80 
81  void bookTheHists();
82  void finalize();
83 
85  enum AxisType {X=1, Y=2, Z=3};
86 
87 private:
88 
90 
92 
100 
101  // modules
116 
117 
118  // used by modules:
119  float fitX(const CLHEP::HepMatrix& sp, const CLHEP::HepMatrix& ep);
120  float getSignal(const CSCStripDigiCollection& stripdigis, CSCDetId idRH, int centerStrip);
121  int typeIndex(CSCDetId id, int flag = 1);
122  int chamberSerial(CSCDetId id);
124 
125  // for efficiency calculation
126  // these functions handle Stoyan's efficiency code
127  void fillEfficiencyHistos(int bin, int flag);
128  void getEfficiency(float bin, float Norm, std::vector<float> &eff);
129  void histoEfficiency(TH1F *readHisto, MonitorElement *writeHisto);
130  double lineParametrization(double z1Position, double z2Position, double z1Direction){
131  double parameterLine = (z2Position-z1Position)/z1Direction;
132  return parameterLine;
133  }
134  double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine){
135  double extrapolatedPosition = initPosition + initDirection*parameterOfTheLine;
136  return extrapolatedPosition;
137  }
138  bool withinSensitiveRegion(LocalPoint localPos, const std::array<const float, 4> & layerBounds,
139  int station, int ring, float shiftFromEdge, float shiftFromDeadZone);
140 
141  // for BX monitor plots
142  void harvestChamberMeans(MonitorElement* meMean1D, MonitorElement *meMean2D, MonitorElement *hNum, MonitorElement *meDenom);
143  void normalize(MonitorElement* me);
144 
145  // DQM
147 
148  // Wire digis
150  std::vector<MonitorElement*> hWireTBin;
151  std::vector<MonitorElement*> hWireNumber;
152 
153  // Strip Digis
155  std::vector<MonitorElement*> hStripNumber;
156  std::vector<MonitorElement*> hStripPed;
157 
158  // recHits
160  std::vector<MonitorElement*> hRHGlobal;
161  std::vector<MonitorElement*> hRHSumQ;
162  std::vector<MonitorElement*> hRHTiming;
163  std::vector<MonitorElement*> hRHTimingAnode;
164  std::vector<MonitorElement*> hRHRatioQ;
165  std::vector<MonitorElement*> hRHstpos;
166  std::vector<MonitorElement*> hRHsterr;
167 
168  // Segments
171  std::vector<MonitorElement*> hSnhits;
173  std::vector<MonitorElement*> hSChiSq;
175  std::vector<MonitorElement*> hSChiSqProb;
182 
183  // Resolution
184  std::vector<MonitorElement*> hSResid;
185 
186  // occupancy histos
198 
199  // Efficiency
215 
216  // BX monitor
223 
230 
237 
238 
239 };
240 #endif
MonitorElement * hEffDenominator
void harvestChamberMeans(MonitorElement *meMean1D, MonitorElement *meMean2D, MonitorElement *hNum, MonitorElement *meDenom)
MonitorElement * hOSegmentsSerial
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
void doPedestalNoise(edm::Handle< CSCStripDigiCollection > strips)
MonitorElement * hOWireSerial
MonitorElement * hSensitiveAreaEvt
MonitorElement * hOStrips
MonitorElement * hRHSTE
int chamberSerial(CSCDetId id)
MonitorElement * hWireEff2
MonitorElement * hORecHits
MonitorElement * hStripSTE2
void histoEfficiency(TH1F *readHisto, MonitorElement *writeHisto)
MonitorElement * hStripReadoutEff2
void doResolution(edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
MonitorElement * hRHEff
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
MonitorElement * hALCTMatch2DNumerator
std::vector< MonitorElement * > hRHGlobal
MonitorElement * hORecHitsSerial
std::vector< MonitorElement * > hSChiSq
float getSignal(const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip)
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
MonitorElement * hWirenGroupsTotal
MonitorElement * hCLCTL1ASerial
MonitorElement * hOStripSerial
edm::ParameterSet param
MonitorElement * hSSTE2
MonitorElement * hSSTE
std::vector< MonitorElement * > hWireNumber
MonitorElement * hALCTgetBXChamberMeans
MonitorElement * hWireSTE2
MonitorElement * hALCTMatch2DMeans
virtual void endRun(edm::Run const &, edm::EventSetup const &)
MonitorElement * hSGlobalPhi
std::vector< MonitorElement * > hSnhits
CSCOfflineMonitor(const edm::ParameterSet &pset)
MonitorElement * hOWires
MonitorElement * hSnSegments
std::vector< MonitorElement * > hRHSumQ
MonitorElement * hOStripsAndWiresAndCLCT
void normalize(MonitorElement *me)
MonitorElement * hOSegments
edm::EDGetTokenT< FEDRawDataCollection > rd_token
std::vector< MonitorElement * > hStripPed
MonitorElement * hALCTMatchSerial
int typeIndex(CSCDetId id, int flag=1)
MonitorElement * hSnhitsAll
float fitX(const CLHEP::HepMatrix &sp, const CLHEP::HepMatrix &ep)
MonitorElement * hCLCTL1AChamberMeans
std::vector< MonitorElement * > hRHTiming
MonitorElement * hALCTgetBX
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
MonitorElement * hALCTMatch
MonitorElement * hSGlobalTheta
MonitorElement * hSTimeCombined
MonitorElement * hOWiresAndCLCT
std::vector< MonitorElement * > hRHsterr
void fillEfficiencyHistos(int bin, int flag)
MonitorElement * hCLCTL1A2Denominator
virtual ~CSCOfflineMonitor()
MonitorElement * hALCTgetBX2Denominator
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
edm::EDGetTokenT< CSCSegmentCollection > se_token
void getEfficiency(float bin, float Norm, std::vector< float > &eff)
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
MonitorElement * hSTimeVsZ
void doSegments(edm::Handle< CSCSegmentCollection > cscSegments, edm::ESHandle< CSCGeometry > cscGeom)
void analyze(const edm::Event &event, const edm::EventSetup &eventSetup)
MonitorElement * hRHSTE2
MonitorElement * hALCTgetBX2DMeans
MonitorElement * hSEff2
MonitorElement * hSChiSqAll
MonitorElement * hCSCOccupancy
virtual void endJob()
MonitorElement * hCLCTL1A2DNumerator
void doWireDigis(edm::Handle< CSCWireDigiCollection > wires)
MonitorElement * hSEff
MonitorElement * hALCTgetBX2DNumerator
std::vector< MonitorElement * > hStripNumber
MonitorElement * hALCTMatch2Denominator
MonitorElement * hRHEff2
MonitorElement * hALCTMatchChamberMeans
std::vector< MonitorElement * > hWireTBin
MonitorElement * hCLCTL1A
bool withinSensitiveRegion(LocalPoint localPos, const std::array< const float, 4 > &layerBounds, int station, int ring, float shiftFromEdge, float shiftFromDeadZone)
void doBXMonitor(edm::Handle< CSCALCTDigiCollection > alcts, edm::Handle< CSCCLCTDigiCollection > clcts, const edm::Event &event, const edm::EventSetup &eventSetup)
MonitorElement * hSTimeCathode
double a
Definition: hdecay.h:121
std::vector< MonitorElement * > hRHstpos
void doStripDigis(edm::Handle< CSCStripDigiCollection > strips)
MonitorElement * hStripNFired
std::vector< MonitorElement * > hSResid
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
MonitorElement * hStripEff2
MonitorElement * hALCTgetBXSerial
MonitorElement * hSTimeVsTOF
MonitorElement * hRHnrechits
double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine)
std::vector< MonitorElement * > hSChiSqProb
std::vector< MonitorElement * > hRHTimingAnode
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)
MonitorElement * hCLCTL1A2DMeans
void doOccupancies(edm::Handle< CSCStripDigiCollection > strips, edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCSegmentCollection > cscSegments, edm::Handle< CSCCLCTDigiCollection > clcts)
Definition: Run.h:41
MonitorElement * hSChiSqProbAll
void doRecHits(edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCStripDigiCollection > strips, edm::ESHandle< CSCGeometry > cscGeom)
std::vector< MonitorElement * > hRHRatioQ
void applyCSClabels(MonitorElement *meHisto, LabelType t, AxisType a)