|
|
Go to the documentation of this file.
21 dataLabel_(iConfig.getUntrackedParameter<
std::
string>(
"dataLabel",
"")),
23 fp_(iConfig.getUntrackedParameter<
edm::FileInPath>(
24 "file",
edm::FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))),
25 Cluster_src_(iConfig.getParameter<
edm::
InputTag>(
"Cluster_src")),
26 Track_src_(iConfig.getUntrackedParameter<
edm::
InputTag>(
"Track_src")),
27 tracksCollection_in_EventTree(iConfig.getUntrackedParameter<
bool>(
"RemoveTrackClusters",
false)),
42 auto obj = std::make_unique<SiStripBadStrip>();
46 if (
AlgoName ==
"SiStripHotStripAlgorithmFromClusterOccupancy") {
48 <<
" [SiStripQualityHotStripIdentifier::getNewObject] call to SiStripHotStripAlgorithmFromClusterOccupancy"
60 <<
" [SiStripQualityHotStripIdentifier::getNewObject] copy SiStripObject in SiStripBadStrip" << std::endl;
66 for (; rIter != rIterEnd; ++rIter) {
71 <<
"[SiStripQualityHotStripIdentifier::getNewObject] detid already exists" << std::endl;
74 <<
" [SiStripQualityHotStripIdentifier::getNewObject] " <<
ss.str() << std::endl;
78 <<
" [SiStripQualityHotStripIdentifier::getNewObject] call for a unknow HotStrip identification algoritm"
81 std::vector<uint32_t>
a;
85 <<
"[SiStripQualityHotStripIdentifier::getNewObject] detid already exists" << std::endl;
107 edm::LogInfo(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::resetHistos] " << std::endl;
110 for (; it != iEnd; ++it) {
116 edm::LogInfo(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::bookHistos] " << std::endl;
118 std::map<uint32_t, SiStripDetInfoFileReader::DetInfo>::const_iterator it =
reader->
getAllData().begin();
119 std::map<uint32_t, SiStripDetInfoFileReader::DetInfo>::const_iterator iEnd =
reader->
getAllData().end();
120 for (; it != iEnd; ++it) {
121 sprintf(hname,
"h_%d", it->first);
125 std::make_shared<TH1F>(hname, hname, it->second.nApvs * 128, -0.5, it->second.nApvs * 128 - 0.5);
128 <<
" [SiStripQualityHotStripIdentifier::bookHistos] DetId " << it->first
129 <<
" already found in map. Ignoring new data" << std::endl;
136 ref->second->Fill(
value);
139 <<
" [SiStripQualityHotStripIdentifier::fillHisto] Histogram not found in the list for DetId " << detid
140 <<
" Ignoring data value " <<
value << std::endl;
152 <<
" [SiStripQualityHotStripIdentifier::algoAnalyze] missing trackCollection with label " <<
Track_src_
157 std::set<const void*> vPSiStripCluster;
162 for (reco::TrackCollection::const_iterator
track = tC.begin();
track != tC.end();
track++) {
163 LogTrace(
"SiStripQualityHotStripIdentifier")
164 <<
"Track number " <<
i + 1 <<
"\n\tmomentum: " <<
track->momentum() <<
"\n\tPT: " <<
track->pt()
165 <<
"\n\tvertex: " <<
track->vertex() <<
"\n\timpact parameter: " <<
track->d0()
166 <<
"\n\tcharge: " <<
track->charge() <<
"\n\tnormalizedChi2: " <<
track->normalizedChi2()
167 <<
"\n\tFrom EXTRA : "
168 <<
"\n\t\touter PT " <<
track->outerPt() << std::endl;
173 LogTrace(
"SiStripQualityHotStripIdentifier") <<
"\t\t Invalid Hit " << std::endl;
182 vPSiStripCluster.insert((
void*)&(matchedHit->
monoCluster()));
183 vPSiStripCluster.insert((
void*)&(matchedHit->
stereoCluster()));
184 }
else if (projectedHit) {
186 }
else if (singleHit) {
187 vPSiStripCluster.insert((
void*)&*(singleHit->
cluster()));
189 LogTrace(
"SiStripQualityHotStripIdentifier") <<
"NULL hit" << std::endl;
195 std::stringstream
ss;
198 for (; DSViter != dsv_SiStripCluster->end(); DSViter++) {
203 if (
std::find(vPSiStripCluster.begin(), vPSiStripCluster.end(), (
void*)&*
ClusIter) == vPSiStripCluster.end()) {
205 ss <<
" adding cluster to histo for detid " << DSViter->id <<
" with barycenter " <<
ClusIter->barycenter()
212 LogTrace(
"SiStripQualityHotStripIdentifier") <<
ss.str();
bool check(const edm::EventSetup &iSetup)
ClusterRef cluster() const
void setMinNumEntriesPerStrip(unsigned short m)
edmNew::DetSet< SiStripCluster >::const_iterator ClusIter
iterator end()
Return the off-the-end iterator.
SiStripCluster const & stereoCluster() const
void setProbabilityThreshold(long double prob)
std::unique_ptr< SiStripBadStrip > getNewObject() override
const edm::ParameterSet conf_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
iterator begin()
Return an iterator to the first DetSet.
~SiStripQualityHotStripIdentifier() override
T getUntrackedParameter(std::string const &, T const &) const
Log< level::Info, false > LogInfo
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
ContainerIterator getDataVectorBegin() const
void extractBadStrips(SiStripQuality *, HistoMap &, const SiStripQuality *)
std::pair< ContainerIterator, ContainerIterator > Range
RegistryIterator getRegistryVectorBegin() const
void setMinNumEntries(unsigned short m)
unsigned short MinClusterWidth_
void fillHisto(uint32_t detid, float value)
SiStripRecHit2D originalHit() const
edm::ESWatcher< SiStripQualityRcd > stripQualityWatcher_
SiStrip::QualityHistosMap ClusterPositionHistoMap
void algoAnalyze(const edm::Event &, const edm::EventSetup &) override
const TrackerTopology * tTopo
void algoBeginRun(const edm::Run &, const edm::EventSetup &) override
bool tracksCollection_in_EventTree
const SiStripQuality * stripQuality_
void algoEndJob() override
collection_type::const_iterator const_iterator
SiStripDetInfoFileReader * reader
Log< level::Error, false > LogError
bool getData(T &iHolder) const
edm::ESGetToken< SiStripQuality, SiStripQualityRcd > stripQualityToken_
SiStripCluster const & monoCluster() const
const std::map< uint32_t, DetInfo > & getAllData() const
T getParameter(std::string const &) const
Registry::const_iterator RegistryIterator
unsigned short MaxClusterWidth_
edm::InputTag Cluster_src_
SiStripQualityHotStripIdentifier(const edm::ParameterSet &)
std::vector< Track > TrackCollection
collection of Tracks
RegistryIterator getRegistryVectorEnd() const
std::string fullPath() const
collection_type::const_iterator const_iterator