53 saveFile( conf_.getUntrackedParameter<bool>(
"saveFile",
false) ),
54 isPIB( conf_.getUntrackedParameter<bool>(
"isPIB",
false) ),
55 slowDown( conf_.getUntrackedParameter<bool>(
"slowDown",
false) ),
56 modOn( conf_.getUntrackedParameter<bool>(
"modOn",
true) ),
57 twoDimOn( conf_.getUntrackedParameter<bool>(
"twoDimOn",
true) ),
58 reducedSet( conf_.getUntrackedParameter<bool>(
"reducedSet",
false) ),
59 ladOn( conf_.getUntrackedParameter<bool>(
"ladOn",
false) ),
60 layOn( conf_.getUntrackedParameter<bool>(
"layOn",
false) ),
61 phiOn( conf_.getUntrackedParameter<bool>(
"phiOn",
false) ),
62 ringOn( conf_.getUntrackedParameter<bool>(
"ringOn",
false) ),
63 bladeOn( conf_.getUntrackedParameter<bool>(
"bladeOn",
false) ),
64 diskOn( conf_.getUntrackedParameter<bool>(
"diskOn",
false) ),
65 isUpgrade( conf_.getUntrackedParameter<bool>(
"isUpgrade",
false) )
68 LogInfo (
"PixelDQM") <<
"SiPixelRecHitSource::SiPixelRecHitSource: Got DQM BackEnd interface"<<endl;
76 LogInfo (
"PixelDQM") <<
"SiPixelRecHitSource::~SiPixelRecHitSource: Destructor"<<endl;
77 std::map<uint32_t,SiPixelRecHitModule*>::iterator struct_iter;
79 delete struct_iter->second;
80 struct_iter->second = 0;
92 LogInfo (
"PixelDQM") <<
" SiPixelRecHitSource::beginJob - Initialisation ... " << std::endl;
114 LogInfo (
"PixelDQM") <<
" SiPixelRecHitSource::endJob - Saving Root File " << std::endl;
132 std::map<uint32_t,SiPixelRecHitModule*>::iterator struct_iter;
134 uint32_t TheID = (*struct_iter).first;
143 if (match != recHitColl->end()) {
149 for ( ; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++)
155 SiPixelRecHit::ClusterRef
const& clust = pixeliter->cluster();
156 int sizeX = (*clust).sizeX();
158 int sizeY = (*clust).sizeY();
164 LocalError lerr = pixeliter->localPositionError();
165 float lerr_x =
sqrt(lerr.
xx());
166 float lerr_y =
sqrt(lerr.
yy());
169 (*struct_iter).second->fill(rechit_x, rechit_y, sizeX, sizeY, lerr_x, lerr_y,
190 LogInfo (
"PixelDQM") <<
" SiPixelRecHitSource::buildStructure" ;
194 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
195 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
196 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
198 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
200 if(dynamic_cast<PixelGeomDetUnit const *>((*it))!=0){
202 DetId detId = (*it)->geographicalId();
213 uint32_t
id = detId();
217 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
221 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
228 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
229 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
230 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
231 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
232 char smodule[80];sprintf(smodule,
"Module_%i",module);
235 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
236 side_str.find(
"HalfCylinder_2")!=string::npos||
237 side_str.find(
"HalfCylinder_4")!=string::npos||
238 disk_str.find(
"Disk_2")!=string::npos;
239 if(
isPIB && mask)
continue;
243 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
250 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
251 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
252 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
253 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
254 char smodule[80];sprintf(smodule,
"Module_%i",module);
257 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
258 side_str.find(
"HalfCylinder_2")!=string::npos||
259 side_str.find(
"HalfCylinder_4")!=string::npos||
260 disk_str.find(
"Disk_2")!=string::npos;
261 if(
isPIB && mask)
continue;
276 std::map<uint32_t,SiPixelRecHitModule*>::iterator struct_iter;
288 <<
"[SiPixelDigiSource::bookMEs] Creation of DQM folder failed";
295 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
302 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
309 LogDebug (
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
316 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
323 LogDebug (
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
330 LogDebug (
"PixelDQM") <<
"PROBLEM WITH RING-FOLDER\n";
int plaquetteName() const
plaquetteId (in pannel)
T getParameter(std::string const &) const
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
bool getByToken(EDGetToken token, Handle< PROD > &result) const
SiPixelRecHitSource(const edm::ParameterSet &conf)
#define DEFINE_FWK_MODULE(type)
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::map< uint32_t, int > rechit_count
virtual void beginRun(const edm::Run &, edm::EventSetup const &)
virtual void buildStructure(edm::EventSetup const &)
int plaquetteName() const
plaquetteId (in pannel)
std::map< uint32_t, SiPixelRecHitModule * > thePixelStructure
uint32_t rawId() const
get the raw id
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.
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
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
int diskName() const
disk id
edm::EDGetTokenT< SiPixelRecHitCollection > src_
int pannelName() const
pannel id
int diskName() const
disk id
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
volatile std::atomic< bool > shutdown_flag false
HalfCylinder halfCylinder() const
HalfCylinder halfCylinder() const
int pannelName() const
pannel id