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__
00025 #define __ATLFAST_Trackmaker__
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 #include "AtlfastCode/HepMC_helper.h"
00046 
00047 
00048 // Atlfast
00049 #include "AtlfastCode/IKinematic.h"
00050 #include "AtlfastCode/TrackTrajectory.h"
00051 #include "AtlfastCode/Track.h"
00052 #include "AtlfastCode/TrackCollection.h"
00053 #include "AtlfastCode/TrackSmearer.h"
00054 #include "AtlfastCode/TesIO.h"
00055 #include "AtlfastCode/CommonData.h"
00056 #include "AtlfastCode/HeaderPrinter.h"
00057 #include "AtlfastCode/MCparticleCollection.h"
00058 
00059 //*************************************
00060 //Default parameters private to this algorithm
00061 //*************************************
00062 
00063 #define DEFAULT_mcPtMin     0.5   // Minimum pT  (applied to MC truth)
00064 #define DEFAULT_mcEtaMax    2.5   // Maximum eta (applied to MC truth) 
00065 #define DEFAULT_vtMax       3.0   // Maximum Vertex(trans)
00066 #define DEFAULT_vlMax       40.0  // Maximum Vertex(long) 
00067 #define DEFAULT_doSmearing  true  // Should the particle four vectors be smeared or not?
00068 #define DEFAULT_bField      2.0   // magnetic field in Tesla
00069  
00070 //htp random number generator should eventually be removed
00071 #define DEFAULT_muConfig    "000"
00072 
00073 
00074 //*****************************************
00075 // Default paths in the Transient event store to get/put entities
00076 //
00077 //[Note:  This will change ]
00078 //******************************************
00079 #define DEFAULT_commonDataLocation "/Event/AtlfastCommonData" 
00080 #define DEFAULT_MC_eventLocation    "/Event/McEventCollection" 
00081 #define DEFAULT_outputLocation      "/Event/AtlfastTracks" 
00082 
00083 
00084 
00085 //***************************************************************
00086 // TrackMaker class declaration
00087 //
00088 //****************************************************************
00089 
00090 namespace Atlfast {
00091 
00092 class TrackMaker : public Algorithm
00093 {
00094 
00095  public:
00096 
00097   //-------------------------
00098   // Constructors/Destructors
00099   //-------------------------
00100 
00101   TrackMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00102   virtual ~TrackMaker();
00103 
00104 
00105   //------------------------------------------------------
00106   // Methods used by Gaudi to run the algorithm
00107   //------------------------------------------------------
00108 
00109   virtual StatusCode initialize() ;
00110   virtual StatusCode execute() ;
00111   virtual StatusCode finalize() ;
00112 
00113 
00114  private:
00115 
00116   // -------------------------------
00117   // Parameters of this algorithm
00118   // (descriptions above)
00119   //--------------------------------
00120   bool          m_notInit;
00121   double        m_vlMax;
00122   double        m_vtMax;
00123   double        m_mcPtMin;     
00124   double        m_mcEtaMax;       
00125   bool          m_doSmearing;
00126   double        m_bField ;
00127   string        m_muConfig;
00128 
00129 
00130 
00131   //--------------------------------------------
00132   // Selector for HepMC generator particles
00133   //---------------------------------------------
00134 
00135 
00139   TesIO* m_tesIO;
00140   HepMC_helper::IMCselector*  m_ncutter ;
00141 
00142   //--------------------------------------------
00143   // Smearer helper class which knows all about how to do smearing
00144   // for Tracks
00145   // There may need to be more of these added in order
00146   // to treat different species differently.
00147   // Alternately the single smearer object could be made to
00148   // dispatch on particle type. Not thought through yet.
00149   //---------------------------------------------
00150 
00151 
00155   TrackSmearer* m_smearer;
00156   HepMC::ParticleDataTable m_particleTable;
00157 
00158 
00159   //--------------------------------------------------
00160   // Paths in the Transient Event store to get/put things
00161   // These are currently set in member variables so that
00162   // they can be overwritten by the job options service
00163   //--------------------------------------------------
00164 
00166   std::string m_commonDataLocation ;
00167   std::string m_MC_eventLocation ;
00168   std::string m_outputLocation ;
00169 
00170 
00171   //-------------------------------
00172   // Private methods
00173   //-------------------------------
00174 
00175   // Create a Track 
00176   virtual Track* create( const HepMC::GenParticle* );
00177 
00178 
00179   // Test if Track passes kinematic requirements
00180   //  virtual bool isAcceptable( Track* );
00181   virtual bool isAcceptable(Track*);
00182   TrackTrajectory extractTrajectory( const HepMC::GenParticle* ) ;
00183 
00184 };
00185 
00186 
00187 }  //end of namespace bracket
00188 
00189 #endif
00190 
00191 
00192 
00193 
00194 
00195 
00196 
00197 
00198 
00199 
00200 

Generated on Wed Jan 23 12:58:32 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001