Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add info on TrackType

Table of Contents

Basic Recipe

This is the basic recipe for reconstructing HPS data:

Overview

The reconstruction is implemented within the HPS Java project as a chain of org.lcsim Drivers (event processors) described by lcsim xml and run by the lcsim job manager.  The EvioToLcio command line tool is used to convert the EVIO to LCIO events using an LCSimEventBuilder such as LCSimEngRunEventBuilder.  The LCIO events are accessed in Java code through the EventHeader API.  The Drivers add output collections to the event such as tracks, calorimeter clusters, reconstructed particles and vertices.  The combined data/physics LCIO events are written out to an LCIO file, which can subsequently be converted to ROOT DST Data Format.  The LCIO events may also be loaded back into the HPS Java environment for analysis.

Basic Steps

These are the steps performed in reconstructing the data:

  1. EvioToLcio command line tool is run with command line parameters like the EVIO file(s) and the path to the XML steering file.
  2. The JobControlManager loads the steering file which defines the chain of reconstruction Drivers and their parameters.
  3. Detector Conditions including per channel calibrations are read and applied in Driver detectorChanged methods.
  4. Each EvioEvent is read with EvioReader and converted to an LCIO raw data event using an appropriate LCSimEventBuilder.
  5. The HPS Java reconstruction runs on the LCIO event, adding additional reconstruction collections to
  6.  EVIO data files are read in and converted to LCIO events.
  7. The HPS Java reconstruction is run to add physics object collections to the events.
  8. The events are written to an LCIO file containing the results of the recon.
  9. The recon output LCIO file can be is converted to ROOT DST Data Format for analysis.

Oftentimes, steps Steps 1-3 6 are typically performed in the same job (process) for efficiency using the EvioToLcio command line utility.

Overview

The HPS physics reconstruction is implemented in the HPS Java project as a chain of org.lcsim Drivers which process LCIO Data Format events that are accessed using the EventHeader API.  The driver list is described in an lcsim xml steering file which is configured by the lcsim job manager.  

Info
titleWhat is a Driver?

In the context of LCSim and HPS Java, a driver is an event processing component that operates on each event in a record processing loop and may add new object collections to the event.  For example, a driver might convert ADC data to a hits collection or it could perform track finding and create new track object collections.

The EVIO Data Format is converted into LCIO by an LCSimEventBuilder such as LCSimEngRunEventBuilder.  The EvioToLcio command line tool reads EvioEvents with an EvioReader and then uses an event builder to create LCIO events representing the raw data.  The driver chain is then run to perform the physics reconstruction which will add additional object collections to the event.  The combined events with the data and recon collections are written out to an LCIO file.  The LCIO output can be converted to ROOT DST Data Format for ROOT compatibility, or it may be loaded back into HPS Java for analysis. 

Steering Files

The production recon steering files such as EngineeringRun2015FullRecon.lcsim are kept in this SVN folder and typically accessed as a class resource from a jar file by the job manager. 

Depending on the tool being used, steering files may also be accessed as XML files on disk.

Data Conversion

.

User analysis can be performed on the LCIO files using the job manager command line tool or within the ROOT environment using the DSTs.

Reconstruction Drivers 

The reconstruction Driver chain is defined in production steering files such as EngineeringRun2015FullRecon.lcsim, which are kept in this SVN folder and typically accessed as a class resource from a jar file.

OrderDriver NameDriver ClassDescription
1

RfFitter

RfFitterDriverconverts accelerator's RF wave form to time and inserts into event
2EcalRunningPedestal

EcalRunningPedestalDriver

calculates per channel running averages for ECal signal pedestals
3EcalRawConverterEcalRawConverterDriverconverts ECal digits to CalorimeterHit collection with energy and time measurements
4ReconClustererReconClusterDriverperforms calorimeter clustering algorithm on ECal hits
5CopyCollectionCopyClusterCollectionDrivercopies calorimeter clusters to new collection to preserve uncorrected energy measurements
6RawTrackerHitSensorSetupRawTrackerHitSensorSetupassigns RawTrackerHits to their sensors for use by track recon
7RawTrackerHitFitterDriverRawTrackerHitFitterDriverfits ADC vs time signal and stores the results, associated to each raw hit
8TrackerHitDriverDataTrackerHitDrivercreates stereo pairs from SVT strip hits
9HelicalTrackHitDriverHelicalTrackHitDrivercreates 3D hit clusters from stereo pairs
10TrackReconSeed345Conf2Extd16TrackerReconDrivertrack finding using layers 3, 4 & 5 as a seed, layer 2 to confirm, and layers 1 and 6 to extend
11TrackReconSeed456Conf3Extd21TrackerReconDrivertrack finding using layers 4, 5 & 6 as a seed, layer 3 to confirm, and layers 2 and 1 to extend
12TrackReconSeed123Conf4Extd56TrackerReconDrivertrack finding using layers 1, 2 & 3 as a seed, layer 4 to confirm, and layers 5 and 6 to extend
13TrackReconSeed123Conf5Extd46TrackerReconDrivertrack finding using layers 1, 2 & 3 as a seed, layer 5 to confirm, and layers 4 and 6 to extend
14MergeTrackCollectionsMergeTrackCollectionsmerges collections from track finding into a single output collection
15GBLRefitterDriverGBLRefitterDriverperforms GBL track refit
16TrackDataDriverTrackDataDriveradds additional collections containing track information to the output event
17ReconParticleDriverHpsReconParticleDriver

creates output reconstructed particle collections, associating tracks with clusters

also performs vertex reconstruction and creates vertex collection

18LCIOWriterLCIODriverwrites output LCIO file
19CleanupDriverReadoutCleanupDrivercleans up readout state for next event (clears assignments of SVT raw hits to sensors)

Data Collections

CollectionJava ClassCreated ByDescription
BeamspotConstrainedMollerCandidatesReconstructedParticleHpsReconParticleDriver

Møller candidate particles required to point back to beamspot at the target

BeamspotConstrainedMollerVerticesVertexHpsReconParticleDriverMøller vertices required to point back to beamspot at the target
BeamspotConstraintedV0CandidatesReconstructedParticleHpsReconParticleDriverelectron-positron candidate particles required to point back to beamspot at the target
BeamspotConstraintedV0VerticesVertexHpsReconParticleDriverelectron-positron vertices required to point back to beamspot at the target
EcalCalHitsCalorimeterHitEcalRawConverterDrivercalibrated ECal Hits
EcalClustersClusterReconClusterDriverreconstructed ECal clusters with uncorrected energies
EcalClustersCorrClusterCopyClusterCollectionDriver

reconstructed ECal clusters with corrected energies

 

EcalReadoutHitsRawTrackerHitEcalEvioReaderECal Hits in ADC counts 
EpicsDataGenericObjectLCSimEngRunEventBuilderEPICS data banks
FADCGenericHitsGenericObjectEcalEvioReaderadditional FADC readout information
FinalStateParticlesReconstructedParticleHpsReconParticleDriverfinal state particles (electrons, positrons, photons) with 4-momenta
GBLKinkDataGenericObjectGBLRefitterDriver extra GBL track kink data
GBLKinkDataRelationsLCRelationGBLRefitterDriver relation from GBLTracks to GBLKinkData
GBLTracksTrackGBLRefitterDrivertracks created from GBL refit
HelicalTrackHitRelationsLCRelationHelicalTrackHitDriver relation from HelicalTrackHits to StripClusterer_SiTrackerHitStrip1D
HelicalTrackHitsTrackerHitHelicalTrackHitDriver3D hits combining StripClusterer_SiTrackerHitStrip1D hits in axial/stereo layers
MatchedToGBLTrackRelationsLCRelationGBLRefitterDriverrelation from MatchedTracks to GBLTracks
MatchedTracksTrackTrackerReconDriver

primary collection of reconstructed tracks

merged from collections with tracks generated from different strategies

PartialTracksTrackMergeTrackCollectionscollection of tracks which have a set of hits that are a strict subset of another track
RotatedHelicalTrackHitRelationsLCRelationHelicalTrackHitDriver relation from RotatedHelicalTrackHit to HelicalTrackHit
RotatedHelicalTrackHitsTrackerHit HelicalTrackHitDriver 

HelicalTrackHits rotated into SeedTracker tracking frame: xy, yz, zx

SVTFittedRawTrackerHitsLCRelationRawTrackerHitFitterDriverrelation from SVTRawTrackerHits to SVTShapeFitParameters
SVTRawTrackerHitsRawTrackerHitSvtEvioReaderSi sensor single strip hits
SVTShapeFitParametersGenericObjectRawTrackerHitFitterDriverresults of the ADC vs sample number fits for SVT data
StripClusterer_SiTrackerHitStrip1DTrackerHit DataTrackerHitDriver1D Si strip clusters
TargetConstrainedMollerCandidatesReconstructedParticleHpsReconParticleDriverMøller candidate particles with the vertex z fixed to the target position and (x,y) constrained to beamspot
TargetConstrainedMollerVerticesVertexHpsReconParticleDriverMøller vertices with the vertex z fixed to the target position and (x,y) constrained to beamspot
TargetConstrainedV0CandidatesReconstructedParticleHpsReconParticleDriverelectron-positron pairs with the vertex z fixed to the target position and (x,y) constrained to beamspot
TargetConstrainedV0VerticesVertexHpsReconParticleDriverelectron-positron vertices with the vertex z fixed to the target position and (x,y) constrained to beamspot
TrackDataGenericObjectTrackDataDriveradditional track information
TrackDataRelationsLCRelationTrackDataDriver relation from TrackData to a Track
TrackResidualsGenericObjectTrackDataDriver X & Y track residuals calculated at the stereo hit position
TrackResidualsRelationsLCRelationTrackDataDriver relation from TrackResiduals to a Track
TriggerBankGenericObjectLCSimEngRunEventBuildertrigger information for the event
UnconstrainedMollerCandidatesReconstructedParticleHpsReconParticleDriver

Møller particle candidates with unconstrained vertex

UnconstrainedMollerVerticesVertexHpsReconParticleDriver

unconstrained Møller vertices

UnconstrainedV0CandidatesReconstructedParticleHpsReconParticleDriverelectron-positron pairs with unconstrained vertex
UnconstrainedV0VerticesVertexHpsReconParticleDriverunconstrained electron-positron vertices

Algorithm Details

Data Conversion

The LCSimEventBuilder defines an interface for converting from EVIO to LCIO events, with the LCSimEngRunEventBuilder providing the current implementation of this conversion process.  EVIO collections are processed by a reader which gets raw bank data and converts it into a typed LCIO collection.

SVT data banks are handled by an SvtEvioReader and converted into RawTrackerHit and  and GenericObject collections collections.

Various modes of EVIO ECal data are converted using the EcalEvioReader.

The following collections are added to the event by the ECal reader.

  • EcalReadoutHits
  • FADCGenericHits
  • EcalReadoutExtraDataRelations
  • EcalReadoutExtraData 

...

default builder will also convert and

...

write DAQ config information, EPICS data,

...

and scaler bank data

...

 into the output LCSim events, if these banks are present in the EVIO data.

Track Reconstruction

These are the primary steps involved in the HPS Java track reconstruction:

  1. RawTrackerHitFitterDriver converts SVT raw data into fitted hits collection by fitting ADC vs time signals is used to fit the ADC vs time signals from the raw data and writes a new collection with the fit result.
  2. DataTrackerHitDriver creates stereo hit pairs from the fitted strip hits along with the fit results.
  3. HelicalTrackHitDriver creates 3D hits (clusters) from input stereo hits.
  4. TrackerReconDriver runs  runs track finding on the 3D hit collection.
    1. Track finding is run runs multiple times with different tracking strategy files, creating a track collection for each strategy used.
  5. The MergeTrackCollections Driver is  is used to merge the multiple track collections into a single output collection.
  6. The GBLRefitterDriver refits  refits the tracks using GBL and writes a number of additional output collections with this information.
  7. TrackDataDriver adds  adds Generic Object collection  collection containing additional information about the track for persistency.

The tracking packages in lcsim form the basis for HPS's tracking algorithms through usage and extension.  Seed  Seed Tracker is used for track finding using a set of input tracking strategies.  The  

The track fit from lcsim is further refined using a Java implementation (port) of the GBL C++ algorithm.

...

.

Each track has a TrackType assigned which indicates the SeedTracker algorithm used, in a bitwise fashion, and sets bit 6 (2^5=32) if the track was refined by GBL. The TrackType is inherited by any particle and is obtained with the getType() method. See: TrackType and StrategyType for details.

Additional References

This paper describes the LCIO track parameters.

These slides provide some details about how tracking strategies are used (see pages 4 & 8).

Cluster Reconstruction

These are the basic steps of the ECal reconstruction:

  1. EcalRawConverterDriver converts  converts RawTrackerHit input  input collection into into CalorimeterHit collection  collection using the the EcalRawConverter.
  2. ReconClusterDriver uses  uses the ReconClusterer to  to create calorimeter Cluster collection  collection from input hits collection.
  3. CopyClusterCollectionDriver copies  copies the clusters (with raw energies) to a different collection with a corrected energy.

The copied collection will be updated with corrected energies in the next step which creates recon particles.

Additional References

This CLAS Note describes the basic clustering algorithm.

This HPS Note covers position corrections and other analysis.

Reconstructed Particles

The ReconParticleDriver creates  creates ReconstructedParticle objects representing the final state particles from the event reconstruction.  These are tracks with matching clusters (when applicable).  It also performs vertex reconstruction and creates a number of candidate particle collections.

The ReconParticleDriver is sub-classed by the actual HpsReconParticleDriver from the steering which adds Moller candidate Møller candidate collections.

Data Collections

Collection NameJava Object TypeCreated ByDescription
EcalReadoutHitsRawCalorimeterHit

evio.ECalEvioReader (data)

ECal Hits in ADC counts 
EcalCalHitsCalorimeterHitrecon.ecal.EcalRawConverterDrivercalibrated ECal Hits
EcalClustersClusterrecon.ecal.EcalClusterICBasicECal Clusters
SVTRawTrackerHitsRawTrackerHit

evio.ECalEvioReader (data)

Si sensor single strip hit information
SVTShapeFitParametersGenericObjectrecon.tracking.RawTrackerHitFitterDriverresult of the ADC vs sample # fit
SVTFittedRawTrackerHitsLCRelationrecon.tracking.RawTrackerHitFitterDriverrelation between SVTRawTrackerHits and SVTShapeFitParameters
StripClusterer_SiTrackerHitStrip1DTrackerHitrecon.tracking.DataTrackerHitDriver1D Si strip clusters
HelicalTrackHitsTrackerHitrecon.tracking.HelicalTrackHitDriver3D SVT hits combining StripClusterer_SiTrackerHitStrip1D hits in axial/stereo layers
HelicalTrackHitRelationsLCRelationrecon.tracking.HelicalTrackHitDriverrelation between HelicalTrackHits and StripClusterer_SiTrackerHitStrip1D
HelicalTrackHitMCRelationsLCRelationrecon.tracking.HelicalTrackHitDriverrelation between HelicalTrackHits and MCParticles
RotatedHelicalTrackHitsTrackerHitrecon.tracking.HelicalTrackHitDriversame as HelicalTrackHits but rotated into SeedTracker tracking frame (x->y,y->z,z->x)
RotatedHelicalTrackHitRelationsLCRelationrecon.tracking.HelicalTrackHitDriver.... but rotated into SeedTracker tracking frame (x->y,y->z,z->x)
RotatedHelicalTrackHitMCRelationsLCRelationrecon.tracking.HelicalTrackHitDriver.... but rotated into SeedTracker tracking frame (x->y,y->z,z->x)
MatchedTracksTrackrecon.tracking.TrackerReconDrivertracks found in the SVT with (d0, phi, omega, tanlambda, z0) parameters
FinalStateParticlesReconstructedParticlerecon.particle.HpsReconParticleDriverthe list of final state particles (electrons, positrons, photons) with 4-momenta.
UnconstrainedV0CandidatesReconstructedParticlerecon.particle.HpsReconParticleDriverelectron-positron pairs with vertex (unconstrained)
BeamspotConstrainedV0CandidatesReconstructedParticlerecon.particle.HpsReconParticleDriverelectron-positron pairs with vertex/momentum required to point back to beamspot at target
TargetConstrainedV0CandidatesReconstructedParticlerecon.particle.HpsReconParticleDriverelectron-positron pairs with the vertex z fixed to the target position and the (x,y) constrained to beamspot
FPGADataGenericObject SVT hybrid information (e.g. temperature)...anything else?
TriggerBankGenericObject trigger information for the event
ReadoutTimestampsGenericObject event timestamp

Java Packages

HPS Java Reconstruction

...

Packages

The HPS Java Documentation can  can be used to browse the packages and classes used for physics reconstruction.

...

Java

...

Java
PackageDescriptionNotesModule
org.hps.evioconverts EVIO raw data to LCIOevio readers for converting EVIO raw data to LCIO eventsevio
org.hps.recon.ecalECal reconstruction utilitiesprimarily for converting from raw data to CalorimeterHits ecal-recon
org.hps.recon.ecal.clusterECal hit clustering frameworkincludes recon clustering and GTP/CTP hardware emulation clusterersecal-recon
org.hps.recon.trackingtrack reconstruction from SVT hitsbased on Seed Tracker from lcsimtracking
org.hps.recon.tracking.gblGBLtrack refitported from C++ to Java; actual Java package now outside HPS Javatracking
org.hps.recon.particlebuilds ReconstructedParticles from tracks and clustersbuilds reconstructed particles from input event collectionsrecon  
org.hps.recon.vertexingvertex reconstructionbased on Billoir vertexing algorithmrecon
org.hps.recon.filteringevent skimming utilities recon

LCSim Packages

These lcsim packages are  are used extensively within the HPS Java reconstruction code.

Java PackageDescriptionNotesModule
org.lcsim.eventphysics event interfaces (implemented by LCIO)interfaces used extensively in HPS Java Drivers 
org.lcsim.util.loopevent processing loopextends Freehep loop classes for lcsim usage 
org.lcsim.joblcsim job manager which reads lcsim xml steering files  
org.lcsim.lcioJava implementation of LCIO file formatimplements event interfaces 
org.lcsim.recon.tracking.seedtrackerSeed Tracker track reconstruction algorithmbasis for HPS Java tracking algorithm 
org.lcsim.utilDriver class for event data processing  
org.lcsim.conditionsdetector conditions system backend  
org.lcsim.geometry, org.lcsim.detectordetector description and geometry classes