MuonSmearer.h

Go to the documentation of this file.
00001 // MuonSmearer class
00002 //
00003 // Implements smearing for muons
00004 //
00005 // Namespace Atlfast::
00006 //
00007 //--------------------------------------------------------------
00008 //
00009 // MuonSmearer replicates the smearing code of ATLFAST++'s
00010 // MuonMaker. It provides the smear() method defined
00011 // in the ISmearer interface. It privately inherits from
00012 // the DefaultSmearer class to use its implementation of
00013 // random number services etc.
00014 //
00015 // Authors: H.T.Phillips, P. Clarke, E. Richter-Was, P. Sherwood, R. Steward
00016 //
00017 
00018 #ifndef ATLFAST_MUONSMEARER_H
00019 #define ATLFAST_MUONSMEARER_H
00020 
00021 
00022 #include <utility>       //contains pair
00023 
00024 #include "AtlfastEvent/ChargeService.h"
00025 
00026 #include "AtlfastAlgs/ISmearer.h"
00027 #include "AtlfastAlgs/DefaultSmearer.h"
00028 #include "AtlfastAlgs/TrackSmearer.h"
00029 #include "AtlfastAlgs/MuonSpectrometer.h"
00030 
00031 #include "CLHEP/Vector/LorentzVector.h"
00032 
00033 namespace Atlfast {
00034 
00035   using std::pair;
00036 
00043   class MuonSmearer : virtual public ISmearer, 
00044                       virtual private DefaultSmearer 
00045     {
00046     public:
00047       // Constructor called from Athena code - instantiates TrackSmearer
00048       MuonSmearer(const int aseed, const int lumi, const int keymuo, 
00049                   std::string &resolutionFile, MsgStream&);
00050       // Constructor that can be called from outside Athena - no TrackSmearer
00051       MuonSmearer(const int aseed, const int lumi, const int keymuo, 
00052                   std::string &resolutionFile);
00053       virtual ~MuonSmearer();
00054       
00055       //--------------------------------------------------------------------------
00056       // the only thing we actually need to provide is the smear() method
00057       //--------------------------------------------------------------------------
00059       virtual HepLorentzVector smear(const HepMC::GenParticle&);
00060       virtual HepLorentzVector smear(const HepLorentzVector& avec);
00061 
00062       //      double resolumu_(double* pt, double* eta, double* phi, double* resol);
00063       pair<double, double> resolMS(const HepLorentzVector& avec);
00064       pair<double, double> resolID(const HepMC::GenParticle& particle);
00065       double               resol(double sigmams, double sigmamuon,
00066                                  double sigmaid, double sigmatrack);
00067       
00070       virtual int setSmearParameters( const std::vector<double>& smearValues );
00071       virtual int setSmearParamSchema( const int smearSchema );
00072       
00073     private:
00074       
00075       void makeResolutionCalculator(std::string &resolutionFile);
00076 
00077       //--------------------------------------------------------------------------
00078       // luminosity option. Currently using an int with 1= low lumi
00079       // 2 = high lumi. This is not very pleasant, but leave for now
00080       //
00081       // flag:
00082       // 1   use muon sepectrometer alone
00083       // 2   use ID alone
00084       // >2  combinations of muon spectrometer and ID
00085       //--------------------------------------------------------------------------
00086       int   m_lumi;
00087       int   m_keymuo;
00088       
00089       std::vector<double> m_smearParams;
00090       int m_smearParamSchema;
00091       
00092       TrackSmearer*              m_tracksmearer;
00093       MuonResolutionCalculator*  m_muonResCalculator;
00094       ChargeService*             m_chargeService;
00095       
00096     };
00097   
00098 } // end of namespace bracket
00099 
00100 #endif
00101 
00102 
00103 
00104 
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 
00121 

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