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_H
00025 #define ATLFAST_JETMAKER_H
00026 
00027 // STL
00028 #ifndef STD_VECTOR_H
00029 #include <vector>
00030 #define STD_VECTOR_H
00031 #endif
00032 
00033 #ifndef STD_STRING_H
00034 #include <string>
00035 #define STD_STRING_H
00036 #endif
00037 
00038 // Gaudi 
00039 #ifndef GAUDIKERNEL_ALGORITHM_H
00040 #include "GaudiKernel/Algorithm.h"
00041 #define GAUDIKERNEL_ALGORITHM_H
00042 #endif
00043 
00044 // Other
00045 #ifndef CLHEP_LORENTZVECTOR_H
00046 #include "CLHEP/Vector/LorentzVector.h"
00047 #define CLHEP_LORENTZVECTOR_H
00048 #endif
00049 
00050 // Atlfast
00051 #ifndef ATLFAST_KINEMATICHELPER_H
00052 #include "AtlfastUtils/KinematicHelper.h"
00053 #endif
00054 
00055 #ifndef ATLFAST_MCPARTICLECOLLECTION_H
00056 #include "AtlfastEvent/MCparticleCollection.h"
00057 #endif
00058 
00059 #include "AtlfastEvent/CollectionDefs.h"
00060 
00061 #include "AtlfastUtils/HepMC_helper/NCutter.h"
00062 #include "AtlfastUtils/HepMC_helper/IsFromHardScatter.h"
00063 #include "AtlfastUtils/HepMC_helper/SelectJetTag.h"
00064 #include "AtlfastUtils/HepMC_helper/SelectTauTag.h"
00065 
00066 //***************************************************************
00067 // JetMaker class declaration
00068 //
00069 // A "Gaudi algorithm" is something which gets scheduled and controlled
00070 // by the framework. In its simplest definition it is something which
00071 //  - gets clled for each event 
00072 //  - can get anything it wants out of the Transient Event Store"
00073 //  - can put anything it makes into the store.
00074 
00075 //
00076 //****************************************************************
00077 class MsgStream;
00078 class ISvcLocator;
00079 
00080 namespace PartitionCondition{
00081   class BelowThresholdDeltaR;
00082 }
00083 
00084 namespace Atlfast {
00085   using std::string;
00086   using std::vector;
00087   class TesIO;
00088   class ICluster;
00089   class ISmearer;
00090   class ReconstructedParticle;
00091   class Jet;
00092   
00102   class JetMaker : public Algorithm{
00103 
00104   private:
00105     //------------------------------------
00106     // Types used internally by this class
00107     // for local collections 
00108     //------------------------------------
00109     
00110     typedef std::vector<ICluster*>                        localClusterCollection;
00111     typedef localClusterCollection::iterator              localClusterIterator;
00112     typedef std::vector<ReconstructedParticle*>           MuonCollection;
00113     typedef MuonCollection::iterator                      MuonIterator;
00114     
00115     //--------------------------------
00116     // Selectors used
00117     //--------------------------------
00118     
00119     HepMC_helper::IMCselector* m_bSelector;
00120     HepMC_helper::IMCselector* m_cSelector;
00121     HepMC_helper::IMCselector* m_tauSelector;      
00122     
00123     //--------------------------------
00124     // Parameters of this algorithm
00125     // (descriptions above)
00126     //--------------------------------
00127     
00128      
00129     double m_minPT;     
00130     double m_maxEta;       
00131     bool   m_doSmearing;
00132     
00133     double m_barrelForwardEta;
00134     double m_rconeb;
00135     double m_rconef;
00136     
00137     double m_bPtMin;
00138     double m_bMaxDeltaR;
00139     double m_cPtMin;
00140     double m_cMaxDeltaR;
00141     double m_tauPtMin;
00142     double m_tauMaxDeltaR;
00143     double m_etaTagMax;
00144     double m_tauJetPtRatio;
00145 
00146     bool   m_adjustMissETForIsolation;
00147     
00148     // Cumulative sum of missing ET
00149     double m_sumET;
00150 
00151    //--------------------------------------------
00152     // Smearer helper class
00153     // which knows all about how to do smearing
00154     // for my particles
00155     //---------------------------------------------
00156     
00157     ISmearer* m_smearer;
00158     ISmearer* m_cellSmearer;
00159     
00160     
00161     TesIO* m_tesIO;
00162     //holds the Storegate MC location
00163     std::string m_mcLocation;
00164     
00165     //--------------------------------------------------
00166     // Paths in the Transient Event store to get/put things
00167     // These are currently set in member variables so that
00168     // they can be overwritten by the job options service
00169     //--------------------------------------------------
00170     
00171     std::string m_inputLocation ;
00172     std::string m_outputLocation ;
00173     std::string m_muonLocation;
00174     std::string m_unusedCellLocation;
00175     std::string m_missingMomentumLocation;
00176     std::string m_isolatedElectronLocation;
00177     std::string m_isolatedPhotonLocation;
00178 
00179     //-------------------------------
00180     // helper
00181     //-------------------------------
00182     
00183     KinematicHelper m_kinehelp ;
00184     
00185     int getJetLabel(MCparticleCollection&  mcParticles,
00186                     Jet* jet,
00187                     double maxDeltaR,
00188                     double &deltaR)const;
00189     int getTauLabel(MCparticleCollection&  mcParticles,
00190                     Jet* jet,
00191                     double maxDeltaR,
00192                     double &deltaR)const;
00193     void label(Jet* jet, 
00194                MCparticleCollection&  mcParticles_b, 
00195                MCparticleCollection&  mcParticles_c, 
00196                MCparticleCollection&  mcParticles_tau) const;
00197     
00198     HepLorentzVector addCells(MsgStream&);
00199     void getUnusedCells(std::vector<const ITwoCptCell*>&, MsgStream&);
00200     void getIsolationCorrectionCells(std::vector<const ITwoCptCell*>&, 
00201                                      std::vector<const ITwoCptCell*>&, 
00202                                      std::string, MsgStream&);
00203     
00204     //-------------------------------
00205     // Protected methods
00206     //-------------------------------
00207   public:
00208     
00209     //-------------------------
00210     // Constructors/Destructors
00211     //
00212     // Gaudi requires that the constructor takes certain arguments
00213     // (and passes them directly to the constructor of the base class)
00214     //-------------------------
00215     
00216     
00218     JetMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00219     
00221     virtual ~JetMaker();
00222     
00223     
00224     //------------------------------------------------------
00225     // Methods used by Gaudi to run the algorithm
00226     //------------------------------------------------------
00227     
00229     StatusCode initialize() ;
00231     StatusCode execute() ;
00233     StatusCode finalize() ;
00234     
00236     Jet* create( ICluster* );
00238     bool isAcceptable( Jet* );
00240     void addMuons(Jet*, MuonCollection& );
00241 
00243     MsgStream& dumpParameters(MsgStream& ) const; 
00244 };
00245   
00246   
00247 }  //end of namespace bracket
00248 
00249 #endif

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