Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 // CellSmearer.cxx
002 //
003 // Implementation of the Cell Smearer class
004 //
005 // Only the smear() method is overridden
006 // Based on JetSmearer, lowlumi, 0.1*0.1
007 //
008 // Authors: J.Couchman
009 //
010 //
011 
012 #include "AtlfastAlgs/CellSmearer.h"
013 #include <cmath>
014 #include <iostream>
015 #include "CLHEP/Vector/LorentzVector.h"
016 #include "CLHEP/Random/JamesRandom.h"
017 #include "CLHEP/Random/RandGauss.h"
018 #include "CLHEP/Units/SystemOfUnits.h"
019 
020 
021 namespace Atlfast {
022 
023   HepLorentzVector CellSmearer::smear(const HepMC::GenParticle& particle){
024       HepLorentzVector hlv(particle.momentum().px(),particle.momentum().py(),particle.momentum().pz(),particle.momentum().e());  
025     return smear(hlv);
026   }
027 
028   HepLorentzVector CellSmearer::smear (const HepLorentzVector& vec) {
029 //........................................................
030 //.....smear Cells energy
031 //........................................................
032 //     parametrizes smearing for hadronic energy deposition
033 //     parametrization from L. Poggioli
034 //     no pileup added
035 
036     float sigma=0.;
037     HepLorentzVector smearedVec(vec);
038     float aa, bb;
039     float sqrtene = sqrt(vec.e()/GeV);
040     float abseta  = fabs(vec.pseudoRapidity());
041     while(1) {
042       aa=randGauss()->fire();
043       bb=randGauss()->fire();
044       if(abseta < m_BarrelForwardEta) sigma = aa*0.5/sqrtene + bb*0.03;
045       else            sigma = aa*1.0/sqrtene + bb*0.07;
046       if(1.+sigma > .0) break;
047     }
048     smearedVec.setPx(vec.px()*(1.0+sigma));
049     smearedVec.setPy(vec.py()*(1.0+sigma));
050     smearedVec.setPz(vec.pz()*(1.0+sigma));
051     smearedVec.setE(vec.e()*(1.0+sigma));
052     return smearedVec;
053     
054   }
055 
056   //cct: implement the setSmearParameters method
057   int CellSmearer::setSmearParameters (const std::vector<double>& /*smearValues*/){
058     return 0;
059   }
060   //cct: implement the setSmearParamSchema method
061   int CellSmearer::setSmearParamSchema ( const int /*smearSchema*/){
062     return 0;
063   }
064   
065 }//end of namespace bracket
066 
067 
068 
069 
070 
071 
072 

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!