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

SNHadLateHcalEc1.cxx

Go to the documentation of this file.
00001 // ================================================
00002 // Implementation of SNHadLateHcalEc1
00003 // ================================================
00004 
00005 #include "FastShowerUtils/Samplers/SNHadLateHcalEc1.h"
00006 
00007 #include "FastShowerUtils/PolyArgs.h"
00008 #include "FastShowerUtils/IFn.h"
00009 #include "FastShowerUtils/CoreSamples.h"
00010 #include "FastShowerUtils/LinearProcessor.h"
00011 #include "FastShowerUtils/ProcessedFlat.h"
00012 #include "FastShowerUtils/ProcessedNormal.h"
00013 #include "FastShowerUtils/IConfigurer.h"
00014 #include <cmath>
00015 #include <iostream>
00016 
00017 namespace FastShower{
00018 
00019   using std::pair;
00020 
00021   SNHadLateHcalEc1::SNHadLateHcalEc1(IUpdatingGaussian* g): 
00022     ISampler(), ICellSN(), DebugBase("SNHadLateHcalEc1"), m_peak(g){}
00023   //
00025   SNHadLateHcalEc1::SNHadLateHcalEc1(const IConfigurer* configurer,
00026                                      const std::string& s):
00027     DebugBase(s), m_peak(0){
00028     m_peak           = configurer->findIUG( text()+"Peak" ) ;
00029     cout<<text()<<" finishing construction"<<endl;
00030   }
00031   //
00032   ISampler* SNHadLateHcalEc1::clone() const {
00033     return new SNHadLateHcalEc1(*this);
00034   }
00035   //
00036   void SNHadLateHcalEc1::sample(const PolyArgs& pa,
00037                                 CoreSamples& cs) const{
00038     pair<double, double>  peakParams = m_peak->parameters(pa);
00039     double peakMean  = peakParams.first;
00040     //
00041     if (peakMean<=0.0) {
00042       // in this case the gaussian has mean/sigma 0/0 (all is deposited in C0!) 
00043       cs.fill(this,0.0);
00044     } else {
00045       cs.fill(this,m_peak->sample(0.0, 100, peakMean, 0, pa));
00046     }
00047   }
00048   //
00049   double SNHadLateHcalEc1::lastValue(const CoreSamples& cs) const {
00050     return cs.give(this);
00051   }
00052   //
00053   void SNHadLateHcalEc1::components(IDebug::Cpts& v) const{
00054     v.push_back(m_peak);
00055   }
00056 }//namespace
00057 
00058 
00059 
00060 
00061 
00062 
00063 
00064 
00065 
00066 

Generated on Tue Mar 18 11:50:05 2003 for FastShowerUtils by doxygen1.3-rc1