Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add NApv shots in text file: module with highest values #12174

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class SiStripTrackerMapCreator {
int16_t cached_layer;
TkLayerMap::XYbin cached_XYbin;
bool topModules;
int32_t numTopModules;
uint32_t numTopModules;
std::string topModLabel;
};
#endif
22 changes: 13 additions & 9 deletions DQM/SiStripMonitorClient/src/SiStripTrackerMapCreator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void SiStripTrackerMapCreator::createForOffline(const edm::ParameterSet & tkmapP
topModules=false;

if(tkmapPset.exists("numberTopModules"))
numTopModules=tkmapPset.getUntrackedParameter<int32_t>("numberTopModules");
numTopModules=tkmapPset.getUntrackedParameter<uint32_t>("numberTopModules");
else
numTopModules = 20;

Expand Down Expand Up @@ -417,12 +417,17 @@ void SiStripTrackerMapCreator::setTkMapFromHistogram(DQMStore* dqm_store, std::s
void SiStripTrackerMapCreator::printTopModules(std::vector<std::pair<float,uint32_t> >* topNmodVec, const edm::EventSetup& eSetup){

//////////////Retrieve tracker topology from geometry
//edm::ESHandle<TrackerTopology> tTopoHandle;
//eSetup.get<TrackerTopologyRecord>().get(tTopoHandle);
//const TrackerTopology* const tTopo = tTopoHandle.product();
edm::ESHandle<TrackerTopology> tTopoHandle;
eSetup.get<IdealGeometryRecord>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();
eSetup.get<TrackerTopologyRcd>().get(tTopoHandle);
const TrackerTopology* const tTopo = tTopoHandle.product();

if (topNmodVec->empty()) return;

std::sort(topNmodVec->rbegin(), topNmodVec->rend());
topNmodVec->resize(numTopModules);
if (topNmodVec->size() > numTopModules) topNmodVec->resize(numTopModules);

edm::LogVerbatim("TopModules") << topModLabel;
edm::LogVerbatim("TopModules") << "------------------------------------------------------";
Expand Down Expand Up @@ -490,13 +495,12 @@ void SiStripTrackerMapCreator::paintTkMapFromHistogram(DQMStore* dqm_store, Moni
if (fval == 0.0) trackerMap_->fillc(det_id,255, 255, 255);
else {
trackerMap_->fill_current_val(det_id, fval);
if(topNmodVec){
auto detPair = std::make_pair(fval,det_id);
topNmodVec->push_back(detPair);
}
}
tkMapMax_ += fval;
if(topNmodVec){
//std::ostringstream ss; ss << fval;
auto detPair = std::make_pair(fval,det_id);
topNmodVec->push_back(detPair);
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@
TkMapOptions = cms.untracked.VPSet(
cms.PSet(mapName=cms.untracked.string('QTestAlarm'),fedMap=cms.untracked.bool(True),useSSQuality=cms.untracked.bool(True),ssqLabel=cms.untracked.string(""),psuMap=cms.untracked.bool(True),loadLVCabling=cms.untracked.bool(True),mapMax=cms.untracked.double(1.)),
cms.PSet(mapName=cms.untracked.string('FractionOfBadChannels'),mapMax=cms.untracked.double(-1.),logScale=cms.untracked.bool(True)),
cms.PSet(mapName=cms.untracked.string('NumberOfCluster'),TopModules=cms.untracked.bool(True),numberTopModules=cms.untracked.int32(20)),
cms.PSet(mapName=cms.untracked.string('NumberOfCluster'),TopModules=cms.untracked.bool(True),numberTopModules=cms.untracked.uint32(20)),
cms.PSet(mapName=cms.untracked.string('NumberOfDigi'),TopModules=cms.untracked.bool(True)),
cms.PSet(mapName=cms.untracked.string('NumberOfOfffTrackCluster'),TopModules=cms.untracked.bool(True)),
cms.PSet(mapName=cms.untracked.string('NumberOfOfffTrackCluster'),mapSuffix=cms.untracked.string("_autoscale"),mapMax=cms.untracked.double(-1.)),
cms.PSet(mapName=cms.untracked.string('NumberOfOnTrackCluster')),
cms.PSet(mapName=cms.untracked.string('StoNCorrOnTrack')),
cms.PSet(mapName=cms.untracked.string('NApvShots'),mapMax=cms.untracked.double(-1.),logScale=cms.untracked.bool(True)),
# cms.PSet(mapName=cms.untracked.string('NApvShots'),mapMax=cms.untracked.double(-1.),logScale=cms.untracked.bool(True),psuMap=cms.untracked.bool(True),loadLVCabling=cms.untracked.bool(True)),
cms.PSet(mapName=cms.untracked.string('MedianChargeApvShots'),mapMax=cms.untracked.double(-1.))
cms.PSet(mapName=cms.untracked.string('NApvShots'),logScale=cms.untracked.bool(True),psuMap=cms.untracked.bool(True),loadLVCabling=cms.untracked.bool(True),TopModules=cms.untracked.bool(True)),
cms.PSet(mapName=cms.untracked.string('MedianChargeApvShots'),mapMax=cms.untracked.double(-1.)),
)
)

Expand Down