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 | Public Attributes | 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 Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

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 &, const edm::EventSetup &iSetup)
 
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
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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 (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Public Attributes

std::string topFolderName_
 

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
 
std::vector< MonitorElement * > meClPosDiskmz
 
std::vector< MonitorElement * > meClPosDiskpz
 
std::vector< MonitorElement * > meClPosLayer
 
MonitorElementmeClusBarrelProf
 
MonitorElementmeClusFpixMProf
 
MonitorElementmeClusFpixPProf
 
bool modOn
 
int nBigEvents
 
int nLumiSecs
 
int noOfDisks
 
int noOfLayers
 
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::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 48 of file SiPixelClusterSource.cc.

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

48  :
49  conf_(iConfig),
50  src_( conf_.getParameter<edm::InputTag>( "src" ) ),
51  saveFile( conf_.getUntrackedParameter<bool>("saveFile",false) ),
52  isPIB( conf_.getUntrackedParameter<bool>("isPIB",false) ),
53  slowDown( conf_.getUntrackedParameter<bool>("slowDown",false) ),
54  modOn( conf_.getUntrackedParameter<bool>("modOn",true) ),
55  twoDimOn( conf_.getUntrackedParameter<bool>("twoDimOn",true) ),
56  reducedSet( conf_.getUntrackedParameter<bool>("reducedSet",false) ),
57  ladOn( conf_.getUntrackedParameter<bool>("ladOn",false) ),
58  layOn( conf_.getUntrackedParameter<bool>("layOn",false) ),
59  phiOn( conf_.getUntrackedParameter<bool>("phiOn",false) ),
60  ringOn( conf_.getUntrackedParameter<bool>("ringOn",false) ),
61  bladeOn( conf_.getUntrackedParameter<bool>("bladeOn",false) ),
62  diskOn( conf_.getUntrackedParameter<bool>("diskOn",false) ),
63  smileyOn(conf_.getUntrackedParameter<bool>("smileyOn",false) ),
64  bigEventSize( conf_.getUntrackedParameter<int>("bigEventSize",100) ),
65  isUpgrade( conf_.getUntrackedParameter<bool>("isUpgrade",false) ),
66  noOfLayers(0),
67  noOfDisks(0)
68 {
69  LogInfo ("PixelDQM") << "SiPixelClusterSource::SiPixelClusterSource: Got DQM BackEnd interface"<<endl;
70 
71  //set Token(-s)
72  srcToken_ = consumes<edmNew::DetSetVector<SiPixelCluster> >(conf_.getParameter<edm::InputTag>("src"));
73  firstRun = true;
74  topFolderName_ = conf_.getParameter<std::string>("TopFolderName");
75 }
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 78 of file SiPixelClusterSource.cc.

References thePixelStructure.

79 {
80  // do anything here that needs to be done at desctruction time
81  // (e.g. close files, deallocate resources etc.)
82  LogInfo ("PixelDQM") << "SiPixelClusterSource::~SiPixelClusterSource: Destructor"<<endl;
83 
84  std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
85  for (struct_iter = thePixelStructure.begin() ; struct_iter != thePixelStructure.end() ; struct_iter++){
86  delete struct_iter->second;
87  struct_iter->second = 0;
88  }
89 }
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 160 of file SiPixelClusterSource.cc.

References bigEventSize, bigFpixClusterEventRate, bladeOn, diskOn, eventNo, MonitorElement::Fill(), edm::EventSetup::get(), edm::Event::getByToken(), i, input, isUpgrade, ladOn, layOn, edm::EventBase::luminosityBlock(), meClPosDiskmz, meClPosDiskpz, meClPosLayer, meClusBarrelProf, meClusFpixMProf, meClusFpixPProf, modOn, noOfDisks, noOfLayers, edm::EventBase::orbitNumber(), phiOn, reducedSet, ringOn, slowDown, smileyOn, srcToken_, thePixelStructure, patCandidatesForDimuonsSequences_cff::tracker, and twoDimOn.

161 {
162  eventNo++;
163 
164  if(meClPosLayer.at(0) && meClPosLayer.at(0)->getEntries()>150000){
165  for (int i = 0; i < noOfLayers; i++)
166  {
167  meClPosLayer.at(i)->Reset();
168  }
169  for (int i = 0; i < noOfDisks; i++)
170  {
171  meClPosDiskpz.at(i)->Reset();
172  meClPosDiskmz.at(i)->Reset();
173  }
174  }
175 
176  // get input data
178  iEvent.getByToken(srcToken_, input);
179 
181  iSetup.get<TrackerDigiGeometryRecord> ().get (pDD);
182  const TrackerGeometry* tracker = &(* pDD);
183 
184  int lumiSection = (int)iEvent.luminosityBlock();
185  int nEventFpixClusters = 0;
186 
187  int nEventsBarrel = 0;
188  int nEventsFPIXm = 0;
189  int nEventsFPIXp = 0;
190 
191 
192  std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
193  for (struct_iter = thePixelStructure.begin() ; struct_iter != thePixelStructure.end() ; struct_iter++) {
194 
195  int numberOfFpixClusters = (*struct_iter).second->fill(*input, tracker,
196  &nEventsBarrel, &nEventsFPIXp, &nEventsFPIXm,
197  meClPosLayer,
200  modOn, ladOn, layOn, phiOn,
201  bladeOn, diskOn, ringOn,
203  nEventFpixClusters = nEventFpixClusters + numberOfFpixClusters;
204 
205  }
206 
207  if(nEventFpixClusters>bigEventSize){
209  bigFpixClusterEventRate->Fill(lumiSection,1./23.);
210  }
211  }
212 
213  float trendVar = iEvent.orbitNumber()/262144.0; //lumisection : seconds - matches strip trend plot
214 
215  meClusBarrelProf->Fill(trendVar,nEventsBarrel);
216  meClusFpixPProf->Fill(trendVar,nEventsFPIXp);
217  meClusFpixMProf->Fill(trendVar,nEventsFPIXm);
218 
219  //std::cout<<"nEventFpixClusters: "<<nEventFpixClusters<<" , nLumiSecs: "<<nLumiSecs<<" , nBigEvents: "<<nBigEvents<<std::endl;
220 
221 
222 
223  // slow down...
224  if(slowDown) usleep(10000);
225 
226 }
int i
Definition: DBlmapReader.cc:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
std::vector< MonitorElement * > meClPosDiskmz
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:62
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > srcToken_
static std::string const input
Definition: EdmProvDump.cc:44
void Fill(long long x)
std::vector< MonitorElement * > meClPosDiskpz
MonitorElement * meClusBarrelProf
std::vector< MonitorElement * > meClPosLayer
int orbitNumber() const
Definition: EventBase.h:66
MonitorElement * meClusFpixMProf
const T & get() const
Definition: EventSetup.h:56
MonitorElement * meClusFpixPProf
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
MonitorElement * bigFpixClusterEventRate
void SiPixelClusterSource::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 114 of file SiPixelClusterSource.cc.

References DQMStore::IBooker::book2D(), bookMEs(), DQMStore::IBooker::bookProfile(), MonitorElement::getTH1(), i, meClPosDiskmz, meClPosDiskpz, meClPosLayer, meClusBarrelProf, meClusFpixMProf, meClusFpixPProf, noOfDisks, noOfLayers, DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and topFolderName_.

114  {
115  bookMEs(iBooker, iSetup);
116  // Book occupancy maps in global coordinates for all clusters:
117  iBooker.setCurrentFolder(topFolderName_+"/Clusters/OffTrack");
118  //bpix
119  std::stringstream ss1, ss2;
120  for (int i = 1; i <= noOfLayers; i++)
121  {
122  ss1.str(std::string()); ss1 << "position_siPixelClusters_Layer_" << i;
123  ss2.str(std::string()); ss2 << "Clusters Layer" << i << ";Global Z (cm);Global #phi";
124  meClPosLayer.push_back(iBooker.book2D(ss1.str(),ss2.str(),200,-30.,30.,128,-3.2,3.2));
125  }
126  for (int i = 1; i <= noOfDisks; i++)
127  {
128  ss1.str(std::string()); ss1 << "position_siPixelClusters_pz_Disk_" << i;
129  ss2.str(std::string()); ss2 << "Clusters +Z Disk" << i << ";Global X (cm);Global Y (cm)";
130  meClPosDiskpz.push_back(iBooker.book2D(ss1.str(),ss2.str(),80,-20.,20.,80,-20.,20.));
131  ss1.str(std::string()); ss1 << "position_siPixelClusters_mz_Disk_" << i;
132  ss2.str(std::string()); ss2 << "Clusters -Z Disk" << i << ";Global X (cm);Global Y (cm)";
133  meClPosDiskmz.push_back(iBooker.book2D(ss1.str(),ss2.str(),80,-20.,20.,80,-20.,20.));
134  }
135 
136  //Book trend cluster plots for barrel and endcap. Lumisections for offline and second for online - taken from strips
137  iBooker.setCurrentFolder(topFolderName_+"/Barrel");
138  ss1.str(std::string()); ss1 << "totalNumberOfClustersProfile_siPixelClusters_Barrel";
139  ss2.str(std::string()); ss2 << "Total number of barrel clusters profile;Lumisection;";
140  meClusBarrelProf = iBooker.bookProfile(ss1.str(),ss2.str(),2400,0.,150,0,0,"");
141  meClusBarrelProf->getTH1()->SetCanExtend(TH1::kAllAxes);
142 
143  iBooker.setCurrentFolder(topFolderName_+"/Endcap");
144 
145  ss1.str(std::string()); ss1 << "totalNumberOfClustersProfile_siPixelClusters_FPIX+";
146  ss2.str(std::string()); ss2 << "Total number of FPIX+ clusters profile;Lumisection;";
147  meClusFpixPProf = iBooker.bookProfile(ss1.str(),ss2.str(),2400,0.,150,0,0,"");
148  meClusFpixPProf->getTH1()->SetCanExtend(TH1::kAllAxes);
149 
150  ss1.str(std::string()); ss1 << "totalNumberOfClustersProfile_siPixelClusters_FPIX-";
151  ss2.str(std::string()); ss2 << "Total number of FPIX- clusters profile;Lumisection;";
152  meClusFpixMProf = iBooker.bookProfile(ss1.str(),ss2.str(),2400,0.,150,0,0,"");
153  meClusFpixMProf->getTH1()->SetCanExtend(TH1::kAllAxes);
154 
155 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
std::vector< MonitorElement * > meClPosDiskmz
std::vector< MonitorElement * > meClPosDiskpz
MonitorElement * meClusBarrelProf
TH1 * getTH1(void) const
std::vector< MonitorElement * > meClPosLayer
MonitorElement * meClusFpixMProf
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * meClusFpixPProf
virtual void bookMEs(DQMStore::IBooker &, const edm::EventSetup &iSetup)
void SiPixelClusterSource::bookMEs ( DQMStore::IBooker iBooker,
const edm::EventSetup iSetup 
)
virtual

Create folder tree and book histograms

Definition at line 298 of file SiPixelClusterSource.cc.

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

Referenced by bookHistograms().

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

Definition at line 231 of file SiPixelClusterSource.cc.

References PixelEndcapName::bladeName(), PixelEndcapName::diskName(), edm::EventSetup::get(), PixelEndcapName::halfCylinder(), isPIB, isUpgrade, PixelBarrelName::layerName(), LogDebug, noOfDisks, noOfLayers, PixelEndcapName::pannelName(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, PixelEndcapName::plaquetteName(), edm::ESHandle< class >::product(), DetId::rawId(), PixelGeomDetUnit::specificTopology(), AlCaHLTBitMon_QueryRunRegistry::string, DetId::subdetId(), and thePixelStructure.

Referenced by dqmBeginRun().

231  {
232 
233  LogInfo ("PixelDQM") <<" SiPixelClusterSource::buildStructure" ;
235  iSetup.get<TrackerDigiGeometryRecord>().get( pDD );
236 
237  edm::ESHandle<TrackerTopology> tTopoHandle;
238  iSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
239  const TrackerTopology *pTT = tTopoHandle.product();
240 
241  LogVerbatim ("PixelDQM") << " *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
242  LogVerbatim ("PixelDQM") << " *** I have " << pDD->dets().size() <<" detectors"<<std::endl;
243  LogVerbatim ("PixelDQM") << " *** I have " << pDD->detTypes().size() <<" types"<<std::endl;
244 
245  for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
246 
247  if(dynamic_cast<PixelGeomDetUnit const *>((*it))!=0){
248 
249  DetId detId = (*it)->geographicalId();
250  const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
251  const PixelGeomDetUnit * pixDet = dynamic_cast<const PixelGeomDetUnit*>(geoUnit);
252  int nrows = (pixDet->specificTopology()).nrows();
253  int ncols = (pixDet->specificTopology()).ncolumns();
254 
255 
256  if((detId.subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) ||
257  (detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap))){
258  uint32_t id = detId();
259  SiPixelClusterModule* theModule = new SiPixelClusterModule(id, ncols, nrows);
260  if(detId.subdetId() == static_cast<int>(PixelSubdetector::PixelBarrel)) {
261  if(isPIB) continue;
262  LogDebug ("PixelDQM") << " ---> Adding Barrel Module " << detId.rawId() << endl;
263  int layer = PixelBarrelName(DetId(id),pTT,isUpgrade).layerName();
264  if (layer > noOfLayers) noOfLayers = layer;
265  thePixelStructure.insert(pair<uint32_t,SiPixelClusterModule*> (id,theModule));
266  }else if ( detId.subdetId() == static_cast<int>(PixelSubdetector::PixelEndcap ) ) {
267  LogDebug ("PixelDQM") << " ---> Adding Endcap Module " << detId.rawId() << endl;
269  int disk = PixelEndcapName(DetId(id),pTT,isUpgrade).diskName();
270  if (disk>noOfDisks) noOfDisks=disk;
271  int blade = PixelEndcapName(DetId(id),pTT,isUpgrade).bladeName();
272  int panel = PixelEndcapName(DetId(id),pTT,isUpgrade).pannelName();
274  char sside[80]; sprintf(sside, "HalfCylinder_%i",side);
275  char sdisk[80]; sprintf(sdisk, "Disk_%i",disk);
276  char sblade[80]; sprintf(sblade, "Blade_%02i",blade);
277  char spanel[80]; sprintf(spanel, "Panel_%i",panel);
278  char smodule[80];sprintf(smodule,"Module_%i",module);
279  std::string side_str = sside;
280  std::string disk_str = sdisk;
281  bool mask = side_str.find("HalfCylinder_1")!=string::npos||
282  side_str.find("HalfCylinder_2")!=string::npos||
283  side_str.find("HalfCylinder_4")!=string::npos||
284  disk_str.find("Disk_2")!=string::npos;
285  // clutch to take all of FPIX, but no BPIX:
286  mask = false;
287  if(isPIB && mask) continue;
288  thePixelStructure.insert(pair<uint32_t,SiPixelClusterModule*> (id,theModule));
289  }
290  }
291  }
292  }
293  LogInfo ("PixelDQM") << " *** Pixel Structure Size " << thePixelStructure.size() << endl;
294 }
#define LogDebug(id)
int plaquetteName() const
plaquetteId (in pannel)
uint32_t rawId() const
get the raw id
Definition: DetId.h:43
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
Definition: DetId.h:18
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int layerName() const
layer id
T const * product() const
Definition: ESHandle.h:86
int pannelName() const
pannel id
int diskName() const
disk id
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
HalfCylinder halfCylinder() const
Definition: vlib.h:208
void SiPixelClusterSource::dqmBeginRun ( const edm::Run r,
edm::EventSetup const &  iSetup 
)
virtual

Reimplemented from DQMEDAnalyzer.

Definition at line 93 of file SiPixelClusterSource.cc.

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

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

Member Data Documentation

int SiPixelClusterSource::bigEventSize
private

Definition at line 97 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

MonitorElement* SiPixelClusterSource::bigFpixClusterEventRate
private

Definition at line 96 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

bool SiPixelClusterSource::bladeOn
private

Definition at line 90 of file SiPixelClusterSource.h.

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

edm::ParameterSet SiPixelClusterSource::conf_
private

Definition at line 77 of file SiPixelClusterSource.h.

Referenced by bookMEs(), and SiPixelClusterSource().

bool SiPixelClusterSource::diskOn
private

Definition at line 90 of file SiPixelClusterSource.h.

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

int SiPixelClusterSource::eventNo
private

Definition at line 82 of file SiPixelClusterSource.h.

Referenced by analyze(), and dqmBeginRun().

bool SiPixelClusterSource::firstRun
private

Definition at line 92 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun(), and SiPixelClusterSource().

bool SiPixelClusterSource::isPIB
private

Definition at line 80 of file SiPixelClusterSource.h.

Referenced by bookMEs(), and buildStructure().

bool SiPixelClusterSource::isUpgrade
private

Definition at line 98 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::ladOn
private

Definition at line 88 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::layOn
private

Definition at line 88 of file SiPixelClusterSource.h.

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

int SiPixelClusterSource::lumSec
private

Definition at line 93 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

std::vector<MonitorElement*> SiPixelClusterSource::meClPosDiskmz
private

Definition at line 102 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

std::vector<MonitorElement*> SiPixelClusterSource::meClPosDiskpz
private

Definition at line 101 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

std::vector<MonitorElement*> SiPixelClusterSource::meClPosLayer
private

Definition at line 100 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClusBarrelProf
private

Definition at line 104 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClusFpixMProf
private

Definition at line 106 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* SiPixelClusterSource::meClusFpixPProf
private

Definition at line 105 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookHistograms().

bool SiPixelClusterSource::modOn
private

Definition at line 84 of file SiPixelClusterSource.h.

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

int SiPixelClusterSource::nBigEvents
private

Definition at line 95 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

int SiPixelClusterSource::nLumiSecs
private

Definition at line 94 of file SiPixelClusterSource.h.

Referenced by dqmBeginRun().

int SiPixelClusterSource::noOfDisks
private

Definition at line 109 of file SiPixelClusterSource.h.

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

int SiPixelClusterSource::noOfLayers
private

Definition at line 108 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::phiOn
private

Definition at line 88 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::reducedSet
private

Definition at line 86 of file SiPixelClusterSource.h.

Referenced by analyze(), and bookMEs().

bool SiPixelClusterSource::ringOn
private

Definition at line 90 of file SiPixelClusterSource.h.

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

bool SiPixelClusterSource::saveFile
private

Definition at line 79 of file SiPixelClusterSource.h.

bool SiPixelClusterSource::slowDown
private

Definition at line 81 of file SiPixelClusterSource.h.

Referenced by analyze().

bool SiPixelClusterSource::smileyOn
private

Definition at line 91 of file SiPixelClusterSource.h.

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

edm::InputTag SiPixelClusterSource::src_
private

Definition at line 78 of file SiPixelClusterSource.h.

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

Definition at line 112 of file SiPixelClusterSource.h.

Referenced by analyze(), and SiPixelClusterSource().

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

Definition at line 83 of file SiPixelClusterSource.h.

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

std::string SiPixelClusterSource::topFolderName_

Definition at line 74 of file SiPixelClusterSource.h.

Referenced by bookHistograms(), bookMEs(), and SiPixelClusterSource().

bool SiPixelClusterSource::twoDimOn
private

Definition at line 85 of file SiPixelClusterSource.h.

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