From: odjuvsla Date: Fri, 12 Feb 2010 01:13:28 +0000 (+0000) Subject: - moving the cluster parameter evalution from own component to clusterizer X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=7c80a370777c462ef4c1cd8d45c7d1402c3e8af2;p=u%2Fmrichter%2FAliRoot.git - moving the cluster parameter evalution from own component to clusterizer - fixing nasty bug in clusterizer - cosmetics - adding geometry classes to build system --- diff --git a/HLT/BASE/util/AliHLTCaloClusterDataStruct.h b/HLT/BASE/util/AliHLTCaloClusterDataStruct.h index c4322c8bd4d..73bd99b14bc 100644 --- a/HLT/BASE/util/AliHLTCaloClusterDataStruct.h +++ b/HLT/BASE/util/AliHLTCaloClusterDataStruct.h @@ -45,6 +45,7 @@ struct AliHLTCaloClusterHeaderStruct { Short_t fNClusters; + Short_t fNDigits; }; /** diff --git a/HLT/CALO/AliHLTCaloClusterAnalyser.cxx b/HLT/CALO/AliHLTCaloClusterAnalyser.cxx index d074694d9ad..a1be56880a4 100644 --- a/HLT/CALO/AliHLTCaloClusterAnalyser.cxx +++ b/HLT/CALO/AliHLTCaloClusterAnalyser.cxx @@ -33,33 +33,30 @@ #include "AliHLTCaloRecPointDataStruct.h" #include "AliHLTCaloClusterDataStruct.h" //#include "AliHLTCaloPhysicsAnalyzer.h" -#include "AliPHOSGeoUtils.h" +#include "AliHLTCaloGeometry.h" #include "AliESDCaloCluster.h" #include "TMath.h" #include "TVector3.h" +#include "AliHLTCaloClusterizer.h" ClassImp(AliHLTCaloClusterAnalyser); -AliHLTCaloClusterAnalyser::AliHLTCaloClusterAnalyser() : +AliHLTCaloClusterAnalyser::AliHLTCaloClusterAnalyser() : // AliHLTCaloBase(), - fLogWeight(0), - fRecPointDataPtr(0), + fLogWeight(4.5), + fRecPointArray(0), + fDigitDataArray(0), fNRecPoints(0), fCaloClusterDataPtr(0), fCaloClusterHeaderPtr(0), - fPHOSGeometry(0), //fAnalyzerPtr(0), fDoClusterFit(false), fHaveCPVInfo(false), fDoPID(false), - fHaveDistanceToBadChannel(false) + fHaveDistanceToBadChannel(false), + fGeometry(0) { //See header file for documentation - fLogWeight = 4.5; - - // fAnalyzerPtr = new AliHLTCaloPhysicsAnalyzer(); - // fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV"); - fPHOSGeometry = new AliPHOSGeoUtils("PHOS", "noCPV"); } AliHLTCaloClusterAnalyser::~AliHLTCaloClusterAnalyser() @@ -67,16 +64,26 @@ AliHLTCaloClusterAnalyser::~AliHLTCaloClusterAnalyser() } void -AliHLTCaloClusterAnalyser::SetCaloClusterDataPtr(AliHLTCaloClusterDataStruct *caloClusterDataPtr) +AliHLTCaloClusterAnalyser::SetCaloClusterData(AliHLTCaloClusterDataStruct *caloClusterDataPtr) { //see header file for documentation fCaloClusterDataPtr = caloClusterDataPtr; } + void -AliHLTCaloClusterAnalyser::SetRecPointDataPtr(AliHLTCaloRecPointHeaderStruct *recPointDataPtr) +AliHLTCaloClusterAnalyser::SetRecPointArray(AliHLTCaloRecPointDataStruct **recPointDataPtr, Int_t nRecPoints) { - fNRecPoints = recPointDataPtr->fNRecPoints; - fRecPointDataPtr = reinterpret_cast(reinterpret_cast(recPointDataPtr)+sizeof(AliHLTCaloRecPointHeaderStruct)); + fRecPointArray = recPointDataPtr; + fNRecPoints = nRecPoints; +} + +void +AliHLTCaloClusterAnalyser::SetDigitDataArray(AliHLTCaloDigitDataStruct *digits) +{ +// AliHLTCaloClusterizer cl("PHOS"); + // cl.CheckDigits(fRecPointArray, digits, fNRecPoints); + fDigitDataArray = digits; + //cl.CheckDigits(fRecPointArray, fDigitDataArray, fNRecPoints); } Int_t @@ -91,17 +98,27 @@ AliHLTCaloClusterAnalyser::CalculateCenterOfGravity() AliHLTCaloDigitDataStruct *digit = 0; //AliPHOSGeometry * phosgeom = AliPHOSGeometry::GetInstance() ; - - AliHLTCaloRecPointDataStruct *recPoint = fRecPointDataPtr; + + + //AliHLTCaloClusterizer cl("PHOS"); + //cl.CheckDigits(fRecPointArray, fDigitDataArray, fNRecPoints); UInt_t iDigit = 0; for(Int_t iRecPoint=0; iRecPoint < fNRecPoints; iRecPoint++) { + AliHLTCaloRecPointDataStruct *recPoint = fRecPointArray[iRecPoint]; // digit = &(recPoint->fDigits); + cout << "COG: Rec point multiplicity: " << recPoint->fMultiplicity << ", rec point energy: " << recPoint->fAmp << endl; + Int_t *digitIndexPtr = &(recPoint->fDigits); + for(iDigit = 0; iDigit < recPoint->fMultiplicity; iDigit++) { - + //cout << "1. Digit array: " << fDigitDataArray << ", Digit: " << digit << ", Index: " << *digitIndexPtr << ", ID: " << digit->fID << endl; + + digit = &(fDigitDataArray[*digitIndexPtr]); + cout << "COG: 2. Digit array: " << fDigitDataArray << ", Digit: " << digit << ", Index: " << *digitIndexPtr << ", index pointer: " << digitIndexPtr<< endl; + cout << ", dig Energy: " << digit->fEnergy << ", Index: " << *digitIndexPtr << ", ID: " << digit->fID << endl; xi = digit->fX; zi = digit->fZ; // cout << "COG digits (x:z:E:time): " << xi << " : " << zi << " : " << digit->fEnergy << " : " << digit->fTime << endl; @@ -112,7 +129,7 @@ AliHLTCaloClusterAnalyser::CalculateCenterOfGravity() z += zi * w ; wtot += w ; } - digit++; + digitIndexPtr++; } //cout << endl; if (wtot>0) @@ -124,7 +141,6 @@ AliHLTCaloClusterAnalyser::CalculateCenterOfGravity() { recPoint->fAmp = 0; } - recPoint = reinterpret_cast(digit); } return 0; } @@ -153,13 +169,21 @@ AliHLTCaloClusterAnalyser::DeconvoluteClusters() } Int_t -AliHLTCaloClusterAnalyser::CreateClusters(UInt_t availableSize, UInt_t& totSize) +AliHLTCaloClusterAnalyser::CreateClusters(Int_t nRecPoints, UInt_t availableSize, UInt_t& totSize) { //See header file for documentation + fNRecPoints = nRecPoints; + + if(fGeometry == 0) + { + HLTError("No geometry object is initialised, creation of clusters stopped"); + } + + CalculateCenterOfGravity(); + UInt_t maxClusterSize = sizeof(AliHLTCaloClusterDataStruct) + (6 << 7); //Reasonable estimate... (6 = sizeof(Short_t) + sizeof(Float_t) - AliHLTCaloRecPointDataStruct* recPointPtr = fRecPointDataPtr; // AliHLTCaloDigitDataStruct* digitPtr = &(recPointPtr->fDigits); AliHLTCaloDigitDataStruct* digitPtr = 0; @@ -172,18 +196,22 @@ AliHLTCaloClusterAnalyser::CreateClusters(UInt_t availableSize, UInt_t& totSize) for(Int_t i = 0; i < fNRecPoints; i++) //TODO needs fix when we start unfolding (number of clusters not necessarily same as number of recpoints gotten from the clusterizer { - +// if(availableSize + AliHLTCaloRecPointDataStruct *recPointPtr = fRecPointArray[i]; + cout << "CA: rec point energy: " << recPointPtr->fAmp << ", rec point multiplicity: " << recPointPtr->fMultiplicity << endl; if(availableSize < (totSize + maxClusterSize)) { return -1; //Might get out of buffer, exiting } // cout << "Local Position (x:z:module): " << recPointPtr->fX << " : "<< recPointPtr->fZ << " : " << recPointPtr->fModule << endl; - fPHOSGeometry->Local2Global(recPointPtr->fModule, recPointPtr->fX, recPointPtr->fZ, globalPos); + + AliHLTCaloGlobalCoordinate globalCoord; + fGeometry->GetGlobalCoordinates(*recPointPtr, globalCoord); // cout << "Global Position (x:y:z): " << globalPos[0] << " : "<< globalPos[1] << " : " << globalPos[2] << endl << endl; - caloClusterPtr->fGlobalPos[0] = globalPos[0]; - caloClusterPtr->fGlobalPos[1] = globalPos[1]; - caloClusterPtr->fGlobalPos[2] = globalPos[2]; + caloClusterPtr->fGlobalPos[0] = globalCoord.fX; + caloClusterPtr->fGlobalPos[1] = globalCoord.fY; + caloClusterPtr->fGlobalPos[2] = globalCoord.fZ; caloClusterPtr->fNCells = recPointPtr->fMultiplicity; @@ -192,16 +220,17 @@ AliHLTCaloClusterAnalyser::CreateClusters(UInt_t availableSize, UInt_t& totSize) for(UInt_t j = 0; j < caloClusterPtr->fNCells; j++) { - fPHOSGeometry->RelPosToAbsId((Int_t)(recPointPtr->fModule), (double)(digitPtr->fX), (double)(digitPtr->fZ), id); - *cellIDPtr = id; + // fPHOSGeometry->RelPosToAbsId((Int_t)(recPointPtr->fModule), (double)(digitPtr->fX), (double)(digitPtr->fZ), id); +/* *cellIDPtr = id; *cellAmpFracPtr = digitPtr->fEnergy/recPointPtr->fAmp; digitPtr++; cellIDPtr = reinterpret_cast(reinterpret_cast(cellAmpFracPtr) + sizeof(Float_t)); - cellAmpFracPtr = reinterpret_cast(reinterpret_cast(cellIDPtr) + sizeof(Short_t)); + cellAmpFracPtr = reinterpret_cast(reinterpret_cast(cellIDPtr) + sizeof(Short_t)); */ } caloClusterPtr->fEnergy = recPointPtr->fAmp; - + cout << "CA: cluster energy: " << caloClusterPtr->fEnergy << endl; + cout << "CA: recpoint energy: " << recPointPtr->fAmp << endl; if(fDoClusterFit) { FitCluster(recPointPtr); @@ -246,8 +275,10 @@ AliHLTCaloClusterAnalyser::CreateClusters(UInt_t availableSize, UInt_t& totSize) // totSize += sizeof(AliHLTCaloClusterDataStruct) + (caloClusterPtr->fNCells)*(sizeof(Short_t) +sizeof(Float_t)-1); totSize += sizeof(AliHLTCaloClusterDataStruct) + (caloClusterPtr->fNCells-1)*(sizeof(Short_t) + sizeof(Float_t)); + // caloClusterPtr = reinterpret_cast(cellAmpFracPtr); caloClusterPtr = reinterpret_cast(cellIDPtr); + recPointPtr = reinterpret_cast(digitPtr); ///digitPtr = &(recPointPtr->fDigits); } diff --git a/HLT/CALO/AliHLTCaloClusterAnalyser.h b/HLT/CALO/AliHLTCaloClusterAnalyser.h index 06f164cc4df..82d34027d76 100644 --- a/HLT/CALO/AliHLTCaloClusterAnalyser.h +++ b/HLT/CALO/AliHLTCaloClusterAnalyser.h @@ -19,7 +19,7 @@ #ifndef ALIHLTCALOCLUSTERANALYSER_H #define ALIHLTCALOCLUSTERANALYSER_H -#include "Rtypes.h" +#include "AliHLTLogging.h" /** * Class calculates properties of rec points @@ -41,9 +41,10 @@ //class AliHLTCaloPhysicsAnalyzer; class AliHLTCaloRecPointHeaderStruct; class AliHLTCaloRecPointDataStruct; +class AliHLTCaloDigitDataStruct; class AliHLTCaloClusterHeaderStruct; class AliHLTCaloClusterDataStruct; -class AliPHOSGeoUtils; +class AliHLTCaloGeometry; /** * @class AliHLTCaloClusterAnalyser @@ -54,7 +55,7 @@ class AliPHOSGeoUtils; * @ingroup alihlt_calo */ //class AliHLTCaloClusterAnalyser : public AliHLTCaloBase -class AliHLTCaloClusterAnalyser +class AliHLTCaloClusterAnalyser : public AliHLTLogging { public: @@ -64,43 +65,17 @@ public: /** Destructor */ virtual ~AliHLTCaloClusterAnalyser(); - /** Copy constructor */ - AliHLTCaloClusterAnalyser(const AliHLTCaloClusterAnalyser &) : - // AliHLTCaloBase(), - fLogWeight(0), - fRecPointDataPtr(0), - fNRecPoints(0), - fCaloClusterDataPtr(0), - fCaloClusterHeaderPtr(0), - fPHOSGeometry(0), - //fAnalyzerPtr(0), - fDoClusterFit(false), - fHaveCPVInfo(false), - fDoPID(false), - fHaveDistanceToBadChannel(false) - - { - //Copy constructor not implemented - } - - /** Assignment */ - AliHLTCaloClusterAnalyser & operator = (const AliHLTCaloClusterAnalyser) - { - //Assignment - return *this; - } - /** * Set the rec point data buffer * @param recPointDataPtr is a pointer to the rec points */ - void SetRecPointDataPtr(AliHLTCaloRecPointHeaderStruct *recPointDataPtr); + void SetRecPointArray(AliHLTCaloRecPointDataStruct **recPointDataPtr, Int_t nRecPoints); /** * Set the calo cluster output buffer * @param caloClusterDataPtr is a pointer to the calo cluster buffer */ - void SetCaloClusterDataPtr(AliHLTCaloClusterDataStruct *caloClusterDataPtr); + void SetCaloClusterData(AliHLTCaloClusterDataStruct *caloClusterDataPtr); /** * Calculates the center of gravity for the reconstruction points in the container @@ -130,7 +105,7 @@ public: * Convert the rec points into calo clusters * @return */ - Int_t CreateClusters(UInt_t availableSize, UInt_t& totSize); + Int_t CreateClusters(Int_t nRecPoints, UInt_t availableSize, UInt_t& totSize); /** * Fit a cluster @@ -180,13 +155,28 @@ public: */ void SetHaveDistanceToBadChannel() { fHaveDistanceToBadChannel = true; } + /** + * Set the geometry object (different for EMCAL and PHOS) + */ + void SetGeometry(AliHLTCaloGeometry *geometry) { fGeometry = geometry; } + + /** + * Set pointer to the digits + */ + void SetDigitDataArray(AliHLTCaloDigitDataStruct *digits); + + + void DoNothing() { printf("Do nothing\n");} private: /** Used for calculation of center of gravity */ Float_t fLogWeight; //COMMENT /** Pointer to the rec points */ - AliHLTCaloRecPointDataStruct *fRecPointDataPtr; //! transient + AliHLTCaloRecPointDataStruct **fRecPointArray; //! transient + + /** Pointer to the digits */ + AliHLTCaloDigitDataStruct *fDigitDataArray; //! transient /** Number of rec points */ Int_t fNRecPoints; //COMMENT @@ -197,13 +187,6 @@ private: /** Pointer to the cluster header */ AliHLTCaloClusterHeaderStruct *fCaloClusterHeaderPtr; //! transient - /** Instance of the PHOS geometry */ - AliPHOSGeoUtils *fPHOSGeometry; //! transient - - //TODO: should not use PhysicsAnalyzer for global coord! - /** */ - // AliHLTCaloPhysicsAnalyzer *fAnalyzerPtr; //! transient - /** Should we do cluster fitting? */ Bool_t fDoClusterFit; //COMMENT @@ -216,6 +199,8 @@ private: /** Do we have distance to bad channel? */ Bool_t fHaveDistanceToBadChannel; //COMMENT + /** The geometry object */ + AliHLTCaloGeometry* fGeometry; //COMMENT }; diff --git a/HLT/CALO/AliHLTCaloClusterizer.cxx b/HLT/CALO/AliHLTCaloClusterizer.cxx index 17c2b3b99b4..455c4353629 100644 --- a/HLT/CALO/AliHLTCaloClusterizer.cxx +++ b/HLT/CALO/AliHLTCaloClusterizer.cxx @@ -40,7 +40,13 @@ ClassImp(AliHLTCaloClusterizer); AliHLTCaloClusterizer::AliHLTCaloClusterizer(TString det): AliHLTCaloConstantsHandler(det), + fRecPointArray(0), fRecPointDataPtr(0), + fFirstRecPointPtr(0), + fArraySize(0), + fAvailableSize(0), + fUsedSize(0), + fNRecPoints(0), fDigitIndexPtr(0), fEmcClusteringThreshold(0), fEmcMinEnergyThreshold(0), @@ -57,26 +63,18 @@ AliHLTCaloClusterizer::AliHLTCaloClusterizer(TString det): fEmcTimeGate = 1.e-6 ; fMaxDigitIndexDiff = 2*fCaloConstants->GetNZROWSMOD(); + + + fArraySize = 10; + fRecPointArray = new AliHLTCaloRecPointDataStruct*[fArraySize]; + + fAvailableSize = sizeof(AliHLTCaloRecPointDataStruct) * 20; + fRecPointDataPtr = reinterpret_cast(new UChar_t[fAvailableSize]); + fFirstRecPointPtr = fRecPointDataPtr; + printf("Start of rec point data: %x, end of rec point data: %x\n", fRecPointDataPtr, reinterpret_cast(fRecPointDataPtr) + fAvailableSize); }//end - -//BALLE how do you set the right detector? -// AliHLTCaloClusterizer::AliHLTCaloClusterizer(const AliHLTCaloClusterizer &) : -// AliHLTCaloConstantsHandler("BALLE"), -// fRecPointDataPtr(0), -// fDigitDataPtr(0), -// fEmcClusteringThreshold(0), -// fEmcMinEnergyThreshold(0), -// fEmcTimeGate(0), -// fDigitsInCluster(0), -// fDigitContainerPtr(0), -// fMaxDigitIndexDiff(0) -// { -// // dummy copy constructor -// }//end - - AliHLTCaloClusterizer::~AliHLTCaloClusterizer() { //See header file for documentation @@ -90,17 +88,14 @@ AliHLTCaloClusterizer::SetRecPointDataPtr(AliHLTCaloRecPointDataStruct* recPoint } Int_t -AliHLTCaloClusterizer::ClusterizeEvent(Int_t nDigits, UInt_t availableSize, UInt_t& totSize) +AliHLTCaloClusterizer::ClusterizeEvent(Int_t nDigits) { //see header file for documentation Int_t nRecPoints = 0; - - fAvailableSize = availableSize; - + fNRecPoints = 0; + fUsedSize = 0; fNDigits = nDigits; - - UInt_t maxRecPointSize = sizeof(AliHLTCaloRecPointDataStruct) + (sizeof(AliHLTCaloDigitDataStruct) << 7); //Reasonable estimate... - + fRecPointDataPtr = fFirstRecPointPtr; //Clusterization starts for(Int_t i = 0; i < nDigits; i++) { @@ -110,13 +105,8 @@ AliHLTCaloClusterizer::ClusterizeEvent(Int_t nDigits, UInt_t availableSize, UInt { continue; } - - if(fAvailableSize < (sizeof(AliHLTCaloRecPointDataStruct))) - { - HLTError("Out of buffer, stopping clusterisation"); - return -1; - } - + CheckArray(); + CheckBuffer(); // printf("cluster candidate!\n"); // First digit is placed at the fDigits member variable in the recpoint fDigitIndexPtr = &(fRecPointDataPtr->fDigits); @@ -126,7 +116,9 @@ AliHLTCaloClusterizer::ClusterizeEvent(Int_t nDigits, UInt_t availableSize, UInt // Assigning the digit to this rec point fRecPointDataPtr->fDigits = i; - + printf("Clusterizier: adding digit: index pointer: %x, index: %d\n", fDigitIndexPtr, *fDigitIndexPtr); + fUsedSize += sizeof(AliHLTCaloRecPointDataStruct); + // Incrementing the pointer to be ready for new entry fDigitIndexPtr++; @@ -141,13 +133,17 @@ AliHLTCaloClusterizer::ClusterizeEvent(Int_t nDigits, UInt_t availableSize, UInt return -1; } - totSize += sizeof(AliHLTCaloRecPointDataStruct) + (fDigitsInCluster-1)*sizeof(AliHLTCaloDigitDataStruct); + //fUsedSize += sizeof(AliHLTCaloRecPointDataStruct) + (fDigitsInCluster-1)*sizeof(AliHLTCaloDigitDataStruct); + fRecPointDataPtr->fMultiplicity = fDigitsInCluster; - // printf("Rec point energy: %f\n", fRecPointDataPtr->fAmp); + printf("Rec point energy: %f\n", fRecPointDataPtr->fAmp); + printf("Multiplicity: %d\n", fDigitsInCluster); + fRecPointArray[fNRecPoints] = fRecPointDataPtr; + fRecPointDataPtr = reinterpret_cast(fDigitIndexPtr); - + }//end of clusterization - + fNRecPoints = nRecPoints; return nRecPoints; } @@ -169,13 +165,25 @@ AliHLTCaloClusterizer::ScanForNeighbourDigits(Int_t index, AliHLTCaloRecPointDat if(AreNeighbours(fDigitsPointerArray[index], fDigitsPointerArray[j])) { - if(fAvailableSize < (sizeof(Int_t))) - { - HLTError("Out of buffer, stopping clusterisation"); - return -1; - } +// if((fAvailableSize - fUsedSize) < sizeof(Int_t)) +// { +// UChar_t *tmp = new UChar_t[fAvailableSize*2]; +// memcpy(tmp, fRecPointDataPtr, fAvailableSize); +// for(Int_t n = 0; n < fNRecPoints; n++) +// { +// fRecPointArray[n] = reinterpret_cast(reinterpret_cast(fRecPointArray[n]) - reinterpret_cast(fFirstRecPointPtr) + reinterpret_cast(tmp)); +// } +// fRecPointDataPtr = reinterpret_cast(tmp); +// fFirstRecPointPtr = fRecPointDataPtr; +// fUsedSize = 0; +// } + CheckBuffer(); // Assigning index to digit + printf("Digit index pointer: %x\n", fDigitIndexPtr); *fDigitIndexPtr = j; + fUsedSize += sizeof(Int_t); + + printf("Clusterizier: adding digit: index pointer: %x, index: %d\n", fDigitIndexPtr, *fDigitIndexPtr); // Incrementing digit pointer to be ready for new entry fDigitIndexPtr++; @@ -197,20 +205,20 @@ AliHLTCaloClusterizer::AreNeighbours(AliHLTCaloDigitDataStruct* digit1, //see header file for documentation if ( (digit1->fModule == digit2->fModule) /*&& (coord1[1]==coord2[1])*/ ) // inside the same PHOS module { -// Int_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ ); -// Int_t coldiff = TMath::Abs( digit1->fX - digit2->fX ); -// if (( coldiff <= 1 && rowdiff == 0 ) || ( coldiff == 0 && rowdiff <= 1 )) -// { -// cout << "Are neighbours: digit (E = " << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << -// " is neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl; - -// if(TMath::Abs(digit1->fTime - digit2->fTime ) < fEmcTimeGate) -// { -// return 1; -// } -// } - - Float_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ ); + Int_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ ); + Int_t coldiff = TMath::Abs( digit1->fX - digit2->fX ); + if (( coldiff <= 1 && rowdiff == 0 ) || ( coldiff == 0 && rowdiff <= 1 )) + { +// cout << "Are neighbours: digit (E = " << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << +// " is neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl; + + if(TMath::Abs(digit1->fTime - digit2->fTime ) < fEmcTimeGate) + { + return 1; + } + } + + /* Float_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ ); Float_t coldiff = TMath::Abs( digit1->fX - digit2->fX ); if (( coldiff <= 2.4 && rowdiff < 0.4 ) || ( coldiff < 0.4 && rowdiff <= 2.4 )) { @@ -222,11 +230,141 @@ AliHLTCaloClusterizer::AreNeighbours(AliHLTCaloDigitDataStruct* digit1, return 1; } } + */ else { - // cout << "Not neighbours: digit (E = " << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << - // " is not neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl; +// cout << "Not neighbours: digit (E = " << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << +// " is not neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl; } } return 0; } + + + +Int_t AliHLTCaloClusterizer::CheckArray() +{ + printf("CheckArray: fArraySize: %d, fNRecPoints: %d\n", fArraySize, fNRecPoints); + if(fArraySize == fNRecPoints) + { + printf("Expanding array..."); + fArraySize *= 2; + AliHLTCaloRecPointDataStruct **tmp = new AliHLTCaloRecPointDataStruct*[fArraySize]; + memcpy(tmp, fRecPointArray, fArraySize/2 * sizeof(AliHLTCaloRecPointDataStruct*)); + delete fRecPointArray; + fRecPointArray = tmp; + } + return 0; +} + +Int_t AliHLTCaloClusterizer::CheckBuffer() +{ + // See header file for class documentation + printf("CheckBuffer: Used size %d, fAvailableSize: %d\n", fUsedSize, fAvailableSize); + if((fAvailableSize - fUsedSize) < sizeof(AliHLTCaloRecPointDataStruct) ) + { + printf("Expanding buffer...\n"); + Int_t recPointOffset = reinterpret_cast(fRecPointDataPtr) - reinterpret_cast(fFirstRecPointPtr); + fAvailableSize *= 2; + UChar_t *tmp = new UChar_t[fAvailableSize]; + memcpy(tmp, fRecPointDataPtr, fAvailableSize/2); + for(Int_t n = 0; n < fNRecPoints; n++) + { + fRecPointArray[n] = reinterpret_cast(reinterpret_cast(fRecPointArray[n]) - reinterpret_cast(fFirstRecPointPtr) + reinterpret_cast(tmp)); + } + delete fRecPointDataPtr; + fFirstRecPointPtr = reinterpret_cast(tmp); + fRecPointDataPtr = reinterpret_cast(tmp + recPointOffset); + fUsedSize = 0; + } + return 0; +} + +Int_t AliHLTCaloClusterizer::CheckDigits(AliHLTCaloRecPointDataStruct** recArray, AliHLTCaloDigitDataStruct** digitArray, Int_t nRP) +{ + AliHLTCaloRecPointDataStruct **recpoints = recArray; + AliHLTCaloDigitDataStruct **digits = digitArray; + Int_t nRecPoints = nRP; + + if(recArray == 0) + { + recpoints = fRecPointArray; + } + if(digitArray == 0) + { + digits = fDigitsPointerArray; + } + if(nRP == 0) + { + nRecPoints = fNRecPoints; + } + printf("CL: CheckDigits: Number of rec points: %d\n", nRecPoints); + for(Int_t i = 0; i < nRecPoints; i++) + { + + AliHLTCaloRecPointDataStruct *recPoint = recpoints[i]; + + //AliHLTCaloRecPointDataStruct *recPoint = fRecPointArray[0]; + Int_t multiplicity = recPoint->fMultiplicity; + Int_t *digitIndexPtr = &(recPoint->fDigits); + printf("CL: Rec point with energy: %f, multiplicity: %d\n", recPoint->fAmp, recPoint->fMultiplicity); + for(Int_t j = 0; j < multiplicity; j++) + { + //AliHLTCaloRecPointDataStruct *recPoint = fRecPointArray[j]; + AliHLTCaloDigitDataStruct *digit = digits[*digitIndexPtr]; + printf("CL: Digit ID: %d, energy: %f, index: %d, indexpointer: %x\n", digit->fID, digit->fEnergy, *digitIndexPtr, digitIndexPtr); + digitIndexPtr++; + //recPoint = reinterpret_cast(digitIndexPtr); + } + } + + + + + + + +} + +Int_t AliHLTCaloClusterizer::CheckDigits(AliHLTCaloRecPointDataStruct** recArray, AliHLTCaloDigitDataStruct* digitArray, Int_t nRP) +{ + AliHLTCaloRecPointDataStruct **recpoints = recArray; + AliHLTCaloDigitDataStruct *digits = digitArray; + Int_t nRecPoints = nRP; + + if(recArray == 0) + { + recpoints = fRecPointArray; + } + if(nRP == 0) + { + nRecPoints = fNRecPoints; + } + printf("CL: CheckDigits: Number of rec points: %d\n", nRecPoints); + for(Int_t i = 0; i < nRecPoints; i++) + { + + AliHLTCaloRecPointDataStruct *recPoint = recpoints[i]; + + //AliHLTCaloRecPointDataStruct *recPoint = fRecPointArray[0]; + Int_t multiplicity = recPoint->fMultiplicity; + Int_t *digitIndexPtr = &(recPoint->fDigits); + printf("CL: Rec point with energy: %f, multiplicity: %d\n", recPoint->fAmp, recPoint->fMultiplicity); + for(Int_t j = 0; j < multiplicity; j++) + { + //AliHLTCaloRecPointDataStruct *recPoint = fRecPointArray[j]; + AliHLTCaloDigitDataStruct digit = digits[*digitIndexPtr]; + printf("CL: digits: %x, recpoints: %x, digitIndexPtr: %x\n", digits, recpoints, digitIndexPtr); + printf("CL: Digit ID: %d, energy: %f, index: %d, indexpointer: %x\n", digit.fID, digit.fEnergy, *digitIndexPtr, digitIndexPtr); + digitIndexPtr++; + //recPoint = reinterpret_cast(digitIndexPtr); + } + } + + + + + + + +} \ No newline at end of file diff --git a/HLT/CALO/AliHLTCaloClusterizer.h b/HLT/CALO/AliHLTCaloClusterizer.h index d71996dfc50..ebfb0c5e66a 100644 --- a/HLT/CALO/AliHLTCaloClusterizer.h +++ b/HLT/CALO/AliHLTCaloClusterizer.h @@ -99,7 +99,7 @@ public: void SetEmcTimeGate(Float_t gate) { fEmcTimeGate = gate; } /** Starts clusterization of the event */ - virtual Int_t ClusterizeEvent(Int_t nDigits, UInt_t availableSize, UInt_t& totSize); + virtual Int_t ClusterizeEvent(Int_t nDigits); /** * For a given digit this digit scans for neighbouring digits which @@ -117,12 +117,48 @@ public: */ virtual Int_t AreNeighbours(AliHLTCaloDigitDataStruct* d1, AliHLTCaloDigitDataStruct* d2); + /** + * Get pointer to the rec points array + */ + AliHLTCaloRecPointDataStruct** GetRecPoints() const { return fRecPointArray; } + + Int_t CheckDigits(AliHLTCaloRecPointDataStruct **recArray = 0, AliHLTCaloDigitDataStruct **digArray = 0, Int_t nRP = 0); + + Int_t CheckDigits(AliHLTCaloRecPointDataStruct **recArray, AliHLTCaloDigitDataStruct *digArray, Int_t nRP = 0); protected: - /** Pointer to the rec point output */ - AliHLTCaloRecPointDataStruct *fRecPointDataPtr; //! transient + /** + * Check the rec point buffer size and resize the buffer if necessary + */ + virtual Int_t CheckBuffer(); //COMMENT + + /** + * Check the rec point array size and resize the array if necessary + */ + virtual Int_t CheckArray(); //COMMENT + + /** Array of pointers to the rec point output */ + AliHLTCaloRecPointDataStruct **fRecPointArray; //COMMENT + /** Pointer to the rec point output */ + AliHLTCaloRecPointDataStruct *fRecPointDataPtr; //COMMENT + + /** The first rec point in the list */ + AliHLTCaloRecPointDataStruct *fFirstRecPointPtr; //COMMENT + + /** Size of the rec point array */ + Int_t fArraySize; + + /** Available size for the rec point output */ + Int_t fAvailableSize; + + /** The used size for the rec point output */ + Int_t fUsedSize; + + /** Number of rec points created so far */ + Int_t fNRecPoints; + /** Pointer to the digit index array in the rec point */ Int_t* fDigitIndexPtr; //! transient @@ -151,18 +187,15 @@ protected: Int_t fNDigits; //COMMENT private: - - /** Size of the available write buffer */ - UInt_t fAvailableSize; //COMMENT /** Default constructor, prohibited */ - AliHLTCaloClusterizer(); // COMMENT + //AliHLTCaloClusterizer(); // COMMENT /** Copy constructor, prohibited */ - AliHLTCaloClusterizer (const AliHLTCaloClusterizer &); //COMMENT + //AliHLTCaloClusterizer (const AliHLTCaloClusterizer &); //COMMENT /** Assignment operator, prohibited */ - AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer &); //COMMENT + //AliHLTCaloClusterizer & operator = (const AliHLTCaloClusterizer &); //COMMENT ClassDef(AliHLTCaloClusterizer, 0); diff --git a/HLT/CALO/AliHLTCaloClusterizerComponent.cxx b/HLT/CALO/AliHLTCaloClusterizerComponent.cxx index 2b68cc26e37..6285be958fb 100644 --- a/HLT/CALO/AliHLTCaloClusterizerComponent.cxx +++ b/HLT/CALO/AliHLTCaloClusterizerComponent.cxx @@ -14,15 +14,15 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -#include - #include "AliHLTCaloClusterizerComponent.h" #include "AliHLTCaloClusterizer.h" +#include "AliHLTCaloClusterAnalyser.h" #include "AliHLTCaloRecPointDataStruct.h" #include "AliHLTCaloRecPointHeaderStruct.h" #include "AliHLTCaloDigitDataStruct.h" #include "AliHLTCaloDigitContainerDataStruct.h" #include "AliHLTCaloDefinitions.h" +#include "AliHLTCaloClusterDataStruct.h" #include "TString.h" /** @file AliHLTCaloClusterizerComponent.cxx @@ -37,14 +37,13 @@ // or // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt - AliHLTCaloClusterizerComponent::AliHLTCaloClusterizerComponent(TString det): AliHLTCaloProcessor(), AliHLTCaloConstantsHandler(det), fDigitsPointerArray(0), fClusterizerPtr(0), + fAnalyserPtr(0), fDigitCount(0) - { //See headerfile for documentation @@ -53,7 +52,9 @@ AliHLTCaloClusterizerComponent::AliHLTCaloClusterizerComponent(TString det): fClusterizerPtr = new AliHLTCaloClusterizer(det); fClusterizerPtr->SetDigitArray(fDigitsPointerArray); - + + fAnalyserPtr = new AliHLTCaloClusterAnalyser(); + } AliHLTCaloClusterizerComponent::~AliHLTCaloClusterizerComponent() @@ -121,7 +122,7 @@ AliHLTCaloClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData, Int_t nDigits = 0; Int_t digCount = 0; - //UInt_t availableSize = size; + UInt_t availableSize = size; AliHLTUInt8_t* outBPtr; outBPtr = outputPtr; const AliHLTComponentBlockData* iter = 0; @@ -130,74 +131,89 @@ AliHLTCaloClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData, UInt_t specification = 0; AliHLTCaloDigitDataStruct *digitDataPtr = 0; - + +// delete fAnalyserPtr; +// fAnalyserPtr = new AliHLTCaloClusterAnalyser(); +// // Adding together all the digits, should be put in standalone method for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ ) { iter = blocks+ndx; // HLTError("Got block"); - if (iter->fDataType == (AliHLTCaloDefinitions::fgkDigitDataType|kAliHLTDataOriginPHOS)) + if (iter->fDataType == (AliHLTCaloDefinitions::fgkDigitDataType|fDataOrigin)) { - // Get the digit header +// fDigitsPointerArray[digCount] = reinterpret_cast(iter->fPtr); + + //cout << "Digits pointer array [" << digCount << "]: " << fDigitsPointerArray[digCount] << endl; // Update the number of digits nDigits = iter->fSize/sizeof(AliHLTCaloDigitDataStruct);; +// digCount += nDigits; // HLTError("Got %d digits", nDigits); - + + availableSize -= iter->fSize; + specification = specification|iter->fSpecification; - digitDataPtr = reinterpret_cast(iter->fPtr); - for (Int_t i = 0; i < nDigits; i++) - { - fDigitsPointerArray[digCount] = digitDataPtr; - digCount++; - digitDataPtr++; - } - + digitDataPtr = reinterpret_cast(iter->fPtr); + for (Int_t i = 0; i < nDigits; i++) + { + fDigitsPointerArray[digCount] = digitDataPtr; + digCount++; + digitDataPtr++; + } } } if(digCount > 0) { - + + AliHLTCaloClusterHeaderStruct* caloClusterHeaderPtr = reinterpret_cast(outBPtr); + caloClusterHeaderPtr->fNDigits = digCount; + // Sort the digit pointers qsort(fDigitsPointerArray, digCount, sizeof(AliHLTCaloDigitDataStruct*), CompareDigits); // Copy the digits to the output + fOutputDigitsArray = reinterpret_cast(outBPtr); for(Int_t n = 0; n < digCount; n++) { memcpy(outBPtr, fDigitsPointerArray[n], sizeof(AliHLTCaloDigitDataStruct)); + //fOutputDigitsArray[n] = reinterpret_cast(outBPtr); outBPtr = outBPtr + sizeof(AliHLTCaloDigitDataStruct); + printf("CL: digit energy: %f, ID: %d\n", fOutputDigitsArray[n].fEnergy, fOutputDigitsArray[n].fID); } - mysize += digCount*sizeof(AliHLTCaloDigitDataStruct); - - AliHLTComponentBlockData bdDigits; - FillBlockData( bdDigits ); - bdDigits.fOffset = offset; - bdDigits.fSize = mysize; - bdDigits.fDataType = iter->fDataType; - bdDigits.fSpecification = specification; - outputBlocks.push_back( bdDigits ); - + mysize += digCount*sizeof(AliHLTCaloDigitDataStruct); - AliHLTCaloRecPointHeaderStruct* recPointHeaderPtr = reinterpret_cast(outBPtr); +// AliHLTComponentBlockData bdDigits; +// FillBlockData( bdDigits ); +// bdDigits.fOffset = offset; +// bdDigits.fSize = mysize; +// bdDigits.fDataType = iter->fDataType; +// bdDigits.fSpecification = specification; +// outputBlocks.push_back( bdDigits ); - fClusterizerPtr->SetRecPointDataPtr(reinterpret_cast(outBPtr+sizeof(AliHLTCaloRecPointHeaderStruct))); - - // HLTError("Total number of digits: %d", digCount ); + //HLTDebug("Total number of digits: %d", digCount ); - printf("Total number of digits: %d\n", digCount); + nRecPoints = fClusterizerPtr->ClusterizeEvent(digCount); + //fClusterizerPtr->CheckDigits(); + //HLTDebug("Number of rec points found: %d", nRecPoints); - nRecPoints = fClusterizerPtr->ClusterizeEvent(digCount, size, mysize); + fAnalyserPtr->SetCaloClusterData(reinterpret_cast(outBPtr + sizeof(AliHLTCaloClusterHeaderStruct))); + + //fClusterizerPtr->CheckDigits(fClusterizerPtr->GetRecPoints(), fOutputDigitsArray, nRecPoints); - if(nRecPoints == -1) - { - // HLTError("Running out of buffer, exiting for safety."); - return -ENOBUFS; - } + fAnalyserPtr->SetRecPointArray(fClusterizerPtr->GetRecPoints(), nRecPoints); - recPointHeaderPtr->fNRecPoints = nRecPoints; + //fClusterizerPtr->CheckDigits(fClusterizerPtr->GetRecPoints(), fOutputDigitsArray, nRecPoints); + + fAnalyserPtr->SetDigitDataArray(fOutputDigitsArray); + + fClusterizerPtr->CheckDigits(fClusterizerPtr->GetRecPoints(), fOutputDigitsArray, nRecPoints); + + fAnalyserPtr->CreateClusters(nRecPoints, size, mysize); + mysize += sizeof(AliHLTCaloRecPointHeaderStruct); // HLTError("Number of clusters: %d", nRecPoints); @@ -206,7 +222,7 @@ AliHLTCaloClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData, FillBlockData( bd ); bd.fOffset = offset; bd.fSize = mysize; - bd.fDataType = AliHLTCaloDefinitions::fgkClusterDataType; + bd.fDataType = AliHLTCaloDefinitions::fgkClusterDataType|fDataOrigin; bd.fSpecification = specification; outputBlocks.push_back( bd ); } @@ -282,4 +298,6 @@ AliHLTCaloClusterizerComponent::CompareDigits(const void *dig0, const void *dig1 { // See header file for documentation return (*((AliHLTCaloDigitDataStruct**)(dig0)))->fID - (*((AliHLTCaloDigitDataStruct**)(dig1)))->fID; + + //return (*((AliHLTCaloDigitDataStruct**)(dig0)))->fID - (*((AliHLTCaloDigitDataStruct**)(dig1)))->fID; } diff --git a/HLT/CALO/AliHLTCaloClusterizerComponent.h b/HLT/CALO/AliHLTCaloClusterizerComponent.h index af58ebd6be3..aa370a54a44 100644 --- a/HLT/CALO/AliHLTCaloClusterizerComponent.h +++ b/HLT/CALO/AliHLTCaloClusterizerComponent.h @@ -44,6 +44,7 @@ class AliHLTCaloDigitDataStruct; class AliHLTCaloDigitContainerDataStruct; class AliHLTCaloClusterizer; +class AliHLTCaloClusterAnalyser; class AliHLTCaloRecPointDataStruct; /** @@ -116,24 +117,6 @@ class AliHLTCaloClusterizerComponent : public AliHLTCaloProcessor, public AliHLT /** Destructor */ virtual ~AliHLTCaloClusterizerComponent(); -// /** Copy constructor */ -// AliHLTCaloClusterizerComponent ( const AliHLTCaloClusterizerComponent & ) : -// AliHLTPHOSProcessor(), -// fAllDigitsPtr ( 0 ), -// fClusterizerPtr ( 0 ), -// // fRecPointStructArrayPtr(0), -// fDigitCount ( 0 ) -// { -// //Copy constructor not implemented -// } - -// /** Assignment */ -// AliHLTCaloClusterizerComponent & operator = ( const AliHLTCaloClusterizerComponent ) -// { -// //Assignment -// return *this; -// } - // /** interface function, see @ref AliHLTComponent for description */ // void GetInputDataTypes ( std::vector& list ); @@ -170,18 +153,27 @@ class AliHLTCaloClusterizerComponent : public AliHLTCaloProcessor, public AliHLT /** interface function, see @ref AliHLTComponent for description */ int ScanConfigurationArgument ( int argc, const char** argv ); + + /** The data origin */ + char* fDataOrigin; //COMMENT + /** Pointer to the cluster analyser */ + AliHLTCaloClusterAnalyser *fAnalyserPtr; //! transient + private: /** Array of pointers to our digits */ AliHLTCaloDigitDataStruct **fDigitsPointerArray; //! transient - + + /** Array of pointers to our digits */ + AliHLTCaloDigitDataStruct *fOutputDigitsArray; //! transient + /** Pointer to the clusterizer it self */ AliHLTCaloClusterizer* fClusterizerPtr; //! transient /** Number of digits in event */ Int_t fDigitCount; //COMMENT - + /** Default constructor, not implemented */ AliHLTCaloClusterizerComponent(); //COMMENT diff --git a/HLT/CALO/AliHLTCaloDigitMaker.cxx b/HLT/CALO/AliHLTCaloDigitMaker.cxx index 46f5416b714..6c6ae15d6cd 100644 --- a/HLT/CALO/AliHLTCaloDigitMaker.cxx +++ b/HLT/CALO/AliHLTCaloDigitMaker.cxx @@ -235,12 +235,14 @@ void AliHLTCaloDigitMaker::AddDigit(AliHLTCaloChannelDataStruct* channelData, Al fChannelBook[coord.fX][coord.fZ] = fDigitStructPtr; - fDigitStructPtr->fID = fDigitStructPtr->fZ * fCaloConstants->GetNXCOLUMNSMOD() + fDigitStructPtr->fX; - + fDigitStructPtr->fX = coord.fX; fDigitStructPtr->fZ = coord.fZ; fDigitStructPtr->fGain = coord.fGain; fDigitStructPtr->fOverflow = false; + + fDigitStructPtr->fID = fDigitStructPtr->fZ * fCaloConstants->GetNXCOLUMNSMOD() + fDigitStructPtr->fX; + if(coord.fGain == fCaloConstants->GetHIGHGAIN() ) { fDigitStructPtr->fEnergy = channelData->fEnergy*fHighGainFactors[coord.fX][coord.fZ]; @@ -270,7 +272,7 @@ void AliHLTCaloDigitMaker::AddDigit(AliHLTCaloChannelDataStruct* channelData, Al bool AliHLTCaloDigitMaker::UseDigit(AliHLTCaloCoordinate &channelCoordinates, AliHLTCaloChannelDataStruct *channel) { AliHLTCaloDigitDataStruct *tmpDigit = fChannelBook[channelCoordinates.fX][channelCoordinates.fZ]; - // printf("UseDigit: Got digit, x: %d, z: %d, gain: %d, amp: %f\n", channelCoordinates.fX, channelCoordinates.fZ, channelCoordinates.fGain, channel->fEnergy); + //printf("UseDigit: Got digit, x: %d, z: %d, gain: %d, amp: %f\n", channelCoordinates.fX, channelCoordinates.fZ, channelCoordinates.fGain, channel->fEnergy); if(tmpDigit) { if(channelCoordinates.fGain == fCaloConstants->GetLOWGAIN()) diff --git a/HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx b/HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx index c4c6afb600e..2b05b63240e 100644 --- a/HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx @@ -19,6 +19,8 @@ #include "AliHLTPHOSClusterizerComponent.h" #include "AliHLTCaloRecPointDataStruct.h" #include "AliHLTCaloRecPointHeaderStruct.h" +#include "AliHLTPHOSGeometry.h" +#include "AliHLTCaloClusterAnalyser.h" @@ -34,7 +36,8 @@ // refer to README to build package // or // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt -#include +#include "AliHLTCaloDefinitions.h" +#include "AliHLTPHOSGeometry.h" AliHLTPHOSClusterizerComponent gAliHLTPHOSClusterizerComponent; @@ -42,6 +45,13 @@ AliHLTPHOSClusterizerComponent::AliHLTPHOSClusterizerComponent(): AliHLTCaloClusterizerComponent("PHOS") { //See headerfile for documentation + + fDataOrigin = const_cast(kAliHLTDataOriginPHOS); + + AliHLTPHOSGeometry *geom = new AliHLTPHOSGeometry; + + fAnalyserPtr->SetGeometry(new AliHLTPHOSGeometry); + } AliHLTPHOSClusterizerComponent::~AliHLTPHOSClusterizerComponent() @@ -88,5 +98,3 @@ AliHLTPHOSClusterizerComponent::Spawn() return new AliHLTPHOSClusterizerComponent(); } - - diff --git a/HLT/PHOS/AliHLTPHOSClusterizerComponent.h b/HLT/PHOS/AliHLTPHOSClusterizerComponent.h index 2d2f591e250..73528f007fc 100644 --- a/HLT/PHOS/AliHLTPHOSClusterizerComponent.h +++ b/HLT/PHOS/AliHLTPHOSClusterizerComponent.h @@ -135,7 +135,9 @@ class AliHLTPHOSClusterizerComponent : public AliHLTCaloClusterizerComponent AliHLTComponent* Spawn(); protected: + virtual int DoInit() {return 0; } virtual int DoDeinit(){ return 0;} + virtual int Deinit() {return 0; } private: diff --git a/HLT/PHOS/macros/rec-hlt-calo-phos.C b/HLT/PHOS/macros/rec-hlt-calo-phos.C index 694a3fd5369..f65dd2b9d51 100644 --- a/HLT/PHOS/macros/rec-hlt-calo-phos.C +++ b/HLT/PHOS/macros/rec-hlt-calo-phos.C @@ -30,8 +30,8 @@ void rec_hlt_phos()//, char* opt="decoder ESD") // int moduleStart = 2; int moduleEnd = 2; - int rcuStart = 0; - int rcuEnd = 3; + int rcuStart = 2; + int rcuEnd = 2; // TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=ESD-FILE"; //TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=PHS-CA_02"; TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTCalo.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=PHS-CL_02"; diff --git a/HLT/libAliHLTCalo.pkg b/HLT/libAliHLTCalo.pkg index 9e31ee1e176..9945b97ef0b 100644 --- a/HLT/libAliHLTCalo.pkg +++ b/HLT/libAliHLTCalo.pkg @@ -21,7 +21,9 @@ AliHLTCaloClusterizerComponent.h \ AliHLTCaloDigitMaker.h \ AliHLTCaloClusterAnalyser.h \ AliHLTCaloRcuProcessor.h \ -AliHLTCaloProcessor.h +AliHLTCaloConstants.h \ +AliHLTCaloProcessor.h \ +AliHLTCaloGeometry.h ## all source files of this module ## all source files corresponding to the class headers diff --git a/HLT/libAliHLTPHOS.pkg b/HLT/libAliHLTPHOS.pkg index 54c6e3b1bda..b8cfc2f3f1c 100644 --- a/HLT/libAliHLTPHOS.pkg +++ b/HLT/libAliHLTPHOS.pkg @@ -32,7 +32,9 @@ CLASS_HDRS:= AliHLTPHOSClusterizerComponent.h \ AliHLTPHOSMonitorTriggerComponent.h \ AliHLTPHOSESDEntriesMakerComponent.h \ AliHLTPHOSESDCaloClusterWriterComponent.h \ - AliHLTPHOSDigitReader.h + AliHLTPHOSDigitReader.h \ + AliHLTPHOSConstants.h \ + AliHLTPHOSGeometry.h MODULE_SRCS:= $(CLASS_HDRS:.h=.cxx)