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
DTEfficiencyTask Class Reference

#include <DTEfficiencyTask.h>

Inheritance diagram for DTEfficiencyTask:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &event, const edm::EventSetup &setup)
 
void beginJob ()
 BeginJob. More...
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
 To reset the MEs. More...
 
 DTEfficiencyTask (const edm::ParameterSet &pset)
 Constructor. More...
 
void endJob ()
 Endjob. More...
 
virtual ~DTEfficiencyTask ()
 Destructor. More...
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void bookHistos (DTLayerId lId, int fisrtWire, int lastWire)
 
void fillHistos (DTLayerId lId, int firstWire, int lastWire, int numWire)
 
void fillHistos (DTLayerId lId, int firstWire, int lastWire, int missingWire, bool UnassHit)
 

Private Attributes

bool debug
 
std::map< DTLayerId,
std::vector< MonitorElement * > > 
histosPerL
 
edm::ParameterSet parameters
 
DQMStoretheDbe
 
std::string theRecHitLabel
 
std::string theRecHits4DLabel
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- 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:

Date:
2010/01/05 10:14:40
Revision:
1.7
Author
G. Mila - INFN Torino

Definition at line 31 of file DTEfficiencyTask.h.

Constructor & Destructor Documentation

DTEfficiencyTask::DTEfficiencyTask ( const edm::ParameterSet pset)

Constructor.

Definition at line 43 of file DTEfficiencyTask.cc.

References debug, edm::ParameterSet::getUntrackedParameter(), cppFunctionSkipper::operator, and Parameters::parameters.

43  {
44 
45  debug = pset.getUntrackedParameter<bool>("debug",false);
46 
47  // Get the DQM needed services
49  theDbe->setCurrentFolder("DT/DTEfficiencyTask");
50 
51  parameters = pset;
52 }
T getUntrackedParameter(std::string const &, T const &) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
edm::ParameterSet parameters
DTEfficiencyTask::~DTEfficiencyTask ( )
virtual

Destructor.

Definition at line 55 of file DTEfficiencyTask.cc.

55  {
56 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 89 of file DTEfficiencyTask.cc.

References filterCSVwithJSON::copy, funct::cos(), gather_cfg::cout, debug, edm::EventSetup::get(), i, DTChamber::layer(), DTWireId::layerId(), DTRangeMapAccessor::layersBySuperLayer(), DTRecSegment2D::specificRecHits(), DTSuperLayerId::superlayer(), DTLayerId::superlayerId(), DTChamber::superLayers(), PV3DBase< T, PVType, FrameType >::theta(), GeomDet::toGlobal(), GeomDet::toLocal(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

89  {
90 
91 
92  if(debug)
93  cout << "[DTEfficiencyTask] Analyze #Run: " << event.id().run()
94  << " #Event: " << event.id().event() << endl;
95 
96 
97  // Get the 4D segment collection from the event
99  event.getByLabel(theRecHits4DLabel, all4DSegments);
100 
101  // Get the rechit collection from the event
102  Handle<DTRecHitCollection> dtRecHits;
103  event.getByLabel(theRecHitLabel, dtRecHits);
104 
105  // Get the DT Geometry
106  ESHandle<DTGeometry> dtGeom;
107  setup.get<MuonGeometryRecord>().get(dtGeom);
108 
109  // Loop over all chambers containing a segment
111  for (chamberId = all4DSegments->id_begin();
112  chamberId != all4DSegments->id_end();
113  ++chamberId) {
114 
115  // Get the chamber
116  const DTChamber* chamber = dtGeom->chamber(*chamberId);
117 
118  // Get all 1D RecHits to be used for searches of hits not associated to segments and map them by wire
119  const vector<const DTSuperLayer*> SLayers = chamber->superLayers();
120  map<DTWireId, int> wireAnd1DRecHits;
121  for(vector<const DTSuperLayer*>::const_iterator superlayer = SLayers.begin();
122  superlayer != SLayers.end();
123  superlayer++) {
124  DTRecHitCollection::range range = dtRecHits->get(DTRangeMapAccessor::layersBySuperLayer((*superlayer)->id()));
125  // Loop over the rechits of this ChamberId
126  for (DTRecHitCollection::const_iterator rechit = range.first;
127  rechit!=range.second;
128  ++rechit){
129  wireAnd1DRecHits[(*rechit).wireId()] = (*rechit).wireId().wire();
130  }
131  }
132 
133 
134  // Get the 4D segment range for the corresponding ChamerId
135  DTRecSegment4DCollection::range range = all4DSegments->get(*chamberId);
136  int nsegm = distance(range.first, range.second);
137  if(debug)
138  cout << " Chamber: " << *chamberId << " has " << nsegm
139  << " 4D segments" << endl;
140 
141 
142  // Loop over the rechits of this ChamerId
143  for (DTRecSegment4DCollection::const_iterator segment4D = range.first;
144  segment4D!=range.second;
145  ++segment4D) {
146  if(debug)
147  cout << " == RecSegment dimension: " << (*segment4D).dimension() << endl;
148 
149  // If Statio != 4 skip RecHits with dimension != 4
150  // For the Station 4 consider 2D RecHits
151  if((*chamberId).station() != 4 && (*segment4D).dimension() != 4) {
152  if(debug)
153  cout << "[DTEfficiencyTask]***Warning: RecSegment dimension is not 4 but "
154  << (*segment4D).dimension() << ", skipping!" << endl;
155  continue;
156  } else if((*chamberId).station() == 4 && (*segment4D).dimension() != 2) {
157  if(debug)
158  cout << "[DTEfficiencyTask]***Warning: RecSegment dimension is not 2 but "
159  << (*segment4D).dimension() << ", skipping!" << endl;
160  continue;
161  }
162 
163  vector<DTRecHit1D> recHits1D;
164  bool rPhi = false;
165  bool rZ = false;
166 
167  // Get 1D RecHits and select only events with 7 or 8 hits in phi and 3 or 4 hits in theta (if any)
168  const DTChamberRecSegment2D* phiSeg = (*segment4D).phiSegment();
169  vector<DTRecHit1D> phiRecHits = phiSeg->specificRecHits();
170  rPhi = true;
171  if(phiRecHits.size() < 7 || phiRecHits.size() > 8 ) {
172  if(debug)
173  cout << "[DTEfficiencyTask] Phi segments has: " << phiRecHits.size()
174  << " hits, skipping" << endl; // FIXME: info output
175  continue;
176  }
177  copy(phiRecHits.begin(), phiRecHits.end(), back_inserter(recHits1D));
178  const DTSLRecSegment2D* zSeg = 0;
179  if((*segment4D).dimension() == 4) {
180  rZ = true;
181  zSeg = (*segment4D).zSegment();
182  vector<DTRecHit1D> zRecHits = zSeg->specificRecHits();
183  if(zRecHits.size() < 3 || zRecHits.size() > 4 ) {
184  if(debug)
185  cout << "[DTEfficiencyTask] Theta segments has: " << zRecHits.size()
186  << " hits, skipping" << endl; // FIXME: info output
187  continue;
188  }
189  copy(zRecHits.begin(), zRecHits.end(), back_inserter(recHits1D));
190  }
191 
192  // Skip the segment if it has more than 1 hit on the same layer
193  vector<DTWireId> wireMap;
194  for(vector<DTRecHit1D>::const_iterator recHit1D = recHits1D.begin();
195  recHit1D != recHits1D.end();
196  recHit1D++) {
197  wireMap.push_back((*recHit1D).wireId());
198  }
199 
200  bool hitsOnSameLayer = false;
201  for(vector<DTWireId>::const_iterator channelId = wireMap.begin();
202  channelId != wireMap.end(); channelId++) {
203  vector<DTWireId>::const_iterator next = channelId;
204  next++;
205  for(vector<DTWireId>::const_iterator ite = next; ite != wireMap.end(); ite++) {
206  if((*channelId).layerId() == (*ite).layerId()) {
207  hitsOnSameLayer = true;
208  }
209  }
210  }
211  if(hitsOnSameLayer) {
212  if(debug)
213  cout << "[DTEfficiencyTask] This RecHit has 2 hits on the same layer, skipping!" << endl;
214  continue;
215  }
216 
217 
218  // Select 2D segments with angle smaller than 45 deg
219  LocalVector phiDirectionInChamber = (*phiSeg).localDirection();
220  if(rPhi && fabs(phiDirectionInChamber.x()/phiDirectionInChamber.z()) > 1) {
221  if(debug) {
222  cout << " RPhi segment has angle > 45 deg, skipping! " << endl;
223  cout << " Theta = " << phiDirectionInChamber.theta() << endl;
224  }
225  continue;
226  }
227  if(rZ) {
228  LocalVector zDirectionInChamber = (*zSeg).localDirection();
229  if(fabs(zDirectionInChamber.y()/zDirectionInChamber.z()) > 1) {
230  if(debug){
231  cout << " RZ segment has angle > 45 deg, skipping! " << endl;
232  cout << " Theta = " << zDirectionInChamber.theta() << endl;
233  }
234  continue;
235  }
236  }
237 
238 
239  // Skip if the 4D segment has only 10 hits
240  if(recHits1D.size() == 10) {
241  if(debug)
242  cout << "[DTEfficiencyTask] 4D Segment with only 10 hits, skipping!" << endl;
243  continue;
244  }
245 
246 
247  // Analyse the case of 11 recHits for MB1,MB2,MB3 and of 7 recHits for MB4
248  if((rPhi && recHits1D.size() == 7) || (rZ && recHits1D.size() == 11)) {
249 
250  if(debug) {
251  if(rPhi && recHits1D.size() == 7)
252  cout << "[DTEfficiencyTask] MB4 Segment with only 7 hits!" << endl;
253  if(rZ && recHits1D.size() == 11)
254  cout << "[DTEfficiencyTask] 4D Segment with only 11 hits!" << endl;
255  }
256 
257  // Find the layer without RecHits ----------------------------------------
258  const vector<const DTSuperLayer*> SupLayers = chamber->superLayers();
259  map<DTLayerId, bool> layerMap;
260  map<DTWireId, float> wireAndPosInChamberAtLayerZ;
261  // Loop over layers and wires to fill a map
262  for(vector<const DTSuperLayer*>::const_iterator superlayer = SupLayers.begin();
263  superlayer != SupLayers.end();
264  superlayer++) {
265  const vector<const DTLayer*> Layers = (*superlayer)->layers();
266  for(vector<const DTLayer*>::const_iterator layer = Layers.begin();
267  layer != Layers.end();
268  layer++) {
269  layerMap.insert(make_pair((*layer)->id(), false));
270  const int firstWire = dtGeom->layer((*layer)->id())->specificTopology().firstChannel();
271  const int lastWire = dtGeom->layer((*layer)->id())->specificTopology().lastChannel();
272  for(int i=firstWire; i - lastWire <= 0; i++) {
273  DTWireId wireId((*layer)->id(), i);
274  float wireX = (*layer)->specificTopology().wirePosition(wireId.wire());
275  LocalPoint wirePosInLay(wireX,0,0);
276  GlobalPoint wirePosGlob = (*layer)->toGlobal(wirePosInLay);
277  LocalPoint wirePosInChamber = chamber->toLocal(wirePosGlob);
278  if((*superlayer)->id().superlayer() == 1 || (*superlayer)->id().superlayer() == 3) {
279  wireAndPosInChamberAtLayerZ.insert(make_pair(wireId, wirePosInChamber.x()));
280  } else {
281  wireAndPosInChamberAtLayerZ.insert(make_pair(wireId, wirePosInChamber.y()));
282  }
283  }
284  }
285  }
286 
287  // Loop over segment 1D RecHit
288  map<DTLayerId, int> NumWireMap;
289  for(vector<DTRecHit1D>::const_iterator recHit = recHits1D.begin();
290  recHit != recHits1D.end();
291  recHit++) {
292  layerMap[(*recHit).wireId().layerId()]= true;
293  NumWireMap[(*recHit).wireId().layerId()]= (*recHit).wireId().wire();
294  }
295 
296  DTLayerId missLayerId;
297  //Loop over the map and find the layer without hits
298  for(map<DTLayerId, bool>::const_iterator iter = layerMap.begin();
299  iter != layerMap.end(); iter++) {
300  if(!(*iter).second) missLayerId = (*iter).first;
301  }
302  if(debug)
303  cout << "[DTEfficiencyTask] Layer without recHits is: " << missLayerId << endl;
304  // -------------------------------------------------------
305 
306 
307 
308  const DTLayer* missLayer = chamber->layer(missLayerId);
309 
310  LocalPoint missLayerPosInChamber = chamber->toLocal(missLayer->toGlobal(LocalPoint(0,0,0)));
311 
312  // Segment position at Wire z in chamber local frame
313  LocalPoint segPosAtZLayer = (*segment4D).localPosition()
314  + (*segment4D).localDirection()*missLayerPosInChamber.z()/cos((*segment4D).localDirection().theta());
315 
316  DTWireId missWireId;
317 
318  // Find the id of the cell without hit ---------------------------------------------------
319  for(map<DTWireId, float>::const_iterator wireAndPos = wireAndPosInChamberAtLayerZ.begin();
320  wireAndPos != wireAndPosInChamberAtLayerZ.end();
321  wireAndPos++) {
322  DTWireId wireId = (*wireAndPos).first;
323  if(wireId.layerId() == missLayerId) {
324  if(missLayerId.superlayerId().superlayer() == 1 || missLayerId.superlayerId().superlayer() == 3 ) {
325  if(fabs(segPosAtZLayer.x() - (*wireAndPos).second) < 2.1)
326  missWireId = wireId;
327  } else {
328  if(fabs(segPosAtZLayer.y() - (*wireAndPos).second) < 2.1)
329  missWireId = wireId;
330  }
331  }
332  }
333  if(debug)
334  cout << "[DTEfficiencyTask] Cell without hit is: " << missWireId << endl;
335  // ----------------------------------------------------------
336 
337 
338  bool foundUnAssRechit = false;
339 
340  // Look for unassociated hits in this cell
341  if(wireAnd1DRecHits.find(missWireId) != wireAnd1DRecHits.end()) {
342  if(debug)
343  cout << "[DTEfficiencyTask] Unassociated Hit found!" << endl;
344  foundUnAssRechit = true;
345  }
346 
347 
348  for(map<DTLayerId, bool>::const_iterator iter = layerMap.begin();
349  iter != layerMap.end(); iter++) {
350  if((*iter).second)
351  fillHistos((*iter).first, dtGeom->layer((*iter).first)->specificTopology().firstChannel(), dtGeom->layer((*iter).first)->specificTopology().lastChannel(), NumWireMap[(*iter).first]);
352  else
353  fillHistos((*iter).first, dtGeom->layer((*iter).first)->specificTopology().firstChannel(), dtGeom->layer((*iter).first)->specificTopology().lastChannel(), missWireId.wire(), foundUnAssRechit);
354  }
355 
356  } // End of the loop for segment with 7 or 11 recHits
357 
358  if((rPhi && recHits1D.size() == 8) || (rZ && recHits1D.size() == 12)) {
359  map<DTLayerId, int> NumWireMap;
360  DTLayerId LayerID;
361  for(vector<DTRecHit1D>::const_iterator recHit = recHits1D.begin();
362  recHit != recHits1D.end();
363  recHit++) {
364  LayerID = (*recHit).wireId().layerId();
365  NumWireMap[LayerID]= (*recHit).wireId().wire();
366  }
367  for(map<DTLayerId, int>::const_iterator iter = NumWireMap.begin();
368  iter != NumWireMap.end(); iter++) {
369  fillHistos((*iter).first, dtGeom->layer((*iter).first)->specificTopology().firstChannel(), dtGeom->layer((*iter).first)->specificTopology().lastChannel(), NumWireMap[(*iter).first]);
370  }
371  }
372 
373  } // End of loop over the 4D segments inside a sigle chamber
374  } // End of loop over all tha chamber with at least a 4D segment in the event
375 }
int i
Definition: DBlmapReader.cc:9
std::pair< const_iterator, const_iterator > range
iterator range
Definition: RangeMap.h:52
std::string theRecHitLabel
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
Definition: GeomDet.h:47
static std::pair< DTLayerId, DTSuperLayerIdComparator > layersBySuperLayer(DTSuperLayerId slId)
Access by SL objects written into a RangeMap by layer.
T y() const
Definition: PV3DBase.h:63
LocalPoint toLocal(const GlobalPoint &gp) const
Conversion to the R.F. of the GeomDet.
Definition: GeomDet.h:62
const DTLayer * layer(DTLayerId id) const
Return the layer corresponding to the given id.
Definition: DTChamber.cc:82
identifier iterator
Definition: RangeMap.h:138
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:61
void fillHistos(DTLayerId lId, int firstWire, int lastWire, int numWire)
Geom::Theta< T > theta() const
Definition: PV3DBase.h:75
C::const_iterator const_iterator
constant access iterator type
Definition: RangeMap.h:45
const std::vector< const DTSuperLayer * > & superLayers() const
Return the superlayers in the chamber.
Definition: DTChamber.cc:62
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
std::vector< DTRecHit1D > specificRecHits() const
Access to specific components.
int superlayer() const
Return the superlayer number (deprecated method name)
std::string theRecHits4DLabel
const T & get() const
Definition: EventSetup.h:55
DTLayerId layerId() const
Return the corresponding LayerId.
Definition: DTWireId.h:64
tuple cout
Definition: gather_cfg.py:121
T x() const
Definition: PV3DBase.h:62
void DTEfficiencyTask::beginJob ( void  )
virtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 59 of file DTEfficiencyTask.cc.

References Parameters::parameters.

59  {
60  // the name of the 4D rec hits collection
61  theRecHits4DLabel = parameters.getParameter<string>("recHits4DLabel");
62  // the name of the rechits collection
63  theRecHitLabel = parameters.getParameter<string>("recHitLabel");
64 }
T getParameter(std::string const &) const
std::string theRecHitLabel
std::string theRecHits4DLabel
edm::ParameterSet parameters
void DTEfficiencyTask::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiSeg,
edm::EventSetup const &  context 
)
virtual

To reset the MEs.

Reimplemented from edm::EDAnalyzer.

Definition at line 67 of file DTEfficiencyTask.cc.

References timingPdfMaker::histo, i, edm::LuminosityBlockBase::id(), edm::LuminosityBlockID::luminosityBlock(), Association::map, Parameters::parameters, and findQualityFiles::size.

67  {
68 
69 
70  if(lumiSeg.id().luminosityBlock()%parameters.getUntrackedParameter<int>("ResetCycle", 3) == 0) {
71  for(map<DTLayerId, vector<MonitorElement*> > ::const_iterator histo = histosPerL.begin();
72  histo != histosPerL.end();
73  histo++) {
74  int size = (*histo).second.size();
75  for(int i=0; i<size; i++){
76  (*histo).second[i]->Reset();
77  }
78  }
79  }
80 
81 }
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
std::map< DTLayerId, std::vector< MonitorElement * > > histosPerL
dictionary map
Definition: Association.py:205
tuple size
Write out results.
edm::ParameterSet parameters
void DTEfficiencyTask::bookHistos ( DTLayerId  lId,
int  fisrtWire,
int  lastWire 
)
private

Definition at line 379 of file DTEfficiencyTask.cc.

References DTSuperLayerId::chamberId(), gather_cfg::cout, debug, mergeVDriftHistosByStation::histos, DTLayerId::layer(), DTChamberId::sector(), DTChamberId::station(), relativeConstraints::station, DTSuperLayerId::superlayer(), DTLayerId::superlayerId(), and DTChamberId::wheel().

379  {
380  if(debug)
381  cout << " Booking histos for L: " << lId << endl;
382 
383  // Compose the chamber name
384  stringstream wheel; wheel << lId.superlayerId().chamberId().wheel();
385  stringstream station; station << lId.superlayerId().chamberId().station();
386  stringstream sector; sector << lId.superlayerId().chamberId().sector();
387  stringstream superLayer; superLayer << lId.superlayerId().superlayer();
388  stringstream layer; layer << lId.layer();
389 
390  string lHistoName =
391  "_W" + wheel.str() +
392  "_St" + station.str() +
393  "_Sec" + sector.str() +
394  "_SL" + superLayer.str()+
395  "_L" + layer.str();
396 
397  theDbe->setCurrentFolder("DT/DTEfficiencyTask/Wheel" + wheel.str() +
398  "/Station" + station.str() +
399  "/Sector" + sector.str() +
400  "/SuperLayer" +superLayer.str());
401  // Create the monitor elements
402  vector<MonitorElement *> histos;
403  // histo for hits associated to the 4D reconstructed segment
404  histos.push_back(theDbe->book1D("hEffOccupancy"+lHistoName, "4D segments recHits occupancy",lastWire-firstWire+1, firstWire-0.5, lastWire+0.5));
405  // histo for hits not associated to the segment
406  histos.push_back(theDbe->book1D("hEffUnassOccupancy"+lHistoName, "4D segments recHits and Hits not associated occupancy",lastWire-firstWire+1, firstWire-0.5, lastWire+0.5));
407  // histo for cells associated to the 4D reconstructed segment
408  histos.push_back(theDbe->book1D("hRecSegmOccupancy"+lHistoName, "4D segments cells occupancy",lastWire-firstWire+1, firstWire-0.5, lastWire+0.5));
409 
410  histosPerL[lId] = histos;
411 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
DTChamberId chamberId() const
Return the corresponding ChamberId.
std::map< DTLayerId, std::vector< MonitorElement * > > histosPerL
int layer() const
Return the layer number.
Definition: DTLayerId.h:55
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
Definition: DTLayerId.h:61
int superlayer() const
Return the superlayer number (deprecated method name)
int sector() const
Definition: DTChamberId.h:63
tuple cout
Definition: gather_cfg.py:121
int station() const
Return the station number.
Definition: DTChamberId.h:53
int wheel() const
Return the wheel number.
Definition: DTChamberId.h:47
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void DTEfficiencyTask::endJob ( void  )
virtual

Endjob.

Reimplemented from edm::EDAnalyzer.

Definition at line 84 of file DTEfficiencyTask.cc.

84  {
85  theDbe->rmdir("DT/DTEfficiencyTask");
86 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
void DTEfficiencyTask::fillHistos ( DTLayerId  lId,
int  firstWire,
int  lastWire,
int  numWire 
)
private

Definition at line 415 of file DTEfficiencyTask.cc.

References bookHistos(), and mergeVDriftHistosByStation::histos.

417  {
418  if(histosPerL.find(lId) == histosPerL.end()){
419  bookHistos(lId, firstWire, lastWire);
420  }
421  vector<MonitorElement *> histos = histosPerL[lId];
422  histos[0]->Fill(numWire);
423  histos[1]->Fill(numWire);
424  histos[2]->Fill(numWire);
425 }
std::map< DTLayerId, std::vector< MonitorElement * > > histosPerL
void bookHistos(DTLayerId lId, int fisrtWire, int lastWire)
void DTEfficiencyTask::fillHistos ( DTLayerId  lId,
int  firstWire,
int  lastWire,
int  missingWire,
bool  UnassHit 
)
private

Definition at line 428 of file DTEfficiencyTask.cc.

References bookHistos(), and mergeVDriftHistosByStation::histos.

431  {
432  if(histosPerL.find(lId) == histosPerL.end()){
433  bookHistos(lId, firstWire, lastWire);
434  }
435  vector<MonitorElement *> histos = histosPerL[lId];
436  if(unassHit)
437  histos[1]->Fill(missingWire);
438  histos[2]->Fill(missingWire);
439 }
std::map< DTLayerId, std::vector< MonitorElement * > > histosPerL
void bookHistos(DTLayerId lId, int fisrtWire, int lastWire)

Member Data Documentation

bool DTEfficiencyTask::debug
private
std::map<DTLayerId, std::vector<MonitorElement*> > DTEfficiencyTask::histosPerL
private

Definition at line 75 of file DTEfficiencyTask.h.

edm::ParameterSet DTEfficiencyTask::parameters
private
DQMStore* DTEfficiencyTask::theDbe
private

Definition at line 55 of file DTEfficiencyTask.h.

std::string DTEfficiencyTask::theRecHitLabel
private

Definition at line 64 of file DTEfficiencyTask.h.

std::string DTEfficiencyTask::theRecHits4DLabel
private

Definition at line 61 of file DTEfficiencyTask.h.