00001 // ================================================ 00002 // DefaultReconstructedParticleMaker 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: DefaultReconstructedParticleMaker 00014 // 00015 // Description: 00016 // 00017 // Default Algorithm to make smeared 'Atlfast::ReconstructedParticles' from 00018 // MC truth 'HepMC::GenParticles' 00019 // 00020 // HepMC::GenParticles are accessed in the TES. Only those satisfying 00021 // specified pre-selection requirements are used by this algorithm. 00022 // These requirements are: 00023 // - particle type (given by pdg_id) 00024 // - minimum pT 00025 // - maximum eta 00026 // These are set via job options. 00027 // 00028 // The different treatement of different species of particle is embodied 00029 // completely in a smearer object. 00030 // Arbitrarily complex smearers can be supplied if desired. 00031 // 00032 // For each HepMC::GenParticle, a candidate ReconstructedParticle is 00033 // created. This is only kept if 00034 // it satisfies the following requirements: 00035 // - minimum pT 00036 // - maximum eta 00037 // 00038 // The surviving ReconstructedParticles are stored in the TES 00039 // 00040 // ................................................................ 00041 00042 00043 #ifndef ATLFAST_DEFAULTRECONTRUCTEDPARTICLEMAKER_H 00044 #define ATLFAST_DEFAULTRECONTRUCTEDPARTICLEMAKER_H 00045 00046 // STL 00047 #include <vector> 00048 #include <string> 00049 00050 // Gaudi 00051 #include "GaudiKernel/ISvcLocator.h" 00052 #include "GaudiKernel/IAlgorithm.h" 00053 #include "GaudiKernel/Algorithm.h" 00054 #include "GaudiKernel/MsgStream.h" 00055 #include "GaudiKernel/DataObject.h" 00056 00057 // Other 00058 #include "CLHEP/Vector/LorentzVector.h" 00059 #include "HepMC/GenEvent.h" 00060 #include "HepMC/GenParticle.h" 00061 00062 // Atlfast 00063 #include "AtlfastEvent/ReconstructedParticle.h" 00064 #include "AtlfastEvent/CollectionDefs.h" 00065 #include "AtlfastAlgs/ISmearer.h" 00066 #include "AtlfastAlgs/IAcceptor.h" 00067 #include "AtlfastUtils/TesIO.h" 00068 00069 00070 namespace HepMC_helper{ 00071 class IMCselector; 00072 } 00073 00074 namespace Atlfast { 00075 using std::string; 00076 00089 class DefaultReconstructedParticleMaker : 00090 public virtual Algorithm 00091 { 00092 00093 public: 00094 00095 //------------------------- 00096 // Constructors/Destructors 00097 //------------------------- 00099 DefaultReconstructedParticleMaker(const std::string& name, 00100 ISvcLocator* pSvcLocator); 00102 virtual ~DefaultReconstructedParticleMaker(); 00103 00104 00105 //------------------------------------------------------ 00106 // Mandatory Athena methods 00107 //------------------------------------------------------ 00109 virtual StatusCode initialize() ; 00111 virtual StatusCode execute() ; 00113 virtual StatusCode finalize() ; 00114 00115 00116 private: 00117 00118 //------------------------------------ 00119 // Typedefs used internally by this class 00120 //------------------------------------ 00121 00122 typedef std::vector<HepMC::GenParticle*> t_MC_particleCollection ; 00123 typedef std::vector<HepMC::GenParticle*>::iterator t_MC_particleIterator ; 00124 00125 00126 //-------------------------------- 00127 // Parameters of this algorithm 00128 //-------------------------------- 00129 // General parameters 00130 // Pre-selection criteria to apply to the HepMC::GenParticles 00132 int m_particleType; 00134 double m_mcPtMin ; 00136 double m_mcEtaMax ; 00137 00138 // Post creation criteria to apply to created ReconstructedParticles 00140 double m_PtMin; 00142 double m_EtaMax; 00143 00145 bool m_doSmearing; 00146 00147 // Paths in the Transient event store to get/put entities 00149 std::string m_outputLocation; 00151 std::string m_muonResFile; 00152 00154 int m_muSmearKey; 00155 00156 //cct: array to hold smearing parameters loaded from JobOptions 00157 std::vector<double> m_smearParamArray; 00158 //cct: integer to hold smearSchema loaded from JobOptions 00159 int m_smearParamSchema; 00160 00161 // Apply efficiencies at particle creation stage? 00162 bool m_applyEfficiencies; 00163 00164 //----------------------------------------------------------------- 00165 // Selector to select only those truth particles which are required 00166 //----------------------------------------------------------------- 00168 HepMC_helper::IMCselector* m_ncutter ; 00169 00170 00171 //-------------------------------------------- 00172 // Smearer helper class which specialises this algorithm for a 00173 // specific particle species 00174 //--------------------------------------------- 00179 ISmearer* m_smearer; 00180 00181 // SES resolution factor ******************** 00182 //CorrectionFactor* m_CorrFactor; 00183 00184 // Class to accept or reject particles 00185 IAcceptor *m_acceptor; 00186 00190 ReconstructedParticle * m_lnkReconstructedParticle; 00191 //-------------------------- 00192 // Private methods 00193 //-------------------------- 00194 00196 TesIO* m_tesIO; 00197 00199 MsgStream m_log; 00200 00202 void getAcceptor(); 00203 00205 virtual ReconstructedParticle* create( const HepMC::GenParticle* ); 00206 00208 virtual bool isAcceptable( const ReconstructedParticle* ); 00209 00211 std::string m_mcLocation; 00212 00213 }; 00214 00215 00216 } //end of namespace bracket 00217 00218 #endif 00219 00220 00221 00222 00223 00224 00225 00226 00227 00228 00229 00230