41 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Constructor called!";
70 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Destructor called!";
88 for(
int wh=-2; wh<=2; wh++){
89 stringstream wheel; wheel << wh;
91 string histoName =
"numberOfSegments_W" + wheel.str();
115 vector<const DTChamber*>::const_iterator ch_it = chambers.begin();
116 vector<const DTChamber*>::const_iterator ch_end = chambers.end();
117 for (; ch_it != ch_end; ++ch_it) {
122 int modeTimeHisto = 0;
124 for(
int wheel = -2; wheel != 3; ++wheel) {
125 for(
int sector = 1; sector <= 12; ++sector) {
127 stringstream wheelstr; wheelstr << wheel;
128 stringstream sectorstr; sectorstr << sector;
129 string sectorHistoName =
"NSegmPerEvent_W" + wheelstr.str()
130 +
"_Sec" + sectorstr.str();
131 string sectorHistoTitle =
"# segm. W" + wheelstr.str() +
" Sect." + sectorstr.str();
134 "/Sector" + sectorstr.str());
155 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run()
156 <<
" #Event: " <<
event.id().event();
158 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run()
159 <<
" #Event: " <<
event.id().event();
173 if(!all4DSegments.
isValid())
return;
176 DTRecSegment4DCollection::id_iterator chamberId;
177 for (chamberId = all4DSegments->id_begin();
178 chamberId != all4DSegments->id_end();
183 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Chamber: " << *chamberId <<
" has " <<
distance(range.first, range.second)
188 segment4D!=range.second;
192 bool segmNoisy =
false;
195 if((*segment4D).hasPhi()){
198 map<DTSuperLayerId,vector<DTRecHit1D> > hitsBySLMap;
199 for(vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
200 hit != phiHits.end(); ++
hit) {
204 bool isNoisy =
false;
205 bool isFEMasked =
false;
206 bool isTDCMasked =
false;
207 bool isTrigMask =
false;
210 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
212 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"Wire: " << wireId <<
" is noisy, skipping!";
218 if((*segment4D).hasZed()) {
222 for(vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
223 hit != zHits.end(); ++
hit) {
225 bool isNoisy =
false;
226 bool isFEMasked =
false;
227 bool isTDCMasked =
false;
228 bool isTrigMask =
false;
231 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
233 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"Wire: " << wireId <<
" is noisy, skipping!";
241 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask")<<
"skipping the segment: it contains noisy cells";
247 if((*segment4D).hasPhi())
248 nHits = (((*segment4D).phiSegment())->specificRecHits()).
size();
249 if((*segment4D).hasZed())
250 nHits = nHits + ((((*segment4D).zSegment())->specificRecHits()).
size());
252 double anglePhiSegm(0.);
253 if( (*segment4D).hasPhi() ) {
254 double xdir = (*segment4D).phiSegment()->localDirection().x();
255 double zdir = (*segment4D).phiSegment()->localDirection().z();
257 anglePhiSegm = atan(xdir/zdir)*180./
TMath::Pi();
259 if( fabs(anglePhiSegm) >
phiSegmCut )
continue;
262 if( fabs((*chamberId).wheel()) == 2 && (*chamberId).station() == 1 ) {
267 DTChamberId checkMB((*chamberId).wheel(),mb,(*chamberId).sector());
271 cksegment4D!=ckrange.second;
275 if((*cksegment4D).hasPhi())
276 nHits = (((*cksegment4D).phiSegment())->specificRecHits()).
size();
277 if((*cksegment4D).hasZed())
278 nHits = nHits + ((((*cksegment4D).zSegment())->specificRecHits()).
size());
280 if( nHits >=
nhitsCut ) segmOk=
true;
286 if( !segmOk )
continue;
291 (*segment4D).chi2()/(*segment4D).degreesOfFreedom());
302 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Booking histos for chamber: " << chamberId;
306 stringstream wheel; wheel << chamberId.
wheel();
308 stringstream sector; sector << chamberId.
sector();
310 string chamberHistoName =
312 "_St" + station.str() +
313 "_Sec" + sector.str();
316 "/Sector" + sector.str() +
317 "/Station" + station.str());
320 vector<MonitorElement *>
histos;
321 histos.push_back(ibooker.
book1D(
"h4DSegmNHits"+chamberHistoName,
322 "# of hits per segment",
325 histos.push_back(ibooker.
book1D(
"h4DChi2"+chamberHistoName,
326 "4D Segment reduced Chi2",
337 int sector = chamberId.
sector();
338 if(chamberId.
sector()==13) {
340 }
else if(chamberId.
sector()==14) {
348 histos[0]->Fill(nHits);
350 histos[1]->Fill(chi2);
360 for(
int wheel = -2; wheel != 3; ++wheel) {
361 for(
int sector = 1; sector <= 12; ++sector) {
T getParameter(std::string const &) const
EventNumber_t event() const
void fillHistos(DTChamberId chamberId, int nHits, float chi2)
T getUntrackedParameter(std::string const &, T const &) const
void analyze(const edm::Event &event, const edm::EventSetup &setup)
std::pair< const_iterator, const_iterator > range
iterator range
DTTimeEvolutionHisto * hNevtPerLS
std::map< int, MonitorElement * > summaryHistos
std::map< DTChamberId, std::vector< MonitorElement * > > histosPerCh
LuminosityBlockNumber_t luminosityBlock() const
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void bookHistos(DQMStore::IBooker &ibooker, DTChamberId chamberId)
MonitorElement * book1D(Args &&...args)
edm::ESHandle< DTGeometry > dtGeom
void dqmBeginRun(const edm::Run &, const edm::EventSetup &)
BeginRun.
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
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup)
Summary.
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
void updateTimeSlot(int ls, int nEventsInLS)
virtual ~DTSegmentAnalysisTask()
Destructor.
MonitorElement * nEventMonitor
std::map< int, std::map< int, DTTimeEvolutionHisto * > > histoTimeEvol
MonitorElement * bookFloat(Args &&...args)
int station() const
Return the station number.
static char chambers[264][20]
edm::EDGetTokenT< DTRecSegment4DCollection > recHits4DToken_
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &eSetup)
int wheel() const
Return the wheel number.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
tuple size
Write out results.
DTSegmentAnalysisTask(const edm::ParameterSet &pset)
Constructor.
std::string topHistoFolder