// File: hphotoncluster.cc // // Author: Laura Fabbietti // Last update by Laura Fabbietti: 02/08/09 17:34:02 // #pragma implementation #include #include #include #include "hphotoncluster.h" #include "htool.h" using namespace std; ClassImp(HPhotonCluster) void HPhotonCluster::clear(){ iPadNr = 0; fThetaMax = 0; fPhiMax = 0; iClass = 0; iXDimension = 0; iYDimension = 0; fTotalCharge = 0; iSector = -1; fPads->Clear(); } HPhotonCluster::HPhotonCluster(){ fPads = new TList; } HPhotonCluster::~HPhotonCluster(){ fPads->Delete(); delete fPads; } Bool_t HPhotonCluster::isInPadList(Int_t col, Int_t row){ HRichCal *dummyPad =NULL; Int_t iCol,iRow; Int_t listSize = fPads->GetSize(); for(Int_t i = 0;iAt(i); iCol = dummyPad->getCol(); iRow = dummyPad->getRow(); if(iCol==col&&iRow==row) return kTRUE; } return kFALSE; } void HPhotonCluster::calculatemaxmin(){ HRichCal * dummyPad = NULL; Int_t listSize = fPads->GetSize(); Int_t * xPad = new Int_t[listSize]; Int_t * yPad = new Int_t[listSize]; for(Int_t i = 0;iAt(i); xPad[i] = dummyPad->getCol(); yPad[i] = dummyPad->getRow(); //cout<<" pads charge "<getCharge()<At(0); sector = dummyPad->getSector(); fThetaMax = ((HRichGeometryPar*) pGeomPar) -> getPadsPar()->getPad(dummyPad->getCol(),dummyPad->getRow())->getTheta(); fPhiMax =((HRichGeometryPar*) pGeomPar) -> getPadsPar()->getPad(dummyPad->getCol(),dummyPad->getRow())->getPhi(sector); }