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       aa=randGauss()->fire();
00057       //bb=randGauss()->fire();
00058       sigph1 = aa*0.10/sqrtene;
00059       if (1.0 + sigph1 <= 0.0) continue;
00060       sigph = sigph1;
00061       if (abseta < 1.4) {
00062         while (1) {
00063           aa=randGauss()->fire();
00064           bb=randGauss()->fire();
00065           sigph1 = aa*0.245/bvec.perp() + bb*0.007;
00066           if (1.0+sigph1 > 0) break;
00067         }
00068       } else {
00069         while (1) {
00070           aa=randGauss()->fire();
00071           bb=randGauss()->fire();
00072           sigph1 = aa*0.306*((2.4-abseta)+0.228)/bvec.e() + bb*0.007;
00073           if (1.0+sigph1 > 0) break;
00074         }
00075       }
00076       sigph += sigph1;
00077       if (m_lumi == 2) {
00078         if (abseta < 0.6) rpilup = 0.32;
00079         if (abseta > 0.6 && abseta < 1.4) rpilup = 0.295;
00080         if (abseta > 1.4) rpilup = 0.27;
00081         while (1) {
00082           aa=randGauss()->fire();
00083           //bb=randGauss()->fire();
00084           sigpu = aa*rpilup/bvec.perp();
00085           if (1+sigpu > 0) break;
00086         }
00087         sigph += sigpu;
00088       }
00089       if (1.0 + sigph > 0) break;
00090     }
00091 
00092 
00093     // Now sigph is the photon "sigma" and we do the following a la Atlfast++ photon maker:
00094     // this seems to be OK for energy resolution. 
00095     //
00096     // It looks to me as though the functional form above for photons is actually the same as
00097     // electrons, just that one magic number is different. Suggest we revisit this and
00098     // exploit commonality.
00099     //
00100 
00101     bvec.setPx(bvec.px()*(1.0+sigph));
00102     bvec.setPy(bvec.py()*(1.0+sigph));
00103     bvec.setPz(bvec.pz()*(1.0+sigph));
00104 
00105     // nb from Atlfast++ code, we go back to the original photon energy here
00106     bvec.setE( avec.e() *(1.0+sigph));
00107   
00108     return bvec;
00109   }

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 Jan 28 09:57:38 2003 for AtlfastAlgs by doxygen1.3-rc1