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

Atlfast::PhotonSmearer Class Reference

Provides parametrised smearing for photons. More...

#include <PhotonSmearer.h>

Inheritance diagram for Atlfast::PhotonSmearer:

Inheritance graph
[legend]
Collaboration diagram for Atlfast::PhotonSmearer:

Collaboration graph
[legend]
List of all members.

Public Methods

 PhotonSmearer (const int aseed, const int lumi)
virtual ~PhotonSmearer ()
virtual HepLorentzVector smear (const HepLorentzVector &avec)
 Smear method decleration provided by ISmearer interface.


Private Attributes

int m_lumi

Detailed Description

Provides parametrised smearing for photons.

PhotonSmearer honours the ISmearer interface and inherets implementation from DefaultSmearer.

Definition at line 35 of file PhotonSmearer.h.


Constructor & Destructor Documentation

Atlfast::PhotonSmearer::PhotonSmearer const int    aseed,
const int    lumi
[inline]
 

Definition at line 42 of file PhotonSmearer.h.

References m_lumi.

00042 : ISmearer(), DefaultSmearer(aseed), m_lumi(lumi) { }

virtual Atlfast::PhotonSmearer::~PhotonSmearer   [inline, virtual]
 

Definition at line 43 of file PhotonSmearer.h.

00043 { }

Member Function Documentation

HepLorentzVector Atlfast::PhotonSmearer::smear const HepLorentzVector &    avec [virtual]
 

Smear method decleration provided by ISmearer interface.

Reimplemented from Atlfast::DefaultSmearer.

Definition at line 24 of file PhotonSmearer.cxx.

References m_lumi, and Atlfast::DefaultSmearer::randGauss().

00024                                                                      {
00025     // do the smearing, copied verbatim (except for ROOT dependencies)
00026     // from photonmaker codein Atlfast++
00027     // The code is very procedural (even more so than Atlfast++!) and should be tidied later!
00028     //
00029     // Parametrisation was by L.Poggioli and F. Gianotti
00030 
00031     double rpilup = 0.0;
00032     double aa, bb, sigph1, sigph, sigpu;
00033     double sqrtene = sqrt(avec.e());
00034     double abseta  = fabs(avec.pseudoRapidity());
00035 
00036     // do smearing of theta first
00037     HepLorentzVector bvec(avec);
00038     
00039     double sigph2 = 0.0;
00040     while (1) {
00041       aa=randGauss()->fire();
00042       if (abseta < 0.8) sigph2                  = aa*0.065/sqrtene;
00043       if (abseta >= 0.8 && abseta < 1.4) sigph2 = aa*0.050/sqrtene;
00044       if (abseta >= 1.4 && abseta < 2.5) sigph2 = aa*0.040/sqrtene;
00045       if (abseta >= 2.5)                 sigph2 = 0;
00046       if (fabs(bvec.theta()) + sigph2 <= M_PI) break;
00047     }
00048 
00049     // sigph2 is now the offset for theta...
00050     bvec.setPz(bvec.e()*cos(bvec.theta()+sigph2));
00051 
00052 
00053     // now do the energy resolution
00054     //
00055     while (1) {
00056       while (1){
00057         aa=randGauss()->fire();
00058         sigph1 = aa*0.10/sqrtene;
00059         //std::cout << "THE VALUE SIGPH1 " << sigph1 << std::endl;
00060         if (1.0 + sigph1 > 0.0) break;
00061       }
00062       sigph = sigph1;
00063       if (abseta < 1.4) {
00064         while (1) {
00065           aa=randGauss()->fire();
00066           bb=randGauss()->fire();
00067           sigph1 = aa*0.245/bvec.perp() + bb*0.007;
00068           if (1.0+sigph1 > 0) break;
00069         }
00070       } else {
00071         while (1) {
00072           aa=randGauss()->fire();
00073           bb=randGauss()->fire();
00074           sigph1 = aa*0.306*((2.4-abseta)+0.228)/bvec.e() + bb*0.007;
00075           if (1.0+sigph1 > 0) break;
00076         }
00077       }
00078       sigph += sigph1;
00079       if (m_lumi == 2) {
00080         if (abseta < 0.6) rpilup = 0.32;
00081         if (abseta > 0.6 && abseta < 1.4) rpilup = 0.295;
00082         if (abseta > 1.4) rpilup = 0.27;
00083         while (1) {
00084           aa=randGauss()->fire();
00085           sigpu = aa*rpilup/bvec.perp();
00086           if (1+sigpu > 0) break;
00087         }
00088         sigph += sigpu;
00089       }
00090       //std::cout << "THE VALUE SIGPH " << sigph << std::endl;
00091       if (1.0 + sigph > 0) break;
00092     }
00093 
00094 
00095     // Now sigph is the photon "sigma" and we do the following a la Atlfast++ photon maker:
00096     // this seems to be OK for energy resolution. 
00097     //
00098     // It looks to me as though the functional form above for photons is actually the same as
00099     // electrons, just that one magic number is different. Suggest we revisit this and
00100     // exploit commonality.
00101     //
00102 
00103     bvec.setPx(avec.px()*(1.0+sigph));
00104     bvec.setPy(avec.py()*(1.0+sigph));
00105     bvec.setPz(bvec.pz()*(1.0+sigph));
00106 
00107     // nb from Atlfast++ code, we go back to the original photon energy here
00108     bvec.setE( avec.e() *(1.0+sigph));
00109   
00110     return bvec;
00111   }

Member Data Documentation

int Atlfast::PhotonSmearer::m_lumi [private]
 

Definition at line 55 of file PhotonSmearer.h.

Referenced by PhotonSmearer(), and smear().


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:18:58 2003 for AtlfastAlgs by doxygen1.3-rc1