#include <C0EmEcalBar1.h>
Inheritance diagram for FastShower::C0EmEcalBar1:
Public Methods | |
C0EmEcalBar1 (IUpdatingGaussian *, IProcessedDist *, IInTail *, IFn *) | |
C0EmEcalBar1 (const IConfigurer *, const std::string &) | |
virtual ISampler * | clone () const |
ISampler interface. | |
virtual void | sample (const PolyArgs &, CoreSamples &) const |
sample and fill CoreSamples. | |
virtual double | lastValue (const CoreSamples &) const |
read back last deposit - used by monitoring code. | |
virtual void | components (IDebug::Cpts &) const |
Private Methods | |
double | evalTail (const PolyArgs &) const |
double | evalPeak (const PolyArgs &) const |
Private Attributes | |
SP< IUpdatingGaussian > | m_peak |
SP< IProcessedDist > | m_tail |
SP< IInTail > | m_inTail |
SP< IFn > | m_tailLowerBound |
Static Private Attributes | |
const double | s_nSigma1 |
const double | s_nSigma2 |
const double | s_tailFluctScale |
|
Definition at line 28 of file C0EmEcalBar1.cxx. Referenced by clone().
00031 : 00032 ISampler(), ICell0(), DebugBase("C0EmEcalBar1"), 00033 m_peak(g), m_tail(t), m_inTail(inTail), m_tailLowerBound(ts){} |
|
Definition at line 35 of file C0EmEcalBar1.cxx. References FastShower::IConfigurer::findFn(), FastShower::IConfigurer::findIUG(), m_inTail, m_peak, m_tail, m_tailLowerBound, FastShower::IConfigurer::makeIInTail(), FastShower::IConfigurer::makeProcessedFlat(), and FastShower::DebugBase::text().
00037 : 00038 DebugBase("C0"), m_peak(0), m_tail(0), m_inTail(0), m_tailLowerBound(0){ 00039 m_peak = configurer->findIUG( text()+"Peak" ) ; 00040 m_tail = configurer->makeProcessedFlat( text() ); 00041 m_inTail = configurer->makeIInTail( text() ); 00042 m_tailLowerBound = configurer->findFn( text()+"TailLowerBound"); 00043 cout<<text()<<" finishing construction"<<endl; 00044 } |
|
ISampler interface.
Implements FastShower::ISampler. Definition at line 46 of file C0EmEcalBar1.cxx. References C0EmEcalBar1().
00046 {return new C0EmEcalBar1(*this);} |
|
sample and fill CoreSamples.
Implements FastShower::ISampler. Definition at line 49 of file C0EmEcalBar1.cxx.
|
|
read back last deposit - used by monitoring code.
Implements FastShower::ISampler. Definition at line 117 of file C0EmEcalBar1.cxx. References FastShower::CoreSamples::give().
00117 { 00118 return cs.give(this); 00119 } |
|
Reimplemented from FastShower::DebugBase. Definition at line 121 of file C0EmEcalBar1.cxx. References m_inTail, m_peak, m_tail, and m_tailLowerBound.
00121 { 00122 v.push_back(m_peak); 00123 v.push_back(m_tail); 00124 v.push_back(m_inTail); 00125 v.push_back(m_tailLowerBound); 00126 } |
|
Definition at line 58 of file C0EmEcalBar1.cxx. References FastShower::ParticleParameters::energy(), FastShower::SplitDecision::lower(), m_peak, m_tail, m_tailLowerBound, FastShower::PolyArgs::pp(), s_nSigma1, s_nSigma2, s_tailFluctScale, and FastShower::ProcessedNormal::sample().
00058 { 00059 00060 pair<double, double> peakParams = m_peak->parameters(pa); 00061 double peakMean = peakParams.first; 00062 double peakSigma = peakParams.second; 00063 //calculate ther upper and lower limits of the tails 00064 // 00065 // upper tail 00066 double energy = pa.pp()->energy(); 00067 double uLimit2 = (energy<30.) ? 1.0 : peakMean + s_nSigma2*peakSigma; 00068 if(uLimit2>1.){ uLimit2=1.;} 00069 // 00070 double lLimit2 = peakMean + s_nSigma1*peakSigma; 00071 if(lLimit2>uLimit2){lLimit2 = uLimit2-peakSigma;} 00072 // 00073 // lower tail 00074 double uLimit1 = peakMean - s_nSigma1*peakSigma; 00075 // 00076 double lLimit1 = uLimit1 - ( m_tailLowerBound->value(pa) ); 00077 //Add a little fluctuation in the lower base length 00078 ProcessedNormal temp; 00079 lLimit1 -= s_tailFluctScale*( abs( temp.sample() ) ); 00080 if(lLimit1<0.){lLimit1=0.;} 00081 // 00082 if(uLimit1<0.){ uLimit1=peakMean;} 00083 00084 double base1 = uLimit1-lLimit1; 00085 double base2 = uLimit2-lLimit2; 00086 double narrowBase; 00087 double narrowBaseStart; 00088 double wideBase; 00089 double wideBaseStart; 00090 00091 if( base1>base2 ){ 00092 wideBase = base1; 00093 wideBaseStart = lLimit1; 00094 narrowBase = base2; 00095 narrowBaseStart = lLimit2; 00096 }else{ 00097 wideBase = base2; 00098 wideBaseStart = lLimit2; 00099 narrowBase = base1; 00100 narrowBaseStart = lLimit1; 00101 } 00102 00103 SplitDecision sp(narrowBase/wideBase); 00104 if ( sp.lower() ){ 00105 LinearProcessor lp(narrowBase,narrowBaseStart); 00106 return m_tail->sample(&lp); 00107 }else{ 00108 LinearProcessor lp(wideBase,wideBaseStart); 00109 return m_tail->sample(&lp); 00110 } 00111 } |
|
Definition at line 113 of file C0EmEcalBar1.cxx.
|
|
Definition at line 75 of file C0EmEcalBar1.h. Referenced by C0EmEcalBar1(), components(), and evalTail(). |
|
Definition at line 76 of file C0EmEcalBar1.h. Referenced by C0EmEcalBar1(), components(), and evalTail(). |
|
Definition at line 77 of file C0EmEcalBar1.h. Referenced by C0EmEcalBar1(), and components(). |
|
Definition at line 78 of file C0EmEcalBar1.h. Referenced by C0EmEcalBar1(), components(), and evalTail(). |
|
Referenced by evalTail(). |
|
Referenced by evalTail(). |
|
Referenced by evalTail(). |