45 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Constructor called!";
72 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Destructor called!";
83 vector<DTChamber*>::const_iterator ch_it = chambers.begin();
84 vector<DTChamber*>::const_iterator ch_end = chambers.end();
85 for (; ch_it != ch_end; ++ch_it) {
90 int modeTimeHisto = 0;
92 for(
int wheel = -2; wheel != 3; ++wheel) {
93 for(
int sector = 1; sector <= 12; ++sector) {
94 stringstream wheelstr; wheelstr << wheel;
95 stringstream sectorstr; sectorstr << sector;
96 string sectorHistoName =
"NSegmPerEvent_W" + wheelstr.str()
97 +
"_Sec" + sectorstr.str();
98 string sectorHistoTitle =
"# segm. W" + wheelstr.str() +
" Sect." + sectorstr.str();
101 "/Sector" + sectorstr.str());
117 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] endjob called!";
128 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run()
129 <<
" #Event: " <<
event.id().event();
131 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run()
132 <<
" #Event: " <<
event.id().event();
146 if(!all4DSegments.
isValid())
return;
150 for (chamberId = all4DSegments->id_begin();
151 chamberId != all4DSegments->id_end();
156 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Chamber: " << *chamberId <<
" has " << distance(range.first, range.second)
161 segment4D!=range.second;
165 bool segmNoisy =
false;
168 if((*segment4D).hasPhi()){
171 map<DTSuperLayerId,vector<DTRecHit1D> > hitsBySLMap;
172 for(vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
173 hit != phiHits.end(); ++
hit) {
177 bool isNoisy =
false;
178 bool isFEMasked =
false;
179 bool isTDCMasked =
false;
180 bool isTrigMask =
false;
183 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
185 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"Wire: " << wireId <<
" is noisy, skipping!";
191 if((*segment4D).hasZed()) {
195 for(vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
196 hit != zHits.end(); ++
hit) {
198 bool isNoisy =
false;
199 bool isFEMasked =
false;
200 bool isTDCMasked =
false;
201 bool isTrigMask =
false;
204 statusMap->cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
206 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"Wire: " << wireId <<
" is noisy, skipping!";
214 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask")<<
"skipping the segment: it contains noisy cells";
220 LocalPoint segment4DLocalPos = (*segment4D).localPosition();
221 LocalVector segment4DLocalDirection = (*segment4D).localDirection();
222 if((*segment4D).hasPhi())
223 nHits = (((*segment4D).phiSegment())->specificRecHits()).
size();
224 if((*segment4D).hasZed())
225 nHits = nHits + ((((*segment4D).zSegment())->specificRecHits()).
size());
229 (*segment4D).chi2()/(*segment4D).degreesOfFreedom());
240 edm::LogVerbatim (
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Booking histos for chamber: " << chamberId;
244 stringstream wheel; wheel << chamberId.
wheel();
246 stringstream sector; sector << chamberId.
sector();
248 string chamberHistoName =
250 "_St" + station.str() +
251 "_Sec" + sector.str();
254 for(
int wh=-2; wh<=2; wh++){
255 stringstream wheel; wheel << wh;
257 string histoName =
"numberOfSegments_W" + wheel.str();
280 "/Sector" + sector.str() +
281 "/Station" + station.str());
284 vector<MonitorElement *>
histos;
285 histos.push_back(
theDbe->
book1D(
"h4DSegmNHits"+chamberHistoName,
286 "# of hits per segment",
289 histos.push_back(
theDbe->
book1D(
"h4DChi2"+chamberHistoName,
290 "4D Segment reduced Chi2",
301 int sector = chamberId.
sector();
302 if(chamberId.
sector()==13) {
304 }
else if(chamberId.
sector()==14) {
312 histos[0]->Fill(nHits);
314 histos[1]->Fill(chi2);
324 for(
int wheel = -2; wheel != 3; ++wheel) {
325 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
static char chambers[TOTALCHAMBERS][20]
std::map< int, MonitorElement * > summaryHistos
std::map< DTChamberId, std::vector< MonitorElement * > > histosPerCh
LuminosityBlockNumber_t luminosityBlock() const
C::const_iterator const_iterator
constant access iterator type
edm::ESHandle< DTGeometry > dtGeom
std::string theRecHits4DLabel
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.
std::map< int, std::map< int, DTTimeEvolutionHisto * > > histoTimeEvol
int station() const
Return the station number.
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