Linear Collider Forum



Home » Analysis and Reconstruction » Reconstruction » MC association
MC association [message #475] Fri, 19 May 2006 02:23 Go to previous message
fabio
Messages: 3
Registered: April 2006
Hello,

I´m trying to get a MC association in order to associate reco photons to Monte Carlo ones.
My idea is to start from reco gamma, trying to get the corresponding reco clusters and so the reco calorimeter hits.
At this point it is possible to utilize the function "getRawHit()" of "CalorimeterHit" to get the Sim calorimeter hits and so all infos about the corresponding MC particle that caused these hits.

In particolar such a process is simply:
************************************************************ **
// loop over all RC gamma of the event
for(int i=0; i< num_RC_gamma ; i++){ ReconstructedParticleImpl* rp =
dynamic_cast<ReconstructedParticleImpl*>( RCcol->getElementAt( i ) ) ;
RecoClusters = rp->getClusters();
for( std::vector<Cluster*>::const_iterator cl =
RecoClusters.begin(); cl != RecoClusters.end(); cl++){
RecoCaloHits = (*cl)->getCalorimeterHits();

// loop over all Reco Cluster Hits
for( std::vector<CalorimeterHit*>::const_iterator ch = RecoCaloHits.begin(); ch != RecoCaloHits.end(); ch++){
LCObject* CSimhit = (*ch)->getRawHit();
SimCalorimeterHit* CRawHit = dynamic_cast<SimCalorimeterHit*> (CSimhit) ;

} // end for const_iterator ch
} // end for const_iterator cl
} // end for num_RC_gamma

************************************************************ ****
this code has been compliled without any problems... but when I try to execute it (qqbar collections) I have a segmentation violation..
In particular, using some printouts, CRawHit returns a pointer to 0...

1) Is it possible to arrange a MC association in this way? Has the calorimeter hit an associated RawCalorimeter hit?

2) how to associate CalorimeterHits to MCParticles?

Thanks in advance,
Fabio.

[Updated on: Fri, 19 May 2006 02:25]

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Problem with Marlin 0.9.4
Next Topic:org.lcsim Tracking Examples
Goto Forum:
  


Current Time: Mon Aug 20 13:53:10 Pacific Daylight Time 2018
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software