52 saveFile( conf_.getUntrackedParameter<bool>(
"saveFile",
false) ),
53 isPIB( conf_.getUntrackedParameter<bool>(
"isPIB",
false) ),
54 slowDown( conf_.getUntrackedParameter<bool>(
"slowDown",
false) ),
55 modOn( conf_.getUntrackedParameter<bool>(
"modOn",
true) ),
56 twoDimOn( conf_.getUntrackedParameter<bool>(
"twoDimOn",
true) ),
57 reducedSet( conf_.getUntrackedParameter<bool>(
"reducedSet",
false) ),
58 ladOn( conf_.getUntrackedParameter<bool>(
"ladOn",
false) ),
59 layOn( conf_.getUntrackedParameter<bool>(
"layOn",
false) ),
60 phiOn( conf_.getUntrackedParameter<bool>(
"phiOn",
false) ),
61 ringOn( conf_.getUntrackedParameter<bool>(
"ringOn",
false) ),
62 bladeOn( conf_.getUntrackedParameter<bool>(
"bladeOn",
false) ),
63 diskOn( conf_.getUntrackedParameter<bool>(
"diskOn",
false) )
66 LogInfo (
"PixelDQM") <<
"SiPixelRecHitSource::SiPixelRecHitSource: Got DQM BackEnd interface"<<endl;
74 LogInfo (
"PixelDQM") <<
"SiPixelRecHitSource::~SiPixelRecHitSource: Destructor"<<endl;
75 std::map<uint32_t,SiPixelRecHitModule*>::iterator struct_iter;
77 delete struct_iter->second;
78 struct_iter->second = 0;
90 LogInfo (
"PixelDQM") <<
" SiPixelRecHitSource::beginJob - Initialisation ... " << std::endl;
112 LogInfo (
"PixelDQM") <<
" SiPixelRecHitSource::endJob - Saving Root File " << std::endl;
131 std::map<uint32_t,SiPixelRecHitModule*>::iterator struct_iter;
133 uint32_t TheID = (*struct_iter).first;
142 if (match != recHitColl->end()) {
148 for ( ; pixeliter != pixelrechitRangeIteratorEnd; pixeliter++)
154 SiPixelRecHit::ClusterRef
const& clust = pixeliter->cluster();
155 int sizeX = (*clust).sizeX();
157 int sizeY = (*clust).sizeY();
163 LocalError lerr = pixeliter->localPositionError();
164 float lerr_x =
sqrt(lerr.
xx());
165 float lerr_y =
sqrt(lerr.
yy());
168 (*struct_iter).second->fill(rechit_x, rechit_y, sizeX, sizeY, lerr_x, lerr_y,
189 LogInfo (
"PixelDQM") <<
" SiPixelRecHitSource::buildStructure" ;
193 LogVerbatim (
"PixelDQM") <<
" *** Geometry node for TrackerGeom is "<<&(*pDD)<<std::endl;
194 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->dets().size() <<
" detectors"<<std::endl;
195 LogVerbatim (
"PixelDQM") <<
" *** I have " << pDD->detTypes().size() <<
" types"<<std::endl;
197 for(TrackerGeometry::DetContainer::const_iterator it = pDD->dets().begin(); it != pDD->dets().end(); it++){
199 if(dynamic_cast<PixelGeomDetUnit*>((*it))!=0){
201 DetId detId = (*it)->geographicalId();
212 uint32_t
id = detId();
216 LogDebug (
"PixelDQM") <<
" ---> Adding Barrel Module " << detId.
rawId() << endl;
220 LogDebug (
"PixelDQM") <<
" ---> Adding Endcap Module " << detId.
rawId() << endl;
227 char sside[80]; sprintf(sside,
"HalfCylinder_%i",side);
228 char sdisk[80]; sprintf(sdisk,
"Disk_%i",disk);
229 char sblade[80]; sprintf(sblade,
"Blade_%02i",blade);
230 char spanel[80]; sprintf(spanel,
"Panel_%i",panel);
231 char smodule[80];sprintf(smodule,
"Module_%i",module);
234 bool mask = side_str.find(
"HalfCylinder_1")!=string::npos||
235 side_str.find(
"HalfCylinder_2")!=string::npos||
236 side_str.find(
"HalfCylinder_4")!=string::npos||
237 disk_str.find(
"Disk_2")!=string::npos;
238 if(
isPIB && mask)
continue;
253 std::map<uint32_t,SiPixelRecHitModule*>::iterator struct_iter;
265 <<
"[SiPixelDigiSource::bookMEs] Creation of DQM folder failed";
272 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LADDER-FOLDER\n";
279 LogDebug (
"PixelDQM") <<
"PROBLEM WITH LAYER-FOLDER\n";
286 LogDebug (
"PixelDQM") <<
"PROBLEM WITH PHI-FOLDER\n";
293 LogDebug (
"PixelDQM") <<
"PROBLEM WITH BLADE-FOLDER\n";
300 LogDebug (
"PixelDQM") <<
"PROBLEM WITH DISK-FOLDER\n";
307 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 &)
std::map< uint32_t, SiPixelRecHitModule * > thePixelStructure
uint32_t rawId() const
get the raw id
int bladeName() const
blade id
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 subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
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
bool setModuleFolder(const uint32_t &rawdetid=0, int type=0)
Set folder name for a module or plaquette.