#ifdef USE_CDFEDM2 ////////////////////////////////////////////////////////////////////////// // // Component: TowerType.cc // Purpose: Implementation of TowerType classes // // Created: 05/05/99 Pierre Savard // History: // ////////////////////////////////////////////////////////////////////////// #include #include "RawDataBanks/RawQieStorableBank.hh" #include "CalorObjects/TowerType.hh" #include "CalorObjects/getScintillatorEnergy.hh" using namespace std; // namespace calor { // // TowerType 0 // // Equality test bool TowerType0::operator==(const TowerType0& rhs) const { if (this == &rhs) return true; return (_cemEnergy[0] == rhs._cemEnergy[0] && _cemEnergy[1] == rhs._cemEnergy[1] && _chaEnergy[0] == rhs._chaEnergy[0] && _chaEnergy[1] == rhs._chaEnergy[1] && _stripEnergy == rhs._stripEnergy && _crackEnergy == rhs._crackEnergy && _iChaTime[1] == rhs._iChaTime[1] && _iChaTime[0] == rhs._iChaTime[0]); } // EDM stuff void TowerType0::readFromBuffer(TBuffer& iobuffer,Version_t version){ iobuffer >> _iCemEnergy[0]; iobuffer >> _iCemEnergy[1]; iobuffer >> _iChaEnergy[0]; iobuffer >> _iChaEnergy[1]; if (version > 6){ iobuffer >> _nChaHits; for (int i=0; i< _nChaHits; i++) { if(_nChaHits > i) iobuffer >> _iChaTime[i]; } } else if(version > 4){ iobuffer >> _nChaHits; if(_nChaHits > 0) iobuffer >> _iChaTime[0]; if(_nChaHits > 1) iobuffer >> _iChaTime[1]; } else{ iobuffer >> _iChaTime[0]; } // we store now the timing with a factor 10 better precision and have to divide by 10 // such that it is still in ns for (int i=0; i< _nChaHits; i++) { if (version>8){ _chaTime[i]=float(_iChaTime[i])/10-float(HTDC_Offset); } else { _chaTime[i]=float(_iChaTime[i])-float(HTDC_Offset); } } if (version>10){ iobuffer >> _nCemHits; for (int i=0; i< _nCemHits; i++) { if(_nCemHits > i) iobuffer >> _iCemTime[i]; _cemTime[i]=float(_iCemTime[i])/10-float(EMTDC_Offset); } } } void TowerType0::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iCemEnergy[0]; iobuffer << _iCemEnergy[1]; iobuffer << _iChaEnergy[0]; iobuffer << _iChaEnergy[1]; iobuffer << _nChaHits; for (int i=0; i< _nChaHits; i++) { if(_nChaHits > i) iobuffer << _iChaTime[i]; } iobuffer << _nCemHits; for (int i=0; i< _nCemHits; i++) { if(_nCemHits > i) iobuffer << _iCemTime[i]; } } // // Printing (incomplete) // void TowerType0::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType0& t) { os << "CEM energy (0): " << setw(10) <pedCem()) * calib->calibCem()*CalOffLer[0]; _cemEnergy[1] = (RawQieStorableBank::unpack_energy(_iCemEnergy[1]) -calib->pedCem()) * calib->calibCem()*CalOffLer[1]; _chaEnergy[0] = (RawQieStorableBank::unpack_energy(_iChaEnergy[0]) -calib->pedCha()) * calib->calibCha()*CalOffLer[4]; _chaEnergy[1] = (RawQieStorableBank::unpack_energy(_iChaEnergy[1]) -calib->pedCha()) * calib->calibCha()*CalOffLer[5]; // just convert to float for now // _chaTime[0] = float(_iChaTime[0]/10)=HTDC_Offset; } int TowerType0::iTower() const { return -1; } // // TowerType 1 // // Equality test bool TowerType1::operator==(const TowerType1& rhs) const { if (this == &rhs) return true; return (_cemEnergy[0] == rhs._cemEnergy[0] && _cemEnergy[1] == rhs._cemEnergy[1] && _chaEnergy[0] == rhs._chaEnergy[0] && _chaEnergy[1] == rhs._chaEnergy[1] && _whaEnergy[0] == rhs._whaEnergy[0] && _whaEnergy[1] == rhs._whaEnergy[1] && _stripEnergy == rhs._stripEnergy && _crackEnergy == rhs._crackEnergy && _iChaTime[0] == rhs._iChaTime[0] && _iWhaTime[0] == rhs._iWhaTime[0]); } // EDM stuff void TowerType1::readFromBuffer(TBuffer& iobuffer,Version_t version){ iobuffer >> _iCemEnergy[0]; iobuffer >> _iCemEnergy[1]; iobuffer >> _iChaEnergy[0]; iobuffer >> _iChaEnergy[1]; iobuffer >> _iWhaEnergy[0]; iobuffer >> _iWhaEnergy[1]; // iobuffer >> _stripEnergy; // iobuffer >> _crackEnergy; if (version > 6){ iobuffer >> _nChaHits; for (int i=0; i< _nChaHits; i++) { uint2 dummy=0; if(_nChaHits > i) { iobuffer >> dummy; if (i<8) _iChaTime[i]=dummy; } } iobuffer >> _nWhaHits; for (int i=0; i<_nWhaHits; i++) { uint2 dummy=0; if(_nWhaHits > i) { iobuffer >> dummy; if (i<8) _iWhaTime[i]=dummy; } } } else if(version > 4){ iobuffer >> _nChaHits; if(_nChaHits > 0) iobuffer >> _iChaTime[0]; if(_nChaHits > 1) iobuffer >> _iChaTime[1]; iobuffer >> _nWhaHits; if(_nWhaHits > 0) iobuffer >> _iWhaTime[0]; if(_nWhaHits > 1) iobuffer >> _iWhaTime[1]; } else{ iobuffer >> _iChaTime[0]; iobuffer >> _iWhaTime[0]; } for (int i=0; i< _nChaHits; i++) { if (version>8){ _chaTime[i]=float(_iChaTime[i])/10-float(HTDC_Offset); } else { _chaTime[i]=float(_iChaTime[i])-float(HTDC_Offset); } } for (int i=0; i< _nWhaHits; i++) { if (version>8){ _whaTime[i]=float(_iWhaTime[i])/10-float(HTDC_Offset); } else { _whaTime[i]=float(_iWhaTime[i])-float(HTDC_Offset); } } if (version>10){ iobuffer >> _nCemHits; for (int i=0; i< _nCemHits; i++) { if(_nCemHits > i) iobuffer >> _iCemTime[i]; _cemTime[i]=float(_iCemTime[i])/10-float(EMTDC_Offset); } } } void TowerType1::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iCemEnergy[0]; iobuffer << _iCemEnergy[1]; iobuffer << _iChaEnergy[0]; iobuffer << _iChaEnergy[1]; iobuffer << _iWhaEnergy[0]; iobuffer << _iWhaEnergy[1]; // iobuffer << _stripEnergy; // iobuffer << _crackEnergy; iobuffer << _nChaHits; for (int i=0; i< _nChaHits; i++) { if(_nChaHits > i) iobuffer << _iChaTime[i]; } iobuffer << _nWhaHits; for (int i=0; i< _nWhaHits; i++) { if(_nWhaHits > i) iobuffer << _iWhaTime[i]; } iobuffer << _nCemHits; for (int i=0; i< _nCemHits; i++) { if(_nCemHits > i) iobuffer << _iCemTime[i]; } } // // Printing (incomplete) // void TowerType1::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType1& t) { os << "CEM energy (0): " << setw(10) <pedCem())* calib->calibCem()*CalOffLer[0]; _cemEnergy[1] = (RawQieStorableBank::unpack_energy(_iCemEnergy[1]) -calib->pedCem())* calib->calibCem()*CalOffLer[1]; _chaEnergy[0] = (RawQieStorableBank::unpack_energy(_iChaEnergy[0]) -calib->pedCha())* calib->calibCha()*CalOffLer[4]; _chaEnergy[1] = (RawQieStorableBank::unpack_energy(_iChaEnergy[1]) -calib->pedCha())* calib->calibCha()*CalOffLer[5]; _whaEnergy[0] = (RawQieStorableBank::unpack_energy(_iWhaEnergy[0]) -calib->pedWha())* calib->calibWha()*CalOffLer[6]; _whaEnergy[1] = (RawQieStorableBank::unpack_energy(_iWhaEnergy[1]) -calib->pedWha())* calib->calibWha()*CalOffLer[7]; // just convert to float for now //_chaTime[0] = float(_iChaTime[0]); //_whaTime[0] = float(_iWhaTime[0]); } int TowerType1::iTower() const { return -1; } // // TowerType 2 // // Equality test bool TowerType2::operator==(const TowerType2& rhs) const { if (this == &rhs) return true; return (_cemEnergy[0] == rhs._cemEnergy[0] && _cemEnergy[1] == rhs._cemEnergy[1] && _whaEnergy[0] == rhs._whaEnergy[0] && _whaEnergy[1] == rhs._whaEnergy[1] && _stripEnergy == rhs._stripEnergy && _crackEnergy == rhs._crackEnergy && _iWhaTime[0] == rhs._iWhaTime[0]); } // EDM stuff void TowerType2::readFromBuffer(TBuffer& iobuffer,Version_t version){ iobuffer >> _iCemEnergy[0]; iobuffer >> _iCemEnergy[1]; iobuffer >> _iWhaEnergy[0]; iobuffer >> _iWhaEnergy[1]; // iobuffer >> _stripEnergy; // iobuffer >> _crackEnergy; if (version > 6){ iobuffer >> _nWhaHits; for (int i=0; i< _nWhaHits; i++) { if(_nWhaHits > i) iobuffer >> _iWhaTime[i]; } } else if(version > 4){ iobuffer >> _nWhaHits; if(_nWhaHits > 0) iobuffer >> _iWhaTime[0]; if(_nWhaHits > 1) iobuffer >> _iWhaTime[1]; } else{ iobuffer >> _iWhaTime[0]; } for (int i=0; i< _nWhaHits; i++) { if (version>8){ _whaTime[i]=float(_iWhaTime[i])/10-float(HTDC_Offset); } else { _whaTime[i]=float(_iWhaTime[i])-float(HTDC_Offset); } } if (version>10){ iobuffer >> _nCemHits; for (int i=0; i< _nCemHits; i++) { if(_nCemHits > i) iobuffer >> _iCemTime[i]; _cemTime[i]=float(_iCemTime[i])/10-float(EMTDC_Offset); } } } void TowerType2::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iCemEnergy[0]; iobuffer << _iCemEnergy[1]; iobuffer << _iWhaEnergy[0]; iobuffer << _iWhaEnergy[1]; // iobuffer << _stripEnergy; // iobuffer << _crackEnergy; iobuffer << _nWhaHits; for (int i=0; i< _nWhaHits; i++) { if(_nWhaHits > i) iobuffer << _iWhaTime[i]; } iobuffer << _nCemHits; for (int i=0; i< _nCemHits; i++) { if(_nCemHits > i) iobuffer << _iCemTime[i]; } } // // Printing (incomplete) // void TowerType2::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType2& t) { os << "CEM energy (0): " << setw(10) <pedCem()) * calib->calibCem()*CalOffLer[0]; _cemEnergy[1] = (RawQieStorableBank::unpack_energy(_iCemEnergy[1]) -calib->pedCem()) * calib->calibCem()*CalOffLer[1]; _whaEnergy[0] = (RawQieStorableBank::unpack_energy(_iWhaEnergy[0]) -calib->pedWha()) * calib->calibWha()*CalOffLer[6]; _whaEnergy[1] = (RawQieStorableBank::unpack_energy(_iWhaEnergy[1]) -calib->pedWha()) * calib->calibWha()*CalOffLer[7]; // just convert to float for now // _whaTime[0] = float(_iWhaTime[0]); } int TowerType2::iTower() const { return -1; } // // TowerType 3 // // Equality test bool TowerType3::operator==(const TowerType3& rhs) const { if (this == &rhs) return true; return (_pemEnergy[0] == rhs._pemEnergy[0] && _pemEnergy[1] == rhs._pemEnergy[1] && _whaEnergy[0] == rhs._whaEnergy[0] && _whaEnergy[1] == rhs._whaEnergy[1] && _pprEnergy[0] == rhs._pprEnergy[0] && _pprEnergy[1] == rhs._pprEnergy[1] && _iWhaTime[0] == rhs._iWhaTime[0]); } // EDM stuff void TowerType3::readFromBuffer(TBuffer& iobuffer,Version_t version){ iobuffer >> _iPemEnergy[0]; iobuffer >> _iPemEnergy[1]; iobuffer >> _iWhaEnergy[0]; iobuffer >> _iWhaEnergy[1]; iobuffer >> _iPprEnergy[0]; iobuffer >> _iPprEnergy[1]; if (version > 6){ iobuffer >> _nWhaHits; for (int i=0; i< _nWhaHits; i++) { if(_nWhaHits > i) iobuffer >> _iWhaTime[i]; } } else if(version > 4){ iobuffer >> _nWhaHits; if(_nWhaHits > 0) iobuffer >> _iWhaTime[0]; if(_nWhaHits > 1) iobuffer >> _iWhaTime[1]; } else{ iobuffer >> _iWhaTime[0]; } for (int i=0; i< _nWhaHits; i++) { if (version>8){ _whaTime[i]=float(_iWhaTime[i])/10-float(HTDC_Offset); } else { _whaTime[i]=float(_iWhaTime[i])-float(HTDC_Offset); } } if (version>10){ iobuffer >> _nPemHits; for (int i=0; i< _nPemHits; i++) { if(_nPemHits > i) iobuffer >> _iPemTime[i]; _pemTime[i]=float(_iPemTime[i])/10-float(EMTDC_Offset); } } } void TowerType3::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iPemEnergy[0]; iobuffer << _iPemEnergy[1]; iobuffer << _iWhaEnergy[0]; iobuffer << _iWhaEnergy[1]; iobuffer << _iPprEnergy[0]; iobuffer << _iPprEnergy[1]; iobuffer << _nWhaHits; for (int i=0; i< _nWhaHits; i++) { if(_nWhaHits > i) iobuffer << _iWhaTime[i]; } iobuffer << _nPemHits; for (int i=0; i< _nPemHits; i++) { if(_nPemHits > i) iobuffer << _iPemTime[i]; } } // // Printing (incomplete) // void TowerType3::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType3& t) { os << "PPR energy (0): " << setw(10) <pedPem()) * calib->calibPem()*CalOffLer[2]; _pemEnergy[1] = (RawQieStorableBank::unpack_energy(_iPemEnergy[1]) -calib->pedPem()) * calib->calibPem()*CalOffLer[3]; _pprEnergy[0] = (RawQieStorableBank::unpack_energy(_iPprEnergy[0]) -calib->pedPpr()) * calib->calibPpr()*CalOffLer[10]; _pprEnergy[1] = (RawQieStorableBank::unpack_energy(_iPprEnergy[1]) -calib->pedPpr()) * calib->calibPpr()*CalOffLer[11]; _whaEnergy[0] = (RawQieStorableBank::unpack_energy(_iWhaEnergy[0]) -calib->pedWha()) * calib->calibWha()*CalOffLer[6]; _whaEnergy[1] = (RawQieStorableBank::unpack_energy(_iWhaEnergy[1]) -calib->pedWha()) * calib->calibWha()*CalOffLer[7]; // just convert to float for now // _whaTime[0] = float(_iWhaTime[0]); } int TowerType3::iTower() const { return -1; } // // TowerType 4 // // Equality test bool TowerType4::operator==(const TowerType4& rhs) const { if (this == &rhs) return true; return (_pemEnergy[0] == rhs._pemEnergy[0] && _pemEnergy[1] == rhs._pemEnergy[1] && _whaEnergy[0] == rhs._whaEnergy[0] && _whaEnergy[1] == rhs._whaEnergy[1] && _phaEnergy[0] == rhs._phaEnergy[0] && _phaEnergy[1] == rhs._phaEnergy[1] && _pprEnergy[0] == rhs._pprEnergy[0] && _pprEnergy[1] == rhs._pprEnergy[1] && _iPhaTime[0] == rhs._iPhaTime[0] && _iWhaTime[0] == rhs._iWhaTime[0] ); } // EDM stuff void TowerType4::readFromBuffer(TBuffer& iobuffer,Version_t version){ iobuffer >> _iPemEnergy[0]; iobuffer >> _iPemEnergy[1]; iobuffer >> _iPhaEnergy[0]; iobuffer >> _iPhaEnergy[1]; iobuffer >> _iWhaEnergy[0]; iobuffer >> _iWhaEnergy[1]; iobuffer >> _iPprEnergy[0]; iobuffer >> _iPprEnergy[1]; if (version > 6){ iobuffer >> _nWhaHits; for (int i=0; i< _nWhaHits; i++) { uint2 dummy=0; if(_nWhaHits > i) { iobuffer >> dummy; if (i<8) _iWhaTime[i]=dummy; } } iobuffer >> _nPhaHits; for (int i=0; i< _nPhaHits; i++) { uint2 dummy=0; if(_nPhaHits > i) { iobuffer >> dummy; if (i<8) _iPhaTime[i]=dummy; } } } else if(version > 4){ iobuffer >> _nWhaHits; if(_nWhaHits > 0) iobuffer >> _iWhaTime[0]; if(_nWhaHits > 1) iobuffer >> _iWhaTime[1]; iobuffer >> _nPhaHits; if(_nPhaHits > 0) iobuffer >> _iPhaTime[0]; if(_nPhaHits > 1) iobuffer >> _iPhaTime[1]; } else{ iobuffer >> _iWhaTime[0]; if(version > 3) iobuffer >> _iPhaTime[0]; } for (int i=0; i< _nWhaHits; i++) { if (version>8){ _whaTime[i]=float(_iWhaTime[i])/10-float(HTDC_Offset); } else { _whaTime[i]=float(_iWhaTime[i])-float(HTDC_Offset); } } for (int i=0; i< _nPhaHits; i++) { if (version>8){ _phaTime[i]=float(_iPhaTime[i])/10-float(HTDC_Offset); } else { _phaTime[i]=float(_iPhaTime[i])-float(HTDC_Offset); } } if (version>10){ iobuffer >> _nPemHits; for (int i=0; i< _nPemHits; i++) { if(_nPemHits > i) iobuffer >> _iPemTime[i]; _pemTime[i]=float(_iPemTime[i])/10-float(EMTDC_Offset); } } } void TowerType4::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iPemEnergy[0]; iobuffer << _iPemEnergy[1]; iobuffer << _iPhaEnergy[0]; iobuffer << _iPhaEnergy[1]; iobuffer << _iWhaEnergy[0]; iobuffer << _iWhaEnergy[1]; iobuffer << _iPprEnergy[0]; iobuffer << _iPprEnergy[1]; iobuffer << _nWhaHits; for (int i=0; i< _nWhaHits; i++) { if(_nWhaHits > i) iobuffer << _iWhaTime[i]; } iobuffer << _nPhaHits; for (int i=0; i< _nPhaHits; i++) { if(_nPhaHits > i) iobuffer << _iPhaTime[i]; } iobuffer << _nPemHits; for (int i=0; i< _nPemHits; i++) { if(_nPemHits > i) iobuffer << _iPemTime[i]; } } // // Printing (incomplete) // void TowerType4::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType4& t) { os << "PPR energy (0): " << setw(10) <pedPem()) * calib->calibPem()*CalOffLer[2]; _pemEnergy[1] = (RawQieStorableBank::unpack_energy(_iPemEnergy[1]) -calib->pedPem()) * calib->calibPem()*CalOffLer[3]; _pprEnergy[0] = (RawQieStorableBank::unpack_energy(_iPprEnergy[0]) -calib->pedPpr()) * calib->calibPpr()*CalOffLer[10]; _pprEnergy[1] = (RawQieStorableBank::unpack_energy(_iPprEnergy[1]) -calib->pedPpr()) * calib->calibPpr()*CalOffLer[11]; _phaEnergy[0] = (RawQieStorableBank::unpack_energy(_iPhaEnergy[0]) -calib->pedPha()) * calib->calibPha()*CalOffLer[8]; _phaEnergy[1] = (RawQieStorableBank::unpack_energy(_iPhaEnergy[1]) -calib->pedPha()) * calib->calibPha()*CalOffLer[9]; _whaEnergy[0] = (RawQieStorableBank::unpack_energy(_iWhaEnergy[0]) -calib->pedWha()) * calib->calibWha()*CalOffLer[6]; _whaEnergy[1] = (RawQieStorableBank::unpack_energy(_iWhaEnergy[1]) -calib->pedWha()) * calib->calibWha()*CalOffLer[7]; // just convert to float for now // _whaTime[0] = float(_iWhaTime[0]); } int TowerType4::iTower() const { return -1; } // // TowerType 5 // // Equality test bool TowerType5::operator==(const TowerType5& rhs) const { if (this == &rhs) return true; return (_pemEnergy == rhs._pemEnergy && _phaEnergy == rhs._phaEnergy && _pprEnergy == rhs._pprEnergy); } // EDM stuff void TowerType5::readFromBuffer(TBuffer& iobuffer,Version_t version){ iobuffer >> _iPemEnergy; iobuffer >> _iPhaEnergy; iobuffer >> _iPprEnergy; if (version > 6){ iobuffer >> _nPhaHits; for (int i=0; i< _nPhaHits; i++) { if(_nPhaHits > i) iobuffer >> _iPhaTime[i]; } } else if(version > 4){ iobuffer >> _nPhaHits; if(_nPhaHits > 0) iobuffer >> _iPhaTime[0]; if(_nPhaHits > 1) iobuffer >> _iPhaTime[1]; } else{ if(version > 3) iobuffer >> _iPhaTime[0]; } for (int i=0; i< _nPhaHits; i++) { if (version>8){ _phaTime[i]=float(_iPhaTime[i])/10-float(HTDC_Offset); } else { _phaTime[i]=float(_iPhaTime[i])-float(HTDC_Offset); } } if (version>10){ iobuffer >> _nPemHits; for (int i=0; i< _nPemHits; i++) { if(_nPemHits > i) iobuffer >> _iPemTime[i]; _pemTime[i]=float(_iPemTime[i])/10-float(EMTDC_Offset); } } } void TowerType5::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iPemEnergy; iobuffer << _iPhaEnergy; iobuffer << _iPprEnergy; iobuffer << _nPhaHits; for (int i=0; i< _nPhaHits; i++) { if(_nPhaHits > i) iobuffer << _iPhaTime[i]; } iobuffer << _nPemHits; for (int i=0; i< _nPemHits; i++) { if(_nPemHits > i) iobuffer << _iPemTime[i]; } } // // Printing (incomplete) // void TowerType5::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType5& t) { // float time0=float(t._iPhaTime[0])/10-float(HTDC_Offset); // float time1=float(t._iPhaTime[0])/10-float(HTDC_Offset); // os << "my time :" << t._iPhaTime[0] << " " << float(t._iPhaTime[0])/10 << " " << float(t._iPhaTime[0])/10-float(HTDC_Offset) <<'\n'; os << "PPR energy : " << setw(10) <pedPem()) * calib->calibPem()*CalOffLer[2]; _pprEnergy = (RawQieStorableBank::unpack_energy(_iPprEnergy) -calib->pedPpr()) * calib->calibPpr()*CalOffLer[10]; _phaEnergy = (RawQieStorableBank::unpack_energy(_iPhaEnergy) -calib->pedPha()) * calib->calibPha()*CalOffLer[8]; } int TowerType5::iTower() const { return -1; } // // TowerType 6 // // Equality test bool TowerType6::operator==(const TowerType6& rhs) const { if (this == &rhs) return true; return (_pemEnergy == rhs._pemEnergy && _phaEnergy == rhs._phaEnergy && _pprEnergy == rhs._pprEnergy); } // EDM stuff void TowerType6::readFromBuffer(TBuffer& iobuffer,Version_t version){ iobuffer >> _iPemEnergy; iobuffer >> _iPhaEnergy; iobuffer >> _iPprEnergy; if (version > 6){ iobuffer >> _nPhaHits; for (int i=0; i< _nPhaHits; i++) { if(_nPhaHits > i) iobuffer >> _iPhaTime[i]; } } else if(version > 4){ iobuffer >> _nPhaHits; if(_nPhaHits > 0) iobuffer >> _iPhaTime[0]; if(_nPhaHits > 1) iobuffer >> _iPhaTime[1]; } else{ if(version > 3) iobuffer >> _iPhaTime[0]; } for (int i=0; i< _nPhaHits; i++) { if (version>8){ _phaTime[i]=float(_iPhaTime[i])/10-float(HTDC_Offset); } else { _phaTime[i]=float(_iPhaTime[i])-float(HTDC_Offset); } } } void TowerType6::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iPemEnergy; iobuffer << _iPhaEnergy; iobuffer << _iPprEnergy; iobuffer << _nPhaHits; for (int i=0; i< _nPhaHits; i++) { if(_nPhaHits > i) iobuffer << _iPhaTime[i]; } } // // Printing (incomplete) // void TowerType6::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType6& t){ os << "PPR energy : " << setw(10) <pedPem()) * calib->calibPem()*CalOffLer[2]; _pprEnergy = (RawQieStorableBank::unpack_energy(_iPprEnergy) -calib->pedPpr()) * calib->calibPpr()*CalOffLer[10]; _phaEnergy = (RawQieStorableBank::unpack_energy(_iPhaEnergy) -calib->pedPha()) * calib->calibPha()*CalOffLer[8]; } int TowerType6::iTower() const { return -1; } // // TowerType 7 // // Equality test bool TowerType7::operator==(const TowerType7& rhs) const { if (this == &rhs) return true; return (_pemEnergy == rhs._pemEnergy && _phaEnergy == rhs._phaEnergy && _pprEnergy == rhs._pprEnergy && _mpaEnergy == rhs._mpaEnergy ); } // EDM stuff void TowerType7::readFromBuffer(TBuffer& iobuffer,Version_t version){ iobuffer >> _iPemEnergy; iobuffer >> _iPhaEnergy; iobuffer >> _iPprEnergy; if (version<8) { iobuffer >> _iMpaEnergy; uint2 dummy; iobuffer >> dummy; } else { iobuffer >> _iMpaEnergy; } if (version > 6){ iobuffer >> _nPhaHits; for (int i=0; i< _nPhaHits; i++) { if(_nPhaHits > i) iobuffer >> _iPhaTime[i]; } } else if(version > 4){ iobuffer >> _nPhaHits; if(_nPhaHits > 0) iobuffer >> _iPhaTime[0]; if(_nPhaHits > 1) iobuffer >> _iPhaTime[1]; } else{ if(version > 3) iobuffer >> _iPhaTime[0]; } for (int i=0; i< _nPhaHits; i++) { if (version>8){ _phaTime[i]=float(_iPhaTime[i])/10-float(HTDC_Offset); } else { _phaTime[i]=float(_iPhaTime[i])-float(HTDC_Offset); } } } void TowerType7::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iPemEnergy; iobuffer << _iPhaEnergy; iobuffer << _iPprEnergy; iobuffer << _iMpaEnergy; iobuffer << _nPhaHits; for (int i=0; i< _nPhaHits; i++) { if(_nPhaHits > i) iobuffer << _iPhaTime[i]; } } // // Printing (incomplete) // void TowerType7::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType7& t) { os << "PPR energy : " << setw(10) <pedPem()) * calib->calibPem()*CalOffLer[2]; _pprEnergy = (RawQieStorableBank::unpack_energy(_iPprEnergy) -calib->pedPpr() )* calib->calibPpr()*CalOffLer[10]; _phaEnergy = (RawQieStorableBank::unpack_energy(_iPhaEnergy) -calib->pedPha()) * calib->calibPha()*CalOffLer[8]; _mpaEnergy = (RawQieStorableBank::unpack_energy(_iMpaEnergy) -calib->pedMpa()) * calib->calibMpa(); } int TowerType7::iTower() const { return -1; } // // TowerType 8 // // Equality test bool TowerType8::operator==(const TowerType8& rhs) const { if (this == &rhs) return true; return (_mpaEnergy == rhs._mpaEnergy); } // EDM stuff void TowerType8::readFromBuffer(TBuffer& iobuffer,Version_t version){ if (version<8) { iobuffer >> _iMpaEnergy; uint2 dummy; iobuffer >> dummy; } else { iobuffer >> _iMpaEnergy; } } void TowerType8::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iMpaEnergy; } // // Printing (incomplete) // void TowerType8::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType8& t) { os << "MPA energy : " <pedMpa()) * calib->calibMpa(); else _mpaEnergy = (RawQieStorableBank::unpack_energy(_iMpaEnergy) -calib->pedMpa()) * CalOffLer[12]; if ( _mpaEnergy < 0.) _mpaEnergy = 0.; } int TowerType8::iTower() const { int phi = this->iPhi(); int wedge = phi / 5; int phiInWedge = phi % 5; int tower = 9 + 14 * wedge + phiInWedge; return tower; } // // TowerType 9 // // Equality test bool TowerType9::operator==(const TowerType9& rhs) const { if (this == &rhs) return true; return (_mpaEnergy == rhs._mpaEnergy); } // EDM stuff void TowerType9::readFromBuffer(TBuffer& iobuffer,Version_t version){ if (version<8) { iobuffer >> _iMpaEnergy; uint2 dummy; iobuffer >> dummy; } else { iobuffer >> _iMpaEnergy; } } void TowerType9::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iMpaEnergy; } // // Printing (incomplete) // void TowerType9::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType9& t) { os << "MPA energy : " << setw(10) <pedMpa()) * calib->calibMpa(); else _mpaEnergy = (RawQieStorableBank::unpack_energy(_iMpaEnergy) -calib->pedMpa()) * CalOffLer[12]; if ( _mpaEnergy < 0.) _mpaEnergy = 0.; } int TowerType9::iTower() const { int phi = this->iPhi(); int wedge = phi / 4; int phiInWedge = phi % 4; int tower = 5 + 14 * wedge + phiInWedge; return tower; } // // TowerType 10 // // Equality test bool TowerType10::operator==(const TowerType10& rhs) const { if (this == &rhs) return true; return (_mpaEnergy == rhs._mpaEnergy); } // EDM stuff void TowerType10::readFromBuffer(TBuffer& iobuffer,Version_t version){ if (version<8) { iobuffer >> _iMpaEnergy; uint2 dummy; iobuffer >> dummy; } else { iobuffer >> _iMpaEnergy; } } void TowerType10::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iMpaEnergy; } // // Printing (incomplete) // void TowerType10::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType10& t) { os << "MPA energy : " <pedMpa()) * calib->calibMpa(); else _mpaEnergy = (RawQieStorableBank::unpack_energy(_iMpaEnergy) -calib->pedMpa()) * CalOffLer[12]; if ( _mpaEnergy < 0.) _mpaEnergy = 0.; } int TowerType10::iTower() const { int phi = this->iPhi(); int wedge = phi / 3; int phiInWedge = phi % 3; int tower = 2 + 14 * wedge + phiInWedge; return tower; } // // TowerType 11 // // Equality test bool TowerType11::operator==(const TowerType11& rhs) const { if (this == &rhs) return true; return (_mpaEnergy == rhs._mpaEnergy); } // EDM stuff void TowerType11::readFromBuffer(TBuffer& iobuffer,Version_t version){ if (version<8) { iobuffer >> _iMpaEnergy; uint2 dummy; iobuffer >> dummy; } else { iobuffer >> _iMpaEnergy; } } void TowerType11::writeToBuffer(TBuffer& iobuffer,Version_t version){ iobuffer << _iMpaEnergy; } // // Printing (incomplete) // void TowerType11::printTower(std::ostream& os) const{os << *this;} ostream& operator<<(std::ostream& os, const TowerType11& t) { os << "MPA energy : " <pedMpa()) * calib->calibMpa(); else _mpaEnergy = (RawQieStorableBank::unpack_energy(_iMpaEnergy) -calib->pedMpa()) * CalOffLer[12]; if ( _mpaEnergy < 0.) _mpaEnergy = 0.; } int TowerType11::iTower() const { int phi = this->iPhi(); int wedge = phi / 2; int phiInWedge = phi % 2; int tower = 14 * wedge + phiInWedge; return tower; } //////////////////////////////////////////////////////////////////////// // // The following methods calculate the energy and phi in a tower // given two photo-tube energies. It can be used for CEM/CHA/WHA/. // Then, the TDC pulse height is corrected for CHA and WHA. // Finally, the CalTower member data are filled. // // This is based on code written by Anwar Bhatti. It was taken out // of the routine qftowe.F. // // In subsequent iterations, this part of the code will be cleaned up // so that Anwar's routines are more smoothly integrated in the new // design // /////////////////////////////////////////////////////////////////////// void TowerType0::fillCalTower(int skcut, int paramVersion){ float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float phiCha = 0; int flag = 0; int detIndex = 0; float pmtEnergy0; float pmtEnergy1; bool badpmt0; bool badpmt1; CellKey cKey1(this->iEta(),this->iPhi(), CEM); pmtEnergy0 = this->pmtEnergy(cKey1,0); pmtEnergy1 = this->pmtEnergy(cKey1,1); detIndex = 1; badpmt0 = false; if (this->isBad(CEMPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(CEMPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eCem,phiEm,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(CEMSPIKE); flag =0; CellKey cKey2(this->iEta(),this->iPhi(), CHA); pmtEnergy0 = this->pmtEnergy(cKey2,0); pmtEnergy1 = this->pmtEnergy(cKey2,1); detIndex = 2; badpmt0 = false; if (this->isBad(CHAPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(CHAPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eCha,phiCha,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(CHASPIKE); flag =0; // set rest of CalTower member data this->setEmEnergy(eCem); this->setEmPhi(phiEm); this->setHadEnergy(eCha); this->setHadPhi(phiCha); this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } void TowerType1::fillCalTower(int skcut,int paramVersion){ float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float phiCha = 0; float phiWha = 0; int flag =0; int detIndex = 0; float pmtEnergy0; float pmtEnergy1; bool badpmt0; bool badpmt1; CellKey cKey1(this->iEta(),this->iPhi(), CEM); pmtEnergy0 = this->pmtEnergy(cKey1,0); pmtEnergy1 = this->pmtEnergy(cKey1,1); detIndex = 1; badpmt0 = false; if (this->isBad(CEMPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(CEMPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eCem,phiEm,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(CEMSPIKE); flag =0; CellKey cKey2(this->iEta(),this->iPhi(), CHA); pmtEnergy0 = this->pmtEnergy(cKey2,0); pmtEnergy1 = this->pmtEnergy(cKey2,1); detIndex = 2; badpmt0 = false; if (this->isBad(CHAPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(CHAPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eCha,phiCha,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(CHASPIKE); flag =0; CellKey cKey3(this->iEta(),this->iPhi(), WHA); pmtEnergy0 = this->pmtEnergy(cKey3,0); pmtEnergy1 = this->pmtEnergy(cKey3,1); detIndex = 3; badpmt0 = false; if (this->isBad(WHAPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(WHAPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eWha,phiWha,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(WHASPIKE); flag =0; // set rest of CalTower member data this->setEmEnergy(eCem); this->setEmPhi(phiEm); float eHad=eCha+eWha; this->setHadEnergy(eHad); if (eHad>0){ float phi = ((eCha*phiCha+eWha*phiWha)/eHad); this->setHadPhi(phi); } else { this->setHadPhi(phiCha); } this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } void TowerType2::fillCalTower(int skcut,int paramVersion){ float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float phiWha = 0; int flag =0; int detIndex = 0; float pmtEnergy0; float pmtEnergy1; bool badpmt0; bool badpmt1; CellKey cKey1(this->iEta(),this->iPhi(), CEM); pmtEnergy0 = this->pmtEnergy(cKey1,0); pmtEnergy1 = this->pmtEnergy(cKey1,1); detIndex = 1; badpmt0 = false; if (this->isBad(CEMPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(CEMPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eCem,phiEm,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(CEMSPIKE); flag =0; CellKey cKey2(this->iEta(),this->iPhi(), WHA); pmtEnergy0 = this->pmtEnergy(cKey2,0); pmtEnergy1 = this->pmtEnergy(cKey2,1); detIndex = 3; badpmt0 = false; if (this->isBad(WHAPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(WHAPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eWha,phiWha,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(WHASPIKE); flag =0; // set rest of CalTower member data this->setEmEnergy(eCem); this->setEmPhi(phiEm); this->setHadEnergy(eWha); this->setHadPhi(phiWha); this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } void TowerType3::fillCalTower(int skcut,int paramVersion){ float pprWeight=pprWeight_0; switch (paramVersion) { case 2: pprWeight=pprWeight_1; } float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float phiWha = 0; int flag = 0; int detIndex = 0; float pmtEnergy0; float pmtEnergy1; bool badpmt0; bool badpmt1; CellKey cKey1(this->iEta(),this->iPhi(), PEM); pmtEnergy0 = this->pmtEnergy(cKey1,0); pmtEnergy1 = this->pmtEnergy(cKey1,1); detIndex = 1; ePem = pmtEnergy0+pmtEnergy1; if (ePem>0) { phiEm= (0.25*pmtEnergy0+0.75*pmtEnergy1)/ePem; } else { phiEm= 0.5; } CellKey cKey2(this->iEta(),this->iPhi(), WHA); pmtEnergy0 = this->pmtEnergy(cKey2,0); pmtEnergy1 = this->pmtEnergy(cKey2,1); detIndex = 3; badpmt0 = false; if (this->isBad(WHAPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(WHAPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eWha,phiWha,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(WHASPIKE); flag =0; CellKey cKey3(this->iEta(),this->iPhi(), PPR); pmtEnergy0 = this->pmtEnergy(cKey3,0); pmtEnergy1 = this->pmtEnergy(cKey3,1); detIndex = 1; ePpr = pmtEnergy0+pmtEnergy1; // set rest of CalTower member data float eEm=ePem+pprWeight*ePpr; this->setEmEnergy(eEm); this->setEmPhi(phiEm); this->setHadEnergy(eWha); this->setHadPhi(phiWha); this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } void TowerType4::fillCalTower(int skcut,int paramVersion){ float pprWeight=pprWeight_0; switch (paramVersion) { case 2: pprWeight=pprWeight_1; } float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float phiPha = 0; float phiWha = 0; int flag =0; int detIndex = 0; float pmtEnergy0; float pmtEnergy1; bool badpmt0; bool badpmt1; CellKey cKey1(this->iEta(),this->iPhi(), PEM); pmtEnergy0 = this->pmtEnergy(cKey1,0); pmtEnergy1 = this->pmtEnergy(cKey1,1); detIndex = 1; ePem = pmtEnergy0+pmtEnergy1; if (ePem>0) { phiEm= (0.25*pmtEnergy0+0.75*pmtEnergy1)/ePem; } else { phiEm= 0.5; } CellKey cKey2(this->iEta(),this->iPhi(), WHA); pmtEnergy0 = this->pmtEnergy(cKey2,0); pmtEnergy1 = this->pmtEnergy(cKey2,1); detIndex = 3; badpmt0 = false; if (this->isBad(WHAPMT0BAD)) badpmt0 = true; badpmt1 = false; if (this->isBad(WHAPMT1BAD)) badpmt1 = true; getScintillatorEnergy(detIndex,pmtEnergy0,pmtEnergy1, eWha,phiWha,flag,skcut,badpmt0,badpmt1,paramVersion); if(flag && skcut>= 0) this->setBad(WHASPIKE); flag =0; CellKey cKey3(this->iEta(),this->iPhi(), PHA); pmtEnergy0 = this->pmtEnergy(cKey3,0); pmtEnergy1 = this->pmtEnergy(cKey3,1); ePha=pmtEnergy0+pmtEnergy1; if (ePha>0) { phiPha= (0.25*pmtEnergy0+0.75*pmtEnergy1)/ePha; } else { phiPha= 0.5; } CellKey cKey4(this->iEta(),this->iPhi(), PPR); pmtEnergy0 = this->pmtEnergy(cKey4,0); pmtEnergy1 = this->pmtEnergy(cKey4,1); detIndex = 1; ePpr = pmtEnergy0+pmtEnergy1; // set rest of CalTower member data float eEm=ePem+pprWeight*ePpr; this->setEmEnergy(eEm); this->setEmPhi(phiEm); float eHad=eWha+ePha; this->setHadEnergy(eHad); if (eHad>0) { float phi = ((eWha*phiWha+ePha*phiPha)/eHad); this->setHadPhi(phi); } else { this->setHadPhi(phiWha); } this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } void TowerType8::fillCalTower(int skcut,int paramVersion){ float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float eMpa = 0; float phiHad = 0; float pmtEnergy0=0; CellKey cKey1(this->iEta(),this->iPhi(), MPA); pmtEnergy0 = this->pmtEnergy(cKey1,0); eMpa = pmtEnergy0; phiEm= 0.5; // set rest of CalTower member data float eEm=eMpa; this->setEmEnergy(eEm); this->setEmPhi(phiEm); float eHad=0; this->setHadEnergy(eHad); this->setHadPhi(phiHad); this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } void TowerType9::fillCalTower(int skcut,int paramVersion){ float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float eMpa = 0; float phiHad = 0; float pmtEnergy0=0; CellKey cKey1(this->iEta(),this->iPhi(), MPA); pmtEnergy0 = this->pmtEnergy(cKey1,0); eMpa = pmtEnergy0; phiEm= 0.5; // set rest of CalTower member data float eEm=eMpa; this->setEmEnergy(eEm); this->setEmPhi(phiEm); float eHad=0; this->setHadEnergy(eHad); this->setHadPhi(phiHad); this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } void TowerType10::fillCalTower(int skcut,int paramVersion){ float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float eMpa = 0; float phiHad = 0; float pmtEnergy0=0; CellKey cKey1(this->iEta(),this->iPhi(), MPA); pmtEnergy0 = this->pmtEnergy(cKey1,0); eMpa = pmtEnergy0; phiEm= 0.5; // set rest of CalTower member data float eEm=eMpa; this->setEmEnergy(eEm); this->setEmPhi(phiEm); float eHad=0; this->setHadEnergy(eHad); this->setHadPhi(phiHad); this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } void TowerType11::fillCalTower(int skcut,int paramVersion){ float eCem = 0; float ePem = 0; float phiEm = 0; float eCha = 0; float eWha = 0; float ePha = 0; float ePpr = 0; float eMpa = 0; float phiHad = 0; float pmtEnergy0=0; CellKey cKey1(this->iEta(),this->iPhi(), MPA); pmtEnergy0 = this->pmtEnergy(cKey1,0); eMpa = pmtEnergy0; phiEm= 0.5; // set rest of CalTower member data float eEm=eMpa; this->setEmEnergy(eEm); this->setEmPhi(phiEm); float eHad=0; this->setHadEnergy(eHad); this->setHadPhi(phiHad); this->setCemEnergy(eCem); this->setPemEnergy(ePem); this->setChaEnergy(eCha); this->setWhaEnergy(eWha); this->setPhaEnergy(ePha); this->setPprEnergy(ePpr); } // // The other TowerTypes do not have 2 PMTs and they use // the CalTower base class fillTower method. // // } // namespace calor #endif // USE_CDFEDM2