00001
00002
00003
00004
00005
00006
00007
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
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
00057
00058
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
00067 for(int ind =0 ;ind<=2; ++ind){
00068 m_section[ind]->deposit(f, l);
00069 }
00070 }
00071
00072
00073 void Calorimeter::deposit(std::vector<Atlfast::EPileupDeposit*>::iterator& f,
00074 std::vector<Atlfast::EPileupDeposit*>::iterator& l)const{
00075
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
00085
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 }
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120