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

Shashlik fix HGcal #3990

Merged
merged 2 commits into from May 23, 2014
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -123,7 +123,8 @@ void CaloTowerConstituentsMapBuilder::assignEEtoHE(const CaloGeometry* geometry,
const CaloSubdetectorGeometry* geomEE ( geometry->getSubdetectorGeometry( DetId::Ecal, EcalEndcap ) );
//const CaloSubdetectorGeometry* geomEK (
if( geomEE==NULL) geomEE=geometry->getSubdetectorGeometry( DetId::Ecal, EcalShashlik ) ;

if(geomEE==NULL) return; // if no EE and no shashlik are defined don't know where it is used
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kpedro88 - can you have a look at these lines and check that they make sense to you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me. If there is no EE geometry defined at all, there should not be any EE cells to add to the CaloTowers.


const CaloSubdetectorGeometry* geomHE ( geometry->getSubdetectorGeometry( DetId::Hcal, HcalEndcap ) );

//get list of EE detids
Expand Down
Expand Up @@ -434,7 +434,6 @@ EcalPhaseIIDigiProducer::finalizeEvent(edm::Event& event, edm::EventSetup const&
m_ShashlikDigitizer->run( *shashlikResult ) ;
edm::LogInfo("EcalDigi") << "EK Digis: " << shashlikResult->size() ;
cacheEKDigis( &*shashlikResult ) ;

if(m_doFastES) {
//m_ESDigitizer->run( *preshowerResult ) ;
} else {
Expand All @@ -447,6 +446,10 @@ EcalPhaseIIDigiProducer::finalizeEvent(edm::Event& event, edm::EventSetup const&
//debug duplicated digis
std::set<unsigned int> filledDigis;
#endif

if(theEKDets!=NULL){ // protection if Shashlik geometry not defined,
// need to generalize the case of a subdetector not defined in geometry

//#ifdef clean_EKDigiCollection
EKDigiCollection shashlikResultValid;
// unsigned int ncount=0;
Expand All @@ -469,6 +472,7 @@ EcalPhaseIIDigiProducer::finalizeEvent(edm::Event& event, edm::EventSetup const&
}
}
shashlikResult->swap(shashlikResultValid);
}
//#endif

// Step D: Put outputs into event
Expand Down