CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelPSimHitSelector.cc
Go to the documentation of this file.
1 
4 
6 
9 
11 
12 
14 {
15  // Look for psimhit collection associated o the tracker
16  PSimHitCollectionMap::const_iterator pSimHitCollections = pSimHitCollectionMap_.find("pixel");
17 
18  // Check that there are psimhit collections defined for the tracker
19  if (pSimHitCollections == pSimHitCollectionMap_.end()) return;
20 
21  // Grab all the PSimHit from the different sencitive volumes
23  std::vector<const CrossingFrame<PSimHit> *> cfPSimHitProductPointers;
24 
25  // Collect the product pointers to the different psimhit collection
26  for (std::size_t i = 0; i < pSimHitCollections->second.size(); ++i)
27  {
28  event.getByLabel("mix", pSimHitCollections->second[i], cfPSimHits);
29  cfPSimHitProductPointers.push_back(cfPSimHits.product());
30  }
31 
32  // Create a mix collection from the different psimhit collections
33  std::auto_ptr<MixCollection<PSimHit> > pSimHits( new MixCollection<PSimHit>(cfPSimHitProductPointers) );
34 
35  // Accessing dead pixel modules from DB:
36  edm::ESHandle<SiPixelQuality> siPixelBadModule;
37  setup.get<SiPixelQualityRcd>().get(siPixelBadModule);
38 
39  // Reading the DB information
40  std::vector<SiPixelQuality::disabledModuleType> badModules( siPixelBadModule->getBadComponentList() );
41  SiPixelQuality pixelQuality(badModules);
42 
43  // Select only psimhits from alive modules
44  for (MixCollection<PSimHit>::MixItr pSimHit = pSimHits->begin(); pSimHit != pSimHits->end(); ++pSimHit)
45  {
46  if ( !pixelQuality.IsModuleBad(pSimHit->detUnitId()) )
47  selection.push_back(*pSimHit);
48  }
49 }
int i
Definition: DBlmapReader.cc:9
selection
main part
Definition: corrVsCorr.py:98
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< PSimHit > PSimHitCollection
T const * product() const
Definition: Handle.h:81
const T & get() const
Definition: EventSetup.h:56
PSimHitCollectionMap pSimHitCollectionMap_
virtual void select(PSimHitCollection &, edm::Event const &, edm::EventSetup const &) const
Pre-process event information.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")