46 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Constructor called!";
75 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Destructor called!";
91 vector<DTChamber*>::const_iterator ch_it = chambers.begin();
92 vector<DTChamber*>::const_iterator ch_end = chambers.end();
93 for (; ch_it != ch_end; ++ch_it) {
98 int modeTimeHisto = 0;
100 for(
int wheel = -2; wheel != 3; ++wheel) {
101 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());
125 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] endjob called!";
140 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run()
141 <<
" #Event: " <<
event.id().event();
143 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run()
144 <<
" #Event: " <<
event.id().event();
158 if(!all4DSegments.
isValid())
return;
162 for (chamberId = all4DSegments->id_begin();
163 chamberId != all4DSegments->id_end();
168 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Chamber: " << *chamberId <<
" has " << distance(range.first, range.second)
173 segment4D!=range.second;
177 bool segmNoisy =
false;
180 if((*segment4D).hasPhi()){
183 map<DTSuperLayerId,vector<DTRecHit1D> > hitsBySLMap;
184 for(vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
185 hit != phiHits.end(); ++
hit) {
189 bool isNoisy =
false;
190 bool isFEMasked =
false;
191 bool isTDCMasked =
false;
192 bool isTrigMask =
false;
195 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
197 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"Wire: " << wireId <<
" is noisy, skipping!";
203 if((*segment4D).hasZed()) {
207 for(vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
208 hit != zHits.end(); ++
hit) {
210 bool isNoisy =
false;
211 bool isFEMasked =
false;
212 bool isTDCMasked =
false;
213 bool isTrigMask =
false;
216 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
218 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"Wire: " << wireId <<
" is noisy, skipping!";
226 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask")<<
"skipping the segment: it contains noisy cells";
232 if((*segment4D).hasPhi())
233 nHits = (((*segment4D).phiSegment())->specificRecHits()).
size();
234 if((*segment4D).hasZed())
235 nHits = nHits + ((((*segment4D).zSegment())->specificRecHits()).
size());
237 double anglePhiSegm(0.);
238 if( (*segment4D).hasPhi() ) {
239 double xdir = (*segment4D).phiSegment()->localDirection().x();
240 double zdir = (*segment4D).phiSegment()->localDirection().z();
242 anglePhiSegm = atan(xdir/zdir)*180./
TMath::Pi();
244 if( fabs(anglePhiSegm) >
phiSegmCut )
continue;
247 if( fabs((*chamberId).wheel()) == 2 && (*chamberId).station() == 1 ) {
252 DTChamberId checkMB((*chamberId).wheel(),mb,(*chamberId).sector());
256 cksegment4D!=ckrange.second;
260 if((*cksegment4D).hasPhi())
261 nHits = (((*cksegment4D).phiSegment())->specificRecHits()).
size();
262 if((*cksegment4D).hasZed())
263 nHits = nHits + ((((*cksegment4D).zSegment())->specificRecHits()).
size());
265 if( nHits >=
nhitsCut ) segmOk=
true;
271 if( !segmOk )
continue;
276 (*segment4D).chi2()/(*segment4D).degreesOfFreedom());
287 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Booking histos for chamber: " << chamberId;
291 stringstream wheel; wheel << chamberId.
wheel();
293 stringstream sector; sector << chamberId.
sector();
295 string chamberHistoName =
297 "_St" + station.str() +
298 "_Sec" + sector.str();
301 for(
int wh=-2; wh<=2; wh++){
302 stringstream wheel; wheel << wh;
304 string histoName =
"numberOfSegments_W" + wheel.str();
329 "/Sector" + sector.str() +
330 "/Station" + station.str());
333 vector<MonitorElement *>
histos;
334 histos.push_back(
theDbe->
book1D(
"h4DSegmNHits"+chamberHistoName,
335 "# of hits per segment",
338 histos.push_back(
theDbe->
book1D(
"h4DChi2"+chamberHistoName,
339 "4D Segment reduced Chi2",
350 int sector = chamberId.
sector();
351 if(chamberId.
sector()==13) {
353 }
else if(chamberId.
sector()==14) {
361 histos[0]->Fill(nHits);
363 histos[1]->Fill(chi2);
373 for(
int wheel = -2; wheel != 3; ++wheel) {
374 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
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
DTTimeEvolutionHisto * hNevtPerLS
std::map< int, MonitorElement * > summaryHistos
std::map< DTChamberId, std::vector< MonitorElement * > > histosPerCh
MonitorElement * bookFloat(const char *name)
Book float.
LuminosityBlockNumber_t luminosityBlock() const
C::const_iterator const_iterator
constant access iterator type
edm::ESHandle< DTGeometry > dtGeom
std::string theRecHits4DLabel
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
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 beginRun(const edm::Run &, const edm::EventSetup &)
BeginRun.
void updateTimeSlot(int ls, int nEventsInLS)
virtual ~DTSegmentAnalysisTask()
Destructor.
MonitorElement * nEventMonitor
std::map< int, std::map< int, DTTimeEvolutionHisto * > > histoTimeEvol
int station() const
Return the station number.
static char chambers[264][20]
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
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.
void setCurrentFolder(const std::string &fullpath)
void bookHistos(DTChamberId chamberId)
std::string topHistoFolder