Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

TrackMaker.h

Go to the documentation of this file.
00001 // ================================================
00002 // TrackMaker class description
00003 // ================================================
00004 //
00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00006 //
00007 //
00008 // This version....
00009 //
00010 //
00011 // Namespace Atlfast::
00012 //
00013 // class: TrackMaker
00014 //
00015 // Description: 
00016 //
00017 //  Default Algorithm which knows how to simulate Tracks from MC truth 
00018 //
00019 //
00020 //
00021 // ................................................................
00022 //
00023 
00024 #ifndef ATLFAST_TRACKMAKER_H
00025 #define ATLFAST_TRACKMAKER_H
00026 
00027 // STL
00028 #include <vector>
00029 #include <string>
00030 
00031 // Gaudi 
00032 #include "GaudiKernel/ISvcLocator.h"
00033 #include "GaudiKernel/IAlgorithm.h"
00034 #include "GaudiKernel/Algorithm.h"
00035 #include "GaudiKernel/MsgStream.h"
00036 #include "GaudiKernel/DataObject.h"
00037 
00038 // Other
00039 #include "CLHEP/Vector/LorentzVector.h"
00040 #include "CLHEP/Vector/ThreeVector.h"
00041 #include "HepMC/GenEvent.h"
00042 #include "HepMC/GenParticle.h"
00043 #include "HepMC/ParticleDataTable.h"
00044 #include "HepMC/IO_PDG_ParticleDataTable.h"
00045 
00046 
00047 // Atlfast
00048 #include "AtlfastCode/IKinematic.h"
00049 #include "AtlfastCode/TrackTrajectory.h"
00050 #include "AtlfastCode/Track.h"
00051 #include "AtlfastCode/TrackCollection.h"
00052 #include "AtlfastCode/TrackSmearer.h"
00053 #include "AtlfastCode/TesIO.h"
00054 #include "AtlfastCode/CommonData.h"
00055 #include "AtlfastCode/HeaderPrinter.h"
00056 #include "AtlfastCode/MCparticleCollection.h"
00057 
00058 //*************************************
00059 //Default parameters private to this algorithm
00060 //*************************************
00061 
00062 #define DEFAULT_mcPtMin     0.5   // Minimum pT  (applied to MC truth)
00063 #define DEFAULT_mcEtaMax    2.5   // Maximum eta (applied to MC truth) 
00064 #define DEFAULT_vtMax       3.0   // Maximum Vertex(trans)
00065 #define DEFAULT_vlMax       40.0  // Maximum Vertex(long) 
00066 #define DEFAULT_doSmearing  true  // Should the particle four vectors be smeared or not?
00067 #define DEFAULT_bField      2.0   // magnetic field in Tesla
00068  
00069 //htp random number generator should eventually be removed
00070 #define DEFAULT_muConfig    "000"
00071 
00072 
00073 //*****************************************
00074 // Default paths in the Transient event store to get/put entities
00075 //
00076 //[Note:  This will change ]
00077 //******************************************
00078 #define DEFAULT_commonDataLocation "/Event/AtlfastCommonData" 
00079 #define DEFAULT_MC_eventLocation    "/Event/McEventCollection" 
00080 #define DEFAULT_outputLocation      "/Event/AtlfastTracks" 
00081 
00082 
00083 
00084 //***************************************************************
00085 // TrackMaker class declaration
00086 //
00087 //****************************************************************
00088 namespace HepMC_helper{
00089   class IMCselector;
00090 }
00091 namespace Atlfast {
00092 
00093 class TrackMaker : public Algorithm
00094 {
00095 
00096  public:
00097 
00098   //-------------------------
00099   // Constructors/Destructors
00100   //-------------------------
00101 
00102   TrackMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00103   virtual ~TrackMaker();
00104 
00105 
00106   //------------------------------------------------------
00107   // Methods used by Gaudi to run the algorithm
00108   //------------------------------------------------------
00109 
00110   virtual StatusCode initialize() ;
00111   virtual StatusCode execute() ;
00112   virtual StatusCode finalize() ;
00113 
00114 
00115  private:
00116 
00117   // -------------------------------
00118   // Parameters of this algorithm
00119   // (descriptions above)
00120   //--------------------------------
00121   bool          m_notInit;
00122   double        m_vlMax;
00123   double        m_vtMax;
00124   double        m_mcPtMin;     
00125   double        m_mcEtaMax;       
00126   bool          m_doSmearing;
00127   double        m_bField ;
00128   string        m_muConfig;
00129 
00130 
00131 
00132   //--------------------------------------------
00133   // Selector for HepMC generator particles
00134   //---------------------------------------------
00135 
00136 
00140   TesIO* m_tesIO;
00141   HepMC_helper::IMCselector*  m_ncutter ;
00142 
00143   //--------------------------------------------
00144   // Smearer helper class which knows all about how to do smearing
00145   // for Tracks
00146   // There may need to be more of these added in order
00147   // to treat different species differently.
00148   // Alternately the single smearer object could be made to
00149   // dispatch on particle type. Not thought through yet.
00150   //---------------------------------------------
00151 
00152 
00156   TrackSmearer* m_smearer;
00157   HepMC::ParticleDataTable m_particleTable;
00158 
00159 
00160   //--------------------------------------------------
00161   // Paths in the Transient Event store to get/put things
00162   // These are currently set in member variables so that
00163   // they can be overwritten by the job options service
00164   //--------------------------------------------------
00165 
00167   std::string m_commonDataLocation ;
00168   std::string m_MC_eventLocation ;
00169   std::string m_outputLocation ;
00170 
00171 
00172   //-------------------------------
00173   // Private methods
00174   //-------------------------------
00175 
00176   // Create a Track 
00177   virtual Track* create( const HepMC::GenParticle* );
00178 
00179 
00180   // Test if Track passes kinematic requirements
00181   //  virtual bool isAcceptable( Track* );
00182   virtual bool isAcceptable(Track*);
00183   TrackTrajectory extractTrajectory( const HepMC::GenParticle* ) ;
00184 
00185 };
00186 
00187 
00188 }  //end of namespace bracket
00189 
00190 #endif
00191 
00192 
00193 
00194 
00195 
00196 
00197 
00198 
00199 
00200 
00201 

Generated on Mon Feb 4 15:54:24 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001