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 // DefaultReconstructor.cxx
002 //
003 // Implementation of Default Smearer class
004 //
005 // Namespace Atlfast::
006 //
007 //--------------------------------------------------------------------
008 //
009 // Authors: H.T. Phillips, P. Clarke, E. Richter-Was, P. Sherwood, R. Steward
010 //
011 // Smearer - Reconstructor Conversion: Alexander Richards (UCL)
012 //
013 #include "AtlfastAlgs/DefaultReconstructor.h"
014 // CLHEP includes
015 #include "CLHEP/Vector/LorentzVector.h"
016 #include "CLHEP/Random/JamesRandom.h"
017 #include "CLHEP/Random/RandGauss.h"
018 #include "CLHEP/Random/RandFlat.h"
019 
020 
021 
022 namespace Atlfast {
023 
024   DefaultReconstructor::DefaultReconstructor(const int aseed) {
025     // instantiate the random number engine based on the seed and store it
026     HepRandomEngine* randomEngine = new HepJamesRandom( aseed );
027     m_randGauss    = new RandGauss( randomEngine );
028     m_randFlat     = new RandFlat( *randomEngine );
029     m_randSeed     = aseed;
030   }
031 
032 
033   DefaultReconstructor::~DefaultReconstructor() {
034 
035     // we check to see if our random engine and gauss are still set and if so kill them
036     
037     if (m_randFlat) {
038       delete m_randFlat;
039     }
040     
041     if (m_randGauss) {
042       delete m_randGauss;
043     }
044     
045     //    if (m_randomEngine) {
046     //      delete m_randomEngine;
047     //    }
048     
049   }
050   
051   ReconstructedParticle DefaultReconstructor::reconstruct( const ReconstructedParticle &particle )const{
052     // do the actual business... to fake it up, just smear in each variable ofthe four vector with width 1.0
053     // for testing purposes only
054 
055     HepLorentzVector bvec;
056     // set each component by smearing around the central value with width 1.0
057     bvec.setE( m_randGauss->fire(particle.e(), 1.0) );
058     bvec.setPx(m_randGauss->fire(particle.px(),1.0) );
059     bvec.setPy(m_randGauss->fire(particle.py(),1.0) );
060     bvec.setPz(m_randGauss->fire(particle.pz(),1.0) );
061 
062     ReconstructedParticle return_particle(particle);
063     return_particle.set_momentum(bvec);
064     return return_particle;
065   }
066 
067   //cct: implement the setSmearParameters method
068   int DefaultReconstructor::setSmearParameters (const std::vector<double>& /*smearValues*/){
069     return 0;
070   }
071   //cct: implement the setSmearParamSchema method
072   int DefaultReconstructor::setSmearParamSchema ( const int /*smearSchema*/){
073     return 0;
074   }
075   
076 } // end of namespace bracket
077 

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!