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) )
66 LogInfo (
"PixelDQM") <<
"SiPixelClusterSource::SiPixelClusterSource: Got DQM BackEnd interface"<<endl;
77 LogInfo (
"PixelDQM") <<
"SiPixelClusterSource::~SiPixelClusterSource: Destructor"<<endl;
79 std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
81 delete struct_iter->second;
82 struct_iter->second = 0;
93 LogInfo (
"PixelDQM") <<
" SiPixelClusterSource::beginJob - Initialisation ... " << std::endl;
99 LogInfo (
"PixelDQM") <<
"Smiley (Cluster sizeY vs. Cluster eta) is " <<
smileyOn <<
"\n";
113 meClPosLayer1 =
theDMBE->
book2D(
"position_siPixelClusters_Layer_1",
"Clusters Layer1;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
114 meClPosLayer2 =
theDMBE->
book2D(
"position_siPixelClusters_Layer_2",
"Clusters Layer2;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
115 meClPosLayer3 =
theDMBE->
book2D(
"position_siPixelClusters_Layer_3",
"Clusters Layer3;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
117 meClPosLayer4 =
theDMBE->
book2D(
"position_siPixelClusters_Layer_4",
"Clusters Layer4;Global Z (cm);Global #phi",200,-30.,30.,128,-3.2,3.2);
120 meClPosDisk1pz =
theDMBE->
book2D(
"position_siPixelClusters_pz_Disk_1",
"Clusters +Z Disk1;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
121 meClPosDisk2pz =
theDMBE->
book2D(
"position_siPixelClusters_pz_Disk_2",
"Clusters +Z Disk2;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
122 meClPosDisk1mz =
theDMBE->
book2D(
"position_siPixelClusters_mz_Disk_1",
"Clusters -Z Disk1;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
123 meClPosDisk2mz =
theDMBE->
book2D(
"position_siPixelClusters_mz_Disk_2",
"Clusters -Z Disk2;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
125 meClPosDisk3pz =
theDMBE->
book2D(
"position_siPixelClusters_pz_Disk_3",
"Clusters +Z Disk3;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
126 meClPosDisk3mz =
theDMBE->
book2D(
"position_siPixelClusters_mz_Disk_3",
"Clusters -Z Disk3;Global X (cm);Global Y (cm)",80,-20.,20.,80,-20.,20.);
136 LogInfo (
"PixelDQM") <<
" SiPixelClusterSource::endJob - Saving Root File " << std::endl;
206 int nEventFpixClusters = 0;
209 std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
212 int numberOfFpixClusters = (*struct_iter).second->fill(*input, tracker,
modOn,
216 nEventFpixClusters = nEventFpixClusters + numberOfFpixClusters;
227 me->
Fill(lumiSection,1./23.);
242 LogInfo (
"PixelDQM") <<
" SiPixelClusterSource::buildStructure" ;
246 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
247 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
248 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
250 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
252 if(dynamic_cast<PixelGeomDetUnit const *>((*it))!=0){
254 DetId detId = (*it)->geographicalId();
255 const GeomDetUnit * geoUnit = pDD->idToDetUnit( detId );
263 uint32_t
id = detId();
267 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
270 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
276 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
277 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
278 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
279 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
280 char smodule[80];sprintf(smodule,
"Module_%i",module);
283 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
284 side_str.find(
"HalfCylinder_2")!=string::npos||
285 side_str.find(
"HalfCylinder_4")!=string::npos||
286 disk_str.find(
"Disk_2")!=string::npos;
289 if(
isPIB && mask)
continue;
292 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
298 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
299 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
300 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
301 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
302 char smodule[80];sprintf(smodule,
"Module_%i",module);
305 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
306 side_str.find(
"HalfCylinder_2")!=string::npos||
307 side_str.find(
"HalfCylinder_4")!=string::npos||
308 disk_str.find(
"Disk_2")!=string::npos;
311 if(
isPIB && mask)
continue;
327 char title[256]; snprintf(title, 256,
"Rate of events with >%i FPIX clusters;LumiSection;Rate of large FPIX events per LS [Hz]",
bigEventSize);
331 std::map<uint32_t,SiPixelClusterModule*>::iterator struct_iter;
344 <<
"[SiPixelClusterSource::bookMEs] Creation of DQM folder failed";
351 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
358 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
365 LogDebug (
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
372 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
379 LogDebug (
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
386 LogDebug (
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
393 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
MonitorElement * meClPosDisk3pz
MonitorElement * meClPosDisk2pz
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
edm::LuminosityBlockNumber_t luminosityBlock() const
double getEntries(void) const
get # of entries
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > srcToken_
int plaquetteName() const
plaquetteId (in pannel)
MonitorElement * meClPosLayer4
SiPixelClusterSource(const edm::ParameterSet &conf)
static std::string const input
uint32_t rawId() const
get the raw id
MonitorElement * meClPosLayer3
int bladeName() const
blade id
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0, bool isUpgrade=false)
Set folder name for a module or plaquette.
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
MonitorElement * meClPosLayer1
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
int bladeName() const
blade id
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int diskName() const
disk id
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
int pannelName() const
pannel id
MonitorElement * meClPosDisk3mz
MonitorElement * meClPosDisk2mz
int diskName() const
disk id
std::map< uint32_t, SiPixelClusterModule * > thePixelStructure
volatile std::atomic< bool > shutdown_flag false
MonitorElement * meClPosLayer2
HalfCylinder halfCylinder() const
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
HalfCylinder halfCylinder() const
int pannelName() const
pannel id
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * bigFpixClusterEventRate
MonitorElement * meClPosDisk1mz
void setCurrentFolder(const std::string &fullpath)
MonitorElement * meClPosDisk1pz