TrackSmearer.h

Go to the documentation of this file.
00001 
00002 /************
00003  Still needs:
00004 
00005  - two FIXMEs to be checked with ELzbieta
00006  
00007  - interfacing to smearing parameters
00008 ************/
00009 
00010 // ================================================
00011 // TrackSmearer class description
00012 // ================================================
00013 //
00014 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00015 //
00016 //
00017 // This version....
00018 //
00019 //
00020 // Namespace Atlfast::
00021 //
00022 // class: TrackSmearer
00023 //
00024 // Description: 
00025 //
00026 //  Used to smear track helix parameters
00027 //
00028 //  Takes as input a set of helix parameters, and smears using a 
00029 //  parameterised set of correclated resolutions which are input from 
00030 //  an external source
00031 //   
00032 // ................................................................
00033 //
00034 
00035 #ifndef ATLFAST_TRACKSMEARER_H
00036 #define ATLFAST_TRACKSMEARER_H
00037 
00038 // CLHEP includes
00039 #include "CLHEP/Random/RandGauss.h"
00040 #include "CLHEP/Random/JamesRandom.h"
00041 #include "CLHEP/Matrix/SymMatrix.h"
00042 
00043 // Athena stuff
00044 #include "GaudiKernel/ISvcLocator.h"
00045 #include "GaudiKernel/IAlgorithm.h"
00046 #include "GaudiKernel/Algorithm.h"
00047 #include "GaudiKernel/MsgStream.h"
00048 #include "GaudiKernel/DataObject.h"
00049 #include "GaudiKernel/ObjectVector.h"
00050 #include "AIDA/IHistogram1D.h"
00051 #include "AIDA/IHistogram2D.h"
00052 #include "GaudiKernel/IHistogramSvc.h"
00053 
00054 // Temporary until standard way of using matrices is sorted
00055 
00056 #include <string>
00057 
00058 //#include "AtlfastUtils/TMatrix.h"
00059 #include "GaudiKernel/DataSvc.h"
00060 
00061 // Atlfast includes
00062 #include "AtlfastEvent/Track.h"
00063 #include "AtlfastEvent/ChargeService.h"
00064 #include "AtlfastEvent/MagField.h"
00065 #include "AtlfastEvent/MsgStreamDefs.h"
00066 
00067 #include "CLHEP/Matrix/SymMatrix.h"
00068 
00069 using ::HepSymMatrix;
00070 
00071 namespace Atlfast {
00072   
00073   class IMatrixManager;
00074   
00075   class TrackSmearer {
00076 
00077   private:
00078 
00079     void makeMatrixManagers(int randSeed);
00080     void makeChargeService();
00081     IMatrixManager* getCorrectMatrixManager(int& pdg) const;
00082     
00083     MsgStream& m_log;
00084     std::string m_muonParamFile;
00085     std::string m_pionParamFile;
00086     std::string m_electronParamFile;
00087     std::string m_bremParamFile;
00088 
00089     // Matrix managers
00090     IMatrixManager* m_muonMatrixManager;   
00091     IMatrixManager* m_pionMatrixManager;   
00092     IMatrixManager* m_electronMatrixManager;   
00093 
00094     // Charge Service
00095     ChargeService* m_chargeService;
00096 
00097   public:
00098     
00099     // Constructor
00100     TrackSmearer( int randSeed, 
00101                   MsgStream& log,
00102                   std::string muonParFile     = "atlfastDatafiles/Atlfast_MuonResParam_CSC.dat",
00103                   std::string pionParFile     = "atlfastDatafiles/Atlfast_PionResParam_DC1_NewUnits.dat",
00104                   std::string electronParFile = "atlfastDatafiles/Atlfast_ElectronResParam_CSC.dat",
00105                   std::string bremParFile     = "atlfastDatafiles/Atlfast_ElectronBremParam_CSC.dat" );
00106     
00107     // Destructor
00108     ~TrackSmearer() ;
00109     
00110     // New interface to client which wraps old interface SmearParameters
00111     Track smear(const Track& track) const;
00112     
00113     // Method to convert covariance matrix into the representation used 
00114     // by Common Tracking, i.e. (d0, z0, phi0, theta0, q/p), instead of 
00115     // internally used (d0, z0, phi0, cot(theta0), q/pT). Needed when  
00116     // matrix is written to CBNTs or AODs.  
00117     HepSymMatrix convertToComTrk(const Track& track, const HepSymMatrix& sigma) const;
00118 
00119     double getPtResolution(const HepMC::GenParticle& particle);
00120     
00121   };
00122   
00123 } // end namespace
00124 
00125 #endif
00126 
00127 
00128 
00129 
00130 
00131 
00132 
00133 

Generated on Mon Sep 24 14:19:11 2007 for AtlfastAlgs by  doxygen 1.5.1