00001
00002 #include "CalRecon/CsIClusters.h"
00003
00004
00005
00006
00007
00008 CsICluster::CsICluster(double e,Point p)
00009
00010 {
00011 int nl = 8;
00012 m_eneLayer.resize(nl);
00013 m_pLayer.resize(nl);
00014 ini();
00015 m_energySum = e;
00016 m_energyCorrected = m_energySum;
00017 m_position = p;
00018 }
00019
00020 void CsICluster::writeOut() const
00021
00022 {
00023 #if 0 // THB: enable this after it is modified to write to the log object, and the values are all defined
00024 std::cout << "Energy " << m_energySum << " Corrected " << m_energyCorrected;
00025 std::cout << " " << position().x() << " " << position().y() << " " << position().z();
00026 std::cout << " " << direction().x() << " " << direction().y() << " " << direction().z();
00027 std::cout<<"\n";
00028 #endif
00029 }
00030
00031
00032 void CsICluster::ini()
00033
00034 {
00035 m_energySum = 0.;
00036 m_energyCorrected = 0.;
00037
00038 m_position = Point(0.,0.,0.);
00039 m_direction = Vector(0.,0.,0);
00040 int nLayers = m_eneLayer.size();
00041 for(int i = 0; i<nLayers; i++){
00042 m_eneLayer[i]=0.;
00043 m_pLayer[i]=Vector(0.,0.,0.);
00044 }
00045 }
00046
00047
00048
00049 void CsIClusterList::clear()
00050
00051 {
00052 int nClusters = num();
00053 for (int icl = 0; icl < nClusters; icl++) {
00054 delete m_CsIClustersList[icl];
00055 }
00056 m_CsIClustersList.clear();
00057 }
00058
00059
00060
00061 void CsIClusterList::ini()
00062
00063 {
00064 m_CsIClustersList.clear();
00065 }
00066
00067 void CsIClusterList::writeOut() const
00068
00069 {
00070 #if 0 // fix this to write to the log file for debug purposes
00071 if (m_CsIClustersList.size()<=0) return;
00072
00073 std::cout << " --- CsIClusterList --- " << m_CsIClustersList.size() <<"\n";
00074 for (int i = 0; i < m_CsIClustersList.size();i++) {
00075 m_CsIClustersList[i]->writeOut();
00076 }
00077 #endif
00078 }