23 dataLabel_(iConfig.getUntrackedParameter<
std::
string>(
"dataLabel",
"")),
25 fp_(iConfig.getUntrackedParameter<
edm::
FileInPath>(
"file",
edm::
FileInPath(
"CalibTracker/SiStripCommon/data/SiStripDetInfo.dat"))),
26 Cluster_src_(iConfig.getParameter<
edm::InputTag>(
"Cluster_src" )),
27 Track_src_(iConfig.getUntrackedParameter<
edm::InputTag>(
"Track_src" )),
28 tracksCollection_in_EventTree(iConfig.getUntrackedParameter<bool>(
"RemoveTrackClusters",
false)),
49 if (AlgoName==
"SiStripHotStripAlgorithmFromClusterOccupancy"){
51 edm::LogInfo(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::getNewObject] call to SiStripHotStripAlgorithmFromClusterOccupancy"<<std::endl;
61 edm::LogInfo(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::getNewObject] copy SiStripObject in SiStripBadStrip"<<std::endl;
67 for(;rIter!=rIterEnd;++rIter){
69 if ( ! obj->
put(rIter->detid,range) )
70 edm::LogError(
"SiStripQualityHotStripIdentifier")<<
"[SiStripQualityHotStripIdentifier::getNewObject] detid already exists"<<std::endl;
72 edm::LogInfo(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::getNewObject] " << ss.str() << std::endl;
75 edm::LogError(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::getNewObject] call for a unknow HotStrip identification algoritm"<<std::endl;
77 std::vector<uint32_t>
a;
79 if ( ! obj->
put(0xFFFFFFFF,range) )
80 edm::LogError(
"SiStripQualityHotStripIdentifier")<<
"[SiStripQualityHotStripIdentifier::getNewObject] detid already exists"<<std::endl;
110 edm::LogInfo(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::resetHistos] " << std::endl;
113 for (;it!=iEnd;++it){
119 edm::LogInfo(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::bookHistos] " << std::endl;
121 std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >::const_iterator it =
reader->
getAllData().begin();
122 std::map<uint32_t, SiStripDetInfoFileReader::DetInfo >::const_iterator iEnd =
reader->
getAllData().end();
123 for(; it!=iEnd; ++it){
124 sprintf(hname,
"h_%d",it->first);
127 ClusterPositionHistoMap[it->first]=boost::shared_ptr<TH1F>(
new TH1F(hname,hname,it->second.nApvs*128,-0.5,it->second.nApvs*128-0.5));
130 edm::LogError(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::bookHistos] DetId " << it->first <<
" already found in map. Ignoring new data"<<std::endl;
138 ref->second->Fill(value);
140 edm::LogError(
"SiStripQualityHotStripIdentifier") <<
" [SiStripQualityHotStripIdentifier::fillHisto] Histogram not found in the list for DetId " << detid <<
" Ignoring data value "<< value <<std::endl;
151 if(!trackCollection.
isValid()){
152 edm::LogError(
"SiStripQualityHotStripIdentifier")<<
" [SiStripQualityHotStripIdentifier::algoAnalyze] missing trackCollection with label " <<
Track_src_ <<std::endl;
156 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
165 <<
"\n\tmomentum: " <<
track->momentum()
166 <<
"\n\tPT: " <<
track->pt()
167 <<
"\n\tvertex: " <<
track->vertex()
168 <<
"\n\timpact parameter: " <<
track->d0()
169 <<
"\n\tcharge: " <<
track->charge()
170 <<
"\n\tnormalizedChi2: " <<
track->normalizedChi2()
171 <<
"\n\tFrom EXTRA : " 172 <<
"\n\t\touter PT "<<
track->outerPt()<<std::endl;
179 LogTrace(
"SiStripQualityHotStripIdentifier") <<
"\t\t Invalid Hit "<<std::endl;
188 vPSiStripCluster.insert((
void *)&(matchedHit->
monoCluster()));
189 vPSiStripCluster.insert((
void *)&(matchedHit->
stereoCluster()));
190 }
else if(projectedHit){
192 }
else if(singleHit){
193 vPSiStripCluster.insert((
void*)&*(singleHit->
cluster()));
195 LogTrace(
"SiStripQualityHotStripIdentifier") <<
"NULL hit" << std::endl;
201 std::stringstream ss;
204 for (; DSViter!=dsv_SiStripCluster->end();DSViter++){
207 for(; ClusIter!=ClusIterEnd; ++
ClusIter) {
209 if (
std::find(vPSiStripCluster.begin(),vPSiStripCluster.end(),(
void*) &*ClusIter) == vPSiStripCluster.end()){
211 ss <<
" adding cluster to histo for detid " << DSViter->id <<
" with barycenter "<< ClusIter->barycenter() << std::endl;
212 fillHisto(DSViter->id,ClusIter->barycenter());
217 LogTrace(
"SiStripQualityHotStripIdentifier") << ss.str();
void setProbabilityThreshold(long double prob)
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void fillHisto(uint32_t detid, float value)
void extractBadStrips(SiStripQuality *, HistoMap &, edm::ESHandle< SiStripQuality > &)
SiStripCluster const & monoCluster() const
std::vector< Track > TrackCollection
collection of Tracks
const edm::ParameterSet conf_
Registry::const_iterator RegistryIterator
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
edm::InputTag Cluster_src_
~SiStripQualityHotStripIdentifier()
SiStripQualityHotStripIdentifier(const edm::ParameterSet &)
edmNew::DetSet< SiStripCluster >::const_iterator ClusIter
const std::map< uint32_t, DetInfo > & getAllData() const
RegistryIterator getRegistryVectorEnd() const
void algoBeginRun(const edm::Run &, const edm::EventSetup &)
unsigned long long m_cacheID_
SiStrip::QualityHistosMap ClusterPositionHistoMap
bool tracksCollection_in_EventTree
unsigned short MinClusterWidth_
void setMinNumEntries(unsigned short m)
ClusterRef cluster() const
edm::ESHandle< SiStripQuality > SiStripQuality_
unsigned short MaxClusterWidth_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
iterator end()
Return the off-the-end iterator.
SiStripBadStrip * getNewObject()
ContainerIterator getDataVectorBegin() const
SiStripRecHit2D originalHit() const
T const * product() const
RegistryIterator getRegistryVectorBegin() const
SiStripCluster const & stereoCluster() const
SiStripDetInfoFileReader * reader
std::pair< ContainerIterator, ContainerIterator > Range
iterator begin()
Return an iterator to the first DetSet.
const TrackerTopology * tTopo
std::string fullPath() const
bool put(const uint32_t &detID, const InputVector &vect)
collection_type::const_iterator const_iterator
collection_type::const_iterator const_iterator
T const * product() const
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
void setMinNumEntriesPerStrip(unsigned short m)
void algoAnalyze(const edm::Event &, const edm::EventSetup &)