00001
00002
00003
00004 #include "AtlfastEvent/TwoCptCell.h"
00005 #include "AtlfastEvent/IAOOvisitor.h"
00006 #include <iomanip>
00007
00008 namespace Atlfast {
00010 TwoCptCell::TwoCptCell():
00011 Cell(),
00012 m_ecalEt(0.),
00013 m_hcalEt(0.),
00014 m_eGenSum(0.){
00015 }
00017 TwoCptCell::TwoCptCell(const CellDescriptor& cellID) :
00018 Cell(cellID),
00019 m_ecalEt(0.),
00020 m_hcalEt(0.),
00021 m_eGenSum(0.){
00022 }
00023
00025 TwoCptCell& TwoCptCell::operator=(const TwoCptCell& otherCell){
00026
00027 if (this!=&otherCell){
00028 Cell::operator=(otherCell);
00029 this->m_ecalEt=otherCell.m_ecalEt;
00030 this->m_hcalEt=otherCell.m_hcalEt;
00031 this->m_eGenSum=otherCell.m_eGenSum;
00032 }
00033
00034 return *this;
00035 }
00036
00038 TwoCptCell::TwoCptCell(const TwoCptCell& otherCell) :
00039 Atlfast::IAOO(otherCell),
00040 INavigable(otherCell),
00041 I4Momentum(otherCell),
00042 INavigable4Momentum(otherCell),
00043 Atlfast::IKinematic(otherCell),
00044 Atlfast::IAODNavigation(otherCell),
00045 Atlfast::ICell(otherCell),
00046 Atlfast::ITwoCptCell(otherCell),
00047 Cell(otherCell){
00048 this->m_ecalEt=otherCell.m_ecalEt;
00049 this->m_hcalEt=otherCell.m_hcalEt;
00050 this->m_eGenSum=otherCell.m_eGenSum;
00051 }
00053
00054 void TwoCptCell::accept(IAOOvisitor* iaPtr) const{
00055 iaPtr->process(this);
00056 }
00058
00059 void TwoCptCell::resetCell() {
00060 Cell::resetCell();
00061 m_ecalEt=0;
00062 m_hcalEt=0;
00063 m_eGenSum=0;
00064 }
00066 void TwoCptCell::depositEcal(double pt){
00067
00068 m_ecalEt += pt;
00069 Cell::newHit(pt);
00070 }
00072 void TwoCptCell::depositHcal(double pt){
00073
00074 m_hcalEt += pt;
00075 Cell::newHit(pt);
00076 }
00078 void TwoCptCell::addEgen(double E){m_eGenSum += E;}
00080 double TwoCptCell::ecalEt() const {
00081 return m_ecalEt;
00082 }
00084 double TwoCptCell::hcalEt() const {
00085 return m_hcalEt;
00086 }
00088 double TwoCptCell::eGen() const {return m_eGenSum;}
00090 IKinematic* TwoCptCell::clone() const{
00091 IKinematic* itcc = new TwoCptCell(*this);
00092 return itcc;
00093 }
00095 ITwoCptCell* TwoCptCell::cloneITCC() const{
00096 ITwoCptCell* itcc = new TwoCptCell(*this);
00097 return itcc;
00098 }
00099
00101 void TwoCptCell::print(const std::string& coor, std::string t) const{
00102 Cell::print(coor, t);
00103 std::cout<<t
00104 <<" Transverse E, ecal: "
00105 <<std::setw(12)<<std::setprecision(3)<<m_ecalEt
00106 <<std::string(6,' ')<<"TwoCptCell\n"
00107 <<" Transverse E, hcal: "
00108 <<std::setw(12)<<std::setprecision(3)<<m_hcalEt
00109 <<std::string(6,' ')<<"TwoCptCell\n"
00110 <<" nSum of e of particles producing FastShower gridlets: "
00111 <<std::setw(12)<<std::setprecision(3)<<m_eGenSum
00112 <<" TwoCptCell"<<std::endl;
00113 }
00114
00115 }
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125