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

JetMaker.h

Go to the documentation of this file.
00001 // ================================================
00002 // JetMaker 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: JetMaker
00014 //
00015 // Description: 
00016 //
00017 //  Algorithm which knows how to make Jets
00018 //
00019 //  The resulting Jets are added to the Event
00020 //
00021 // ................................................................
00022 //
00023 
00024 #ifndef __ATLFAST_JetMaker__
00025 #define __ATLFAST_JetMaker__
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 "HepMC/GenEvent.h"
00041 #include "HepMC/GenParticle.h"
00042 #include "AtlfastCode/HepMC_helper.h"
00043 
00044 
00045 // Atlfast
00046 #include "AtlfastCode/KinematicHelper.h"
00047 #include "AtlfastCode/Cluster.h"
00048 #include "AtlfastCode/ISmearer.h"
00049 #include "AtlfastCode/Jet.h"
00050 #include "AtlfastCode/JetCollection.h"
00051 #include "AtlfastCode/ReconstructedParticle.h"
00052 #include "AtlfastCode/ReconstructedParticleCollection.h"
00053 #include "AtlfastCode/MCparticleCollection.h"
00054 #include "AtlfastCode/JetSmearer.h"
00055 #include "AtlfastCode/FunctionObjects.h"
00056 //#include "AtlfastCode/Muon.h"
00057 #include "AtlfastCode/TesIO.h"
00058 
00059 //*************************************
00060 //Default parameters private to this algorithm
00061 //*************************************
00062 #define DEFAULT_minPT       10    // Minimum jet transverse momentum
00063 #define DEFAULT_maxEta      5     // eta range to consider 
00064 #define DEFAULT_doSmearing  true  // Smear the jet four vector?
00065  
00066 #define DEFAULT_rconeb      0.400
00067 #define DEFAULT_rconef      0.400
00068 //*****************************************
00069 //cuts on MC particles used to tag jets
00070 #define DEFAULT_bPtMin          5.0
00071 #define DEFAULT_cPtMin          5.0
00072 #define DEFAULT_tauPtMin       10.0
00073 #define DEFAULT_bMaxDeltaR      0.2
00074 #define DEFAULT_cMaxDeltaR      0.2
00075 #define DEFAULT_tauMaxDeltaR    0.3
00076 #define DEFAULT_etaTagMax       2.5
00077 #define DEFAULT_tauJetPtRatio   0.9
00078 //*****************************************
00079 // Default paths in the Transient event store to get/put entities
00080 //
00081 //******************************************
00082 
00083 #define DEFAULT_inputLocation           "/Event/AtlfastClusters" 
00084 #define DEFAULT_outputLocation          "/Event/AtlfastJets" 
00085 #define DEFAULT_muonLocation            "/Event/AtlfastNonIsolatedMuons"
00086 #define DEFAULT_commonDataLocation      "/Event/AtlfastCommonData"
00087 #define DEFAULT_mcTruthLocation         "/Event/McEventCollection"
00088 #define DEFAULT_unusedCellLocation      "/Event/AtlfastUnusedCells"
00089 #define DEFAULT_missingMomentumLocation "/Event/AtlfastMissingMomentum"
00090 //***************************************************************
00091 // JetMaker class declaration
00092 //
00093 // A "Gaudi algorithm" is something which gets scheduled and controlled
00094 // by the framework. In its simplest definition it is something which
00095 //  - gets clled for each event 
00096 //  - can get anything it wants out of the Transient Event Store"
00097 //  - can put anything it makes into the store.
00098 
00099 //
00100 //****************************************************************
00101 
00102 namespace Atlfast {
00107   class JetMaker : public Algorithm
00108 {
00109 
00110  private:
00111   //------------------------------------
00112   // Types used internally by this class
00113   // for local collections 
00114   //------------------------------------
00115 
00116   typedef std::vector<Cluster*>                         localClusterCollection;
00117   typedef std::vector<Cluster*>::iterator               localClusterIterator;
00118   typedef std::vector<ReconstructedParticle*>           MuonCollection;
00119   typedef std::vector<ReconstructedParticle*>::iterator MuonIterator;
00120 
00121   //--------------------------------
00122   // Parameters of this algorithm
00123   // (descriptions above)
00124   //--------------------------------
00125 
00126   bool          m_notInit;
00127   double        m_minPT;     
00128   double        m_maxEta;       
00129   bool          m_doSmearing;
00130 
00131   double        m_barrelForwardEta;
00132   double        m_rconeb;
00133   double        m_rconef;
00134 
00135   double m_bPtMin;
00136   double m_bMaxDeltaR;
00137   double m_cPtMin;
00138   double m_cMaxDeltaR;
00139   double m_tauPtMin;
00140   double m_tauMaxDeltaR;
00141   double m_etaTagMax;
00142   double m_tauJetPtRatio;
00143 
00144   //--------------------------------------------
00145   // Smearer helper class
00146   // which knows all about how to do smearing
00147   // for my particles
00148   //---------------------------------------------
00149 
00150 
00154   ISmearer* m_smearer;
00155   ISmearer* m_cellSmearer;
00156 
00157 
00158   TesIO* m_tesIO;
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 
00166   std::string m_inputLocation ;
00167   std::string m_outputLocation ;
00168   std::string m_muonLocation;
00169   std::string m_mcTruthLocation;
00170   std::string m_unusedCellLocation;
00171   std::string m_commonDataLocation;
00172   std::string m_missingMomentumLocation;
00173 
00174 
00175 
00176   //-------------------------------
00177   // helper
00178   //-------------------------------
00179 
00180   KinematicHelper m_kinehelp ;
00181 
00182   int getJetTags(MCparticleCollection&  mcParticles,
00183                   const PartitionCondition::BelowThresholdDeltaR& tagSelector
00184                   )const;
00185   int getTauTags(MCparticleCollection&  mcParticles,
00186                  const PartitionCondition::BelowThresholdDeltaR& tagSelector,
00187                  double jetPt )const;
00188   void tag(Jet* jet, 
00189            MCparticleCollection&  mcParticles_b, 
00190            MCparticleCollection&  mcParticles_c, 
00191            MCparticleCollection&  mcParticles_tau) const;
00192  
00193   HepLorentzVector addUnusedCells(MsgStream&) const;
00194 
00195   //-------------------------------
00196   // Protected methods
00197   //-------------------------------
00198  public:
00199 
00200   //-------------------------
00201   // Constructors/Destructors
00202   //
00203   // Gaudi requires that the constructor takes certain arguments
00204   // (and passes them directly to the constructor of the base class)
00205   //-------------------------
00206 
00207   JetMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00208    virtual ~JetMaker();
00209 
00210 
00211   //------------------------------------------------------
00212   // Methods used by Gaudi to run the algorithm
00213   //------------------------------------------------------
00214 
00215    StatusCode initialize() ;
00216    StatusCode execute() ;
00217    StatusCode finalize() ;
00218 
00219   //------------------------------------------------------
00220   // Methods of IReconstructedParticleMaker which we are
00221   // implementing
00222   //------------------------------------------------------
00223 
00224    Jet* create( Cluster* );
00225    bool isAcceptable( Jet* );
00226    void addMuons(Jet*, MuonCollection& );
00227    MsgStream& dumpParameters(MsgStream& ) const; 
00228 
00229 };
00230 
00231 
00232 }  //end of namespace bracket
00233 
00234 #endif
00235 
00236 
00237 
00238 
00239 
00240 
00241 
00242 
00243 
00244 
00245 
00246 
00247 
00248 
00249 
00250 

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