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 
42 
48 
54 
56 
59 
65 
73 
75 public:
78 
80  virtual ~CSCOfflineMonitor();
81 
82  // Operations
83  void beginJob(void);
84  void finalize();
85  virtual void beginRun( edm::Run const &, edm::EventSetup const & ) {finalizedHistograms_ = false;};
86  virtual void endRun( edm::Run const &, edm::EventSetup const & ) ; // call finialize()
87  virtual void endJob() ; // call finalize()
88 
89 
90 
92  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
93 
95  enum AxisType {X=1, Y=2, Z=3};
96 
97 
98 protected:
99 
100 private:
101 
103 
112 
113  // some useful functions
114 
115  // modules:
130 
131 
132  // used by modules:
133  float fitX(const CLHEP::HepMatrix& sp, const CLHEP::HepMatrix& ep);
134  float getSignal(const CSCStripDigiCollection& stripdigis, CSCDetId idRH, int centerStrip);
135  int typeIndex(CSCDetId id, int flag = 1);
136  int chamberSerial(CSCDetId id);
138  // for efficiency calculation
139  // these functions handle Stoyan's efficiency code
140  void fillEfficiencyHistos(int bin, int flag);
141  void getEfficiency(float bin, float Norm, std::vector<float> &eff);
142  void histoEfficiency(TH1F *readHisto, MonitorElement *writeHisto);
143  double lineParametrization(double z1Position, double z2Position, double z1Direction){
144  double parameterLine = (z2Position-z1Position)/z1Direction;
145  return parameterLine;
146  }
147  double extrapolate1D(double initPosition, double initDirection, double parameterOfTheLine){
148  double extrapolatedPosition = initPosition + initDirection*parameterOfTheLine;
149  return extrapolatedPosition;
150  }
151  bool withinSensitiveRegion(LocalPoint localPos, const std::array<const float, 4> & layerBounds,
152  int station, int ring, float shiftFromEdge, float shiftFromDeadZone);
153 
154  // for BX monitor plots
155  void harvestChamberMeans(MonitorElement* meMean1D, MonitorElement *meMean2D, MonitorElement *hNum, MonitorElement *meDenom);
156  void normalize(MonitorElement* me);
157 
158  // DQM
160 
161  // Wire digis
163  std::vector<MonitorElement*> hWireTBin;
164  std::vector<MonitorElement*> hWireNumber;
165 
166  // Strip Digis
168  std::vector<MonitorElement*> hStripNumber;
169  std::vector<MonitorElement*> hStripPed;
170 
171  // recHits
173  std::vector<MonitorElement*> hRHGlobal;
174  std::vector<MonitorElement*> hRHSumQ;
175  std::vector<MonitorElement*> hRHTiming;
176  std::vector<MonitorElement*> hRHTimingAnode;
177  std::vector<MonitorElement*> hRHRatioQ;
178  std::vector<MonitorElement*> hRHstpos;
179  std::vector<MonitorElement*> hRHsterr;
180 
181  // Segments
184  std::vector<MonitorElement*> hSnhits;
186  std::vector<MonitorElement*> hSChiSq;
188  std::vector<MonitorElement*> hSChiSqProb;
195 
196  // Resolution
197  std::vector<MonitorElement*> hSResid;
198 
199  // occupancy histos
211 
212  // Efficiency
228 
229  // BX monitor
236 
243 
250 
251 
252 };
253 #endif
MonitorElement * hEffDenominator
void harvestChamberMeans(MonitorElement *meMean1D, MonitorElement *meMean2D, MonitorElement *hNum, MonitorElement *meDenom)
MonitorElement * hOSegmentsSerial
void doPedestalNoise(edm::Handle< CSCStripDigiCollection > strips)
MonitorElement * hOWireSerial
long int flag
Definition: mlp_lapack.h:47
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
MonitorElement * hALCTMatch2DNumerator
std::vector< MonitorElement * > hRHGlobal
MonitorElement * hORecHitsSerial
std::vector< MonitorElement * > hSChiSq
float getSignal(const CSCStripDigiCollection &stripdigis, CSCDetId idRH, int centerStrip)
edm::InputTag alctDigiTag_
edm::InputTag clctDigiTag_
MonitorElement * hWirenGroupsTotal
MonitorElement * hCLCTL1ASerial
MonitorElement * hOStripSerial
edm::ParameterSet param
MonitorElement * hSSTE2
MonitorElement * hSSTE
std::vector< MonitorElement * > hWireNumber
MonitorElement * hALCTgetBXChamberMeans
MonitorElement * hWireSTE2
MonitorElement * hALCTMatch2DMeans
edm::InputTag cscSegTag_
virtual void endRun(edm::Run const &, edm::EventSetup const &)
MonitorElement * hSGlobalPhi
std::vector< MonitorElement * > hSnhits
CSCOfflineMonitor(const edm::ParameterSet &pset)
Constructor.
MonitorElement * hOWires
MonitorElement * hSnSegments
std::vector< MonitorElement * > hRHSumQ
edm::InputTag FEDRawDataCollectionTag_
MonitorElement * hOStripsAndWiresAndCLCT
void normalize(MonitorElement *me)
MonitorElement * hOSegments
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
MonitorElement * hALCTMatch
MonitorElement * hSGlobalTheta
MonitorElement * hSTimeCombined
MonitorElement * hOWiresAndCLCT
std::vector< MonitorElement * > hRHsterr
void fillEfficiencyHistos(int bin, int flag)
MonitorElement * hCLCTL1A2Denominator
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
void getEfficiency(float bin, float Norm, std::vector< float > &eff)
MonitorElement * hSTimeVsZ
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 * hRHSTE2
MonitorElement * hALCTgetBX2DMeans
MonitorElement * hSEff2
MonitorElement * hSChiSqAll
MonitorElement * hCSCOccupancy
virtual void endJob()
MonitorElement * hCLCTL1A2DNumerator
void doWireDigis(edm::Handle< CSCWireDigiCollection > wires)
edm::InputTag stripDigiTag_
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
edm::InputTag wireDigiTag_
std::vector< MonitorElement * > hSResid
MonitorElement * hStripEff2
MonitorElement * hALCTgetBXSerial
MonitorElement * hSTimeVsTOF
MonitorElement * hRHnrechits
edm::InputTag cscRecHitTag_
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)
virtual ~CSCOfflineMonitor()
Destructor.
Definition: Run.h:36
MonitorElement * hSChiSqProbAll
void doRecHits(edm::Handle< CSCRecHit2DCollection > recHits, edm::Handle< CSCStripDigiCollection > strips, edm::ESHandle< CSCGeometry > cscGeom)
std::vector< MonitorElement * > hRHRatioQ
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
void applyCSClabels(MonitorElement *meHisto, LabelType t, AxisType a)