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

Calorimeter.cxx

Go to the documentation of this file.
00001 
00002 //                                                                      //
00003 // RMS  calorimeter class implementation.                               //
00004 //                                                                      //
00005 // HTP  put into namespace & a little tidying up                        //
00006 //                                                                      //
00007 // PS   radically changed.                                              //
00009 
00010 
00011 #include "AtlfastAlgs/Calorimeter.h"
00012 #include "AtlfastAlgs/ICellSelector.h"
00013 #include "AtlfastAlgs/CalSection.h"
00014 #include "AtlfastEvent/IKinematic.h"
00015 #include "AtlfastEvent/EPileupDeposit.h"
00016 #include "AtlfastAlgs/ISmearer.h"
00017 #include <cmath> 
00018 #include <vector>
00019 #include <iostream>
00020 
00021 
00022 namespace Atlfast {
00023   using std::abs;
00024 
00025   //____________________________________________________________________
00026   // create calorimeter as a number of CalSections
00027   Calorimeter::Calorimeter(
00028                            MsgStream log,
00029                            const double MaxEta,
00030                            const double barrelMaxEta, 
00031                            const double granBarrelEta,
00032                            const double granBarrelPhi,
00033                            const double granForwardEta,
00034                            const double granForwardPhi
00035                            )
00036   { 
00037     
00038     m_section[0] =  new CalSection(log,
00039                                    abs(barrelMaxEta),  abs(MaxEta), 
00040                                    granForwardEta, granForwardPhi);
00041     
00042     m_section[1] =  new CalSection(log, -abs(barrelMaxEta), abs(barrelMaxEta), 
00043                                    granBarrelEta,  granBarrelPhi);
00044 
00045     m_section[2] =  new CalSection(log,
00046                                    -abs(MaxEta),       -abs(barrelMaxEta), 
00047                                    granForwardEta, granForwardPhi);
00048 
00049   }
00050   Calorimeter::~Calorimeter(){
00051     delete m_section[0];
00052     delete m_section[1];
00053     delete m_section[2];
00054   }
00055   Calorimeter::Calorimeter(const Calorimeter& c){
00056     //make m_sections point to different instances
00057     // of the CalSections, with the same value as those
00058     //owned by c.
00059     m_section[0]=new CalSection(*(c.m_section[0]));
00060     m_section[1]=new CalSection(*(c.m_section[1]));
00061     m_section[2]=new CalSection(*(c.m_section[2]));
00062   }
00063   //_____________________________________________________________________
00064   void Calorimeter::deposit(TransportedParticleCollectionIter& f, 
00065                             TransportedParticleCollectionIter& l)const{
00066     // send particles to calorimeter sections
00067     for(int ind =0 ;ind<=2; ++ind){
00068       m_section[ind]->deposit(f, l);
00069     }
00070   }
00071   //_____________________________________________________________________
00072   // deposit energy pileup
00073   void Calorimeter::deposit(std::vector<Atlfast::EPileupDeposit*>::iterator& f, 
00074                             std::vector<Atlfast::EPileupDeposit*>::iterator& l)const{
00075     //send energy pileup to calorimeter sections
00076     for(int ind =0 ;ind<=2; ++ind){
00077       m_section[ind]->deposit(f, l);
00078     }
00079 
00080   }
00081   //__________________________________________________________________
00082   void Calorimeter::giveHitCells(const ICellSelector* p_cellSelector, CellCollection* cells)  {
00083 
00084     // return cells in calorimeter passed by cellSelector
00085     // could make type change from Calorimeter cells to TES cells here 
00086     
00087     for(int ind=0; ind<=2; ++ind) {
00088       m_section[ind]->giveHits(p_cellSelector, cells);
00089     }
00090   }
00091     
00092   //_______________________________________________________________________
00093   void Calorimeter::reset()
00094   {
00095     for(int ind=0; ind<=2; ++ind) m_section[ind]->reset();
00096   }
00097   //_______________________________________________________________________
00098   void Calorimeter::smearCells(ISmearer* p_smearer)
00099   {
00100     for(int ind=0; ind<=2; ++ind) {
00101       m_section[ind]->smearCells(p_smearer);
00102     }
00103   }
00104 } // end of namespace bracket
00105 
00106 
00107 
00108 
00109 
00110 
00111 
00112 
00113 
00114 
00115 
00116 
00117 
00118 
00119 
00120 

Generated on Tue Jan 28 09:57:12 2003 for AtlfastAlgs by doxygen1.3-rc1