CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
DTSegmentAnalysisTask Class Reference

#include <DTSegmentAnalysisTask.h>

Inheritance diagram for DTSegmentAnalysisTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup)
 Summary. More...
 
void beginRun (const edm::Run &, const edm::EventSetup &)
 BeginRun. More...
 
 DTSegmentAnalysisTask (const edm::ParameterSet &pset)
 Constructor. More...
 
void endJob ()
 Endjob. More...
 
void endLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup)
 
virtual ~DTSegmentAnalysisTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void bookHistos (DTChamberId chamberId)
 
void fillHistos (DTChamberId chamberId, int nHits, float chi2)
 

Private Attributes

bool checkNoisyChannels
 
bool detailedAnalysis
 
edm::ESHandle< DTGeometrydtGeom
 
std::map< DTChamberId,
std::vector< MonitorElement * > > 
histosPerCh
 
std::map< int, std::map< int,
DTTimeEvolutionHisto * > > 
histoTimeEvol
 
bool hltDQMMode
 
DTTimeEvolutionHistohNevtPerLS
 
MonitorElementnEventMonitor
 
int nevents
 
int nEventsInLS
 
int nhitsCut
 
int nLSTimeBin
 
int nTimeBins
 
edm::ParameterSet parameters
 
double phiSegmCut
 
edm::EDGetTokenT
< DTRecSegment4DCollection
recHits4DToken_
 
bool slideTimeBins
 
std::map< int, MonitorElement * > summaryHistos
 
DQMStoretheDbe
 
std::string topHistoFolder
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

DQM Analysis of 4D DT segments, it produces plots about:

Author
G. Cerminara - INFN Torino

Definition at line 36 of file DTSegmentAnalysisTask.h.

Constructor & Destructor Documentation

DTSegmentAnalysisTask::DTSegmentAnalysisTask ( const edm::ParameterSet pset)

Constructor.

Definition at line 40 of file DTSegmentAnalysisTask.cc.

References checkNoisyChannels, detailedAnalysis, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), hltDQMMode, nhitsCut, nLSTimeBin, nTimeBins, cppFunctionSkipper::operator, phiSegmCut, recHits4DToken_, slideTimeBins, theDbe, and topHistoFolder.

40  : nevents(0) , nEventsInLS(0), hNevtPerLS(0) {
41 
42  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") << "[DTSegmentAnalysisTask] Constructor called!";
43 
44  // switch for detailed analysis
45  detailedAnalysis = pset.getUntrackedParameter<bool>("detailedAnalysis",false);
46  // the name of the 4D rec hits collection
47  recHits4DToken_ = consumes<DTRecSegment4DCollection>(
48  edm::InputTag(pset.getParameter<string>("recHits4DLabel")));
49  // Get the map of noisy channels
50  checkNoisyChannels = pset.getUntrackedParameter<bool>("checkNoisyChannels",false);
51  // # of bins in the time histos
52  nTimeBins = pset.getUntrackedParameter<int>("nTimeBins",100);
53  // # of LS per bin in the time histos
54  nLSTimeBin = pset.getUntrackedParameter<int>("nLSTimeBin",2);
55  // switch on/off sliding bins in time histos
56  slideTimeBins = pset.getUntrackedParameter<bool>("slideTimeBins",true);
57  phiSegmCut = pset.getUntrackedParameter<double>("phiSegmCut",30.);
58  nhitsCut = pset.getUntrackedParameter<int>("nhitsCut",12);
59 
60  // Get the DQM needed services
62 
63  // top folder for the histograms in DQMStore
64  topHistoFolder = pset.getUntrackedParameter<string>("topHistoFolder","DT/02-Segments");
65  // hlt DQM mode
66  hltDQMMode = pset.getUntrackedParameter<bool>("hltDQMMode",false);
67 
68 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
DTTimeEvolutionHisto * hNevtPerLS
edm::EDGetTokenT< DTRecSegment4DCollection > recHits4DToken_
DTSegmentAnalysisTask::~DTSegmentAnalysisTask ( )
virtual

Destructor.

Definition at line 71 of file DTSegmentAnalysisTask.cc.

71  {
72  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") << "[DTSegmentAnalysisTask] Destructor called!";
73 }

Member Function Documentation

void DTSegmentAnalysisTask::analyze ( const edm::Event event,
const edm::EventSetup setup 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 131 of file DTSegmentAnalysisTask.cc.

References checkNoisyChannels, edm::EventID::event(), MonitorElement::Fill(), fillHistos(), edm::EventSetup::get(), edm::EventBase::id(), edm::HandleBase::isValid(), nEventMonitor, nevents, nEventsInLS, nhitsCut, phiSegmCut, Pi, recHits4DToken_, findQualityFiles::size, DTRecSegment2D::specificRecHits(), crabStatusFromReport::statusMap, and xdir.

131  {
132 
133  nevents++;
135 
136  nEventsInLS++;
137  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") << "[DTSegmentAnalysisTask] Analyze #Run: " << event.id().run()
138  << " #Event: " << event.id().event();
139  if(!(event.id().event()%1000))
140  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") << "[DTSegmentAnalysisTask] Analyze #Run: " << event.id().run()
141  << " #Event: " << event.id().event();
142 
144  if(checkNoisyChannels) {
145  setup.get<DTStatusFlagRcd>().get(statusMap);
146  }
147 
148 
149  // -- 4D segment analysis -----------------------------------------------------
150 
151  // Get the 4D segment collection from the event
153  event.getByToken(recHits4DToken_, all4DSegments);
154 
155  if(!all4DSegments.isValid()) return;
156 
157  // Loop over all chambers containing a segment
158  DTRecSegment4DCollection::id_iterator chamberId;
159  for (chamberId = all4DSegments->id_begin();
160  chamberId != all4DSegments->id_end();
161  ++chamberId){
162  // Get the range for the corresponding ChamerId
163  DTRecSegment4DCollection::range range = all4DSegments->get(*chamberId);
164 
165  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") << " Chamber: " << *chamberId << " has " << distance(range.first, range.second)
166  << " 4D segments";
167 
168  // Loop over the rechits of this ChamerId
169  for (DTRecSegment4DCollection::const_iterator segment4D = range.first;
170  segment4D!=range.second;
171  ++segment4D){
172 
173  //FOR NOISY CHANNELS////////////////////////////////
174  bool segmNoisy = false;
175  if(checkNoisyChannels) {
176 
177  if((*segment4D).hasPhi()){
178  const DTChamberRecSegment2D* phiSeg = (*segment4D).phiSegment();
179  vector<DTRecHit1D> phiHits = phiSeg->specificRecHits();
180  map<DTSuperLayerId,vector<DTRecHit1D> > hitsBySLMap;
181  for(vector<DTRecHit1D>::const_iterator hit = phiHits.begin();
182  hit != phiHits.end(); ++hit) {
183  DTWireId wireId = (*hit).wireId();
184 
185  // Check for noisy channels to skip them
186  bool isNoisy = false;
187  bool isFEMasked = false;
188  bool isTDCMasked = false;
189  bool isTrigMask = false;
190  bool isDead = false;
191  bool isNohv = false;
192  statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
193  if(isNoisy) {
194  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") << "Wire: " << wireId << " is noisy, skipping!";
195  segmNoisy = true;
196  }
197  }
198  }
199 
200  if((*segment4D).hasZed()) {
201  const DTSLRecSegment2D* zSeg = (*segment4D).zSegment(); // zSeg lives in the SL RF
202  // Check for noisy channels to skip them
203  vector<DTRecHit1D> zHits = zSeg->specificRecHits();
204  for(vector<DTRecHit1D>::const_iterator hit = zHits.begin();
205  hit != zHits.end(); ++hit) {
206  DTWireId wireId = (*hit).wireId();
207  bool isNoisy = false;
208  bool isFEMasked = false;
209  bool isTDCMasked = false;
210  bool isTrigMask = false;
211  bool isDead = false;
212  bool isNohv = false;
213  statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
214  if(isNoisy) {
215  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") << "Wire: " << wireId << " is noisy, skipping!";
216  segmNoisy = true;
217  }
218  }
219  }
220 
221  } // end of switch on noisy channels
222  if (segmNoisy) {
223  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask")<<"skipping the segment: it contains noisy cells";
224  continue;
225  }
226  //END FOR NOISY CHANNELS////////////////////////////////
227 
228  int nHits=0;
229  if((*segment4D).hasPhi())
230  nHits = (((*segment4D).phiSegment())->specificRecHits()).size();
231  if((*segment4D).hasZed())
232  nHits = nHits + ((((*segment4D).zSegment())->specificRecHits()).size());
233 
234  double anglePhiSegm(0.);
235  if( (*segment4D).hasPhi() ) {
236  double xdir = (*segment4D).phiSegment()->localDirection().x();
237  double zdir = (*segment4D).phiSegment()->localDirection().z();
238 
239  anglePhiSegm = atan(xdir/zdir)*180./TMath::Pi();
240  }
241  if( fabs(anglePhiSegm) > phiSegmCut ) continue;
242  // If the segment is in Wh+-2/SecX/MB1, get the DT chambers just above and check if there is a segment
243  // to validate the segment present in MB1
244  if( fabs((*chamberId).wheel()) == 2 && (*chamberId).station() == 1 ) {
245 
246  bool segmOk=false;
247  int mb(2);
248  while( mb < 4 ) {
249  DTChamberId checkMB((*chamberId).wheel(),mb,(*chamberId).sector());
250  DTRecSegment4DCollection::range ckrange = all4DSegments->get(checkMB);
251 
252  for (DTRecSegment4DCollection::const_iterator cksegment4D = ckrange.first;
253  cksegment4D!=ckrange.second;
254  ++cksegment4D){
255 
256  int nHits=0;
257  if((*cksegment4D).hasPhi())
258  nHits = (((*cksegment4D).phiSegment())->specificRecHits()).size();
259  if((*cksegment4D).hasZed())
260  nHits = nHits + ((((*cksegment4D).zSegment())->specificRecHits()).size());
261 
262  if( nHits >= nhitsCut ) segmOk=true;
263 
264  }
265  mb++;
266  }
267 
268  if( !segmOk ) continue;
269 
270  }
271  fillHistos(*chamberId,
272  nHits,
273  (*segment4D).chi2()/(*segment4D).degreesOfFreedom());
274  }
275  }
276 
277  // -----------------------------------------------------------------------------
278 }
const double Pi
EventNumber_t event() const
Definition: EventID.h:44
void fillHistos(DTChamberId chamberId, int nHits, float chi2)
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:50
void Fill(long long x)
bool isValid() const
Definition: HandleBase.h:76
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
const T & get() const
Definition: EventSetup.h:55
MonitorElement * nEventMonitor
edm::EventID id() const
Definition: EventBase.h:56
edm::EDGetTokenT< DTRecSegment4DCollection > recHits4DToken_
tuple size
Write out results.
void DTSegmentAnalysisTask::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  eSetup 
)
virtual

Summary.

Reimplemented from edm::EDAnalyzer.

Definition at line 378 of file DTSegmentAnalysisTask.cc.

References nEventsInLS.

378  {
379  nEventsInLS = 0;
380 }
void DTSegmentAnalysisTask::beginRun ( const edm::Run run,
const edm::EventSetup context 
)
virtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 76 of file DTSegmentAnalysisTask.cc.

References DQMStore::bookFloat(), bookHistos(), chambers, dtGeom, edm::EventSetup::get(), histoTimeEvol, hltDQMMode, hNevtPerLS, nEventMonitor, nLSTimeBin, nTimeBins, DQMStore::setCurrentFolder(), slideTimeBins, theDbe, and topHistoFolder.

76  {
77 
78  // Get the DT Geometry
79  context.get<MuonGeometryRecord>().get(dtGeom);
80 
81  if (!hltDQMMode) {
82  theDbe->setCurrentFolder("DT/EventInfo/Counters");
83  nEventMonitor = theDbe->bookFloat("nProcessedEventsSegment");
84  }
85 
86  // loop over all the DT chambers & book the histos
87  const vector<const DTChamber*>& chambers = dtGeom->chambers();
88  vector<const DTChamber*>::const_iterator ch_it = chambers.begin();
89  vector<const DTChamber*>::const_iterator ch_end = chambers.end();
90  for (; ch_it != ch_end; ++ch_it) {
91  bookHistos((*ch_it)->id());
92  }
93 
94  // book sector time-evolution histos
95  int modeTimeHisto = 0;
96  if(!slideTimeBins) modeTimeHisto = 1;
97  for(int wheel = -2; wheel != 3; ++wheel) { // loop over wheels
98  for(int sector = 1; sector <= 12; ++sector) { // loop over sectors
99  stringstream wheelstr; wheelstr << wheel;
100  stringstream sectorstr; sectorstr << sector;
101  string sectorHistoName = "NSegmPerEvent_W" + wheelstr.str()
102  + "_Sec" + sectorstr.str();
103  string sectorHistoTitle = "# segm. W" + wheelstr.str() + " Sect." + sectorstr.str();
104 
105  theDbe->setCurrentFolder(topHistoFolder + "/Wheel" + wheelstr.str() +
106  "/Sector" + sectorstr.str());
107  histoTimeEvol[wheel][sector] = new DTTimeEvolutionHisto(&(*theDbe),sectorHistoName,sectorHistoTitle,
108  nTimeBins,nLSTimeBin,slideTimeBins,modeTimeHisto);
109  }
110  }
111 
113  else theDbe->setCurrentFolder("DT/EventInfo/");
114 
115  hNevtPerLS = new DTTimeEvolutionHisto(&(*theDbe),"NevtPerLS","# evt.",nTimeBins,nLSTimeBin,slideTimeBins,2);
116 
117 }
DTTimeEvolutionHisto * hNevtPerLS
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:891
edm::ESHandle< DTGeometry > dtGeom
const T & get() const
Definition: EventSetup.h:55
MonitorElement * nEventMonitor
std::map< int, std::map< int, DTTimeEvolutionHisto * > > histoTimeEvol
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
void bookHistos(DTChamberId chamberId)
void DTSegmentAnalysisTask::bookHistos ( DTChamberId  chamberId)
private

Definition at line 282 of file DTSegmentAnalysisTask.cc.

References DQMStore::book1D(), DQMStore::book2D(), detailedAnalysis, DQMStore::get(), mergeVDriftHistosByStation::histos, histosPerCh, DTChamberId::sector(), DQMStore::setCurrentFolder(), DTChamberId::station(), relativeConstraints::station, summaryHistos, theDbe, topHistoFolder, and DTChamberId::wheel().

Referenced by beginRun().

282  {
283 
284  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") << " Booking histos for chamber: " << chamberId;
285 
286 
287  // Compose the chamber name
288  stringstream wheel; wheel << chamberId.wheel();
289  stringstream station; station << chamberId.station();
290  stringstream sector; sector << chamberId.sector();
291 
292  string chamberHistoName =
293  "_W" + wheel.str() +
294  "_St" + station.str() +
295  "_Sec" + sector.str();
296 
297 
298  for(int wh=-2; wh<=2; wh++){
299  stringstream wheel; wheel << wh;
300  theDbe->setCurrentFolder(topHistoFolder + "/Wheel" + wheel.str());
301  string histoName = "numberOfSegments_W" + wheel.str();
302  if (theDbe->get(topHistoFolder + "/Wheel" + wheel.str() + "/" + histoName))
303  continue;
304  summaryHistos[wh] = theDbe->book2D(histoName.c_str(),histoName.c_str(),12,1,13,4,1,5);
305  summaryHistos[wh]->setAxisTitle("Sector",1);
306  summaryHistos[wh]->setBinLabel(1,"1",1);
307  summaryHistos[wh]->setBinLabel(2,"2",1);
308  summaryHistos[wh]->setBinLabel(3,"3",1);
309  summaryHistos[wh]->setBinLabel(4,"4",1);
310  summaryHistos[wh]->setBinLabel(5,"5",1);
311  summaryHistos[wh]->setBinLabel(6,"6",1);
312  summaryHistos[wh]->setBinLabel(7,"7",1);
313  summaryHistos[wh]->setBinLabel(8,"8",1);
314  summaryHistos[wh]->setBinLabel(9,"9",1);
315  summaryHistos[wh]->setBinLabel(10,"10",1);
316  summaryHistos[wh]->setBinLabel(11,"11",1);
317  summaryHistos[wh]->setBinLabel(12,"12",1);
318  summaryHistos[wh]->setBinLabel(1,"MB1",2);
319  summaryHistos[wh]->setBinLabel(2,"MB2",2);
320  summaryHistos[wh]->setBinLabel(3,"MB3",2);
321  summaryHistos[wh]->setBinLabel(4,"MB4",2);
322  }
323 
324 
325  theDbe->setCurrentFolder(topHistoFolder + "/Wheel" + wheel.str() +
326  "/Sector" + sector.str() +
327  "/Station" + station.str());
328 
329  // Create the monitor elements
330  vector<MonitorElement *> histos;
331  histos.push_back(theDbe->book1D("h4DSegmNHits"+chamberHistoName,
332  "# of hits per segment",
333  16, 0.5, 16.5));
334  if(detailedAnalysis){
335  histos.push_back(theDbe->book1D("h4DChi2"+chamberHistoName,
336  "4D Segment reduced Chi2",
337  20, 0, 20));
338  }
339  histosPerCh[chamberId] = histos;
340 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:954
std::map< int, MonitorElement * > summaryHistos
std::map< DTChamberId, std::vector< MonitorElement * > > histosPerCh
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1708
int sector() const
Definition: DTChamberId.h:61
int station() const
Return the station number.
Definition: DTChamberId.h:51
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1082
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
void DTSegmentAnalysisTask::endJob ( void  )
virtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 120 of file DTSegmentAnalysisTask.cc.

References hNevtPerLS.

120  {
121 
122  edm::LogVerbatim ("DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<"[DTSegmentAnalysisTask] endjob called!";
123 
124  delete hNevtPerLS;
125  //theDbe->save("testMonitoring.root");
126 
127 }
DTTimeEvolutionHisto * hNevtPerLS
void DTSegmentAnalysisTask::endLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  eSetup 
)
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 366 of file DTSegmentAnalysisTask.cc.

References histoTimeEvol, hNevtPerLS, edm::LuminosityBlockBase::luminosityBlock(), nEventsInLS, and DTTimeEvolutionHisto::updateTimeSlot().

366  {
367 
368  hNevtPerLS->updateTimeSlot(lumiSeg.luminosityBlock(), nEventsInLS);
369  // book sector time-evolution histos
370  for(int wheel = -2; wheel != 3; ++wheel) {
371  for(int sector = 1; sector <= 12; ++sector) {
372  histoTimeEvol[wheel][sector]->updateTimeSlot(lumiSeg.luminosityBlock(), nEventsInLS);
373  }
374  }
375 }
DTTimeEvolutionHisto * hNevtPerLS
void updateTimeSlot(int ls, int nEventsInLS)
std::map< int, std::map< int, DTTimeEvolutionHisto * > > histoTimeEvol
void DTSegmentAnalysisTask::fillHistos ( DTChamberId  chamberId,
int  nHits,
float  chi2 
)
private

Definition at line 344 of file DTSegmentAnalysisTask.cc.

References detailedAnalysis, mergeVDriftHistosByStation::histos, histosPerCh, histoTimeEvol, DTChamberId::sector(), DTChamberId::station(), summaryHistos, and DTChamberId::wheel().

Referenced by analyze().

346  {
347  int sector = chamberId.sector();
348  if(chamberId.sector()==13) {
349  sector = 4;
350  } else if(chamberId.sector()==14) {
351  sector = 10;
352  }
353 
354  summaryHistos[chamberId.wheel()]->Fill(sector,chamberId.station());
355  histoTimeEvol[chamberId.wheel()][sector]->accumulateValueTimeSlot(1);
356 
357  vector<MonitorElement *> histos = histosPerCh[chamberId];
358  histos[0]->Fill(nHits);
359  if(detailedAnalysis){
360  histos[1]->Fill(chi2);
361  }
362 
363 }
std::map< int, MonitorElement * > summaryHistos
std::map< DTChamberId, std::vector< MonitorElement * > > histosPerCh
std::map< int, std::map< int, DTTimeEvolutionHisto * > > histoTimeEvol
int sector() const
Definition: DTChamberId.h:61
int station() const
Return the station number.
Definition: DTChamberId.h:51
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:45

Member Data Documentation

bool DTSegmentAnalysisTask::checkNoisyChannels
private

Definition at line 78 of file DTSegmentAnalysisTask.h.

Referenced by analyze(), and DTSegmentAnalysisTask().

bool DTSegmentAnalysisTask::detailedAnalysis
private

Definition at line 69 of file DTSegmentAnalysisTask.h.

Referenced by bookHistos(), DTSegmentAnalysisTask(), and fillHistos().

edm::ESHandle<DTGeometry> DTSegmentAnalysisTask::dtGeom
private

Definition at line 72 of file DTSegmentAnalysisTask.h.

Referenced by beginRun().

std::map<DTChamberId, std::vector<MonitorElement*> > DTSegmentAnalysisTask::histosPerCh
private

Definition at line 90 of file DTSegmentAnalysisTask.h.

Referenced by bookHistos(), and fillHistos().

std::map<int, std::map<int, DTTimeEvolutionHisto*> > DTSegmentAnalysisTask::histoTimeEvol
private

Definition at line 92 of file DTSegmentAnalysisTask.h.

Referenced by beginRun(), endLuminosityBlock(), and fillHistos().

bool DTSegmentAnalysisTask::hltDQMMode
private

Definition at line 107 of file DTSegmentAnalysisTask.h.

Referenced by beginRun(), and DTSegmentAnalysisTask().

DTTimeEvolutionHisto* DTSegmentAnalysisTask::hNevtPerLS
private

Definition at line 96 of file DTSegmentAnalysisTask.h.

Referenced by beginRun(), endJob(), and endLuminosityBlock().

MonitorElement* DTSegmentAnalysisTask::nEventMonitor
private

Definition at line 113 of file DTSegmentAnalysisTask.h.

Referenced by analyze(), and beginRun().

int DTSegmentAnalysisTask::nevents
private

Definition at line 94 of file DTSegmentAnalysisTask.h.

Referenced by analyze().

int DTSegmentAnalysisTask::nEventsInLS
private

Definition at line 95 of file DTSegmentAnalysisTask.h.

Referenced by analyze(), beginLuminosityBlock(), and endLuminosityBlock().

int DTSegmentAnalysisTask::nhitsCut
private

Definition at line 111 of file DTSegmentAnalysisTask.h.

Referenced by analyze(), and DTSegmentAnalysisTask().

int DTSegmentAnalysisTask::nLSTimeBin
private

Definition at line 101 of file DTSegmentAnalysisTask.h.

Referenced by beginRun(), and DTSegmentAnalysisTask().

int DTSegmentAnalysisTask::nTimeBins
private

Definition at line 99 of file DTSegmentAnalysisTask.h.

Referenced by beginRun(), and DTSegmentAnalysisTask().

edm::ParameterSet DTSegmentAnalysisTask::parameters
private
double DTSegmentAnalysisTask::phiSegmCut
private

Definition at line 109 of file DTSegmentAnalysisTask.h.

Referenced by analyze(), and DTSegmentAnalysisTask().

edm::EDGetTokenT<DTRecSegment4DCollection> DTSegmentAnalysisTask::recHits4DToken_
private

Definition at line 75 of file DTSegmentAnalysisTask.h.

Referenced by analyze(), and DTSegmentAnalysisTask().

bool DTSegmentAnalysisTask::slideTimeBins
private

Definition at line 103 of file DTSegmentAnalysisTask.h.

Referenced by beginRun(), and DTSegmentAnalysisTask().

std::map< int, MonitorElement* > DTSegmentAnalysisTask::summaryHistos
private

Definition at line 91 of file DTSegmentAnalysisTask.h.

Referenced by bookHistos(), and fillHistos().

DQMStore* DTSegmentAnalysisTask::theDbe
private

Definition at line 66 of file DTSegmentAnalysisTask.h.

Referenced by beginRun(), bookHistos(), and DTSegmentAnalysisTask().

std::string DTSegmentAnalysisTask::topHistoFolder
private

Definition at line 105 of file DTSegmentAnalysisTask.h.

Referenced by beginRun(), bookHistos(), and DTSegmentAnalysisTask().