test
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 beginJob ()
 
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_, 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 }
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 72 of file SiPixelClusterSource.cc.

References thePixelStructure.

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

137 {
138  eventNo++;
139 
140  //if(modOn && !isUpgrade){
141  if(!isUpgrade){
142  if(meClPosLayer1 && meClPosLayer1->getEntries()>150000){
143  meClPosLayer1->Reset();
144  meClPosLayer2->Reset();
145  meClPosLayer3->Reset();
150  }
151  //}else if(modOn && isUpgrade){
152  }else if(isUpgrade){
153  if(meClPosLayer1 && meClPosLayer1->getEntries()>150000){
154  meClPosLayer1->Reset();
155  meClPosLayer2->Reset();
156  meClPosLayer3->Reset();
157  meClPosLayer4->Reset();
164  }
165  }
166 
167  // get input data
169  iEvent.getByToken(srcToken_, input);
170 
172  iSetup.get<TrackerDigiGeometryRecord> ().get (pDD);
173  const TrackerGeometry* tracker = &(* pDD);
174 
175  int lumiSection = (int)iEvent.luminosityBlock();
176  int nEventFpixClusters = 0;
177 
178 
179  std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
180  for (struct_iter = thePixelStructure.begin() ; struct_iter != thePixelStructure.end() ; struct_iter++) {
181 
182  int numberOfFpixClusters = (*struct_iter).second->fill(*input, tracker,
186  modOn, ladOn, layOn, phiOn,
187  bladeOn, diskOn, ringOn,
189  nEventFpixClusters = nEventFpixClusters + numberOfFpixClusters;
190 
191  }
192 
193  if(nEventFpixClusters>bigEventSize){
195  bigFpixClusterEventRate->Fill(lumiSection,1./23.);
196  }
197  }
198  //std::cout<<"nEventFpixClusters: "<<nEventFpixClusters<<" , nLumiSecs: "<<nLumiSecs<<" , nBigEvents: "<<nBigEvents<<std::endl;
199 
200  // slow down...
201  if(slowDown) usleep(10000);
202 
203 }
MonitorElement * meClPosDisk3pz
MonitorElement * meClPosDisk2pz
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
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::beginJob ( void  )
virtual

Definition at line 86 of file SiPixelClusterSource.cc.

References firstRun.

86  {
87  firstRun = true;
88 }
void SiPixelClusterSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 111 of file SiPixelClusterSource.cc.

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

111  {
112  bookMEs(iBooker);
113  // Book occupancy maps in global coordinates for all clusters:
114  iBooker.setCurrentFolder("Pixel/Clusters/OffTrack");
115  //bpix
116  meClPosLayer1 = iBooker.book2D("position_siPixelClusters_Layer_1","Clusters Layer1;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
117  meClPosLayer2 = iBooker.book2D("position_siPixelClusters_Layer_2","Clusters Layer2;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
118  meClPosLayer3 = iBooker.book2D("position_siPixelClusters_Layer_3","Clusters Layer3;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
119  if (isUpgrade) {
120  meClPosLayer4 = iBooker.book2D("position_siPixelClusters_Layer_4","Clusters Layer4;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
121  }
122  //fpix
123  meClPosDisk1pz = iBooker.book2D("position_siPixelClusters_pz_Disk_1","Clusters +Z Disk1;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
124  meClPosDisk2pz = iBooker.book2D("position_siPixelClusters_pz_Disk_2","Clusters +Z Disk2;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
125  meClPosDisk1mz = iBooker.book2D("position_siPixelClusters_mz_Disk_1","Clusters -Z Disk1;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
126  meClPosDisk2mz = iBooker.book2D("position_siPixelClusters_mz_Disk_2","Clusters -Z Disk2;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
127  if (isUpgrade) {
128  meClPosDisk3pz = iBooker.book2D("position_siPixelClusters_pz_Disk_3","Clusters +Z Disk3;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
129  meClPosDisk3mz = iBooker.book2D("position_siPixelClusters_mz_Disk_3","Clusters -Z Disk3;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
130  }
131 }
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:131
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 290 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().

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

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

Referenced by dqmBeginRun().

208  {
209 
210  LogInfo ("PixelDQM") <<" SiPixelClusterSource::buildStructure" ;
212  iSetup.get<TrackerDigiGeometryRecord>().get( pDD );
213 
214  LogVerbatim ("PixelDQM") << " *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
215  LogVerbatim ("PixelDQM") << " *** I have " << pDD->dets().size() <<" detectors"<<std::endl;
216  LogVerbatim ("PixelDQM") << " *** I have " << pDD->detTypes().size() <<" types"<<std::endl;
217 
218  for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
219 
220  if(dynamic_cast<PixelGeomDetUnit const *>((*it))!=0){
221 
222  DetId detId = (*it)->geographicalId();
223  const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
224  const PixelGeomDetUnit * pixDet = dynamic_cast<const PixelGeomDetUnit*>(geoUnit);
225  int nrows = (pixDet->specificTopology()).nrows();
226  int ncols = (pixDet->specificTopology()).ncolumns();
227 
228 
229  if((detId.subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) ||
230  (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap))){
231  uint32_t id = detId();
232  SiPixelClusterModule* theModule = new SiPixelClusterModule(id, ncols, nrows);
233  if(detId.subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
234  if(isPIB) continue;
235  LogDebug ("PixelDQM") << " ---> Adding Barrel Module " << detId.rawId() << endl;
236  thePixelStructure.insert(pair<uint32_t,SiPixelClusterModule*> (id,theModule));
237  }else if ( (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (!isUpgrade) ) {
238  LogDebug ("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
240  int disk = PixelEndcapName(DetId(id)).diskName();
241  int blade = PixelEndcapName(DetId(id)).bladeName();
242  int panel = PixelEndcapName(DetId(id)).pannelName();
244  char sside[80]; sprintf(sside, "HalfCylinder_%i",side);
245  char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
246  char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
247  char spanel[80]; sprintf(spanel, "Panel_%i",panel);
248  char smodule[80];sprintf(smodule,"Module_%i",module);
249  std::string side_str = sside;
250  std::string disk_str = sdisk;
251  bool mask = side_str.find("HalfCylinder_1")!=string::npos||
252  side_str.find("HalfCylinder_2")!=string::npos||
253  side_str.find("HalfCylinder_4")!=string::npos||
254  disk_str.find("Disk_2")!=string::npos;
255  // clutch to take all of FPIX, but no BPIX:
256  mask = false;
257  if(isPIB && mask) continue;
258  thePixelStructure.insert(pair<uint32_t,SiPixelClusterModule*> (id,theModule));
259  } else if ( (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap)) && (isUpgrade) ) {
260  LogDebug ("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
262  int disk = PixelEndcapNameUpgrade(DetId(id)).diskName();
263  int blade = PixelEndcapNameUpgrade(DetId(id)).bladeName();
264  int panel = PixelEndcapNameUpgrade(DetId(id)).pannelName();
265  int module = PixelEndcapNameUpgrade(DetId(id)).plaquetteName();
266  char sside[80]; sprintf(sside, "HalfCylinder_%i",side);
267  char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
268  char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
269  char spanel[80]; sprintf(spanel, "Panel_%i",panel);
270  char smodule[80];sprintf(smodule,"Module_%i",module);
271  std::string side_str = sside;
272  std::string disk_str = sdisk;
273  bool mask = side_str.find("HalfCylinder_1")!=string::npos||
274  side_str.find("HalfCylinder_2")!=string::npos||
275  side_str.find("HalfCylinder_4")!=string::npos||
276  disk_str.find("Disk_2")!=string::npos;
277  // clutch to take all of FPIX, but no BPIX:
278  mask = false;
279  if(isPIB && mask) continue;
280  thePixelStructure.insert(pair<uint32_t,SiPixelClusterModule*> (id,theModule));
281  }//endif(Upgrade)
282  }
283  }
284  }
285  LogInfo ("PixelDQM") << " *** Pixel Structure Size " << thePixelStructure.size() << endl;
286 }
#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 90 of file SiPixelClusterSource.cc.

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

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

Member Data Documentation

int SiPixelClusterSource::bigEventSize
private

Definition at line 96 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

MonitorElement* SiPixelClusterSource::bigFpixClusterEventRate
private

Definition at line 95 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

bool SiPixelClusterSource::bladeOn
private

Definition at line 89 of file SiPixelClusterSource.h.

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

edm::ParameterSet SiPixelClusterSource::conf_
private

Definition at line 76 of file SiPixelClusterSource.h.

Referenced by bookMEs(), and SiPixelClusterSource().

bool SiPixelClusterSource::diskOn
private

Definition at line 89 of file SiPixelClusterSource.h.

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

int SiPixelClusterSource::eventNo
private

Definition at line 81 of file SiPixelClusterSource.h.

Referenced by analyze(), and dqmBeginRun().

bool SiPixelClusterSource::firstRun
private

Definition at line 91 of file SiPixelClusterSource.h.

Referenced by beginJob(), and dqmBeginRun().

bool SiPixelClusterSource::isPIB
private

Definition at line 79 of file SiPixelClusterSource.h.

Referenced by bookMEs(), and buildStructure().

bool SiPixelClusterSource::isUpgrade
private

Definition at line 97 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::ladOn
private

Definition at line 87 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::layOn
private

Definition at line 87 of file SiPixelClusterSource.h.

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

int SiPixelClusterSource::lumSec
private

Definition at line 92 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

MonitorElement* SiPixelClusterSource::meClPosDisk1mz
private

Definition at line 106 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk1pz
private

Definition at line 103 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk2mz
private

Definition at line 107 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk2pz
private

Definition at line 104 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk3mz
private

Definition at line 108 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosDisk3pz
private

Definition at line 105 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosLayer1
private

Definition at line 99 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosLayer2
private

Definition at line 100 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosLayer3
private

Definition at line 101 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClPosLayer4
private

Definition at line 102 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

bool SiPixelClusterSource::modOn
private

Definition at line 83 of file SiPixelClusterSource.h.

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

int SiPixelClusterSource::nBigEvents
private

Definition at line 94 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

int SiPixelClusterSource::nLumiSecs
private

Definition at line 93 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

bool SiPixelClusterSource::phiOn
private

Definition at line 87 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::reducedSet
private

Definition at line 85 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

bool SiPixelClusterSource::ringOn
private

Definition at line 89 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::saveFile
private

Definition at line 78 of file SiPixelClusterSource.h.

bool SiPixelClusterSource::slowDown
private

Definition at line 80 of file SiPixelClusterSource.h.

Referenced by analyze().

bool SiPixelClusterSource::smileyOn
private

Definition at line 90 of file SiPixelClusterSource.h.

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

edm::InputTag SiPixelClusterSource::src_
private

Definition at line 77 of file SiPixelClusterSource.h.

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

Definition at line 111 of file SiPixelClusterSource.h.

Referenced by analyze(), and SiPixelClusterSource().

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

Definition at line 82 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::twoDimOn
private

Definition at line 84 of file SiPixelClusterSource.h.

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