41 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Constructor called!";
70 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Destructor called!";
90 vector<const DTChamber*>::const_iterator ch_it = chambers.begin();
91 vector<const DTChamber*>::const_iterator ch_end = chambers.end();
92 for (; ch_it != ch_end; ++ch_it) {
97 int modeTimeHisto = 0;
99 for(
int wheel = -2; wheel != 3; ++wheel) {
100 for(
int sector = 1; sector <= 12; ++sector) {
102 stringstream wheelstr; wheelstr << wheel;
103 stringstream sectorstr; sectorstr << sector;
104 string sectorHistoName =
"NSegmPerEvent_W" + wheelstr.str()
105 +
"_Sec" + sectorstr.str();
106 string sectorHistoTitle =
"# segm. W" + wheelstr.str() +
" Sect." + sectorstr.str();
109 "/Sector" + sectorstr.str());
130 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run()
131 <<
" #Event: " <<
event.id().event();
133 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run()
134 <<
" #Event: " <<
event.id().event();
148 if(!all4DSegments.
isValid())
return;
151 DTRecSegment4DCollection::id_iterator chamberId;
152 for (chamberId = all4DSegments->id_begin();
153 chamberId != all4DSegments->id_end();
158 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Chamber: " << *chamberId <<
" has " <<
distance(range.first, range.second)
163 segment4D!=range.second;
167 bool segmNoisy =
false;
170 if((*segment4D).hasPhi()){
173 map<DTSuperLayerId,vector<DTRecHit1D> > hitsBySLMap;
174 for(vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
175 hit != phiHits.end(); ++
hit) {
179 bool isNoisy =
false;
180 bool isFEMasked =
false;
181 bool isTDCMasked =
false;
182 bool isTrigMask =
false;
185 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
187 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"Wire: " << wireId <<
" is noisy, skipping!";
193 if((*segment4D).hasZed()) {
197 for(vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
198 hit != zHits.end(); ++
hit) {
200 bool isNoisy =
false;
201 bool isFEMasked =
false;
202 bool isTDCMasked =
false;
203 bool isTrigMask =
false;
206 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
208 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"Wire: " << wireId <<
" is noisy, skipping!";
216 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask")<<
"skipping the segment: it contains noisy cells";
222 if((*segment4D).hasPhi())
223 nHits = (((*segment4D).phiSegment())->specificRecHits()).
size();
224 if((*segment4D).hasZed())
225 nHits = nHits + ((((*segment4D).zSegment())->specificRecHits()).
size());
227 double anglePhiSegm(0.);
228 if( (*segment4D).hasPhi() ) {
229 double xdir = (*segment4D).phiSegment()->localDirection().x();
230 double zdir = (*segment4D).phiSegment()->localDirection().z();
232 anglePhiSegm = atan(xdir/zdir)*180./
TMath::Pi();
234 if( fabs(anglePhiSegm) >
phiSegmCut )
continue;
237 if( fabs((*chamberId).wheel()) == 2 && (*chamberId).station() == 1 ) {
242 DTChamberId checkMB((*chamberId).wheel(),mb,(*chamberId).sector());
246 cksegment4D!=ckrange.second;
250 if((*cksegment4D).hasPhi())
251 nHits = (((*cksegment4D).phiSegment())->specificRecHits()).
size();
252 if((*cksegment4D).hasZed())
253 nHits = nHits + ((((*cksegment4D).zSegment())->specificRecHits()).
size());
255 if( nHits >=
nhitsCut ) segmOk=
true;
261 if( !segmOk )
continue;
266 (*segment4D).chi2()/(*segment4D).degreesOfFreedom());
277 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Booking histos for chamber: " << chamberId;
281 stringstream wheel; wheel << chamberId.
wheel();
283 stringstream sector; sector << chamberId.
sector();
285 string chamberHistoName =
287 "_St" + station.str() +
288 "_Sec" + sector.str();
291 for(
int wh=-2; wh<=2; wh++){
292 stringstream wheel; wheel << wh;
294 string histoName =
"numberOfSegments_W" + wheel.str();
318 "/Sector" + sector.str() +
319 "/Station" + station.str());
322 vector<MonitorElement *>
histos;
323 histos.push_back(ibooker.
book1D(
"h4DSegmNHits"+chamberHistoName,
324 "# of hits per segment",
327 histos.push_back(ibooker.
book1D(
"h4DChi2"+chamberHistoName,
328 "4D Segment reduced Chi2",
339 int sector = chamberId.
sector();
340 if(chamberId.
sector()==13) {
342 }
else if(chamberId.
sector()==14) {
350 histos[0]->Fill(nHits);
352 histos[1]->Fill(chi2);
362 for(
int wheel = -2; wheel != 3; ++wheel) {
363 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