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

Atlfast::ElectronSmearer Class Reference

ElectronSmearer replicates the smearing code of ATLFAST++'s ElectronMaker. More...

#include <ElectronSmearer.h>

Inheritance diagram for Atlfast::ElectronSmearer:

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

Collaboration graph
[legend]
List of all members.

Public Methods

 ElectronSmearer (const int aseed, const int lumi)
 Constructor taking a random number seed and luminosity.

virtual ~ElectronSmearer ()
 Default Destructor.

virtual HepLorentzVector smear (const HepLorentzVector &avec)
 Smear method to over-ride base class method.


Private Attributes

int m_lumi
 luminosity option


Detailed Description

ElectronSmearer replicates the smearing code of ATLFAST++'s ElectronMaker.


It provides the smear() method defined in the ISmearer interface. It privately inherits from the DefaultSmearer class to use its implementation of random number services etc.

Definition at line 39 of file ElectronSmearer.h.


Constructor & Destructor Documentation

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

Constructor taking a random number seed and luminosity.

Definition at line 47 of file ElectronSmearer.h.

References m_lumi.

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

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

Default Destructor.

Definition at line 49 of file ElectronSmearer.h.

00049 { }

Member Function Documentation

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

Smear method to over-ride base class method.

Reimplemented from Atlfast::DefaultSmearer.

Definition at line 23 of file ElectronSmearer.cxx.

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

00023                                                                        {
00024     // do the smearing, copied verbatim (except for ROOT dependencies)
00025     // from electronmaker codein Atlfast++
00026     //
00027     // This code has not otherwise been altered which is why it is all very
00028     // procedural
00029     //
00030     // Parametrisation was by L.Poggioli
00031 
00032     double rpilup = 0.0;
00033     double aa, bb, sigph1, sigph, sigpu;
00034     double sqrtene = sqrt(avec.e());
00035     double abseta  = fabs(avec.pseudoRapidity());
00036 
00037     while (1) {
00038       aa=randGauss()->fire();
00039       //bb=randGauss()->fire();
00040       sigph1 = aa*0.12/sqrtene;
00041       if (1.0 + sigph1 <= 0.0) continue;
00042       sigph = sigph1;
00043       if (abseta < 1.4) {
00044         while (1) {
00045           aa=randGauss()->fire();
00046           bb=randGauss()->fire();
00047           sigph1 = aa*0.245/avec.perp() + bb*0.007;
00048           if (1.0+sigph1 > 0) break;
00049         }
00050       } else {
00051         while (1) {
00052           aa=randGauss()->fire();
00053           bb=randGauss()->fire();
00054           sigph1 = aa*0.306*((2.4-abseta)+0.228)/avec.e() + bb*0.007;
00055           if (1.0+sigph1 > 0) break;
00056         }
00057       }
00058       sigph += sigph1;
00059       if (m_lumi == 2) {
00060         if (abseta < 0.6) rpilup = 0.32;
00061         if (abseta > 0.6 && abseta < 1.4) rpilup = 0.295;
00062         if (abseta > 1.4) rpilup = 0.27;
00063         while (1) {
00064           aa=randGauss()->fire();
00065           //bb=randGauss()->fire();
00066           sigpu = aa*rpilup/avec.perp();
00067           if (1.0+sigpu > 0) break;
00068         }
00069         sigph += sigpu;
00070       }
00071       if (1.0 + sigph > 0) break;
00072     }
00073 
00074     //now sigph is the electron "sigma" and we do the following a la Atlfast++ electron maker:
00075     HepLorentzVector bvec(avec.px()*(1.0+sigph), avec.py()*(1.0+sigph), avec.pz()*(1.0+sigph), avec.e() *(1.0+sigph));
00076 
00077     return bvec;
00078   }

Member Data Documentation

int Atlfast::ElectronSmearer::m_lumi [private]
 

luminosity option

Definition at line 63 of file ElectronSmearer.h.

Referenced by ElectronSmearer(), and smear().


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