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

CellSmearer.cxx

Go to the documentation of this file.
00001 // CellSmearer.cxx
00002 //
00003 // Implementation of the Cell Smearer class
00004 //
00005 // Only the smear() method is overridden
00006 // Based on JetSmearer, lowlumi, 0.1*0.1
00007 //
00008 // Authors: J.Couchman
00009 //
00010 //
00011 
00012 #include "AtlfastAlgs/CellSmearer.h"
00013 #include "AtlfastAlgs/PhotonSmearer.h"
00014 #include <cmath>
00015 #include <iostream>
00016 #include "CLHEP/Vector/LorentzVector.h"
00017 #include "CLHEP/Random/JamesRandom.h"
00018 #include "CLHEP/Random/RandGauss.h"
00019 
00020 
00021 namespace Atlfast {
00022   HepLorentzVector CellSmearer::smear (const HepLorentzVector& vec) {
00023 //........................................................
00024 //.....smear Cells energy
00025 //........................................................
00026 //     parametrizes smearing for hadronic energy deposition
00027 //     parametrization from L. Poggioli
00028 //     no pileup added
00029 
00030     float sigma=0.;
00031     HepLorentzVector smearedVec(vec);
00032     float aa, bb;
00033     float sqrtene = sqrt(vec.e());
00034     float abseta  = fabs(vec.pseudoRapidity());
00035     while(1) {
00036       aa=randGauss()->fire();
00037       bb=randGauss()->fire();
00038       if(abseta < m_BarrelForwardEta) sigma = aa*0.5/sqrtene + bb*0.03;
00039       else            sigma = aa*1.0/sqrtene + bb*0.07;
00040       if(1.+sigma > .0) break;
00041     }
00042     smearedVec.setPx(vec.px()*(1.0+sigma));
00043     smearedVec.setPy(vec.py()*(1.0+sigma));
00044     smearedVec.setPz(vec.pz()*(1.0+sigma));
00045     smearedVec.setE(vec.e()*(1.0+sigma));
00046     return smearedVec;
00047     
00048   }
00049 
00050 }//end of namespace bracket
00051 
00052 
00053 
00054 
00055 
00056 
00057 

Generated on Tue Mar 18 11:18:22 2003 for AtlfastAlgs by doxygen1.3-rc1