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

Atlfast::Calorimeter Class Reference

#include <Calorimeter.h>

Collaboration diagram for Atlfast::Calorimeter:

Collaboration graph
[legend]
List of all members.

Public Methods

 Calorimeter (MsgStream &log, bool fastShower, const double etaCoverage, const double barrelForwardEta, const double granBarrelEta, const double granBarrelPhi, const double granForwardEta, const double granForwardPhi)
 Constructor providing coverage and granularity parameters, set in CellMaker jobOptions.

 ~Calorimeter ()
 Default destructor.

 Calorimeter (const Calorimeter &)
 Copy constructor.

void deposit (TransportedParticleCollectionIter &first, TransportedParticleCollectionIter &last)
 Deposits HepMc::Particle.

void deposit (std::vector< Atlfast::EPileupDeposit * >::iterator &first, std::vector< Atlfast::EPileupDeposit * >::iterator &last) const
 Deposits Energy Pileup Map into the Calorimeter.

const GridletForger * gridletForger () const
 give the GridletForger

MsgStream & msgStream () const
 make log available to those who want it

void addEelements (ElementCollectionIter, ElementCollectionIter)
 Set the collection of Gridlet Elements (Ecal).

void addHelements (ElementCollectionIter, ElementCollectionIter)
 Set the collection of Gridlet Elements (Ecal).

void reset ()
 Resets the calorimeter sections and local collections.

void giveHitCells (const ICellSelector *, ITwoCptCellCollection *)
 Gives selected cells.

void smearCells (ISmearer *)
 Smear the cells resolution.


Private Attributes

CalSectionm_section [3]
 Three calorimeter sections owned by the calorimeter.

MsgStream & m_log
 Pointer to fastShowerer - 0 if no fast Showering.

GridletForger * m_gridletForger
ElementCollection m_eElements
ElementCollection m_hElements

Constructor & Destructor Documentation

Atlfast::Calorimeter::Calorimeter MsgStream &    log,
bool    fastShower,
const double    etaCoverage,
const double    barrelForwardEta,
const double    granBarrelEta,
const double    granBarrelPhi,
const double    granForwardEta,
const double    granForwardPhi
 

Constructor providing coverage and granularity parameters, set in CellMaker jobOptions.

Definition at line 30 of file Calorimeter.cxx.

References m_gridletForger, and m_section.

00039                             :m_log(log){ 
00040     
00041     m_section[0] =  new CalSection(log,
00042                                    abs(barrelMaxEta),  abs(MaxEta), 
00043                                    granForwardEta, granForwardPhi);
00044     
00045     m_section[1] =  new CalSection(log,
00046                                    -abs(barrelMaxEta), abs(barrelMaxEta), 
00047                                    granBarrelEta,  granBarrelPhi);
00048 
00049     m_section[2] =  new CalSection(log,
00050                                    -abs(MaxEta),       -abs(barrelMaxEta), 
00051                                    granForwardEta, granForwardPhi);
00052 
00053     if(fastShower) {
00054       m_gridletForger   = new GridletForger;
00055     }else{
00056       m_gridletForger   = 0;
00057     }
00058 
00059   }

Atlfast::Calorimeter::~Calorimeter  
 

Default destructor.

Definition at line 60 of file Calorimeter.cxx.

References m_log, and m_section.

00060                            {
00061     m_log<<MSG::DEBUG<<"Calorimeter destructor starts "<<endreq;
00062     delete m_section[0];
00063     delete m_section[1];
00064     delete m_section[2];
00065     //    delete m_gridletForger;
00066     m_log<<MSG::DEBUG<<"Calorimeter destructor ends "<<endreq;
00067   }

Atlfast::Calorimeter::Calorimeter const Calorimeter &   
 

Copy constructor.

Definition at line 68 of file Calorimeter.cxx.

References m_gridletForger, and m_section.

00068                                               :m_log(c.m_log){
00069     //make m_sections point to different instances
00070     // of the CalSections, with the same value as those
00071     //owned by c.
00072     m_section[0]   = new CalSection(*(c.m_section[0]));
00073     m_section[1]   = new CalSection(*(c.m_section[1]));
00074     m_section[2]   = new CalSection(*(c.m_section[2]));
00075     m_gridletForger= new GridletForger(*(c.m_gridletForger));
00076   }

Member Function Documentation

void Atlfast::Calorimeter::deposit TransportedParticleCollectionIter   first,
TransportedParticleCollectionIter   last
 

Deposits HepMc::Particle.

The double is the phi position of the particle* at the calorimeter. the "last" iterator will be modified...

Definition at line 78 of file Calorimeter.cxx.

References Atlfast::CalSection::deposit(), Atlfast::CalSection::depositEcal(), Atlfast::CalSection::depositHcal(), m_eElements, m_hElements, m_section, and Atlfast::TransportedParticleCollectionIter.

Referenced by Atlfast::CellMaker::execute().

00079                                                                  {
00080     
00081     TransportedParticleCollectionIter divider = 
00082       std::partition(f, l, TryToShower(this));
00083 
00084     // send gridlet elements and unshowered aprticlesto calorimeter sections
00085     for(int ind =0 ;ind<=2; ++ind){ 
00086       m_section[ind]->depositEcal(m_eElements.begin(), m_eElements.end() );
00087       m_section[ind]->depositHcal(m_hElements.begin(), m_hElements.end() );
00088       m_section[ind]->deposit(divider, l);
00089     }
00090   }

void Atlfast::Calorimeter::deposit std::vector< Atlfast::EPileupDeposit * >::iterator &    first,
std::vector< Atlfast::EPileupDeposit * >::iterator &    last
const
 

Deposits Energy Pileup Map into the Calorimeter.

Definition at line 93 of file Calorimeter.cxx.

00094                                                                               {
00095     //send energy pileup to calorimeter sections
00096     for(int ind =0 ;ind<=2; ++ind){
00097       m_section[ind]->deposit(f, l);
00098     }
00099 
00100     }

const GridletForger * Atlfast::Calorimeter::gridletForger   const
 

give the GridletForger

Definition at line 102 of file Calorimeter.cxx.

References m_gridletForger.

Referenced by Atlfast::TryToShower::operator()().

00102                                                          {
00103     return m_gridletForger;
00104   }

MsgStream & Atlfast::Calorimeter::msgStream   const
 

make log available to those who want it

Definition at line 106 of file Calorimeter.cxx.

References m_log.

Referenced by Atlfast::TryToShower::operator()().

00106 {return m_log;}

void Atlfast::Calorimeter::addEelements ElementCollectionIter   ,
ElementCollectionIter   
 

Set the collection of Gridlet Elements (Ecal).

Definition at line 108 of file Calorimeter.cxx.

References Atlfast::ElementCollectionIter, and m_eElements.

Referenced by Atlfast::TryToShower::operator()().

00109                                                           {
00110     for(ElementCollectionIter iter = f; iter != l; ++iter){
00111       m_eElements.push_back(*iter);}
00112   }

void Atlfast::Calorimeter::addHelements ElementCollectionIter   ,
ElementCollectionIter   
 

Set the collection of Gridlet Elements (Ecal).

Definition at line 114 of file Calorimeter.cxx.

References Atlfast::ElementCollectionIter, and m_hElements.

Referenced by Atlfast::TryToShower::operator()().

00115                                                           {
00116     for(ElementCollectionIter iter = f; iter != l;++iter){
00117       m_hElements.push_back(*iter);}
00118   }

void Atlfast::Calorimeter::reset  
 

Resets the calorimeter sections and local collections.

Definition at line 132 of file Calorimeter.cxx.

References m_eElements, m_hElements, m_section, and Atlfast::CalSection::reset().

Referenced by Atlfast::CellMaker::execute().

00133   {
00134     for(int ind=0; ind<=2; ++ind) {m_section[ind]->reset();}
00135 
00136     ElementCollection::iterator iter;
00137 
00138     iter = m_eElements.begin();
00139     for(; iter!=m_eElements.end(); ++iter){delete *iter;}
00140     m_eElements.clear();
00141 
00142     iter = m_hElements.begin();
00143     for(; iter!=m_hElements.end(); ++iter){delete *iter;}
00144     m_hElements.clear();
00145   }

void Atlfast::Calorimeter::giveHitCells const ICellSelector  ,
ITwoCptCellCollection *   
 

Gives selected cells.

Definition at line 120 of file Calorimeter.cxx.

References Atlfast::CalSection::giveHits(), and m_section.

Referenced by Atlfast::CellMaker::execute().

00121                                                                 {
00122     
00123     // return cells in calorimeter passed by cellSelector
00124     // could make type change from Calorimeter cells to TES cells here 
00125     
00126     for(int ind=0; ind<=2; ++ind) {
00127       m_section[ind]->giveHits(p_cellSelector, cells);
00128     }
00129   }

void Atlfast::Calorimeter::smearCells ISmearer  
 

Smear the cells resolution.

Definition at line 147 of file Calorimeter.cxx.

References m_section, and Atlfast::CalSection::smearCells().

Referenced by Atlfast::CellMaker::execute().

00148   {
00149     for(int ind=0; ind<=2; ++ind) {
00150       m_section[ind]->smearCells(p_smearer);
00151     }
00152   }

Member Data Documentation

CalSection* Atlfast::Calorimeter::m_section[3] [private]
 

Three calorimeter sections owned by the calorimeter.

1

Definition at line 122 of file Calorimeter.h.

Referenced by Calorimeter(), deposit(), giveHitCells(), reset(), smearCells(), and ~Calorimeter().

MsgStream& Atlfast::Calorimeter::m_log [private]
 

Pointer to fastShowerer - 0 if no fast Showering.

Definition at line 127 of file Calorimeter.h.

Referenced by msgStream(), and ~Calorimeter().

GridletForger* Atlfast::Calorimeter::m_gridletForger [private]
 

Definition at line 128 of file Calorimeter.h.

Referenced by Calorimeter(), and gridletForger().

ElementCollection Atlfast::Calorimeter::m_eElements [private]
 

Definition at line 129 of file Calorimeter.h.

Referenced by addEelements(), deposit(), and reset().

ElementCollection Atlfast::Calorimeter::m_hElements [private]
 

Definition at line 130 of file Calorimeter.h.

Referenced by addHelements(), deposit(), and reset().


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