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) ),
69 LogInfo (
"PixelDQM") <<
"SiPixelClusterSource::SiPixelClusterSource: Got DQM BackEnd interface"<<endl;
82 LogInfo (
"PixelDQM") <<
"SiPixelClusterSource::~SiPixelClusterSource: Destructor"<<endl;
84 std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
86 delete struct_iter->second;
87 struct_iter->second = 0;
94 LogInfo (
"PixelDQM") <<
" SiPixelClusterSource::beginJob - Initialisation ... " << std::endl;
100 LogInfo (
"PixelDQM") <<
"Smiley (Cluster sizeY vs. Cluster eta) is " <<
smileyOn <<
"\n";
119 std::stringstream ss1, ss2;
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));
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)";
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)";
138 ss1.str(
std::string()); ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_Barrel";
139 ss2.str(
std::string()); ss2 <<
"Total number of barrel clusters profile;Lumisection;";
145 ss1.str(
std::string()); ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_FPIX+";
146 ss2.str(
std::string()); ss2 <<
"Total number of FPIX+ clusters profile;Lumisection;";
150 ss1.str(
std::string()); ss1 <<
"totalNumberOfClustersProfile_siPixelClusters_FPIX-";
151 ss2.str(
std::string()); ss2 <<
"Total number of FPIX- clusters profile;Lumisection;";
185 int nEventFpixClusters = 0;
187 int nEventsBarrel = 0;
188 int nEventsFPIXm = 0;
189 int nEventsFPIXp = 0;
192 std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
195 int numberOfFpixClusters = (*struct_iter).second->fill(*input, tracker,
196 &nEventsBarrel, &nEventsFPIXp, &nEventsFPIXm,
203 nEventFpixClusters = nEventFpixClusters + numberOfFpixClusters;
233 LogInfo (
"PixelDQM") <<
" SiPixelClusterSource::buildStructure" ;
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;
245 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
247 if(dynamic_cast<PixelGeomDetUnit const *>((*it))!=0){
249 DetId detId = (*it)->geographicalId();
250 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
258 uint32_t
id = detId();
262 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
267 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
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);
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;
287 if(
isPIB && mask)
continue;
302 char title[256]; snprintf(title, 256,
"Rate of events with >%i FPIX clusters;LumiSection;Rate of large FPIX events per LS [Hz]",
bigEventSize);
306 std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
319 <<
"[SiPixelClusterSource::bookMEs] Creation of DQM folder failed";
326 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
333 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
340 LogDebug (
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
347 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
354 LogDebug (
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
361 LogDebug (
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
368 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BARREL-FOLDER\n";
int plaquetteName() const
plaquetteId (in pannel)
virtual void buildStructure(edm::EventSetup const &)
T getParameter(std::string const &) const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< MonitorElement * > meClPosDiskmz
#define DEFINE_FWK_MODULE(type)
edm::LuminosityBlockNumber_t luminosityBlock() const
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > srcToken_
SiPixelClusterSource(const edm::ParameterSet &conf)
static std::string const input
uint32_t rawId() const
get the raw id
int bladeName() const
blade id
std::vector< MonitorElement * > meClPosDiskpz
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)
MonitorElement * meClusBarrelProf
std::vector< MonitorElement * > meClPosLayer
MonitorElement * meClusFpixMProf
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
MonitorElement * meClusFpixPProf
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int layerName() const
layer id
T const * product() const
virtual void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual void dqmBeginRun(const edm::Run &, edm::EventSetup const &)
int pannelName() const
pannel id
virtual void bookMEs(DQMStore::IBooker &, const edm::EventSetup &iSetup)
int diskName() const
disk id
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
volatile std::atomic< bool > shutdown_flag false
HalfCylinder halfCylinder() const
MonitorElement * bigFpixClusterEventRate
std::string topFolderName_