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

FastShower::CoreDepositor Class Reference

#include <CoreDepositor.h>

Inheritance diagram for FastShower::CoreDepositor:

Inheritance graph
[legend]
Collaboration diagram for FastShower::CoreDepositor:

Collaboration graph
[legend]
List of all members.

Public Types

typedef boost::array< double, 6 > ProximityDeposits
typedef ProximityDeposits::iterator ProxDepIter
enum  {
  sf, sc, sn, af,
  ac, an
}
 integer indices for the proximity scheme labels the proximity scheme labels a cell according to how close it is to the struck quadrant in the struck cell. More...


Public Methods

 CoreDepositor (ISampler *, ISampler *, ISampler *, ISampler *)
 constructor allows the CoreSampler to be programmed for ecal or hcal

virtual void deposit (const ParticleParameters &, const Normalisations &, IDeposits &)
virtual IDepositorclone () const
 make a copy of the class when used as an IDepositor

virtual void components (IDebug::Cpts &) const

Private Methods

void fillProximityDeps ()
 function used to go from the four samples (which are independent) to the energies (each succesive cell energy calculation depends on the previous energies)


Private Attributes

ProximityDeposits m_proximityDeps
 store for the deposits

boost::array< SP< ISampler >, 4 > m_samplers
 the four cell samplers: slice0, cell0, same Near, adjacent near cells

CoreSamples m_cs
 store for the samples

array< array< pair< int, int >, 6 >, 4 > m_mappers
 provide the eta-phi mapping between the proximity and geometry schemes there is a mapper for each quadrant (4).


Member Typedef Documentation

typedef boost::array<double, 6> FastShower::CoreDepositor::ProximityDeposits
 

Definition at line 84 of file CoreDepositor.h.

typedef ProximityDeposits::iterator FastShower::CoreDepositor::ProxDepIter
 

Definition at line 85 of file CoreDepositor.h.


Member Enumeration Documentation

anonymous enum
 

integer indices for the proximity scheme labels the proximity scheme labels a cell according to how close it is to the struck quadrant in the struck cell.

in the geometical scheme, a cell is labelled according to its position in space. A cell has only one label in the geometrical scheme, but one of four labels in the proximity scheme, depending on the point of impact of the incomming particle.

Enumeration values:
sf 
sc 
sn 
af 
ac 
an 

Definition at line 66 of file CoreDepositor.h.

00066 {sf, sc, sn, af, ac, an};

Constructor & Destructor Documentation

FastShower::CoreDepositor::CoreDepositor ISampler  ,
ISampler  ,
ISampler  ,
ISampler  
 

constructor allows the CoreSampler to be programmed for ecal or hcal

Definition at line 63 of file CoreDepositor.cxx.

References ac, af, an, m_mappers, m_proximityDeps, m_samplers, sc, sf, and sn.

Referenced by clone().

00064                                                            :
00065     IDepositor(), DebugBase("CoreDepositor"){
00066     unsigned int it = 0;
00067     unsigned int end = m_samplers.size();
00068 
00069     m_samplers[it++]=s0;
00070     m_samplers[it++]=c0;
00071     m_samplers[it++]=csn;
00072     m_samplers[it++]=can;
00073     assert(it=end);
00074     
00075     m_proximityDeps.assign(0.); //eta and phi offsets wrt to cell 0 center
00076     array<pair<int, int>, 6> q0, q1, q2, q3;
00077     // 
00078     q0[sf]=pair<int, int>(  0, -1);
00079     q0[sc]=pair<int, int>(  0,  0);
00080     q0[sn]=pair<int, int>(  0,  1);
00081     q0[af]=pair<int, int>(  1, -1);
00082     q0[ac]=pair<int, int>(  1,  0);
00083     q0[an]=pair<int, int>(  1,  1);
00084     m_mappers[0]=q0;
00085     //
00086     q1[sf]=pair<int, int>(  0, -1);
00087     q1[sc]=pair<int, int>(  0,  0 );
00088     q1[sn]=pair<int, int>(  0,  1);
00089     q1[af]=pair<int, int>( -1, -1);
00090     q1[ac]=pair<int, int>( -1,  0 );
00091     q1[an]=pair<int, int>( -1,  1);
00092     m_mappers[1]=q1;
00093     //
00094     q2[sf]=pair<int, int>(  0,  1);
00095     q2[sc]=pair<int, int>(  0,  0 );
00096     q2[sn]=pair<int, int>(  0, -1);
00097     q2[af]=pair<int, int>( -1,  1);
00098     q2[ac]=pair<int, int>( -1,  0);
00099     q2[an]=pair<int, int>( -1, -1);
00100     m_mappers[2]=q2;
00101     //
00102     q3[sf]=pair<int, int>(  0,  1);
00103     q3[sc]=pair<int, int>(  0,  0);
00104     q3[sn]=pair<int, int>(  0, -1);
00105     q3[af]=pair<int, int>(  1,  1);
00106     q3[ac]=pair<int, int>(  1,  0);
00107     q3[an]=pair<int, int>(  1, -1);
00108     m_mappers[3]=q3;
00109 
00110   }


Member Function Documentation

void FastShower::CoreDepositor::deposit const ParticleParameters  ,
const Normalisations  ,
IDeposits  
[virtual]
 

Implements FastShower::IDepositor.

Definition at line 113 of file CoreDepositor.cxx.

References FastShower::Normalisations::core(), fillProximityDeps(), m_cs, m_mappers, m_proximityDeps, m_samplers, and FastShower::ParticleParameters::quadrant().

00115                                                       {
00116     unsigned int ind = 0;
00117     unsigned int end = m_samplers.size();
00118     PolyArgs pa(pp, m_cs);
00119     
00120     // fill core samples
00121     for(; ind!=end; ++ind){
00122       m_samplers[ind]->sample(pa, m_cs);
00123     }
00124 
00125     // fill proximity map
00126     this->fillProximityDeps();
00127 
00128     //normalise core deposits
00129     std::for_each(m_proximityDeps.begin(),
00130           m_proximityDeps.end(),
00131           ApplyNorm(ns.core())
00132           );
00133 
00134     // proximity to geometry map
00135     std::for_each(
00136                   m_mappers[pp.quadrant()].begin(),
00137                   m_mappers[pp.quadrant()].end(),
00138                   ProxToGeom( m_proximityDeps.begin(), geomDeposits )
00139                   );
00140 
00141   }

IDepositor * FastShower::CoreDepositor::clone   const [virtual]
 

make a copy of the class when used as an IDepositor

Implements FastShower::IDepositor.

Definition at line 170 of file CoreDepositor.cxx.

References CoreDepositor().

00170                                          {
00171     IDepositor* d = new CoreDepositor(*this);
00172     return d;
00173   }

virtual void FastShower::CoreDepositor::components IDebug::Cpts   const [virtual]
 

Reimplemented from FastShower::DebugBase.

void FastShower::CoreDepositor::fillProximityDeps   [private]
 

function used to go from the four samples (which are independent) to the energies (each succesive cell energy calculation depends on the previous energies)

Definition at line 144 of file CoreDepositor.cxx.

References ac, af, an, FastShower::CoreSamples::cell0(), FastShower::CoreSamples::cellAN(), FastShower::CoreSamples::cellSN(), m_cs, m_proximityDeps, sc, sf, FastShower::CoreSamples::slice0(), and sn.

Referenced by deposit().

00144                                        {
00145     double sfF, acF, afF;
00146     sfF = 1.0 - m_cs.cell0() - m_cs.cellSN();
00147     assert(sfF>=0.0 && sfF<=1.0);
00148     if (sfF<=0.0) {
00149       afF = 0.0;
00150     } else {
00151       afF = (1.0 - m_cs.cellAN())/(1.0 + m_cs.cell0()/sfF);
00152     }
00153     assert(afF>=0.0 && afF<=1.0);
00154     if (m_cs.cell0()<=0.0) {
00155       acF = 0.0;
00156     } else {
00157       acF = (1.0 - m_cs.cellAN())/(1.0 + sfF/m_cs.cell0());
00158     }
00159     assert(acF>=0.0 && acF<=1.0);
00160 
00161     m_proximityDeps[sc] = m_cs.cell0()*m_cs.slice0();
00162     m_proximityDeps[sn] = m_cs.cellSN()*m_cs.slice0();
00163     m_proximityDeps[sf] = sfF*m_cs.slice0();
00164     m_proximityDeps[an] = m_cs.cellAN()*(1.0-m_cs.slice0());
00165     m_proximityDeps[af] = afF*(1.0-m_cs.slice0());
00166     m_proximityDeps[ac] = acF*(1.0-m_cs.slice0());
00167   }

Member Data Documentation

ProximityDeposits FastShower::CoreDepositor::m_proximityDeps [private]
 

store for the deposits

Definition at line 93 of file CoreDepositor.h.

Referenced by CoreDepositor(), deposit(), and fillProximityDeps().

boost::array<SP<ISampler>, 4> FastShower::CoreDepositor::m_samplers [private]
 

the four cell samplers: slice0, cell0, same Near, adjacent near cells

Definition at line 95 of file CoreDepositor.h.

Referenced by CoreDepositor(), and deposit().

CoreSamples FastShower::CoreDepositor::m_cs [private]
 

store for the samples

Definition at line 97 of file CoreDepositor.h.

Referenced by deposit(), and fillProximityDeps().

array<array< pair<int, int>, 6>, 4> FastShower::CoreDepositor::m_mappers [private]
 

provide the eta-phi mapping between the proximity and geometry schemes there is a mapper for each quadrant (4).

Each gives 6 eta-phi values of the center of the proximity scheme cell wrt to the cell0 center.

Definition at line 102 of file CoreDepositor.h.

Referenced by CoreDepositor(), and deposit().


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:55:10 2003 for FastShowerUtils by doxygen1.3-rc1