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

safety added after new digitizer #6048

Merged
Merged
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
20 changes: 20 additions & 0 deletions SimTracker/TrackTriggerAssociation/plugins/TTClusterAssociator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,26 @@ void TTClusterAssociator< Ref_PixelDigi_ >::produce( edm::Event& iEvent, const e
const DetId detId = theStackedTrackers->idToDet( tempCluRef->getDetId(), tempCluRef->getStackMember() )->geographicalId();

/// Get the PixelDigiSimLink
/// Safety check added after new digitizer (Oct 2014)
if ( thePixelDigiSimLinkHandle->find(detId.rawId()) == thePixelDigiSimLinkHandle->end() )
{
/// Sensor is not found in DigiSimLink.
/// Set MC truth to NULL for all hits in this sensor. Period.

/// Get the Digis and loop over them
std::vector< Ref_PixelDigi_ > theseHits = tempCluRef->getHits();
for ( unsigned int i = 0; i < theseHits.size(); i++ )
{
/// No SimLink is found by definition
/// Then store NULL MC truth for all the digis
edm::Ptr< TrackingParticle > tempTPPtr; // = new edm::Ptr< TrackingParticle >();
clusterToTrackingParticleVectorMap.find( tempCluRef )->second.push_back( tempTPPtr );
}

/// Go to the next sensor
continue;
}

edm::DetSet<PixelDigiSimLink> thisDigiSimLink = (*(thePixelDigiSimLinkHandle) )[detId.rawId()];
edm::DetSet<PixelDigiSimLink>::const_iterator iterSimLink;

Expand Down