#include "AliHLTCaloClusterizer.h"\r
#include "AliHLTLogging.h"\r
#include "TMath.h"\r
-#include "AliHLTCaloRecPointContainerStruct.h"\r
#include "AliHLTCaloRecPointDataStruct.h"\r
#include "AliHLTCaloDigitDataStruct.h"\r
#include "AliHLTCaloDigitContainerDataStruct.h"\r
-#include "TClonesArray.h"\r
#include "AliHLTCaloConstantsHandler.h"\r
-//#ifndef HAVENOT__PHOSRECOPARAMEMC // set from configure if EMC functionality not available in AliPHOSRecoParam\r
-//#include "AliPHOSRecoParam.h"\r
-//#else\r
-//#include "AliPHOSRecoParamEmc.h"\r
-//ff#endif\r
-#include <iostream>\r
-using namespace std;\r
-\r
-\r
\r
ClassImp(AliHLTCaloClusterizer);\r
\r
fRecPointDataPtr = recPointDataPtr;\r
}\r
\r
-// void\r
-// AliHLTCaloClusterizer::SetRecoParameters(AliPHOSRecoParam* params)\r
-// {\r
-// //see header file for documentation\r
-// #ifndef HAVE_NOT_PHOSRECOPARAMEMC // set from configure if EMC functionality not available in AliPHOSRecoParam\r
-// // the new AliPHOSRecoParam functions, available from revision\r
-// // fEmcClusteringThreshold = params->GetEMCClusteringThreshold();\r
-// // fEmcMinEnergyThreshold = params->GetEMCMinE();\r
-// // fLogWeight = params->GetEMCLogWeight();\r
-// params++;\r
-// params--;\r
-// #else\r
-// fEmcClusteringThreshold = params->GetClusteringThreshold();\r
-// fEmcMinEnergyThreshold = params->GetMinE();\r
-// fLogWeight = params->GetLogWeight();\r
-// #endif\r
-// } \r
-\r
Int_t \r
AliHLTCaloClusterizer::ClusterizeEvent(UInt_t availableSize, UInt_t& totSize)\r
{\r
#include "AliHLTCaloChannelDataStruct.h"\r
#include "AliHLTCaloChannelDataHeaderStruct.h"\r
#include "AliHLTCaloDigitDataStruct.h"\r
+#include "AliHLTCaloCoordinate.h"\r
#include "AliHLTCaloSharedMemoryInterfacev2.h" // added by PTH\r
//#include "AliPHOSEMCAGeometry.h"\r
#include "TH2F.h"\r
fHighGainFactors(0),\r
fLowGainFactors(0),\r
fBadChannelMask(0),\r
- fChannelBook(0)\r
+ fChannelBook(0),\r
+ fMaxEnergy(900)\r
{\r
// See header file for documentation\r
\r
\r
}\r
} \r
- \r
- //Must be set in child instance\r
- //fMapperPtr = new AliHLTCaloMapper(det);\r
-\r
}\r
\r
AliHLTCaloDigitMaker::~AliHLTCaloDigitMaker() \r
// Int_t xMod = -1;\r
// Int_t zMod = -1;\r
\r
- UShort_t coord1[4];\r
- // UShort_t coord2[4];\r
- Float_t locCoord[3];\r
+\r
+ AliHLTCaloCoordinate coord;\r
\r
\r
AliHLTCaloChannelDataStruct* currentchannel = 0;\r
{\r
if(availableSize < totSize) return -1;\r
\r
- fMapperPtr->GetChannelCoord(currentchannel->fChannelID, coord1);\r
+ fMapperPtr->ChannelId2Coordinate(currentchannel->fChannelID, coord);\r
\r
- tmpchannel = currentchannel;\r
- \r
- fMapperPtr->GetLocalCoord(currentchannel->fChannelID, locCoord);\r
- if(UseDigit(coord1, currentchannel))\r
+ // fMapperPtr->GetLocalCoord(currentchannel->fChannelID, locCoord);\r
+ if(UseDigit(coord, currentchannel))\r
{\r
- AddDigit(currentchannel, coord1, locCoord);\r
+ AddDigit(currentchannel, coord);\r
j++; \r
totSize += sizeof(AliHLTCaloDigitDataStruct);\r
}\r
- \r
currentchannel = fShmPtr->NextChannel(); // Get the next channel\r
-\r
- fMapperPtr->GetLocalCoord(currentchannel->fChannelID, locCoord);\r
- if(UseDigit(coord1, currentchannel))\r
- {\r
- AddDigit(currentchannel, coord1, locCoord);\r
- j++; \r
- totSize += sizeof(AliHLTCaloDigitDataStruct);\r
- }\r
- currentchannel = fShmPtr->NextChannel(); // Get the next channel\r
}\r
+// if(currentchannel)\r
+// {\r
+// fMapperPtr->GetLocalCoord(currentchannel->fChannelID, locCoord);\r
+// if(UseDigit(coord1, currentchannel))\r
+// {\r
+// AddDigit(currentchannel, coord1, locCoord);\r
+// j++; \r
+// totSize += sizeof(AliHLTCaloDigitDataStruct);\r
+// }\r
+// currentchannel = fShmPtr->NextChannel(); // Get the next channel\r
+// }\r
+// }\r
\r
fDigitCount += j;\r
return fDigitCount; \r
}\r
\r
\r
-void AliHLTCaloDigitMaker::AddDigit(AliHLTCaloChannelDataStruct* channelData, UShort_t* channelCoordinates, Float_t* localCoordinates)\r
+void AliHLTCaloDigitMaker::AddDigit(AliHLTCaloChannelDataStruct* channelData, AliHLTCaloCoordinate &coord)\r
{\r
\r
- fChannelBook[channelCoordinates[0]][channelCoordinates[0]] = fDigitStructPtr;\r
+ fChannelBook[coord.fX][coord.fZ] = fDigitStructPtr;\r
\r
- fDigitStructPtr->fX = channelCoordinates[0];\r
- fDigitStructPtr->fZ = channelCoordinates[1];\r
-\r
- fDigitStructPtr->fLocX = localCoordinates[0];\r
- fDigitStructPtr->fLocZ = localCoordinates[1];\r
-\r
- if(channelCoordinates[2] == fCaloConstants->GetHIGHGAIN() )\r
+ fDigitStructPtr->fX = coord.fX;\r
+ fDigitStructPtr->fZ = coord.fZ;\r
+ fDigitStructPtr->fOverflow = false;\r
+ if(coord.fGain == fCaloConstants->GetHIGHGAIN() )\r
{\r
- fDigitStructPtr->fEnergy = channelData->fEnergy*fHighGainFactors[channelCoordinates[0]][channelCoordinates[1]];\r
- if(channelData->fEnergy >= 1023)\r
+ fDigitStructPtr->fEnergy = channelData->fEnergy*fHighGainFactors[coord.fX][coord.fZ];\r
+ if(channelData->fEnergy >= fMaxEnergy)\r
{\r
fDigitStructPtr->fOverflow = true;\r
}\r
- // printf("HG channel (x = %d, z = %d) with amplitude: %f --> Digit with energy: %f \n", channelCoordinates[0], channelCoordinates[1], channelData->fEnergy, fDigitStructPtr->fEnergy);\r
+ // printf("HG channel (x = %d, z = %d) with amplitude: %f --> Digit with energy: %f \n", coord.fX, coord.fZ, channelData->fEnergy, fDigitStructPtr->fEnergy);\r
}\r
else\r
{\r
- fDigitStructPtr->fEnergy = channelData->fEnergy*fLowGainFactors[channelCoordinates[0]][channelCoordinates[1]];\r
+ fDigitStructPtr->fEnergy = channelData->fEnergy*fLowGainFactors[coord.fX][coord.fZ];\r
if(channelData->fEnergy >= 1023)\r
{\r
fDigitStructPtr->fOverflow = true;\r
}\r
- // printf("LG channel (x = %d, z = %d) with amplitude: %f --> Digit with energy: %f\n", channelCoordinates[0], channelCoordinates[1], channelData->fEnergy, fDigitStructPtr->fEnergy); \r
+ // printf("LG channel (x = %d, z = %d) with amplitude: %f --> Digit with energy: %f\n", coord.fX, coord.fZ, channelData->fEnergy, fDigitStructPtr->fEnergy); \r
}\r
fDigitStructPtr->fTime = channelData->fTime * 0.0000001; //TODO\r
fDigitStructPtr->fCrazyness = channelData->fCrazyness;\r
- fDigitStructPtr->fModule = channelCoordinates[3];\r
+ fDigitStructPtr->fModule = coord.fModuleId;\r
fDigitStructPtr++;\r
}\r
\r
-bool AliHLTCaloDigitMaker::UseDigit(UShort_t *channelCoordinates, AliHLTCaloChannelDataStruct *channel) \r
+bool AliHLTCaloDigitMaker::UseDigit(AliHLTCaloCoordinate &channelCoordinates, AliHLTCaloChannelDataStruct *channel) \r
{\r
- AliHLTCaloDigitDataStruct *tmpDigit = fChannelBook[channelCoordinates[0]][channelCoordinates[1]];\r
+ AliHLTCaloDigitDataStruct *tmpDigit = fChannelBook[channelCoordinates.fX][channelCoordinates.fZ];\r
+ // printf("UseDigit: Got digit, x: %d, z: %d, gain: %d, amp: %f\n", channelCoordinates.fX, channelCoordinates.fZ, channelCoordinates.fGain, channel->fEnergy);\r
if(tmpDigit)\r
{\r
- if(channelCoordinates[2] == fCaloConstants->GetLOWGAIN())\r
+ if(channelCoordinates.fGain == fCaloConstants->GetLOWGAIN())\r
{\r
+ // printf("UseDigit: Already have digit with, x: %d, z: %d, with high gain \n", channelCoordinates.fX, channelCoordinates.fZ);\r
if(tmpDigit->fOverflow)\r
{\r
+ // printf("But it was in overflow! Let's use this low gain!");\r
return true;\r
}\r
return false;\r
}\r
else\r
{\r
- if(channel->fEnergy >= fCaloConstants->GetMAXBINVALUE() )\r
+ // printf("UseDigit: Already have digit with, x: %d, z: %d, with low gain: %d\n", channelCoordinates.fX, channelCoordinates.fZ);\r
+ if(channel->fEnergy > fMaxEnergy )\r
{\r
return false;\r
}\r
class AliHLTCaloSharedMemoryInterfacev2; // added by PTH\r
class AliHLTCaloChannelDataHeaderStruct;\r
class AliHLTCaloMapper;\r
+class AliHLTCaloCoordinate;\r
class TString;\r
\r
//using namespace CaloHLTConst;\r
/** Reset the channel book */\r
void Reset();\r
\r
+ /** Set the mapper */\r
+ void SetMapper(AliHLTCaloMapper *mapper) { fMapperPtr = mapper; }\r
+\r
private:\r
\r
AliHLTCaloDigitMaker();\r
* @param channelData is the channel data\r
* @param coordinates is the coordinates of the channel, including gain and module\r
*/\r
- void AddDigit(AliHLTCaloChannelDataStruct* channelData, UShort_t* channelCoordinates, Float_t* localCoordinates);\r
+ void AddDigit(AliHLTCaloChannelDataStruct* channelData, AliHLTCaloCoordinate &coord);\r
\r
/**\r
* Check if we already have this crystal. If so, keep the high gain as long as it \r
* @param channel is a pointer to a struct containing channel information\r
* @return true if we should use the digit. \r
*/\r
- bool UseDigit(UShort_t *channelCoordinates, AliHLTCaloChannelDataStruct *channel);\r
+ bool UseDigit(AliHLTCaloCoordinate &coord, AliHLTCaloChannelDataStruct *channel);\r
\r
/** Pointer to shared memory interface */\r
AliHLTCaloSharedMemoryInterfacev2* fShmPtr; //! transient\r
/** Channel book keeping variable */\r
AliHLTCaloDigitDataStruct ***fChannelBook; //! transient\r
\r
+ /** Maximum energy we allow in a channel */\r
+ Float_t fMaxEnergy; //COMMENT\r
+\r
/** Assignment operator and copy constructor not implemented */\r
AliHLTCaloDigitMaker(const AliHLTCaloDigitMaker &);\r
AliHLTCaloDigitMaker & operator = (const AliHLTCaloDigitMaker &);\r
Short_t index = GetDDLFromSpec(spec);
if( index < 0 )
{
- // HLTError("Specification 0x%X not consistent with single DDL in PHOS", spec);
+ HLTError("Specification 0x%X not consistent with single DDL in PHOS", spec);
return index;
}
else
channelCoord[1] = (channelId >> 6)&0x3f;
channelCoord[2] = (channelId >> 12)&0x1;
channelCoord[3] = (channelId >> 13)&0x1f;
- // printf("Channel ID: 0x%X Coordinates: x = %d, z = %d, gain = %d\n", channelId, channelCoord[0], channelCoord[1], channelCoord[2]);
+ printf("Channel ID: 0x%X Coordinates: x = %d, z = %d, gain = %d\n", channelId, channelCoord[0], channelCoord[1], channelCoord[2]);
}
void
{
// HLTError("Specification %d, not consistent with any DDL in PHOS or EMCAL", spec );
}
+
return tmpIndex;
}
bool GetIsInitializedMapping();
virtual char* GetFilePath();
- int GetChannelID(const AliHLTUInt32_t spec, const Int_t hadd);
+ virtual int GetChannelID(const AliHLTUInt32_t spec, const Int_t hadd);
static void GetChannelCoord(const UShort_t channelId, UShort_t* channelCoord);
static void ChannelId2Coordinate(const int channelId, AliHLTCaloCoordinate &channelCoord);
virtual void GetLocalCoord(const int channelId, Float_t* localCoord) const;
char fXCol; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve to one Module
char fGain; // Gain (high gain = 1, low gain = 0)
};
-
struct fDDLSpecificationMap{
- char fModId;
+ UInt_t fRcuX; // Coordinate in Z direction (beam direction) relatve too one RCU
+ UInt_t fRcuZ; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
+ UInt_t fRcuXOffset;
+ UInt_t fRcuZOffset;
+ int fModId;
};
+// struct fDDLSpecificationMap{
+// char fModId;
+// };
+
fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address
#include "AliHLTCaloRcuProcessor.h"
#include "AliHLTCaloCrazynessDefinitions.h"
#include "AliHLTCaloChannelRawDataStruct.h"
+#include "AliHLTCaloCoordinate.h"
//#include "AliCALOBunchInfo.h"
Int_t
AliHLTCaloRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, AliHLTUInt8_t* outputPtr, const AliHLTUInt32_t size, UInt_t& totSize)
{
-
+
int tmpsize= 0;
Int_t crazyness = 0;
Int_t nSamples = 0;
totSize += sizeof( AliHLTCaloChannelDataHeaderStruct );
fRawReaderMemoryPtr->SetMemory( reinterpret_cast<UChar_t*>( iter->fPtr ), static_cast<ULong_t>( iter->fSize ) );
- fRawReaderMemoryPtr->SetEquipmentID( fMapperPtr->GetDDLFromSpec( iter->fSpecification) + 4608 );
+ fRawReaderMemoryPtr->SetEquipmentID( fMapperPtr->GetDDLFromSpec( iter->fSpecification) + 1792 );
fRawReaderMemoryPtr->Reset();
fRawReaderMemoryPtr->NextEvent();
if(fAltroRawStreamPtr->NextDDL())
{
int cnt = 0;
- fOffset = ( fAltroRawStreamPtr->GetAltroCFG1() >> 10 ) & 0xf;
-
+ // fOffset = ( fAltroRawStreamPtr->GetAltroCFG1() >> 10 ) & 0xf;
+ fOffset = 0;
while( fAltroRawStreamPtr->NextChannel() )
{
// cout << __FILE__ << ":" << __LINE__ << ":" <<__FUNCTION__ << "T3" << endl;
++ cnt;
UShort_t* firstBunchPtr = 0;
int chId = fMapperPtr->GetChannelID(iter->fSpecification, fAltroRawStreamPtr->GetHWAddress());
+ // HLTError("Channel HW address: %d", fAltroRawStreamPtr->GetHWAddress());
if( fDoPushRawData == true)
{
fRawDataWriter->SetChannelId( chId );
//return 1;
- totSize += sizeof( AliHLTCaloChannelDataStruct );
+ totSize += sizeof( AliHLTCaloChannelDataStruct );
if(totSize > size)
{
//HLTError("Buffer overflow: Trying to write data of size: %d bytes. Output buffer available: %d bytes.", totSize, size);
channelDataPtr->fChannelID = chId;
channelDataPtr->fEnergy = static_cast<Float_t>(fAnalyzerPtr->GetEnergy()) - fOffset;
-
+ AliHLTCaloCoordinate c;
+ fMapperPtr->ChannelId2Coordinate(chId, c);
+ // HLTError("Got channel, x: %d, z: %d, gain: %d, energy: %f", c.fX, c.fZ, c.fGain, channelDataPtr->fEnergy);
channelDataPtr->fTime = static_cast<Float_t>(fAnalyzerPtr->GetTiming());
channelDataPtr->fCrazyness = static_cast<Short_t>(crazyness);
channelCount++;
// channelDataHeaderPtr->fHasRawData = false;
channelDataHeaderPtr->fHasRawData = fDoPushRawData;
- HLTDebug("Number of channels: %d", channelCount);
+ HLTError("Number of channels: %d", channelCount);
tmpsize += sizeof(AliHLTCaloChannelDataStruct)*channelCount + sizeof(AliHLTCaloChannelDataHeaderStruct);
return tmpsize;
fkMAXHOSTS(20),
fkDEFAULTEVENTPORT(42001),
fkMAXBINVALUE(1023),
- fkHIGHGAIN(0),
- fkLOWGAIN(1),
+ fkHIGHGAIN(1),
+ fkLOWGAIN(0),
fkALTROMAXSAMPLES(1008),
fkALTROMAXPRESAMPLES(15),
fkNZROWSRCU(56),
**************************************************************************/
#include "AliHLTPHOSDigitMakerComponent.h"
-#include "AliHLTPHOSDigitMaker.h"
-#include "AliHLTPHOSDigitDataStruct.h"
+#include "AliHLTCaloDigitMaker.h"
+#include "AliHLTCaloDigitDataStruct.h"
+#include "AliHLTPHOSMapper.h"
#include "AliHLTPHOSChannelDataHeaderStruct.h"
#include "AliHLTPHOSChannelDataStruct.h"
#include "TFile.h"
/**
- * @file AliHLTPHOSDigitMakerComponent.cxx
+ * @file AliHLTCaloDigitMakerComponent.cxx
* @author Oystein Djuvsland
* @date
* @brief A digit maker component for PHOS HLT
{
//see header file for documentation
constBase = 0;
- inputMultiplier = (float)sizeof(AliHLTPHOSDigitDataStruct)/sizeof(AliHLTPHOSChannelDataStruct) + 1;
+ inputMultiplier = (float)sizeof(AliHLTCaloDigitDataStruct)/sizeof(AliHLTPHOSChannelDataStruct) + 1;
}
int
unsigned long ndx;
UInt_t specification = 0;
- AliHLTPHOSChannelDataHeaderStruct* tmpChannelData = 0;
+ AliHLTCaloChannelDataHeaderStruct* tmpChannelData = 0;
- fDigitMakerPtr->SetDigitHeaderPtr(reinterpret_cast<AliHLTPHOSDigitHeaderStruct*>(outputPtr));
+ // fDigitMakerPtr->SetDigitHeaderPtr(reinterpret_cast<AliHLTCaloDigitHeaderStruct*>(outputPtr));
+
+ fDigitMakerPtr->SetDigitDataPtr(reinterpret_cast<AliHLTCaloDigitDataStruct*>(outputPtr));
for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
{
}
specification |= iter->fSpecification;
- tmpChannelData = reinterpret_cast<AliHLTPHOSChannelDataHeaderStruct*>(iter->fPtr);
+ tmpChannelData = reinterpret_cast<AliHLTCaloChannelDataHeaderStruct*>(iter->fPtr);
- ret = fDigitMakerPtr->MakeDigits(tmpChannelData, size-(digitCount*sizeof(AliHLTPHOSDigitDataStruct)));
+ ret = fDigitMakerPtr->MakeDigits(tmpChannelData, size-(digitCount*sizeof(AliHLTCaloDigitDataStruct)));
if(ret == -1)
{
HLTError("Trying to write over buffer size");
digitCount += ret;
}
- mysize += digitCount*sizeof(AliHLTPHOSDigitDataStruct);
+ mysize += digitCount*sizeof(AliHLTCaloDigitDataStruct);
HLTDebug("# of digits: %d, used memory size: %d, available size: %d", digitCount, mysize, size);
{
//see header file for documentation
- fDigitMakerPtr = new AliHLTPHOSDigitMaker();
+ fDigitMakerPtr = new AliHLTCaloDigitMaker("PHOS");
+
+ AliHLTCaloMapper *mapper = new AliHLTPHOSMapper();
+ fDigitMakerPtr->SetMapper(mapper);
for(int i = 0; i < argc; i++)
{
{
fDigitMakerPtr->SetGlobalHighGainFactor(atof(argv[i+1]));
}
- if(!strcmp("-reverseorder", argv[i]))
- {
- fDigitMakerPtr->SetOrdered(false);
- }
}
//fDigitMakerPtr->SetDigitThreshold(2);
#include "AliHLTPHOSProcessor.h"
-class AliHLTPHOSDigitMaker;
-class AliHLTPHOSDigitContainerDataStruct;
+class AliHLTCaloDigitMaker;
+class AliHLTCaloDigitContainerDataStruct;
/**
* @class AliHLTPHOSDigitMakerComponent
private:
/** Pointer to the digit maker itself */
- AliHLTPHOSDigitMaker *fDigitMakerPtr; //! transient
+ AliHLTCaloDigitMaker *fDigitMakerPtr; //! transient
/** The output of the component, digits in a container */
- AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr; //! transient
+ AliHLTCaloDigitContainerDataStruct *fDigitContainerPtr; //! transient
};
#endif
AliHLTPHOSMapper::InitAltroMapping(const unsigned long specification)
{
// Loads mapping between Altro addresses and geometrical addresses from file
-
+
+ // HLTError("Initialising ALTRO map");
+
fDDLId = GetDDLFromSpec(specification);
Int_t modId = GetModuleFromSpec(specification);
AliHLTPHOSMapper::InitDDLSpecificationMapping()
{
fSpecificationMapPtr = new fDDLSpecificationMap[fCaloConstants->GetNMODULES()*fCaloConstants->GetNRCUSPERMODULE()];
+ // HLTError("NUMBER OF DDLs: %d, map ptr: %d", fCaloConstants->GetNMODULES()*fCaloConstants->GetNRCUSPERMODULE(), fSpecificationMapPtr);
for(Int_t ddl = 0; ddl < fCaloConstants->GetNMODULES()*fCaloConstants->GetNRCUSPERMODULE(); ddl++)
{
}
fSpecificationMapPtr[ddl].fRcuZOffset = fCaloConstants->GetNZROWSRCU()*(fSpecificationMapPtr[ddl].fRcuZ);
- fSpecificationMapPtr[ddl].fRcuXOffset = fCaloConstants->GetNXCOLUMNSMOD()*(fSpecificationMapPtr[ddl].fRcuX);
+ fSpecificationMapPtr[ddl].fRcuXOffset = fCaloConstants->GetNXCOLUMNSRCU()*(fSpecificationMapPtr[ddl].fRcuX);
+
}
}
Int_t
AliHLTPHOSMapper::GetChannelID(Int_t hwAddress)
{
-
+
+ // HLTError("HW add: %d -> x: %d, z: %d, gain: %d", fHw2geomapPtr[hwAddress].fXCol + fSpecificationMapPtr[fDDLId].fRcuXOffset,
+ // fHw2geomapPtr[hwAddress].fZRow + fSpecificationMapPtr[fDDLId].fRcuZOffset,
+ // fHw2geomapPtr[hwAddress].fGain);
return ((fHw2geomapPtr[hwAddress].fXCol + fSpecificationMapPtr[fDDLId].fRcuXOffset) |
+
((fHw2geomapPtr[hwAddress].fZRow + fSpecificationMapPtr[fDDLId].fRcuZOffset) << 6) |
(fHw2geomapPtr[hwAddress].fGain << 12) |
fSpecificationMapPtr[fDDLId].fModId << 13);
else if(specification == 0x80000) index = 19;
else HLTError("Specification 0x%X not consistent with single DDL in PHOS", specification);
+
// HLTError("Channel ID: 0x%X Coordinates: x = %d, z = %d, gain = %d", ((fHw2geomapPtr[hwAddress].fXCol + fSpecificationMapPtr[index].fRcuXOffset) |((fHw2geomapPtr[hwAddress].fZRow + fSpecificationMapPtr[index].fRcuZOffset) << 6) | (fHw2geomapPtr[hwAddress].fGain << 12) | fSpecificationMapPtr[index].fModId << 13),
- // fHw2geomapPtr[hwAddress].fXCol,
- // fHw2geomapPtr[hwAddress].fZRow,
+ // fHw2geomapPtr[hwAddress].fXCol,
+ // fHw2geomapPtr[hwAddress].fZRow,
+ // fHw2geomapPtr[hwAddress].fGain);
+
+ // HLTError("HW add: %d -> x: %d, z: %d, gain: %d", hwAddress, fHw2geomapPtr[hwAddress].fXCol + fSpecificationMapPtr[index].fRcuXOffset,
+ // fHw2geomapPtr[hwAddress].fZRow + fSpecificationMapPtr[index].fRcuZOffset,
// fHw2geomapPtr[hwAddress].fGain);
+ // HLTError("RCU X offset: %d", fSpecificationMapPtr[index].fRcuXOffset);
+ // HLTError("RCU Z offset: %d", fSpecificationMapPtr[index].fRcuZOffset);
return ((fHw2geomapPtr[hwAddress].fXCol + fSpecificationMapPtr[index].fRcuXOffset) |
((fHw2geomapPtr[hwAddress].fZRow + fSpecificationMapPtr[index].fRcuZOffset) << 6) |
(fHw2geomapPtr[hwAddress].fGain << 12) |
Bool_t InitAltroMapping(const unsigned long specification);
void InitDDLSpecificationMapping();
bool GetIsInitializedMapping();
- char* GetFilePath(const int ddlId);
+ // char* GetFilePath(const int ddlId);
Int_t GetChannelID(Int_t hwAddress);
Int_t GetChannelID(AliHLTUInt32_t specification, Int_t hwAddress);
int GetDDLFromSpec(AliHLTUInt32_t specification);
int GetModuleFromSpec(AliHLTUInt32_t specification);
- struct fAltromap{
- int fZRow; // Coordinate in Z direction (beam direction) relatve too one RCU
- int fXCol; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
- int fGain; // Gain (high gain = 1, low gain = 0)
- };
-
- struct fDDLSpecificationMap{
- UInt_t fRcuX; // Coordinate in Z direction (beam direction) relatve too one RCU
- UInt_t fRcuZ; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
- UInt_t fRcuXOffset;
- UInt_t fRcuZOffset;
- int fModId;
- };
+// struct fDDLSpecificationMap{
+// UInt_t fRcuX; // Coordinate in Z direction (beam direction) relatve too one RCU
+// UInt_t fRcuZ; // Coordinate in X direction (perpendicular too beam direction an parallell to ground) relatve too one RCU
+// UInt_t fRcuXOffset;
+// UInt_t fRcuZOffset;
+// int fModId;
+// };
- fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address
+// fAltromap *fHw2geomapPtr; //pointer to structure holding information about geometrical address
char fFilepath[1024];
AliHLTPHOSMapper(const AliHLTPHOSMapper & );
AliHLTPHOSMapper & operator = (const AliHLTPHOSMapper &);
- fDDLSpecificationMap* fSpecificationMapPtr;
+ // fDDLSpecificationMap* fSpecificationMapPtr;
//AliPHOSEMCAGeometry fPHOSGeometry;
static const Float_t fCellStep = 2.2;//2.*fPHOSGeometry.GetAirCellHalfSize()[0];
AliHLTPHOSRawAnalyzerComponentv3::AliHLTPHOSRawAnalyzerComponentv3() :
AliHLTCaloRawAnalyzerComponentv3("PHOS")
- ,fAnalyzerPtr(0)
+ ,fCurrentSpec(-1)
{
// See header file for class documentation
+ InitMapping(0);
}
AliHLTPHOSRawAnalyzerComponentv3::~AliHLTPHOSRawAnalyzerComponentv3()
{
// See header file for class documentation
fMapperPtr = new AliHLTPHOSMapper;
+ cout << "Initialising mapper..." << endl;
+ fMapperPtr->InitDDLSpecificationMapping();
+ fMapperPtr->InitAltroMapping(specification);
+
}
AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr,
AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
- /** Pointer to an analyzer object used for raw data anlysis */
- AliHLTPHOSRawAnalyzer *fAnalyzerPtr; //COMMENT
-
virtual void InitMapping(const int specification);
private:
#include "AliHLTPHOSRawAnalyzerCrudeComponent.h"
-#include "AliHLTPHOSRawAnalyzerCrude.h"
+#include "AliHLTCaloRawAnalyzerCrude.h"
AliHLTPHOSRawAnalyzerCrudeComponent gAliHLTPHOSRawAnalyzerCrudeComponent;
//___________________________________________________________________________
AliHLTPHOSRawAnalyzerCrudeComponent::AliHLTPHOSRawAnalyzerCrudeComponent()
{
- fAnalyzerPtr = new AliHLTPHOSRawAnalyzerCrude();
+ HLTError("Creating raw analyzer");
+ fAnalyzerPtr = new AliHLTCaloRawAnalyzerCrude();
}
//___________________________________________________________________________
AliHLTPHOSRawAnalyzerCrudeComponent::~AliHLTPHOSRawAnalyzerCrudeComponent()
{
- if(fAnalyzerPtr)
- {
- delete fAnalyzerPtr;
- fAnalyzerPtr = 0;
- }
+// if(fAnalyzerPtr)
+// {
+// delete fAnalyzerPtr;
+// fAnalyzerPtr = 0;
+// }
}
//___________________________________________________________________________
**************************************************************************/
#include "AliHLTPHOSRawAnalyzerPeakFinderComponent.h"
-#include "AliHLTPHOSRawAnalyzerPeakFinder.h"
+#include "AliHLTCaloRawAnalyzerPeakFinder.h"
AliHLTPHOSRawAnalyzerPeakFinderComponent gAliHLTPHOSRawAnalyzerPeakFinderComponent;
//___________________________________________________________________________________________________________
AliHLTPHOSRawAnalyzerPeakFinderComponent::AliHLTPHOSRawAnalyzerPeakFinderComponent():AliHLTPHOSRawAnalyzerComponentv3()
{
- fAnalyzerPtr = new AliHLTPHOSRawAnalyzerPeakFinder();
+ fAnalyzerPtr = new AliHLTCaloRawAnalyzerPeakFinder();
if(1)//LoadPFVector() == kFALSE)
{
{
res = fscanf(fp, "%lf", &tmpTVector[i]);
}
- fAnalyzerPtr->SetAVector(tmpAVector, nSamples);
- fAnalyzerPtr->SetTVector(tmpTVector, nSamples);
+ // fAnalyzerPtr->SetAVector(tmpAVector, nSamples);
+ // fAnalyzerPtr->SetTVector(tmpTVector, nSamples);
fclose(fp);
delete [] tmpAVector;
delete [] tmpTVector;
int rcuEnd = 1;
// 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-RA_02_1";
+ TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTCalo.so libAliHLTPHOS.so libAliHLTGlobal.so loglevel=0x7f chains=PHS-DM_02_1";
TString ecInput;
TString emInput;
AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrude", publisher.Data(), arg.Data());
// digit maker components
-// dm.Form("PHS-DM_%02d_%d", module, rcu);
-// arg="";
-// arg.Form("-sethighgainfactor 0.005 -setlowgainfactor 0.08 -setdigitthresholds 0.005 0.002");
-// AliHLTConfiguration dmConf(dm.Data(), "PhosDigitMaker", ra.Data(), arg.Data());
+ dm.Form("PHS-DM_%02d_%d", module, rcu);
+ arg="";
+ arg.Form("-sethighgainfactor 0.005 -setlowgainfactor 0.08 -setdigitthresholds 0.005 0.002");
+ AliHLTConfiguration dmConf(dm.Data(), "PhosDigitMaker", ra.Data(), arg.Data());
if(clInput.Length() > 0) clInput += " ";
clInput+=dm;
AliHLTPHOSRawAnalyzerCrude.h \
AliHLTPHOSRawAnalyzerCrudeComponent.h \
AliHLTPHOSRawAnalyzerPeakFinderComponent.h \
+ AliHLTPHOSDigitMakerComponent.h \
AliHLTPHOSRcuProcessor.h \
AliHLTPHOSMapper.h \
AliHLTPHOSRawAnalyzerPeakFinder.h \