Accessing Bremsstrahlung found by track fitters

Note brems will only be found in the 15.X.0 nightlies or later. Also come changes have been made to setup of Kalmann/DNA and the GSF so it might be useful to inspect the latest version of EMTrkFitter.py to see how to setup the track fitters correctly for the latest version of Athena.

Introduction

Within Athena there are currently two track fitters that will identify the location of Bremsstrahlung along tracks. These are DNA and the GSF. To enable this feature in the GSF all that is required is that the flag "runBremFinder" is set to True in the configuration of the GSF (N.B. the brem finder does take significant amount of time to find). While with DNA brem positions will be found whenever the Kalman fitter is set to fit with electron hypothesis.

Example Code

Once you have a Trk::Track fitted with the GSF or DNA you need to find out if a brem position has been identified. The bremsstrahlung information is stored as a Trk::TrackStateOnSurface(TSoS) with in the track. From the TSoS you can obtain some information about the identified bremsstrahlung. This is located in the associatede MaterialEffectsOnTrack object which should be of type EstimatedBremOnTrack.

C++


#include "TrkTrack/Track.h"
#include "TrkTrack/TrackStateOnSurface.h"
#include "TrkMaterialOnTrack/EstimatedBremOnTrack.h"
#include "TrkEventPrimitives/GlobalPosition.h"

void  getBrems(Trk::Track *track) const
{
  //We going to look for brems
  if (!track) return;
  
  double material(0);
  //Obtain the vector of TrackStateOnSurface's
  DataVector<const Trk::TrackStateOnSurface>::const_iterator trackStateOnSurface = track->trackStateOnSurfaces()->begin();    
  //Iterate over them
  for (;trackStateOnSurface < track->trackStateOnSurfaces()->end(); ++ trackStateOnSurface){

    //Determine if the surface is of type BremPoint
    if ( (*trackStateOnSurface)->type(Trk::TrackStateOnSurface::BremPoint) ){
    std::cout<<" A brem point has been found on the track" <<std::endl; 
      
      //Check that the material effects are of type EstimatedBremOnTrack
      const Trk::EstimatedBremOnTrack *estimatedBremOnTrack =  dynamic_cast< const Trk::EstimatedBremOnTrack* >  ((*trackStateOnSurface)->materialEffectsOnTrack());
      if (estimatedBremOnTrack) {
   
         std::cout<< " The fraction of energy retained by the track is: "<< estimatedBremOnTrack->retainedEnFraction() <<std::endl;
      
      } else {
      
         std::cout<<" No EstimatedBremOnTrack object :(" <<std::endl;
      
      }

      const Trk::TrackParameters* trackParameters = (*trackStateOnSurface)->trackParameters();
      if (trackParameters!=0){
      
        const Trk::GlobalPosition globalPosition = trackParameters->position();
        std::cout<< " BremPosition (x,y,z) = " << globalPosition.x() << "\t" <<  globalPosition.y() << "\t" << globalPosition.z() <<std::endl;
      
      } else {
      
        std::cout<< " No TrackParameters " <<std::endl;
      
      }
    }
  }
}

   

Related Topics

UserForm
FirstName Anthony
LastName Morley
Email anthony.morley@cernNOSPAMPLEASE.ch
Telephone

Address

Comment

Edit personal data
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r6 - 2009-02-19 - AnthonyMorley
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback