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 // JetSmearer.cxx
002 //
003 // Implementation of the Jet Smearer class
004 //
005 // Only the smear() method is overridden
006 //
007 //
008 // Authors: H.T. Phillips, P.Clarke, E.Richter-Was, P.Sherwood, R.Steward
009 //
010 //
011 
012 #include "AtlfastAlgs/JetSmearer.h"
013 #include <cmath>
014 #include <iostream>
015 
016 #include "CLHEP/Vector/LorentzVector.h"
017 #include "CLHEP/Random/JamesRandom.h"
018 #include "CLHEP/Random/RandGauss.h"
019 
020 #include "CLHEP/Units/SystemOfUnits.h"
021 
022 namespace Atlfast {
023 
024 /** @brief Provides parameterised jet smearing.
025    *
026    * Jet Smearer honours the ISmearer interface and uses
027    * implementation of the DefaultSmearer class.
028    */
029 
030   /** Smear method for HepMC::GenParticle */
031   HepLorentzVector JetSmearer::smear(const HepMC::GenParticle& particle){
032       HepLorentzVector hlv(particle.momentum().px(),particle.momentum().py(),particle.momentum().pz(),particle.momentum().e());
033     return smear(hlv);
034   }
035    /** Smear method for HepLorentzVector */
036   HepLorentzVector JetSmearer::smear (const HepLorentzVector& vec) {
037     // do the smearing, copied verbatim (except for ROOT dependencies)
038     // from Jetmaker codein Atlfast++
039     //
040     // This code has not otherwise been altered which is why it is all very
041     // procedural
042     //
043     
044     //........................................................
045     //.....smear clusters energy
046     //........................................................
047     float sigma=0.;
048     if ( vec.e() == 0 ) return vec;
049     HepLorentzVector smearedVec(vec);
050     
051     
052     //     parametrizes smearing for hadronic energy deposition
053     //     parametrization from L. Poggioli
054     //     pile-up added as in HADCALO
055     
056     float epileup = 0;
057     float aa, bb, cc, dd;
058     float abseta  = fabs(vec.pseudoRapidity());
059     float rcone;
060     //make sure momentum, energy is in GeV
061     //Note: Atlfast can enter an infinite loop below if energy is negative hence sqrtene = NAN
062     //      Has in the past been down to bugs in the MissET adjustment for Isolation (see AtlfastAlgs/JetMaker)
063     float sqrtene = sqrt(vec.e()/GeV);
064     float pt      = vec.perp()/GeV;
065     if (fabs(vec.pseudoRapidity()) <= m_BarrelForwardEta) {rcone=m_rconeb;}else{rcone=m_rconef;}
066     if(rcone <= 0.4)                epileup = 0.4;
067     if(rcone == 0.4)                epileup = 7.5;
068     if(rcone > 0.4 && rcone <= 0.5) epileup = 12.0;
069     if(rcone > 0.5 && rcone <= 0.7) epileup = 18.0;
070     if(rcone > 0.7)                 epileup = 20.0;
071     
072     if(m_lumi <= 1) {
073       while(1) {
074         aa=randGauss()->fire();
075         bb=randGauss()->fire();
076         if(abseta < m_BarrelForwardEta) sigma = aa*0.5/sqrtene + bb*0.03;
077         else            sigma = aa*1.0/sqrtene + bb*0.07;
078         if(1.+sigma > .0) break;
079       }
080     } else if(m_lumi == 2) {
081       while(1) {
082         aa=randGauss()->fire();
083         bb=randGauss()->fire();
084         cc=randGauss()->fire();
085         dd=randGauss()->fire();
086         if(abseta < m_BarrelForwardEta) sigma = aa*0.5/sqrtene + bb*0.03  + cc*epileup/pt;
087         else            sigma = aa*1.0/sqrtene + bb*0.07  + cc*epileup/pt;
088         if(1.+sigma > .0) break;
089       }
090       
091     }                                
092     smearedVec.setPx(vec.px()*(1.0+sigma));
093     smearedVec.setPy(vec.py()*(1.0+sigma));
094     smearedVec.setPz(vec.pz()*(1.0+sigma));
095     smearedVec.setE(vec.e()*(1.0+sigma));
096     
097     
098     return smearedVec;
099     
100   }
101   
102   //cct: implement the setSmearParameters method
103   int JetSmearer::setSmearParameters (const std::vector<double>& /*smearValues*/){
104     return 0;
105   }
106   //cct: implement the setSmearParamSchema method
107   int JetSmearer::setSmearParamSchema ( const int /*smearSchema*/){
108     return 0;
109   }
110   
111 }//end of namespace bracket
112 
113 
114 
115 
116 
117 
118 

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!