CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
SiPixelClusterSource Class Reference

#include <SiPixelClusterSource.h>

Inheritance diagram for SiPixelClusterSource:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef edmNew::DetSet
< SiPixelCluster >
::const_iterator 
ClusterIterator
 
- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
virtual void bookMEs (DQMStore::IBooker &)
 
virtual void buildStructure (edm::EventSetup const &)
 
virtual void dqmBeginRun (const edm::Run &, edm::EventSetup const &)
 
 SiPixelClusterSource (const edm::ParameterSet &conf)
 
 ~SiPixelClusterSource ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

int bigEventSize
 
MonitorElementbigFpixClusterEventRate
 
bool bladeOn
 
edm::ParameterSet conf_
 
bool diskOn
 
int eventNo
 
bool firstRun
 
bool isPIB
 
bool isUpgrade
 
bool ladOn
 
bool layOn
 
int lumSec
 
MonitorElementmeClPosDisk1mz
 
MonitorElementmeClPosDisk1pz
 
MonitorElementmeClPosDisk2mz
 
MonitorElementmeClPosDisk2pz
 
MonitorElementmeClPosDisk3mz
 
MonitorElementmeClPosDisk3pz
 
MonitorElementmeClPosLayer1
 
MonitorElementmeClPosLayer2
 
MonitorElementmeClPosLayer3
 
MonitorElementmeClPosLayer4
 
bool modOn
 
int nBigEvents
 
int nLumiSecs
 
bool phiOn
 
bool reducedSet
 
bool ringOn
 
bool saveFile
 
bool slowDown
 
bool smileyOn
 
edm::InputTag src_
 
edm::EDGetTokenT
< edmNew::DetSetVector
< SiPixelCluster > > 
srcToken_
 
std::map< uint32_t,
SiPixelClusterModule * > 
thePixelStructure
 
bool twoDimOn
 

Additional Inherited Members

- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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

Definition at line 60 of file SiPixelClusterSource.h.

Member Typedef Documentation

Definition at line 65 of file SiPixelClusterSource.h.

Constructor & Destructor Documentation

SiPixelClusterSource::SiPixelClusterSource ( const edm::ParameterSet conf)
explicit

Definition at line 46 of file SiPixelClusterSource.cc.

References conf_, firstRun, edm::ParameterSet::getParameter(), and srcToken_.

46  :
47  conf_(iConfig),
48  src_( conf_.getParameter<edm::InputTag>( "src" ) ),
49  saveFile( conf_.getUntrackedParameter<bool>("saveFile",false) ),
50  isPIB( conf_.getUntrackedParameter<bool>("isPIB",false) ),
51  slowDown( conf_.getUntrackedParameter<bool>("slowDown",false) ),
52  modOn( conf_.getUntrackedParameter<bool>("modOn",true) ),
53  twoDimOn( conf_.getUntrackedParameter<bool>("twoDimOn",true) ),
54  reducedSet( conf_.getUntrackedParameter<bool>("reducedSet",false) ),
55  ladOn( conf_.getUntrackedParameter<bool>("ladOn",false) ),
56  layOn( conf_.getUntrackedParameter<bool>("layOn",false) ),
57  phiOn( conf_.getUntrackedParameter<bool>("phiOn",false) ),
58  ringOn( conf_.getUntrackedParameter<bool>("ringOn",false) ),
59  bladeOn( conf_.getUntrackedParameter<bool>("bladeOn",false) ),
60  diskOn( conf_.getUntrackedParameter<bool>("diskOn",false) ),
61  smileyOn(conf_.getUntrackedParameter<bool>("smileyOn",false) ),
62  bigEventSize( conf_.getUntrackedParameter<int>("bigEventSize",100) ),
63  isUpgrade( conf_.getUntrackedParameter<bool>("isUpgrade",false) )
64 {
65  LogInfo ("PixelDQM") << "SiPixelClusterSource::SiPixelClusterSource: Got DQM BackEnd interface"<<endl;
66 
67  //set Token(-s)
68  srcToken_ = consumes<edmNew::DetSetVector<SiPixelCluster> >(conf_.getParameter<edm::InputTag>("src"));
69  firstRun = true;
70 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > srcToken_
edm::ParameterSet conf_
SiPixelClusterSource::~SiPixelClusterSource ( )

Definition at line 73 of file SiPixelClusterSource.cc.

References thePixelStructure.

74 {
75  // do anything here that needs to be done at desctruction time
76  // (e.g. close files, deallocate resources etc.)
77  LogInfo ("PixelDQM") << "SiPixelClusterSource::~SiPixelClusterSource: Destructor"<<endl;
78 
79  std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
80  for (struct_iter = thePixelStructure.begin() ; struct_iter != thePixelStructure.end() ; struct_iter++){
81  delete struct_iter->second;
82  struct_iter->second = 0;
83  }
84 }
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure

Member Function Documentation

void SiPixelClusterSource::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 134 of file SiPixelClusterSource.cc.

References bigEventSize, bigFpixClusterEventRate, bladeOn, diskOn, eventNo, MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), MonitorElement::getEntries(), input, isUpgrade, ladOn, layOn, edm::EventBase::luminosityBlock(), meClPosDisk1mz, meClPosDisk1pz, meClPosDisk2mz, meClPosDisk2pz, meClPosDisk3mz, meClPosDisk3pz, meClPosLayer1, meClPosLayer2, meClPosLayer3, meClPosLayer4, modOn, phiOn, reducedSet, MonitorElement::Reset(), ringOn, slowDown, smileyOn, srcToken_, thePixelStructure, patCandidatesForDimuonsSequences_cff::tracker, and twoDimOn.

135 {
136  eventNo++;
137 
138  //if(modOn && !isUpgrade){
139  if(!isUpgrade){
140  if(meClPosLayer1 && meClPosLayer1->getEntries()>150000){
141  meClPosLayer1->Reset();
142  meClPosLayer2->Reset();
143  meClPosLayer3->Reset();
148  }
149  //}else if(modOn && isUpgrade){
150  }else if(isUpgrade){
151  if(meClPosLayer1 && meClPosLayer1->getEntries()>150000){
152  meClPosLayer1->Reset();
153  meClPosLayer2->Reset();
154  meClPosLayer3->Reset();
155  meClPosLayer4->Reset();
162  }
163  }
164 
165  // get input data
167  iEvent.getByToken(srcToken_, input);
168 
170  iSetup.get<TrackerDigiGeometryRecord> ().get (pDD);
171  const TrackerGeometry* tracker = &(* pDD);
172 
173  int lumiSection = (int)iEvent.luminosityBlock();
174  int nEventFpixClusters = 0;
175 
176 
177  std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
178  for (struct_iter = thePixelStructure.begin() ; struct_iter != thePixelStructure.end() ; struct_iter++) {
179 
180  int numberOfFpixClusters = (*struct_iter).second->fill(*input, tracker,
184  modOn, ladOn, layOn, phiOn,
185  bladeOn, diskOn, ringOn,
187  nEventFpixClusters = nEventFpixClusters + numberOfFpixClusters;
188 
189  }
190 
191  if(nEventFpixClusters>bigEventSize){
193  bigFpixClusterEventRate->Fill(lumiSection,1./23.);
194  }
195  }
196  //std::cout<<"nEventFpixClusters: "<<nEventFpixClusters<<" , nLumiSecs: "<<nLumiSecs<<" , nBigEvents: "<<nBigEvents<<std::endl;
197 
198  // slow down...
199  if(slowDown) usleep(10000);
200 
201 }
MonitorElement * meClPosDisk3pz
MonitorElement * meClPosDisk2pz
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
double getEntries(void) const
get # of entries
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > srcToken_
MonitorElement * meClPosLayer4
static std::string const input
Definition: EdmProvDump.cc:44
void Fill(long long x)
MonitorElement * meClPosLayer3
MonitorElement * meClPosLayer1
const T & get() const
Definition: EventSetup.h:55
MonitorElement * meClPosDisk3mz
MonitorElement * meClPosDisk2mz
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
MonitorElement * meClPosLayer2
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * bigFpixClusterEventRate
MonitorElement * meClPosDisk1mz
MonitorElement * meClPosDisk1pz
void SiPixelClusterSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 109 of file SiPixelClusterSource.cc.

References DQMStore::IBooker::book2D(), bookMEs(), isUpgrade, meClPosDisk1mz, meClPosDisk1pz, meClPosDisk2mz, meClPosDisk2pz, meClPosDisk3mz, meClPosDisk3pz, meClPosLayer1, meClPosLayer2, meClPosLayer3, meClPosLayer4, and DQMStore::IBooker::setCurrentFolder().

109  {
110  bookMEs(iBooker);
111  // Book occupancy maps in global coordinates for all clusters:
112  iBooker.setCurrentFolder("Pixel/Clusters/OffTrack");
113  //bpix
114  meClPosLayer1 = iBooker.book2D("position_siPixelClusters_Layer_1","Clusters Layer1;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
115  meClPosLayer2 = iBooker.book2D("position_siPixelClusters_Layer_2","Clusters Layer2;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
116  meClPosLayer3 = iBooker.book2D("position_siPixelClusters_Layer_3","Clusters Layer3;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
117  if (isUpgrade) {
118  meClPosLayer4 = iBooker.book2D("position_siPixelClusters_Layer_4","Clusters Layer4;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
119  }
120  //fpix
121  meClPosDisk1pz = iBooker.book2D("position_siPixelClusters_pz_Disk_1","Clusters +Z Disk1;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
122  meClPosDisk2pz = iBooker.book2D("position_siPixelClusters_pz_Disk_2","Clusters +Z Disk2;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
123  meClPosDisk1mz = iBooker.book2D("position_siPixelClusters_mz_Disk_1","Clusters -Z Disk1;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
124  meClPosDisk2mz = iBooker.book2D("position_siPixelClusters_mz_Disk_2","Clusters -Z Disk2;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
125  if (isUpgrade) {
126  meClPosDisk3pz = iBooker.book2D("position_siPixelClusters_pz_Disk_3","Clusters +Z Disk3;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
127  meClPosDisk3mz = iBooker.book2D("position_siPixelClusters_mz_Disk_3","Clusters -Z Disk3;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
128  }
129 }
MonitorElement * meClPosDisk3pz
MonitorElement * meClPosDisk2pz
MonitorElement * meClPosLayer4
MonitorElement * meClPosLayer3
MonitorElement * meClPosLayer1
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
virtual void bookMEs(DQMStore::IBooker &)
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * meClPosDisk3mz
MonitorElement * meClPosDisk2mz
MonitorElement * meClPosLayer2
MonitorElement * meClPosDisk1mz
MonitorElement * meClPosDisk1pz
void SiPixelClusterSource::bookMEs ( DQMStore::IBooker iBooker)
virtual

Create folder tree and book histograms

Definition at line 288 of file SiPixelClusterSource.cc.

References bigEventSize, bigFpixClusterEventRate, bladeOn, DQMStore::IBooker::book1D(), conf_, diskOn, edm::hlt::Exception, isPIB, isUpgrade, ladOn, layOn, LogDebug, modOn, phiOn, reducedSet, ringOn, DQMStore::IBooker::setCurrentFolder(), SiPixelFolderOrganizer::setModuleFolder(), smileyOn, thePixelStructure, indexGen::title, and twoDimOn.

Referenced by bookHistograms().

288  {
289 
290  // Get DQM interface
291  iBooker.setCurrentFolder("Pixel");
292  char title[256]; snprintf(title, 256, "Rate of events with >%i FPIX clusters;LumiSection;Rate of large FPIX events per LS [Hz]",bigEventSize);
293  bigFpixClusterEventRate = iBooker.book1D("bigFpixClusterEventRate",title,5000,0.,5000.);
294 
295 
296  std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
297 
298  SiPixelFolderOrganizer theSiPixelFolder(false);
299 
300  for(struct_iter = thePixelStructure.begin(); struct_iter != thePixelStructure.end(); struct_iter++){
301 
303  if(modOn){
304  if(theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,0,isUpgrade)){
305  (*struct_iter).second->book( conf_,iBooker,0,twoDimOn,reducedSet,isUpgrade);
306  } else {
307 
308  if(!isPIB) throw cms::Exception("LogicError")
309  << "[SiPixelClusterSource::bookMEs] Creation of DQM folder failed";
310  }
311  }
312  if(ladOn){
313  if(theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,1,isUpgrade)){
314  (*struct_iter).second->book( conf_,iBooker,1,twoDimOn,reducedSet,isUpgrade);
315  } else {
316  LogDebug ("PixelDQM") << "PROBLEM WITH LADDER-FOLDER\n";
317  }
318  }
319  if(layOn){
320  if(theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,2,isUpgrade)){
321  (*struct_iter).second->book( conf_,iBooker,2,twoDimOn,reducedSet,isUpgrade);
322  } else {
323  LogDebug ("PixelDQM") << "PROBLEM WITH LAYER-FOLDER\n";
324  }
325  }
326  if(phiOn){
327  if(theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,3,isUpgrade)){
328  (*struct_iter).second->book( conf_,iBooker,3,twoDimOn,reducedSet,isUpgrade);
329  } else {
330  LogDebug ("PixelDQM") << "PROBLEM WITH PHI-FOLDER\n";
331  }
332  }
333  if(bladeOn){
334  if(theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,4,isUpgrade)){
335  (*struct_iter).second->book( conf_,iBooker,4,twoDimOn,reducedSet,isUpgrade);
336  } else {
337  LogDebug ("PixelDQM") << "PROBLEM WITH BLADE-FOLDER\n";
338  }
339  }
340  if(diskOn){
341  if(theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,5,isUpgrade)){
342  (*struct_iter).second->book( conf_,iBooker,5,twoDimOn,reducedSet,isUpgrade);
343  } else {
344  LogDebug ("PixelDQM") << "PROBLEM WITH DISK-FOLDER\n";
345  }
346  }
347  if(ringOn){
348  if(theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,6,isUpgrade)){
349  (*struct_iter).second->book( conf_,iBooker,6,twoDimOn,reducedSet,isUpgrade);
350  } else {
351  LogDebug ("PixelDQM") << "PROBLEM WITH RING-FOLDER\n";
352  }
353  }
354  if(smileyOn){
355  if(theSiPixelFolder.setModuleFolder(iBooker,(*struct_iter).first,7,isUpgrade)){
356  (*struct_iter).second->book( conf_,iBooker,7,twoDimOn,reducedSet,isUpgrade);
357  } else {
358  LogDebug ("PixelDQM") << "PROBLEM WITH BARREL-FOLDER\n";
359  }
360  }
361 
362  }
363 
364 }
#define LogDebug(id)
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
edm::ParameterSet conf_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
MonitorElement * bigFpixClusterEventRate
void SiPixelClusterSource::buildStructure ( edm::EventSetup const &  iSetup)
virtual

Definition at line 206 of file SiPixelClusterSource.cc.

References PixelEndcapNameUpgrade::bladeName(), PixelEndcapName::bladeName(), PixelEndcapNameUpgrade::diskName(), PixelEndcapName::diskName(), edm::EventSetup::get(), PixelEndcapNameUpgrade::halfCylinder(), PixelEndcapName::halfCylinder(), isPIB, isUpgrade, LogDebug, PixelEndcapNameUpgrade::pannelName(), PixelEndcapName::pannelName(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, PixelEndcapNameUpgrade::plaquetteName(), PixelEndcapName::plaquetteName(), DetId::rawId(), PixelGeomDetUnit::specificTopology(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), and thePixelStructure.

Referenced by dqmBeginRun().

206  {
207 
208  LogInfo ("PixelDQM") <<" SiPixelClusterSource::buildStructure" ;
210  iSetup.get<TrackerDigiGeometryRecord>().get( pDD );
211 
212  LogVerbatim ("PixelDQM") << " *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
213  LogVerbatim ("PixelDQM") << " *** I have " << pDD->dets().size() <<" detectors"<<std::endl;
214  LogVerbatim ("PixelDQM") << " *** I have " << pDD->detTypes().size() <<" types"<<std::endl;
215 
216  for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
217 
218  if(dynamic_cast<PixelGeomDetUnit const *>((*it))!=0){
219 
220  DetId detId = (*it)->geographicalId();
221  const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
222  const PixelGeomDetUnit * pixDet = dynamic_cast<const PixelGeomDetUnit*>(geoUnit);
223  int nrows = (pixDet->specificTopology()).nrows();
224  int ncols = (pixDet->specificTopology()).ncolumns();
225 
226 
227  if((detId.subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) ||
228  (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap))){
229  uint32_t id = detId();
230  SiPixelClusterModule* theModule = new SiPixelClusterModule(id, ncols, nrows);
231  if(detId.subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
232  if(isPIB) continue;
233  LogDebug ("PixelDQM") << " ---> Adding Barrel Module " << detId.rawId() << endl;
234  thePixelStructure.insert(pair<uint32_t,SiPixelClusterModule*> (id,theModule));
235  }else if ( (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (!isUpgrade) ) {
236  LogDebug ("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
238  int disk = PixelEndcapName(DetId(id)).diskName();
239  int blade = PixelEndcapName(DetId(id)).bladeName();
240  int panel = PixelEndcapName(DetId(id)).pannelName();
242  char sside[80]; sprintf(sside, "HalfCylinder_%i",side);
243  char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
244  char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
245  char spanel[80]; sprintf(spanel, "Panel_%i",panel);
246  char smodule[80];sprintf(smodule,"Module_%i",module);
247  std::string side_str = sside;
248  std::string disk_str = sdisk;
249  bool mask = side_str.find("HalfCylinder_1")!=string::npos||
250  side_str.find("HalfCylinder_2")!=string::npos||
251  side_str.find("HalfCylinder_4")!=string::npos||
252  disk_str.find("Disk_2")!=string::npos;
253  // clutch to take all of FPIX, but no BPIX:
254  mask = false;
255  if(isPIB && mask) continue;
256  thePixelStructure.insert(pair<uint32_t,SiPixelClusterModule*> (id,theModule));
257  } else if ( (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (isUpgrade) ) {
258  LogDebug ("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
260  int disk = PixelEndcapNameUpgrade(DetId(id)).diskName();
261  int blade = PixelEndcapNameUpgrade(DetId(id)).bladeName();
262  int panel = PixelEndcapNameUpgrade(DetId(id)).pannelName();
263  int module = PixelEndcapNameUpgrade(DetId(id)).plaquetteName();
264  char sside[80]; sprintf(sside, "HalfCylinder_%i",side);
265  char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
266  char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
267  char spanel[80]; sprintf(spanel, "Panel_%i",panel);
268  char smodule[80];sprintf(smodule,"Module_%i",module);
269  std::string side_str = sside;
270  std::string disk_str = sdisk;
271  bool mask = side_str.find("HalfCylinder_1")!=string::npos||
272  side_str.find("HalfCylinder_2")!=string::npos||
273  side_str.find("HalfCylinder_4")!=string::npos||
274  disk_str.find("Disk_2")!=string::npos;
275  // clutch to take all of FPIX, but no BPIX:
276  mask = false;
277  if(isPIB && mask) continue;
278  thePixelStructure.insert(pair<uint32_t,SiPixelClusterModule*> (id,theModule));
279  }//endif(Upgrade)
280  }
281  }
282  }
283  LogInfo ("PixelDQM") << " *** Pixel Structure Size " << thePixelStructure.size() << endl;
284 }
#define LogDebug(id)
int plaquetteName() const
plaquetteId (in pannel)
int plaquetteName() const
plaquetteId (in pannel)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
int bladeName() const
blade id
int bladeName() const
blade id
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
int diskName() const
disk id
Definition: DetId.h:18
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int pannelName() const
pannel id
int diskName() const
disk id
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
HalfCylinder halfCylinder() const
HalfCylinder halfCylinder() const
int pannelName() const
pannel id
Definition: vlib.h:208
void SiPixelClusterSource::dqmBeginRun ( const edm::Run r,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from DQMEDAnalyzer.

Definition at line 88 of file SiPixelClusterSource.cc.

References bladeOn, buildStructure(), diskOn, eventNo, firstRun, ladOn, layOn, lumSec, modOn, nBigEvents, nLumiSecs, phiOn, ringOn, smileyOn, and twoDimOn.

88  {
89  LogInfo ("PixelDQM") << " SiPixelClusterSource::beginJob - Initialisation ... " << std::endl;
90  LogInfo ("PixelDQM") << "Mod/Lad/Lay/Phi " << modOn << "/" << ladOn << "/"
91  << layOn << "/" << phiOn << std::endl;
92  LogInfo ("PixelDQM") << "Blade/Disk/Ring" << bladeOn << "/" << diskOn << "/"
93  << ringOn << std::endl;
94  LogInfo ("PixelDQM") << "2DIM IS " << twoDimOn << "\n";
95  LogInfo ("PixelDQM") << "Smiley (Cluster sizeY vs. Cluster eta) is " << smileyOn << "\n";
96 
97  if(firstRun){
98  eventNo = 0;
99  lumSec = 0;
100  nLumiSecs = 0;
101  nBigEvents = 0;
102  // Build map
103  buildStructure(iSetup);
104 
105  firstRun = false;
106  }
107 }
virtual void buildStructure(edm::EventSetup const &)

Member Data Documentation

int SiPixelClusterSource::bigEventSize
private

Definition at line 95 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

MonitorElement* SiPixelClusterSource::bigFpixClusterEventRate
private

Definition at line 94 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

bool SiPixelClusterSource::bladeOn
private

Definition at line 88 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

edm::ParameterSet SiPixelClusterSource::conf_
private

Definition at line 75 of file SiPixelClusterSource.h.

Referenced by bookMEs(), and SiPixelClusterSource().

bool SiPixelClusterSource::diskOn
private

Definition at line 88 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

int SiPixelClusterSource::eventNo
private

Definition at line 80 of file SiPixelClusterSource.h.

Referenced by analyze(), and dqmBeginRun().

bool SiPixelClusterSource::firstRun
private

Definition at line 90 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun(), and SiPixelClusterSource().

bool SiPixelClusterSource::isPIB
private

Definition at line 78 of file SiPixelClusterSource.h.

Referenced by bookMEs(), and buildStructure().

bool SiPixelClusterSource::isUpgrade
private

Definition at line 96 of file SiPixelClusterSource.h.

Referenced by analyze(), bookHistograms(), bookMEs(), and buildStructure().

bool SiPixelClusterSource::ladOn
private

Definition at line 86 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

bool SiPixelClusterSource::layOn
private

Definition at line 86 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

int SiPixelClusterSource::lumSec
private

Definition at line 91 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

MonitorElement* SiPixelClusterSource::meClPosDisk1mz
private

Definition at line 105 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk1pz
private

Definition at line 102 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk2mz
private

Definition at line 106 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk2pz
private

Definition at line 103 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk3mz
private

Definition at line 107 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk3pz
private

Definition at line 104 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosLayer1
private

Definition at line 98 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosLayer2
private

Definition at line 99 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosLayer3
private

Definition at line 100 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosLayer4
private

Definition at line 101 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

bool SiPixelClusterSource::modOn
private

Definition at line 82 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

int SiPixelClusterSource::nBigEvents
private

Definition at line 93 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

int SiPixelClusterSource::nLumiSecs
private

Definition at line 92 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

bool SiPixelClusterSource::phiOn
private

Definition at line 86 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

bool SiPixelClusterSource::reducedSet
private

Definition at line 84 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

bool SiPixelClusterSource::ringOn
private

Definition at line 88 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

bool SiPixelClusterSource::saveFile
private

Definition at line 77 of file SiPixelClusterSource.h.

bool SiPixelClusterSource::slowDown
private

Definition at line 79 of file SiPixelClusterSource.h.

Referenced by analyze().

bool SiPixelClusterSource::smileyOn
private

Definition at line 89 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().

edm::InputTag SiPixelClusterSource::src_
private

Definition at line 76 of file SiPixelClusterSource.h.

edm::EDGetTokenT<edmNew::DetSetVector<SiPixelCluster> > SiPixelClusterSource::srcToken_
private

Definition at line 110 of file SiPixelClusterSource.h.

Referenced by analyze(), and SiPixelClusterSource().

std::map<uint32_t,SiPixelClusterModule*> SiPixelClusterSource::thePixelStructure
private

Definition at line 81 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), buildStructure(), and ~SiPixelClusterSource().

bool SiPixelClusterSource::twoDimOn
private

Definition at line 83 of file SiPixelClusterSource.h.

Referenced by analyze(), bookMEs(), and dqmBeginRun().