Optionally creates four collections of LCRelations ("recoMCTruthLink", "trackMCTruthLink", "mcTruthTrackLink", "clusterMCTruthLink", ""clusterMCTruthLink" and "calohitMCTruthLink") with weighetd relations between true particles and reconstructed particles, tracks, clusters, and calorimeter hits, respectively.
More...
|
| RecoMCTruthLinker (const RecoMCTruthLinker &)=delete |
|
RecoMCTruthLinker & | operator= (const RecoMCTruthLinker &)=delete |
|
virtual Processor * | newProcessor () |
|
| RecoMCTruthLinker () |
|
virtual void | init () |
| Called at the begin of the job before anything is read. More...
|
|
virtual void | processRunHeader (LCRunHeader *run) |
| Called for every run. More...
|
|
virtual void | processEvent (LCEvent *evt) |
| Called for every event - the working horse. More...
|
|
virtual void | trackLinker (LCEvent *evt, LCCollection *mcpCol, LCCollection *trackCol, LCCollection **ttrcol, LCCollection **trtcol) |
|
virtual void | clusterLinker (LCEvent *evt, LCCollection *mcpCol, LCCollection *clusterCol, LCCollection **ctrcol, LCCollection **trccol, LCCollection **chittrlcol) |
|
virtual void | particleLinker (LCCollection *mcpCol, LCCollection *particleCol, LCCollection *ttrcol, LCCollection *ctrlcol, LCCollection *trtlcol, LCCollection *trclcol, LCCollection **ptrlcol, LCCollection **trplcol) |
|
virtual void | linkPrinter (LCCollection *mcpCol, LCCollection *particleCol, LCCollection *ptrlcol, LCCollection *trplcol) |
|
virtual void | check (LCEvent *evt) |
|
virtual void | makeSkim (LCCollection *mcpCol, LCCollection *ttrcol, LCCollection *ctrcol, LCCollectionVec **skimVec) |
|
virtual void | end () |
| Called after data processing for clean up. More...
|
|
Optionally creates four collections of LCRelations ("recoMCTruthLink", "trackMCTruthLink", "mcTruthTrackLink", "clusterMCTruthLink", ""clusterMCTruthLink" and "calohitMCTruthLink") with weighetd relations between true particles and reconstructed particles, tracks, clusters, and calorimeter hits, respectively.
If the corresponding parameter for the output collection name is empty the collection is not created.
This relation is based on the number of hits for tracks, for hits weighted with the SimHit-energy for clusters and calorimeter hits. For tracks and clusters, the weight is the sum of hits from the considered true particle divided by the sum of all hits, for calorimter hits, it's simply the simHit energy of the hit. For the reconstructed particles, the relation could either be only to the true particle having the largest weight, or to all contributing true particles. In the former case, the pointer (and weight) will concern the true particle creating hits in the tracker, if there are any. Only for track-less seen particles would it point to the main contributor to the cluster. In the latter case, pointers are set up to all contributing true particles, and the weight is givean as (fractional contribution to track)+ 10000* (fractional contribution to cluster), with fractions given in permil (int). Hence: trackwgt = (int(wgt)%10000)/1000. and clusterwgt = (int(wgt)/10000)/1000. Which of the two is used is selected by the processor flag "FullRecoRelation" (default=true)
For example a weight of 0.95 for a charged particle link implies that 95 percent of the SimTrackerHits used in the particles' track fit have been caused by the linked MCParticle.
If a neutral particle with one cluster has no MC contribution assigned the MCParticle pointing closest to the cluster is assigned and the weight is set to the negative scalar product of the MCParticle's momentum direction and the direction to the Cluster position. (This fixes a bug in the Mokka LCal driver ov mokka-v06-06-p03).
A skimmed MCParticle subset collection is created. It containes all particles created by the generator program and all particles that have been reconstructed including all their parents. Additionally, the daughters of all decays in flight of particles specified in 'KeepDaughtersPDG' (default: gamma, K0s and pi0) are kept in the skimmed list if the original particle is in the skim ( either from the generator or from reconstruction).
Output
-
trackMCTruthLink: holds LCRelations that map the tracks to the corresponding MCParticle - the weight is the fraction of all hits on the the track that have contributions from this MCParticle
-
mcTruthTrackLink: holds LCRelations that map MCParticles to tracks - the weight is the fraction of all sim-hits from the MCParticle that contributed to this track
-
clusterMCTruthLink: holds LCRelations that map the clusters to the corresponding MCParticle
-
recoMCTruthLink: holds LCRelations that map the reconstructed particles to the corresponding MCParticle
-
calohitMCTruthLink: holds LCRelations that map the calorimeter hits to the corresponding MCParticle
-
MCParticlesSkimmed: skimmed MCParticle collection
- Parameters
-
MCParticleCollectionName | the MCParticle input collection |
trackCollectionName | the ReconstructedParticles input collection |
clusterCollectionName | the ReconstructedParticles input collection |
UseTrackerHitRelations | use the rel collection for TrackerHits default true (false only for very old files) |
TrackerHitsRelInputCollections | the rel collection for TrackerHit collection |
SimClusterHitRelation | relation betweeen simulated and digitized cluster hits |
KeepDaughtersPDG | absolute PDG code of particles where daughter are to be kept (default: gamma,pi0,K0_S) |
FullRecoRelation | Select which option to use for the reconstructed link ( default: full relation) |
TrackMCTruthLinkName | name of output collection - default is "" |
MCTruthTrackLinkName | name of output collection - default is "" |
ClusterMCTruthLinkName | name of output collection - default is "" |
RecoMCTruthLinkName | name of output collection - default is "" |
CalohitMCTruthLinkName | name of output collection - default is "" |
MCParticlesSkimmedName | skimmed MCParticle collection - default is "" |
UsingParticleGun | If Using Particle Gun Ignore Gen Stat - default is false |
- Author
- M. Berggren, DESY, based on RecoMCTruthLinker v 1.0 by F. Gaede, DESY. changelog F.Gaede, 02/2012 modified logic for optional output collections (collection name not empty) and added mcTruthTrackLink
- Version
- $Id$
Definition at line 106 of file RecoMCTruthLinker.h.