#include <C0EmEcalEc1.h>
Inheritance diagram for FastShower::C0EmEcalEc1:
Public Methods | |
C0EmEcalEc1 (IUpdatingGaussian *, IProcessedDist *, IInTail *, IFn *) | |
C0EmEcalEc1 (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 32 of file C0EmEcalEc1.cxx. Referenced by clone().
00035 : 00036 ISampler(), ICell0(), DebugBase("C0EmEcalEc1"), 00037 m_peak(g), m_tail(t), m_inTail(inTail), m_tailLowerBound(ts){} |
|
Definition at line 39 of file C0EmEcalEc1.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().
00041 : 00042 DebugBase("C0"), m_peak(0), m_tail(0), m_inTail(0), m_tailLowerBound(0){ 00043 m_peak = configurer->findIUG( text()+"Peak" ) ; 00044 m_tail = configurer->makeProcessedFlat( text() ); 00045 m_inTail = configurer->makeIInTail( text() ); 00046 m_tailLowerBound = configurer->findFn( text()+"TailLowerBound"); 00047 cout<<text()<<" finishing construction"<<endl; 00048 } |
|
ISampler interface.
Implements FastShower::ISampler. Definition at line 50 of file C0EmEcalEc1.cxx. References C0EmEcalEc1().
00050 {return new C0EmEcalEc1(*this);} |
|
sample and fill CoreSamples.
Implements FastShower::ISampler. Definition at line 53 of file C0EmEcalEc1.cxx. References evalPeak(), evalTail(), FastShower::CoreSamples::fill(), and m_inTail.
|
|
read back last deposit - used by monitoring code.
Implements FastShower::ISampler. Definition at line 125 of file C0EmEcalEc1.cxx. References FastShower::CoreSamples::give().
00125 { 00126 return cs.give(this); 00127 } |
|
Reimplemented from FastShower::DebugBase. Definition at line 128 of file C0EmEcalEc1.cxx. References m_inTail, m_peak, m_tail, and m_tailLowerBound.
00128 { 00129 v.push_back(m_peak); 00130 v.push_back(m_tail); 00131 v.push_back(m_inTail); 00132 v.push_back(m_tailLowerBound); 00133 } |
|
Definition at line 62 of file C0EmEcalEc1.cxx. References FastShower::ParticleParameters::delPhi(), FastShower::ParticleParameters::energy(), FastShower::SplitDecision::lower(), m_peak, m_tail, m_tailLowerBound, FastShower::PolyArgs::pp(), s_nSigma1, s_nSigma2, and s_tailFluctScale. Referenced by sample().
00062 { 00063 00064 pair<double, double> peakParams = m_peak->parameters(pa); 00065 double peakMean = peakParams.first; 00066 double peakSigma = peakParams.second; 00067 00068 double fracBelow01 = 0.0; 00069 00070 // handle very low fraction deposits for low energies 00071 double energy = pa.pp()->energy(); 00072 double aDelPhi = pa.pp()->delPhi(); 00073 00074 fracBelow01 = (0.7-0.03*energy)+(0.3*energy-3.0)*aDelPhi; 00075 fracBelow01 = max(fracBelow01, 0.0); 00076 00077 SplitDecision below01(fracBelow01); 00078 if (below01.lower()) { 00079 double base = 0.1+RandFlat::shoot()*0.05; 00080 return (RandFlat::shoot())*base; 00081 } else { 00082 //calculate the upper and lower limits of the tails 00083 // 00084 // upper tail 00085 //double uLimit2 = peakMean + s_nSigma2*peakSigma; 00086 double uLimit2 = (aDelPhi<0.037)? 00087 min(peakMean+s_nSigma2*peakSigma, 0.99) : 0.99; 00088 uLimit2 = min(uLimit2, 1.0); 00089 // 00090 double lLimit2 = peakMean + s_nSigma1*peakSigma; 00091 if(lLimit2>uLimit2){lLimit2 = uLimit2-peakSigma;} 00092 // 00093 // lower tail 00094 double uLimit1 = peakMean - s_nSigma1*peakSigma; 00095 // 00096 double lLimit1 = uLimit1 - ( m_tailLowerBound->value(pa) ); 00097 //Add a little fluctuation on the lower tail 00098 lLimit1 -= s_tailFluctScale*( RandFlat::shoot() ); 00099 if (fracBelow01>0.0) { lLimit1 = max(lLimit1, 0.1); } 00100 00101 lLimit1 = max(lLimit1,0.0); 00102 // 00103 if(uLimit1<lLimit1){ uLimit1=peakMean;} 00104 00105 // Sample from the flat tail 00106 // decide which tail we are in? 00107 double base1 = uLimit1-lLimit1; 00108 double base2 = uLimit2-lLimit2; 00109 00110 SplitDecision sp(0.422-0.002*energy); 00111 if ( sp.lower() ){ 00112 LinearProcessor lp(base2,lLimit2); 00113 return m_tail->sample(&lp); 00114 }else{ 00115 LinearProcessor lp(base1,lLimit1); 00116 return m_tail->sample(&lp); 00117 } 00118 } 00119 } |
|
Definition at line 121 of file C0EmEcalEc1.cxx. Referenced by sample().
|
|
Definition at line 69 of file C0EmEcalEc1.h. Referenced by C0EmEcalEc1(), components(), and evalTail(). |
|
Definition at line 70 of file C0EmEcalEc1.h. Referenced by C0EmEcalEc1(), components(), and evalTail(). |
|
Definition at line 71 of file C0EmEcalEc1.h. Referenced by C0EmEcalEc1(), components(), and sample(). |
|
Definition at line 72 of file C0EmEcalEc1.h. Referenced by C0EmEcalEc1(), components(), and evalTail(). |
|
Referenced by evalTail(). |
|
Referenced by evalTail(). |
|
Referenced by evalTail(). |