Re: MC association [message #476 is a reply to message #475] |
Fri, 19 May 2006 06:16   |
lima Messages: 47 Registered: May 2004 Location: DeKalb, IL, USA |
|
|
|
Hi Fabio,
At this point it is unlikely that you are using DigiSim upstream of your analysis code. Without DigiSim, there are no RawCalHits. If this is the case, all you need to do is to cast the CalorimeterHit* to a SimCalorimeterHit* and take it from there:
// loop over all Reco Cluster Hits
for( std::vector<CalorimeterHit*>::const_iterator ch = RecoCaloHits.begin(); ch != RecoCaloHits.end(); ch++){
// LCObject* CSimhit = (*ch)->getRawHit();
SimCalorimeterHit* simHit = dynamic_cast<SimCalorimeterHit*>(*ch) ;
int nMCcont = simHit->getNMCParticles();
//... and so on...
}
Please let us know if this does not work.
Good luck,
Guilherme
|
|
|