78 virtual void endJob()
override ;
124 m_multiplicityMapTokens(edm::
vector_transform(iConfig.getParameter<std::vector<edm::InputTag> >(
"multiplicityMaps"), [this](edm::InputTag
const &
tag){
return consumes<std::map<unsigned int, int> >(
tag);})),
131 m_avemultiplicity =
m_rhm.makeTProfile(
"avemult",
"Average Multiplicty",6000,0.5,6000.5);
132 m_aveoccupancy =
m_rhm.makeTProfile(
"aveoccu",
"Average Occupancy",6000,0.5,6000.5);
134 m_nchannels_ideal =
m_rhm.makeTH1F(
"nchannels_ideal",
"Number of channels (ideal)",6000,0.5,6000.5);
135 m_nchannels_real =
m_rhm.makeTH1F(
"nchannels_real",
"Number of channels (real)",6000,0.5,6000.5);
137 m_averadius =
m_rhm.makeTProfile(
"averadius",
"Average Module Radius",6000,0.5,6000.5);
138 m_avez =
m_rhm.makeTProfile(
"avez",
"Average Module z coordinate",6000,0.5,6000.5);
139 m_avex =
m_rhm.makeTProfile(
"avex",
"Average Module x coordinate",6000,0.5,6000.5);
140 m_avey =
m_rhm.makeTProfile(
"avey",
"Average Module y coordinate",6000,0.5,6000.5);
142 m_zavedr =
m_rhm.makeTProfile(
"zavedr",
"Average z unit vector dr",6000,0.5,6000.5);
143 m_zavedz =
m_rhm.makeTProfile(
"zavedz",
"Average z unit vector dz",6000,0.5,6000.5);
144 m_zavedrphi =
m_rhm.makeTProfile(
"zavedrphi",
"Average z unit vector drphi",6000,0.5,6000.5);
145 m_xavedr =
m_rhm.makeTProfile(
"xavedr",
"Average x unit vector dr",6000,0.5,6000.5);
146 m_xavedz =
m_rhm.makeTProfile(
"xavedz",
"Average x unit vctor dz",6000,0.5,6000.5);
147 m_xavedrphi =
m_rhm.makeTProfile(
"xavedrphi",
"Average Module x unit vector drphi",6000,0.5,6000.5);
148 m_yavedr =
m_rhm.makeTProfile(
"yavedr",
"Average y unit vector dr",6000,0.5,6000.5);
149 m_yavedz =
m_rhm.makeTProfile(
"yavedz",
"Average y unit vector dz",6000,0.5,6000.5);
150 m_yavedrphi =
m_rhm.makeTProfile(
"yavedrphi",
"Average y unit vector drphi",6000,0.5,6000.5);
152 std::vector<edm::ParameterSet> wantedsubdets_ps = iConfig.getParameter<std::vector<edm::ParameterSet> >(
"wantedSubDets");
154 for(std::vector<edm::ParameterSet>::const_iterator wsdps = wantedsubdets_ps.begin();wsdps!=wantedsubdets_ps.end();++wsdps) {
156 unsigned int detsel = wsdps->getParameter<
unsigned int>(
"detSelection");
157 std::vector<std::string> selstr = wsdps->getUntrackedParameter<std::vector<std::string> >(
"selection");
191 for(std::map<unsigned int,int>::const_iterator
mult=mults->begin();
mult!=mults->end();
mult++) {
203 for(std::map<unsigned int,int>::const_iterator occu=occus->begin();occu!=occus->end();occu++) {
242 for(TrackingGeometry::DetIdContainer::const_iterator det = detunits.begin(); det!=detunits.end(); ++det) {
249 GlobalPoint zpos = trkgeo->idToDet(*det)->toGlobal(locz);
250 GlobalPoint xpos = trkgeo->idToDet(*det)->toGlobal(locx);
251 GlobalPoint ypos = trkgeo->idToDet(*det)->toGlobal(locy);
257 double dzdr = posvect.
perp()>0 ? (dz.
x()*posvect.
x()+dz.
y()*posvect.
y())/posvect.
perp() : 0. ;
258 double dxdr = posvect.
perp()>0 ? (dx.
x()*posvect.
x()+dx.
y()*posvect.
y())/posvect.
perp() : 0. ;
259 double dydr = posvect.
perp()>0 ? (dy.
x()*posvect.
x()+dy.
y()*posvect.
y())/posvect.
perp() : 0. ;
261 double dzdrphi = posvect.
perp()>0 ? (dz.
y()*posvect.
x()-dz.
x()*posvect.
y())/posvect.
perp() : 0. ;
262 double dxdrphi = posvect.
perp()>0 ? (dx.
y()*posvect.
x()-dx.
x()*posvect.
y())/posvect.
perp() : 0. ;
263 double dydrphi = posvect.
perp()>0 ? (dy.
y()*posvect.
x()-dy.
x()*posvect.
y())/posvect.
perp() : 0. ;
267 if(
sel->second.isSelected(*det)) {
294 const std::vector<uint32_t>& detids = reader->
getAllDetIds();
296 for(std::vector<uint32_t>::const_iterator
detid=detids.begin();
detid!=detids.end();++
detid) {
301 for(
int strip = 0; strip < nchannideal; ++strip) {
302 if(!quality->IsStripBad(*
detid,strip)) ++nchannreal;
308 if(
sel->second.isSelected(*
detid)) {
323 const std::vector<uint32_t>& pxldetids = pxlreader.
getAllDetIds();
325 for(std::vector<uint32_t>::const_iterator
detid=pxldetids.begin();
detid!=pxldetids.end();++
detid) {
327 int nchannideal = pxlreader.getDetUnitDimensions(*detid).first*pxlreader.getDetUnitDimensions(*detid).second;
329 if(!pxlquality->IsModuleBad(*
detid)) {
330 nchannreal = pxlreader.getDetUnitDimensions(*detid).first*pxlreader.getDetUnitDimensions(*detid).second;
341 if(
sel->second.isSelected(*
detid)) {
OccupancyPlots(const edm::ParameterSet &)
const std::vector< uint32_t > & getAllDetIds() const
TH1F ** m_nchannels_ideal
const std::pair< unsigned short, double > getNumberOfApvsAndStripLength(uint32_t detId) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual void beginRun(const edm::Run &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
auto vector_transform(std::vector< InputType > const &input, Function predicate) -> std::vector< typename std::remove_cv< typename std::remove_reference< decltype(predicate(input.front()))>::type >::type >
virtual void beginJob() override
RunHistogramManager m_rhm
static int position[TOTALCHAMBERS][3]
std::vector< edm::EDGetTokenT< std::map< unsigned int, int > > > m_multiplicityMapTokens
std::map< unsigned int, DetIdSelector > m_wantedsubdets
m_fp(iConfig.getUntrackedParameter< edm::FileInPath >("file", edm::FileInPath("CalibTracker/SiPixelESProducers/data/PixelSkimmedGeometry.txt")))
const std::vector< uint32_t > & getAllDetIds() const
TProfile ** m_aveoccupancy
m_rhm(consumesCollector())
m_occupancyMapTokens(edm::vector_transform(iConfig.getParameter< std::vector< edm::InputTag > >("occupancyMaps"), [this](edm::InputTag const &tag){return consumes< std::map< unsigned int, int > >(tag);}))
TProfile ** m_avemultiplicity
void beginRun(const edm::Run &iRun)
std::vector< edm::EDGetTokenT< std::map< unsigned int, int > > > m_occupancyMapTokens
std::string fullPath() const
virtual void endJob() override
virtual void endRun(const edm::Run &, const edm::EventSetup &) override
std::vector< DetId > DetIdContainer
virtual void analyze(const edm::Event &, const edm::EventSetup &) override