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 protection to consider only Strip hits #14218

Merged
merged 1 commit into from May 7, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 13 additions & 12 deletions DQM/SiStripMonitorTrack/src/SiStripMonitorTrack.cc
Expand Up @@ -218,7 +218,7 @@ void SiStripMonitorTrack::book(DQMStore::IBooker & ibooker , const TrackerTopolo
// book module plots
folder_organizer.setDetectorFolder(detid,tTopo);
bookModMEs(ibooker , *detid_iter);
}//end loop on detectors detid
}//end loop on detectors detid
} else {
for (std::vector<uint32_t>::const_iterator detid_iter=vdetId_.begin(),detid_end=vdetId_.end();detid_iter!=detid_end;++detid_iter){ //loop on all the active detid
uint32_t detid = *detid_iter;
Expand Down Expand Up @@ -663,15 +663,16 @@ void SiStripMonitorTrack::trajectoryStudy(const edm::Ref<std::vector<Trajectory>
TrajectoryStateOnSurface updatedtsos=traj_mes_iterator->updatedState();
ConstRecHitPointer ttrh=traj_mes_iterator->recHit();

if (TkHistoMap_On_ && (numTracks > 0)) {

if (TkHistoMap_On_ ) {
uint32_t thedetid=ttrh->rawId();
if ( thedetid > 369120277-1 ) {
if ( SiStripDetId(thedetid).subDetector() >=3 && SiStripDetId(thedetid).subDetector() <=6) { //TIB/TID + TOB + TEC only
if ( (ttrh->getType()==1) )
tkhisto_NumMissingHits->add(thedetid,static_cast<float>(1./numTracks));
tkhisto_NumMissingHits->add(thedetid,1.);
if ( (ttrh->getType()==2) )
tkhisto_NumberInactiveHits->add(thedetid,static_cast<float>(1./numTracks));
tkhisto_NumberInactiveHits->add(thedetid,1.);
if ( (ttrh->getType()==0) )
tkhisto_NumberValidHits->add(thedetid,static_cast<float>(1./numTracks));
tkhisto_NumberValidHits->add(thedetid,1.);
}
}

Expand Down Expand Up @@ -851,7 +852,7 @@ void SiStripMonitorTrack::trackStudyFromTrack(edm::Handle<reco::TrackCollection
// es.get<TransientTrackRecord>().get("TransientTrackBuilder",builder);
// const TransientTrackBuilder* transientTrackBuilder = builder.product();

numTracks = trackCollectionHandle->size();
//numTracks = trackCollectionHandle->size();
reco::TrackCollection trackCollection = *trackCollectionHandle;
for (reco::TrackCollection::const_iterator track = trackCollection.begin(), etrack = trackCollection.end();
track!=etrack; ++track) {
Expand All @@ -862,15 +863,15 @@ void SiStripMonitorTrack::trackStudyFromTrack(edm::Handle<reco::TrackCollection
for (trackingRecHit_iterator hit = track->recHitsBegin(), ehit = track->recHitsEnd();
hit!=ehit; ++hit) {

if (TkHistoMap_On_ && (numTracks > 0)) {
if (TkHistoMap_On_ ) {
uint32_t thedetid=(*hit)->rawId();
if ( thedetid > 369120277-1 ) {
if ( SiStripDetId(thedetid).subDetector() >=3 && SiStripDetId(thedetid).subDetector() <=6) { //TIB/TID + TOB + TEC only
if ( ((*hit)->getType()==1) )
tkhisto_NumMissingHits->add(thedetid,static_cast<float>(1./numTracks));
tkhisto_NumMissingHits->add(thedetid,1.);
if ( ((*hit)->getType()==2) )
tkhisto_NumberInactiveHits->add(thedetid,static_cast<float>(1./numTracks));
tkhisto_NumberInactiveHits->add(thedetid,1.);
if ( ((*hit)->getType()==0) )
tkhisto_NumberValidHits->add(thedetid,static_cast<float>(1./numTracks));
tkhisto_NumberValidHits->add(thedetid,1.);
}
}

Expand Down