*/
virtual ~AliHLTPHOSBaseline();
+ /** Copy constructor */
+ AliHLTPHOSBaseline(const AliHLTPHOSBaseline &) :
+ TObject(),
+ fBaseline(-1),
+ fX(-1),
+ fZ(-1),
+ fGain(-1),
+ fEntries(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSBaseline & operator = (const AliHLTPHOSBaseline)
+
+ {
+ //Assignment
+ return *this;
+ }
+
+
/**
* Set the baseline
* @param baseline is the baseline
AliHLTPHOSBase(),
fSampleStart(5),
fMaxCrazyDifference(0),
- fMaxSignal(0),
+ fMaxSignal(0),
+ fChannelCount(0),
fTreePtr(0),
+ fBaselineArrayPtr(0),
+ fRMSHistogramPtr(0),
+ fRMSMapHighGainHistogramPtr(0),
+ fRMSMapLowGainHistogramPtr(0),
+ fFixedRMSHistogramPtr(0),
+ fFixedRMSMapHighGainHistogramPtr(0),
+ fFixedRMSMapLowGainHistogramPtr(0),
fSanityInspector(0)
{
//see headerfile for documentation
AliHLTPHOSBaselineAnalyzer::CalculateRcuBaselines(AliHLTPHOSRcuCellEnergyDataStruct* rcuData)
{
//see headerfile for documentation
- Int_t xOff = rcuData->fRcuX * N_XCOLUMNS_RCU;
- Int_t zOff = rcuData->fRcuZ * N_ZROWS_RCU;
- Float_t baseline = 0;
+ //Int_t xOff = rcuData->fRcuX * N_XCOLUMNS_RCU;
+ //Int_t zOff = rcuData->fRcuZ * N_ZROWS_RCU;
+ //Float_t baseline = 0;
//TODO: fix this to comply with new format
/*
/** Destructor */
virtual ~AliHLTPHOSBaselineAnalyzer();
-
+
+ /** Copy constructor */
+ AliHLTPHOSBaselineAnalyzer(const AliHLTPHOSBaselineAnalyzer &) :
+ AliHLTPHOSBase(),
+ fSampleStart(5),
+ fMaxCrazyDifference(0),
+ fMaxSignal(0),
+ fChannelCount(0),
+ fTreePtr(0),
+ fBaselineArrayPtr(0),
+ fRMSHistogramPtr(0),
+ fRMSMapHighGainHistogramPtr(0),
+ fRMSMapLowGainHistogramPtr(0),
+ fFixedRMSHistogramPtr(0),
+ fFixedRMSMapHighGainHistogramPtr(0),
+ fFixedRMSMapLowGainHistogramPtr(0),
+ fSanityInspector(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSBaselineAnalyzer & operator = (const AliHLTPHOSBaselineAnalyzer)
+ {
+ //Assignment
+ return *this;
+ }
+
/**
* Calculate baselines for an RCU
* @param rcuData is a pointer to energy and timing data from an RCU
AliHLTPHOSProcessor(),
fBaselineAnalyzerPtr(0),
fTreePtr(0),
+ fBaselineArrayPtr(0),
fEvCnt(0),
fWriteInterval(100),
fFillInterval(100),
fFilename(0),
fDirectory(0),
fHistPath(0),
- fRunNb(0)
+ fRunNb(0),
+ fCalculateAll(false)
{
//See header file for documentation
}
AliHLTPHOSBaselineAnalyzerComponent::GetOutputDataType()
{
//See header file for documentation
- return AliHLTPHOSDefinitions::fgkAliHLTBaselineDataType;
+ return AliHLTPHOSDefinitions::fgkBaselineDataType;
}
/** Destructor */
virtual ~AliHLTPHOSBaselineAnalyzerComponent();
+
+ /** Copy constructor */
+ AliHLTPHOSBaselineAnalyzerComponent(const AliHLTPHOSBaselineAnalyzerComponent &) :
+ AliHLTPHOSProcessor(),
+ fBaselineAnalyzerPtr(0),
+ fTreePtr(0),
+ fBaselineArrayPtr(0),
+ fEvCnt(0),
+ fWriteInterval(100),
+ fFillInterval(100),
+ fFilename(0),
+ fDirectory(0),
+ fHistPath(0),
+ fRunNb(0),
+ fCalculateAll(false)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSBaselineAnalyzerComponent & operator = (const AliHLTPHOSBaselineAnalyzerComponent)
+ {
+ //Assignment
+ return *this;
+ }
/** interface function, see @ref AliHLTComponent for description */
const char* GetComponentID();
fLogWeight = 4.5;
fAnalyzerPtr = new AliHLTPHOSPhysicsAnalyzerSpectrum();
- //fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
+ fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
}
AliHLTPHOSClusterAnalyser::~AliHLTPHOSClusterAnalyser()
{
}
+void
+AliHLTPHOSClusterAnalyser::SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr)
+{
+ //see header file for documentation
+ fCaloClustersPtr = caloClusterContainerPtr;
+ fCaloClustersPtr->fNCaloClusters = 0;
+}
+
Int_t
AliHLTPHOSClusterAnalyser::CalculateCenterOfGravity()
{
}
Int_t
-AliHLTPHOSClusterAnalyser::CalculateClusterMoments(AliHLTPHOSRecPointDataStruct *recPointPtr, AliHLTPHOSCaloClusterDataStruct* clusterPtr)
+AliHLTPHOSClusterAnalyser::CalculateClusterMoments(AliHLTPHOSRecPointDataStruct */*recPointPtr*/, AliHLTPHOSCaloClusterDataStruct* /*clusterPtr*/)
{
//See header file for documentation
return 0;
//fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
- for(Int_t i = 0; i < fRecPointsPtr->fNRecPoints; i++)
+ for(UInt_t i = 0; i < fRecPointsPtr->fNRecPoints; i++)
{
caloClusterPtr = &(fCaloClustersPtr->fCaloClusterArray[i]);
localPos[0] = recPointPtr->fX;
localPos[1] = recPointPtr->fZ;
-
- fAnalyzerPtr->GlobalPosition( &localPos[0], &globalPos[0], recPointPtr->fModule);
+
+ fAnalyzerPtr->GlobalPosition( localPos, globalPos, recPointPtr->fModule);
caloClusterPtr->fGlobalPos[0] = globalPos[0];
caloClusterPtr->fGlobalPos[1] = globalPos[1];
caloClusterPtr->fNCells = recPointPtr->fMultiplicity;
//cout << "fNCells = " << caloClusterPtr->fNCells << endl;
- for(Int_t j = 0; j < caloClusterPtr->fNCells; j++)
+ for(UInt_t j = 0; j < caloClusterPtr->fNCells; j++)
{
digitPtr = &(recPointPtr->fDigitsList[j]);
//fPHOSGeometry->RelPosToAbsId((Int_t)(recPointPtr->fModule + 1), (double)(digitPtr->fX), (double)(digitPtr->fZ), id);
caloClusterPtr->fClusterType = '\0';
}
fCaloClustersPtr->fNCaloClusters = fRecPointsPtr->fNRecPoints;
-
-
- return 0;
+ //cout << fCaloClustersPtr->fNCaloClusters << endl;
+
+ return fCaloClustersPtr->fNCaloClusters;
}
/** Destructor */
virtual ~AliHLTPHOSClusterAnalyser();
+ /** Copy constructor */
+ AliHLTPHOSClusterAnalyser(const AliHLTPHOSClusterAnalyser &) :
+ AliHLTPHOSBase(),
+ fLogWeight(0),
+ fRecPointsPtr(0),
+ fCaloClustersPtr(0),
+ fPHOSGeometry(0),
+ fAnalyzerPtr(0),
+ fDoClusterFit(false),
+ fHaveCPVInfo(false),
+ fDoPID(false),
+ fHaveDistanceToBadChannel(false)
+
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSClusterAnalyser & operator = (const AliHLTPHOSClusterAnalyser)
+ {
+ //Assignment
+ return *this;
+ }
+
/**
* Set the rec point container
* @param recPointContainerPtr is a pointer to the rec points
* Set the calo cluster container
* @param caloClusterContainerPtr is a pointer to the calo clusters
*/
- void SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr) { fCaloClustersPtr = caloClusterContainerPtr; }
+ void SetCaloClusterContainer(AliHLTPHOSCaloClusterContainerStruct *caloClusterContainerPtr);
/**
* Calculates the center of gravity for the reconstruction points in the container
AliHLTPHOSClusterAnalyserComponent::AliHLTPHOSClusterAnalyserComponent():
AliHLTPHOSProcessor(),
-fClusterAnalyserPtr(0)
+fClusterAnalyserPtr(0),
+fDoDeconvolution(0),
+fDoCalculateMoments(0)
{
//See headerfile for documentation
}
{
//See headerfile for documentation
- return AliHLTPHOSDefinitions::fgkAliHLTClusterDataType;
+ return AliHLTPHOSDefinitions::fgkClusterDataType;
}
void
UInt_t tSize = 0;
UInt_t offset = 0;
UInt_t mysize = 0;
- Int_t nRecPoints = 0;
- Int_t nDigits = 0;
- Int_t j =0;
+ Int_t nClusters = 0;
AliHLTUInt8_t* outBPtr;
outBPtr = outputPtr;
fClusterAnalyserPtr->SetCaloClusterContainer((AliHLTPHOSCaloClusterContainerStruct*)outBPtr);
for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
{
- iter = blocks+ndx;
- if (iter->fDataType != AliHLTPHOSDefinitions::fgkAliHLTRecPointDataType)
+ iter = blocks+ndx;
+ if (iter->fDataType != AliHLTPHOSDefinitions::fgkClusterDataType)
{
continue;
}
{
fClusterAnalyserPtr->CalculateRecPointMoments();
}
- fClusterAnalyserPtr->CreateClusters();
-
+ nClusters = fClusterAnalyserPtr->CreateClusters();
}
- mysize = 0;
+ mysize = 0;
offset = tSize;
-
mysize += sizeof(AliHLTPHOSCaloClusterContainerStruct);
- //cout << "Size of calo cluster container: " << mysize << endl;
+
AliHLTComponentBlockData bd;
FillBlockData( bd );
bd.fOffset = offset;
tSize += mysize;
outBPtr += mysize;
-
+
if ( tSize > size )
{
Logging( kHLTLogFatal, "HLT::AliHLTPHOSClusterAnalyserComponent::DoEvent", "Too much data",
, tSize, size );
return EMSGSIZE;
}
+
+ fPhosEventCount++;
+ if(fPrintInfo == kTRUE)
+ {
+ if(fPhosEventCount%fPrintInfoFrequncy == 0)
+ {
+ cout << "Cluster analyser: # of clusters: " << nClusters << endl;
+ }
+ }
return 0;
int
AliHLTPHOSClusterAnalyserComponent::DoInit(int argc, const char** argv )
{
+
//See headerfile for documentation
fClusterAnalyserPtr = new AliHLTPHOSClusterAnalyser();
+ ScanArguments(argc, argv);
for (int i = 0; i < argc; i++)
{
if(!strcmp("-dodeconvolution", argv[i]))
/** Destructor */
virtual ~AliHLTPHOSClusterAnalyserComponent();
+ /** Copy constructor */
+ AliHLTPHOSClusterAnalyserComponent(const AliHLTPHOSClusterAnalyserComponent &) :
+ AliHLTPHOSProcessor(),
+ fClusterAnalyserPtr(0),
+ fDoDeconvolution(0),
+ fDoCalculateMoments(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSClusterAnalyserComponent & operator = (const AliHLTPHOSClusterAnalyserComponent)
+ {
+ //Assignment
+ return *this;
+ }
+
/** interface function, see @ref AliHLTComponent for description */
const char* GetComponentID();
//See header file for documentation
}
+void
+AliHLTPHOSClusterizer::SetRecPointContainer(AliHLTPHOSRecPointContainerStruct* recPointContainerPtr)
+ {
+ fRecPointContainerPtr = recPointContainerPtr;
+ fRecPointContainerPtr->fNRecPoints = 0;
+ }
void
AliHLTPHOSClusterizer::SetRecoParameters(AliPHOSRecoParamEmc* params)
AliHLTPHOSRecPointDataStruct *recPoint = 0;
- //printf("Number of digits in event: %d\n", fDigitContainerPtr->fNDigits);
-
//Clusterization starts
for(i = 0; i < fDigitContainerPtr->fNDigits; i++)
{
//printf("Got rec point above clustering threshold!\n");
recPoint = &(fRecPointContainerPtr->fRecPointArray[nRecPoints]);
recPoint->fAmp = 0;
+ //TODO!!!!!!!
+ recPoint->fModule = fDigitContainerPtr->fDigitDataStruct[i].fModule;
+ //TODO!!!!!!!
//recPoint->
recPoint->fDigitsList[fDigitsInCluster] = fDigitContainerPtr->fDigitDataStruct[i];
recPoint->fAmp += fDigitContainerPtr->fDigitDataStruct[i].fEnergy;
/** Destructor */
virtual ~AliHLTPHOSClusterizer();
-
- /*
- AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &);
- AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer &) {return *this;}
- */
+ /** Copy constructor */
+ AliHLTPHOSClusterizer(const AliHLTPHOSClusterizer &) :
+ AliHLTPHOSBase(),
+ fEmcClusteringThreshold(0),
+ fEmcMinEnergyThreshold(0),
+ fEmcTimeGate(0),
+ fLogWeight(0),
+ fDigitsInCluster(0),
+ fOnlineMode(true),
+ fDigitArrayPtr(0),
+ fEmcRecPointsPtr(0),
+ fDigitPtr(0),
+ fDigitContainerPtr(0),
+ fRecPointContainerPtr(0),
+ fPHOSGeometry(0),
+ fGetterPtr(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSClusterizer & operator = (const AliHLTPHOSClusterizer)
+ {
+ //Assignment
+ return *this;
+ }
+
/** Set digit container */
void SetDigitContainer(AliHLTPHOSDigitContainerDataStruct* digitContainerPtr)
{ fDigitContainerPtr = digitContainerPtr; }
/** Set rec point container */
- void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *RecPointContainerPtr)
- { fRecPointContainerPtr = RecPointContainerPtr; }
+ void SetRecPointContainer(AliHLTPHOSRecPointContainerStruct *recPointContainerPtr);
+
/** Set reco parameters */
void SetRecoParameters(AliPHOSRecoParamEmc* recoPars);
AliHLTPHOSClusterizerComponent::AliHLTPHOSClusterizerComponent():
AliHLTPHOSProcessor(),
+ fAllDigitsPtr(0),
fClusterizerPtr(0),
- fRecPointStructArrayPtr(0)
- //, fRecPointListPtr(0)
+ fRecPointStructArrayPtr(0),
+ fDigitCount(0),
+ fModuleClusterizationMode(false),
+ fNoCrazyness(0)
{
//See headerfile for documentation
}
{
//See headerfile for documentation
- if (fClusterizerPtr)
+ if(fClusterizerPtr)
{
delete fClusterizerPtr;
fClusterizerPtr = 0;
}
- if (fRecPointStructArrayPtr)
+ if(fRecPointStructArrayPtr)
{
for (int i = 0; i < 1000; i++)
{
delete fRecPointStructArrayPtr;
fRecPointStructArrayPtr = 0;
}
-
+ if(fAllDigitsPtr)
+ {
+ delete fAllDigitsPtr;
+ fAllDigitsPtr = 0;
+ }
}
void
AliHLTPHOSClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
- //See headerfile for documentation
-
- const AliHLTComponentDataType* pType=fgkInputDataTypes;
- while (pType->fID!=0)
- {
- list.push_back(*pType);
- pType++;
- }
+ list.clear();
+ list.push_back(AliHLTPHOSDefinitions::fgkDigitDataType);
}
AliHLTComponentDataType
AliHLTPHOSClusterizerComponent::GetOutputDataType()
{
//See headerfile for documentation
-
- return AliHLTPHOSDefinitions::fgkAliHLTClusterDataType;
+ return AliHLTPHOSDefinitions::fgkClusterDataType;
}
void
{
//See headerfile for documentation
-
constBase = 30;
inputMultiplier = 1;
}
int
AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
- AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
+ AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
std::vector<AliHLTComponentBlockData>& outputBlocks)
{
//See headerfile for documentation
UInt_t offset = 0;
UInt_t mysize = 0;
Int_t nRecPoints = 0;
- Int_t nDigits = 0;
Int_t j =0;
AliHLTUInt8_t* outBPtr;
AliHLTPHOSDigitContainerDataStruct *digitContainerPtr = 0;
fClusterizerPtr->SetRecPointContainer((AliHLTPHOSRecPointContainerStruct*)outBPtr);
-
+
for ( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
{
iter = blocks+ndx;
- if (iter->fDataType != AliHLTPHOSDefinitions::fgkAliHLTDigitDataType)
- {
- // cout << "Data type is not fgkAliHLTDigitDataTupe\n";
- continue;
- }
- specification = specification|iter->fSpecification;
- digitContainerPtr = reinterpret_cast<AliHLTPHOSDigitContainerDataStruct*>(iter->fPtr);
- fClusterizerPtr->SetDigitContainer(digitContainerPtr);
-
- for (UInt_t i = 0; i < digitContainerPtr->fNDigits; i++)
+ if (iter->fDataType == AliHLTPHOSDefinitions::fgkDigitDataType)
{
- if(fNoCrazyness && digitContainerPtr->fDigitDataStruct[i].fCrazyness)
- continue;
-
- fAllDigitsPtr->fDigitDataStruct[j].fX = digitContainerPtr->fDigitDataStruct[i].fX;
- fAllDigitsPtr->fDigitDataStruct[j].fZ = digitContainerPtr->fDigitDataStruct[i].fZ;
- fAllDigitsPtr->fDigitDataStruct[j].fAmplitude = digitContainerPtr->fDigitDataStruct[i].fAmplitude;
- fAllDigitsPtr->fDigitDataStruct[j].fTime = digitContainerPtr->fDigitDataStruct[i].fTime;
- fAllDigitsPtr->fDigitDataStruct[j].fCrazyness = digitContainerPtr->fDigitDataStruct[i].fCrazyness;
- j++;
+ specification = specification|iter->fSpecification;
+ digitContainerPtr = reinterpret_cast<AliHLTPHOSDigitContainerDataStruct*>(iter->fPtr);
+ if(fModuleClusterizationMode)
+ {
+ for (UInt_t i = 0; i < digitContainerPtr->fNDigits; i++)
+ {
+ fAllDigitsPtr->fDigitDataStruct[j].fX = digitContainerPtr->fDigitDataStruct[i].fX;
+ fAllDigitsPtr->fDigitDataStruct[j].fZ = digitContainerPtr->fDigitDataStruct[i].fZ;
+ fAllDigitsPtr->fDigitDataStruct[j].fAmplitude = digitContainerPtr->fDigitDataStruct[i].fAmplitude;
+ fAllDigitsPtr->fDigitDataStruct[j].fTime = digitContainerPtr->fDigitDataStruct[i].fTime;
+ fAllDigitsPtr->fDigitDataStruct[j].fCrazyness = digitContainerPtr->fDigitDataStruct[i].fCrazyness;
+ j++;
+ }
+
+ }
}
}
+ if(fModuleClusterizationMode && fAllDigitsPtr != 0)
+ {
+ fClusterizerPtr->SetDigitContainer(fAllDigitsPtr);
+ }
+ else if(digitContainerPtr != 0)
+ {
+ fClusterizerPtr->SetDigitContainer(digitContainerPtr);
+ }
+ if(digitContainerPtr != 0)
+ {
+ nRecPoints = fClusterizerPtr->ClusterizeEvent();
+
+ mysize = 0;
+ offset = tSize;
- nRecPoints = fClusterizerPtr->ClusterizeEvent();
- //cout << "Number of clusters found: " << nRecPoints << ", from a total of " << nDigits << " digits" << endl;
-
- mysize = 0;
- offset = tSize;
-
- mysize += sizeof(AliHLTPHOSRecPointContainerStruct);
-
- //cout << "Size of rec point container: " << mysize << endl;
-
- AliHLTComponentBlockData bd;
- FillBlockData( bd );
- bd.fOffset = offset;
- bd.fSize = mysize;
- bd.fDataType = AliHLTPHOSDefinitions::fgkAliHLTRecPointDataType;
- bd.fSpecification = specification;
- outputBlocks.push_back( bd );
-
- tSize += mysize;
- outBPtr += mysize;
-
+ mysize += sizeof(AliHLTPHOSRecPointContainerStruct);
+
+ AliHLTComponentBlockData bd;
+ FillBlockData( bd );
+ bd.fOffset = offset;
+ bd.fSize = mysize;
+ bd.fDataType = AliHLTPHOSDefinitions::fgkClusterDataType;
+ bd.fSpecification = specification;
+ outputBlocks.push_back( bd );
+ tSize += mysize;
+ outBPtr += mysize;
+
+ }
+
if ( tSize > size )
{
Logging( kHLTLogFatal, "HLT::AliHLTPHOSClusterizerComponent::DoEvent", "Too much data",
return 0;
+
}
int
fClusterizerPtr->SetDigitContainer(fAllDigitsPtr);
fNoCrazyness = false;
//
-
+
+ ScanArguments(argc, argv);
for (int i = 0; i < argc; i++)
{
if(!strcmp("-digitthreshold", argv[i]))
{
fClusterizerPtr->SetEmcMinEnergyThreshold(atof(argv[i+1]));
- cout << "Clusterizer: digit threshold is: " << argv[i+1] << endl;
}
if(!strcmp("-recpointthreshold", argv[i]))
{
fClusterizerPtr->SetEmcClusteringThreshold(atof(argv[i+1]));
- cout << "Clusterizer: rec point threshold is: " << argv[i+1] << endl;
+ }
+ if(!strcmp("-modulemode", argv[i]))
+ {
+ fModuleClusterizationMode = true;
}
}
-
- cout << "#######################################\n";
- cout << "# Clusterizer component started with: # \n";
- // cout << "# --> Digit threshold: " << fClusterizerPtr->GetThreshold() << " #\n";
- // cout << "# --> Cluster threshold: " << fClusterizerPtr->GetClusterThreshold() << " #\n";
- cout << "#######################################\n";
-
return 0;
}
/** Destructor */
virtual ~AliHLTPHOSClusterizerComponent();
+ /** Copy constructor */
+ AliHLTPHOSClusterizerComponent(const AliHLTPHOSClusterizerComponent &) :
+ AliHLTPHOSProcessor(),
+ fAllDigitsPtr(0),
+ fClusterizerPtr(0),
+ fRecPointStructArrayPtr(0),
+ fDigitCount(0),
+ fModuleClusterizationMode(0),
+ fNoCrazyness(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSClusterizerComponent & operator = (const AliHLTPHOSClusterizerComponent)
+ {
+ //Assignment
+ return *this;
+ }
+
/** interface function, see @ref AliHLTComponent for description */
const char* GetComponentID();
void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
/** interface function, see @ref AliHLTComponent for description */
+
int DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size,
std::vector<AliHLTComponentBlockData>& outputBlocks);
-
+ // Int_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
/** interface function, see @ref AliHLTComponent for description */
AliHLTComponent* Spawn();
/** Number of digits in event */
Int_t fDigitCount;
+ /** If the clusterizer is doing clusterization of the whole module */
+ Bool_t fModuleClusterizationMode; //COMMENT
+
/** If one should consider crazyness or not */
- Bool_t fNoCrazyness;
+ Bool_t fNoCrazyness; //COMMENT
/** interface function, see @ref AliHLTComponent for description */
- static const AliHLTComponentDataType fgkInputDataTypes[];
+ static const AliHLTComponentDataType fgkInputDataTypes[]; //COMMENT
};
#endif
const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellTimingHistogramDataType = { sizeof(AliHLTComponentDataType), {'T','I','M','E','H','I','S','T'},{'P','H','O','S'}};;
const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellTimingAverageDataType = { sizeof(AliHLTComponentDataType), {'T','I','M','E','A','V','E','R'},{'P','H','O','S'}};;
const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCellChannelDataDataType = { sizeof(AliHLTComponentDataType), {'C','H','A','N','D','A','T','A'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTClusterDataType = { sizeof(AliHLTComponentDataType), {'C','L','U','S','T','R','T','Y'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTRecPointDataType = { sizeof(AliHLTComponentDataType), {'R','E','C','P','T','T','Y','P'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTHistDataType = { sizeof(AliHLTComponentDataType), {'H','I','S','T','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTSpectrumDataType = { sizeof(AliHLTComponentDataType), {'S','P','E','C','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTRootTreeDataType = { sizeof(AliHLTComponentDataType), {'R','T','R','E','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTBaselineDataType = { sizeof(AliHLTComponentDataType), {'B','A','S','L','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTDigitDataType = { sizeof(AliHLTComponentDataType), {'D','I','G','I','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTNoiseMapDataType = { sizeof(AliHLTComponentDataType), {'N','O','M','A','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTMIPDataType = { sizeof(AliHLTComponentDataType), {'M','I','P','D','T','Y','P','E'},{'P','H','O','S'}};;
-const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkAliHLTSandboxDataType = { sizeof(AliHLTComponentDataType), {'S','A','B','X','T','Y','P','E'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkClusterDataType = { sizeof(AliHLTComponentDataType), {'C','L','U','S','T','R','T','Y'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkRecPointDataType = { sizeof(AliHLTComponentDataType), {'R','E','C','P','O','I','N','T'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkHistDataType = { sizeof(AliHLTComponentDataType), {'H','I','S','T','O','G','R','A'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkSpectrumDataType = { sizeof(AliHLTComponentDataType), {'S','P','E','C','T','R','U','M'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkRootTreeDataType = { sizeof(AliHLTComponentDataType), {'R','O','O','T','T','R','E','E'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkBaselineDataType = { sizeof(AliHLTComponentDataType), {'B','A','S','E','L','I','N','E'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkDigitDataType = { sizeof(AliHLTComponentDataType), {'D','I','G','I','T','T','Y','P'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkNoiseMapDataType = { sizeof(AliHLTComponentDataType), {'N','O','I','S','E','M','A','P'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkMIPDataType = { sizeof(AliHLTComponentDataType), {'M','I','P','D','T','Y','P','E'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkSandboxDataType = { sizeof(AliHLTComponentDataType), {'S','A','N','D','B','O','X','T'},{'P','H','O','S'}};;
const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkEmcCalibDataType = { sizeof(AliHLTComponentDataType), {'C','A','L','I','T','Y','P','E'},{'P','H','O','S'}};;
const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkCaloClusterDataType = { sizeof(AliHLTComponentDataType), {'C','A','L','C','L','U','S','T'},{'P','H','O','S'}};;
+
class AliHLTPHOSDefinitions
{
public:
+
static const AliHLTComponentDataType fgkCellEnergyDataType; /**<Reconstructed cell/crystal energies*/
static const AliHLTComponentDataType fgkDDLPackedRawDataType; /**<DDL raw data on the RCU data format*/
static const AliHLTComponentDataType fgkCellEnergyHistogramDataType; /**<Histogram for per cell/gain energy distribution*/
static const AliHLTComponentDataType fgkCellTimingHistogramDataType; /**<Histogram for per cell/gain time distribution*/
static const AliHLTComponentDataType fgkCellTimingAverageDataType; /**<Histogram for per cell/gain time distribution*/
static const AliHLTComponentDataType fgkCellChannelDataDataType; /**<Time dependent signal from the readout channels*/
- static const AliHLTComponentDataType fgkAliHLTClusterDataType; //Cluster data type
- static const AliHLTComponentDataType fgkAliHLTRecPointDataType; //RecPoint data type
- static const AliHLTComponentDataType fgkAliHLTHistDataType; //hist data type
- static const AliHLTComponentDataType fgkAliHLTSpectrumDataType; //spectrum data type
- static const AliHLTComponentDataType fgkAliHLTDigitDataType; //Digit data type
- static const AliHLTComponentDataType fgkAliHLTRootTreeDataType; //Root tree type
- static const AliHLTComponentDataType fgkAliHLTBaselineDataType; //Baseline type
- static const AliHLTComponentDataType fgkAliHLTMIPDataType; //"MIP" data type
- static const AliHLTComponentDataType fgkAliHLTNoiseMapDataType; //Noise map data type
- static const AliHLTComponentDataType fgkAliHLTSandboxDataType; //General data type
+ static const AliHLTComponentDataType fgkClusterDataType; //Cluster data type
+ static const AliHLTComponentDataType fgkRecPointDataType; //RecPoint data type
+ static const AliHLTComponentDataType fgkHistDataType; //hist data type
+ static const AliHLTComponentDataType fgkSpectrumDataType; //spectrum data type
+ static const AliHLTComponentDataType fgkDigitDataType; //Digit data type
+ static const AliHLTComponentDataType fgkRootTreeDataType; //Root tree type
+ static const AliHLTComponentDataType fgkBaselineDataType; //Baseline type
+ static const AliHLTComponentDataType fgkMIPDataType; //"MIP" data type
+ static const AliHLTComponentDataType fgkNoiseMapDataType; //Noise map data type
+ static const AliHLTComponentDataType fgkSandboxDataType; //General data type
static const AliHLTComponentDataType fgkEmcCalibDataType; //Calibration data type
static const AliHLTComponentDataType fgkCaloClusterDataType; //Calo cluster data type
};
fSamples(55),
fPreSamples(15),
fTotalSamples(70),
- fDebugVar(-1)
+ fDebugVar(-1),
+ fData(0),
+ fCrazyness(0),
+ fBaseline(0)
{
//See header file for documentation
//added by PT
+
/**************************************************************************
* This file is property of and copyright by the ALICE HLT Project *
* All rights reserved. *
/** Destructor */
virtual ~AliHLTPHOSDigit();
+ /** Copy constructor */
+ AliHLTPHOSDigit(const AliHLTPHOSDigit &) :
+ TObject(),
+ AliHLTPHOSBase(),
+ fX(-1),
+ fZ(-1),
+ fAmplitude(-1),
+ fTime(-1),
+ fEnergy(-1),
+ fGain(-1),
+ fSamples(55),
+ fPreSamples(15),
+ fTotalSamples(70),
+ fDebugVar(-1),
+ fData(0),
+ fCrazyness(0),
+ fBaseline(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSDigit & operator = (const AliHLTPHOSDigit)
+ {
+ //Assignment
+ return *this;
+ }
+
/** Set x */
void SetX(Int_t x) { fX = x; }
UInt_t fPHOSModule; //COMMENT
/** Array of digits in container */
- AliHLTPHOSDigitDataStruct fDigitDataStruct[7168]; //COMMENT
+ AliHLTPHOSDigitDataStruct fDigitDataStruct[N_XCOLUMNS_RCU*N_ZROWS_RCU*N_GAINS]; //COMMENT
};
/** The gain */
Int_t fGain;
- /** The raw data */
- Int_t fData[512];
-
/** The crazyness */
Int_t fCrazyness;
/** The baseline */
Float_t fBaseline;
- /**
- * Set the raw data
- * @param data is a pointer to the raw data
- */
- void SetRawData(Int_t *data)
- {
- for(Int_t i = 0; i < 512; i++) //Fy på deg Øystein
- {
- fData[i] = data[i];
- }
- }
};
#endif
fCellDataPtr(0),
fDigitContainerStructPtr(0),
fDigitArrayPtr(0),
- fDigitPtr(0),
fDigitStructPtr(0),
fDigitCount(0)
{
// See header file for documentation
-
+ for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
+ {
+ for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
+ {
+ fHighGainFactors[x][z] = 0.005;
+ fLowGainFactors[x][z] = 0.08;
+ }
+ }
+
}
AliHLTPHOSDigitMaker::~AliHLTPHOSDigitMaker()
AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSRcuCellEnergyDataStruct* rcuData)
{
//See header file for documentation
- Int_t i = 0;
+
Int_t j = 0;
Int_t xMod = -1;
Int_t zMod = -1;
- Int_t gain = -1;
Float_t amplitude = 0;
- for(Int_t x = 0; x < N_XCOLUMNS_RCU; x++)
+ for(UInt_t x = 0; x < N_XCOLUMNS_RCU; x++)
{
- for(Int_t z = 0; z < N_ZROWS_RCU; z++)
+ for(UInt_t z = 0; z < N_ZROWS_RCU; z++)
{
fCellDataPtr = &(rcuData->fValidData[x][z][HIGH_GAIN]);
xMod = x + rcuData->fRcuX * N_XCOLUMNS_RCU;
//TODO: fix time
fDigitStructPtr->fTime = fCellDataPtr->fTime * 0.0000001;
fDigitStructPtr->fCrazyness = fCellDataPtr->fCrazyness;
+ fDigitStructPtr->fModule = rcuData->fModuleID;
j++;
}
else if(amplitude >= MAX_BIN_VALUE)
//TODO: fix time
fDigitStructPtr->fTime = fCellDataPtr->fTime * 0.0000001;;
fDigitStructPtr->fCrazyness = fCellDataPtr->fCrazyness;
+ fDigitStructPtr->fModule = rcuData->fModuleID;
j++;
}
}
AliHLTPHOSDigitMaker::SetGlobalHighGainFactor(Float_t factor)
{
//See header file for documentation
- for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
+ for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
{
- for(Int_t z = 0; z < N_ZROWS_MOD; z++)
+ for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
{
fHighGainFactors[x][z] = factor;
}
AliHLTPHOSDigitMaker::SetGlobalLowGainFactor(Float_t factor)
{
//See header file for documentation
- for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
+ for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
{
- for(Int_t z = 0; z < N_ZROWS_MOD; z++)
+ for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
{
fLowGainFactors[x][z] = factor;
}
TH2F *lgHist = (TH2F*)histFile->Get("RMSLGMapHist");
TH2F *hgHist = (TH2F*)histFile->Get("RMSHGMapHist");
- for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
+ for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
{
- for(Int_t z = 0; z < N_ZROWS_MOD; z++)
+ for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
{
fDigitThresholds[x][z][LOW_GAIN] = lgHist->GetBinContent(x, z) * nSigmas;
fDigitThresholds[x][z][HIGH_GAIN] = hgHist->GetBinContent(x, z) * nSigmas;
* @ingroup alihlt_phos
*/
-class AliHLTPHOSDigit;
class TClonesArray;
class TTree;
class AliHLTPHOSValidCellDataStruct;
/** Destructor */
virtual ~AliHLTPHOSDigitMaker();
+
+ /** Copy constructor */
+ AliHLTPHOSDigitMaker(const AliHLTPHOSDigitMaker &) :
+ AliHLTPHOSBase(),
+ fCellDataPtr(0),
+ fDigitContainerStructPtr(0),
+ fDigitArrayPtr(0),
+ fDigitStructPtr(0),
+ fDigitCount(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSDigitMaker & operator = (const AliHLTPHOSDigitMaker)
+ {
+ //Assignment
+ return *this;
+ }
+
// void SetValidCellData(AliHLTPHOSValidCellDataStruct *data) { fCellDataPtr = data; }
// void SetDigitContainerStruct(AliHLTPHOSDigitContainerStruct *container)
/** Pointer to the digit TClonesArray */
TClonesArray *fDigitArrayPtr; //! transient
- /** Pointer to a AliHLTPHOSDigit */
- AliHLTPHOSDigit *fDigitPtr; //! transient
-
/** Pointer to a AliHLTPHOSDigitDataStruct */
AliHLTPHOSDigitDataStruct *fDigitStructPtr; //! transient
-/**************************************************************************
+ /**************************************************************************
* This file is property of and copyright by the ALICE HLT Project *
* All rights reserved. *
* *
AliHLTPHOSDigitMakerComponent::AliHLTPHOSDigitMakerComponent() :
AliHLTPHOSProcessor(),
- fDigitMakerPtr(0)
+ fDigitMakerPtr(0),
+ fDigitContainerPtr(0)
// fEvtCnt(0)
{
//see header file for documentation
AliHLTPHOSDigitMakerComponent::GetOutputDataType()
{
//see header file for documentation
- return AliHLTPHOSDefinitions::fgkAliHLTDigitDataType;
+ return AliHLTPHOSDefinitions::fgkDigitDataType;
}
FillBlockData( bd );
bd.fOffset = offset;
bd.fSize = mysize;
- bd.fDataType = AliHLTPHOSDefinitions::fgkAliHLTDigitDataType;
+ bd.fDataType = AliHLTPHOSDefinitions::fgkDigitDataType;
bd.fSpecification = specification;
outputBlocks.push_back( bd );
/** Constructor */
AliHLTPHOSDigitMakerComponent();
- /** Destructor */
+ /** Destructor */
virtual ~AliHLTPHOSDigitMakerComponent();
+ /** Copy constructor */
+ AliHLTPHOSDigitMakerComponent(const AliHLTPHOSDigitMakerComponent &) :
+ AliHLTPHOSProcessor(),
+ fDigitMakerPtr(0),
+ fDigitContainerPtr(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSDigitMakerComponent & operator = (const AliHLTPHOSDigitMakerComponent)
+ {
+ //Assignment
+ return *this;
+ }
+
/** interface function, see @ref AliHLTComponent for description */
const char* GetComponentID();
//See header file for documentation
if(fCaloClustersPtr)
{
- delete fCaloClustersPtr;
- fCaloClustersPtr = 0;
+ //fCaloClustersPtr->Delete();
+ //fCaloClustersPtr = 0;
}
}
AliESDCaloCluster *caloCluster = 0;
AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
- for( Int_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
+ for(UInt_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
{
caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->At(i + fNCaloClusters);
caloClusterStruct = &(fCaloClusterContainerPtr->fCaloClusterArray[i]);
AliESDCaloCluster *caloCluster = 0;
AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
-
- for( Int_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
+ for(UInt_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
{
// caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i);
return 0;
}
+Int_t
+AliHLTPHOSESDMaker::FillESDEvent(AliHLTPHOSCaloClusterContainerStruct* caloClusterContainerPtr)
+{
+ //See header file for documentation
+
+ AliESDCaloCluster *caloCluster = 0;
+ AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
+
+ for(UInt_t i = 0; i < 1/*caloClusterContainerPtr->fNCaloClusters*/; i++)
+ {
+ // caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
+ //caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
+ /* caloClusterStruct = &(caloClusterContainerPtr->fCaloClusterArray[i]);
+ caloCluster->SetID(caloClusterStruct->fID);
+ caloCluster->SetClusterType(caloClusterStruct->fClusterType);
+ caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
+ caloCluster->SetE(caloClusterStruct->fEnergy);
+ caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
+ caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
+ caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
+ caloCluster->SetM20(caloClusterStruct->fM20);
+ caloCluster->SetM02(caloClusterStruct->fM02);
+ caloCluster->SetM11(caloClusterStruct->fM11);
+ caloCluster->SetNExMax(caloClusterStruct->fNExMax);
+ caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
+ caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
+ caloCluster->SetNCells(caloClusterStruct->fNCells);
+ caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
+ caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
+ fESDEventPtr->AddCaloCluster(caloCluster);
+ //cout << caloCluster->E() << endl;*/
+ fNCaloClusters++;
+ }
+
+ return 0;
+}
void
AliHLTPHOSESDMaker::ResetESD()
{
fNCaloClusters = 0;
- fCaloClustersPtr->Delete();
+ // fCaloClustersPtr->Delete();
}
/** Destructor */
virtual ~AliHLTPHOSESDMaker();
+ /** Copy constructor */
+ AliHLTPHOSESDMaker(const AliHLTPHOSESDMaker &) :
+ AliHLTPHOSBase(),
+ fNCaloClusters(0),
+ fCaloClustersPtr(0),
+ fESDEventPtr(0),
+ fCaloClusterContainerPtr(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSESDMaker & operator = (const AliHLTPHOSESDMaker)
+ {
+ //Assignment
+ return *this;
+ }
+
/**
* Set the AliESDEvent object to be filled
* @param is a pointer to the AliESDEvent
*/
Int_t FillESDEvent();
+ /**
+ * Fill the AliESDEvent object with clusters from a calo cluster container
+ * @param caloClusterContainerPtr is a pointer to a cluster container
+ * @return
+ */
+ Int_t FillESDEvent(AliHLTPHOSCaloClusterContainerStruct* caloClusterContainerPtr);
+
/**
* Reset the ESD and ESDCaloCluster array
*/
}
Int_t
-AliHLTPHOSESDMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& trigData )
+AliHLTPHOSESDMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ )
{
// see header file for class documentation
const AliHLTComponentBlockData* iter = 0;
UInt_t specification = 0;
+
+ fESDMakerPtr->ResetESD();
+
+ fESDEventPtr = new AliESDEvent();
+ fESDEventPtr->CreateStdContent();
+ fESDMakerPtr->SetESDEvent(fESDEventPtr);
for ( iter = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkCaloClusterDataType); iter != 0; iter = GetNextInputBlock())
{
specification = specification|iter->fSpecification;
caloClusterContainerPtr = reinterpret_cast<AliHLTPHOSCaloClusterContainerStruct*>(iter->fPtr);
- fESDMakerPtr->SetCaloClusterContainer(caloClusterContainerPtr);
+ fESDMakerPtr->FillESDEvent(caloClusterContainerPtr);
+ // fESDMakerPtr->SetCaloClusterContainer(caloClusterContainerPtr);
}
- fESDEventPtr = new AliESDEvent();
- fESDEventPtr->CreateStdContent();
- fESDMakerPtr->SetESDEvent(fESDEventPtr);
- fESDMakerPtr->FillESDEvent();
-
- // AliESDCaloCluster *cc = fESDEventPtr->GetCaloCluster(0);
- /*if(cc)
- {
- cout << cc->E() << endl;
- }*/
PushBack(fESDEventPtr, kAliHLTDataTypeESDObject|kAliHLTDataOriginPHOS, specification);
fESDEventPtr = 0;
}
+ fPhosEventCount++;
+ if(fPrintInfo == kTRUE)
+ {
+ if(fPhosEventCount%fPrintInfoFrequncy == 0)
+ {
+ cout << "Made ESD from event!" << endl;
+ }
+ }
return 0;
}
{
//See headerfile for documentation
- fESDEventPtr = new AliESDEvent();
- fESDEventPtr->CreateStdContent();
fESDMakerPtr = new AliHLTPHOSESDMaker();
- fESDMakerPtr->SetESDEvent(fESDEventPtr);
+ //fESDMakerPtr->SetESDEvent(fESDEventPtr);
//
+ ScanArguments(argc, argv);
for (int i = 0; i < argc; i++)
{
-
+
}
return 0;
/** Destructor */
virtual ~AliHLTPHOSESDMakerComponent();
+ /** Copy constructor */
+ AliHLTPHOSESDMakerComponent(const AliHLTPHOSESDMakerComponent &) :
+ AliHLTPHOSProcessor(),
+ fESDMakerPtr(0),
+ fESDEventPtr(0)
+
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSESDMakerComponent & operator = (const AliHLTPHOSESDMakerComponent)
+ {
+ //Assignment
+ return *this;
+ }
+
/** interface function, see @ref AliHLTComponent for description */
const char* GetComponentID();
/** Destructor */
virtual ~AliHLTPHOSEmcCalibrationHistogramProducer();
+ /** Copy constructor */
+ AliHLTPHOSEmcCalibrationHistogramProducer(const AliHLTPHOSEmcCalibrationHistogramProducer &) : AliHLTPHOSBase()
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSEmcCalibrationHistogramProducer & operator = (const AliHLTPHOSEmcCalibrationHistogramProducer)
+ {
+ //Assignment
+ return *this;
+ }
+
/** Reset the histograms */
void Reset();
ClassImp(AliHLTPHOSPhysicsAnalyzer);
-AliHLTPHOSPhysicsAnalyzer::AliHLTPHOSPhysicsAnalyzer():fRecPointsPtr(0), fRootHistPtr(0), fPHOSRadius(0)
-
-
+AliHLTPHOSPhysicsAnalyzer::AliHLTPHOSPhysicsAnalyzer():
+ fRecPointsPtr(0),
+ fRootHistPtr(0),
+ fPHOSRadius(0)
{
//Constructor
//See header file for documentation
AliPHOSGeometry *geom=AliPHOSGeometry::GetInstance("noCPV");
// fPHOSRadius = geom->GetIPtoCrystalSurface();
- fPHOSRadius = 1500;
+ fPHOSRadius = geom->GetIPtoCrystalSurface();
for(UInt_t i = 0; i < N_MODULES; i++)
{
}
void
-AliHLTPHOSPhysicsAnalyzer::LocalPosition(AliHLTPHOSRecPointDataStruct* recPointPtr, Float_t* locPositionPtr)
+AliHLTPHOSPhysicsAnalyzer::LocalPosition(AliHLTPHOSRecPointDataStruct* /*recPointPtr*/, Float_t* /*locPositionPtr*/)
{
//Get local position for a recPoint
//Get global position for a recPoint
//See header file for documentation
Float_t tempPosX = 0;
-
- // Int_t module = recPointPtr->fPHOSModule;
-
- Int_t module = 2;
+
+
+ Int_t module = recPointPtr->fModule;
tempPosX = kCRYSTAL_SIZE*(recPointPtr->fX-N_XCOLUMNS_MOD/2) + kCRYSTAL_SIZE/2;
positionPtr[0] = tempPosX*fRotParametersSin[module] + fPHOSRadius*fRotParametersCos[module];
positionPtr[1] = tempPosX*fRotParametersCos[module] - fPHOSRadius*fRotParametersSin[module];
-
+
positionPtr[2] = kCRYSTAL_SIZE*(recPointPtr->fZ-N_ZROWS_MOD/2) + kCRYSTAL_SIZE/2;
}
{
//Get global position from local postion and module number
//See header file for documentation
- positionPtr[0] = kCRYSTAL_SIZE*(locPositionPtr[0]-N_XCOLUMNS_MOD/2)*fRotParametersCos[module-1] + fPHOSRadius*fRotParametersSin[module-1];
+ positionPtr[0] = kCRYSTAL_SIZE*(locPositionPtr[0]-N_XCOLUMNS_MOD/2)*fRotParametersCos[module] + fPHOSRadius*fRotParametersSin[module];
- positionPtr[1] = kCRYSTAL_SIZE*(locPositionPtr[0]-N_XCOLUMNS_MOD/2)*fRotParametersSin[module-1] - fPHOSRadius*fRotParametersCos[module-1];
+ positionPtr[1] = kCRYSTAL_SIZE*(locPositionPtr[0]-N_XCOLUMNS_MOD/2)*fRotParametersSin[module] - fPHOSRadius*fRotParametersCos[module];
positionPtr[2] = kCRYSTAL_SIZE*(locPositionPtr[1]-N_ZROWS_MOD);
/** Destructor */
virtual ~AliHLTPHOSPhysicsAnalyzer();
- /*
- AliHLTPHOSPhysicsAnalyzer(const AliHLTPHOSPhysicsAnalyzer & );
- AliHLTPHOSPhysicsAnalyzer & operator = (const AliHLTPHOSPhysicsAnalyzer &) {return *this;}
- */
-
-
+ /** Copy constructor */
+ AliHLTPHOSPhysicsAnalyzer(const AliHLTPHOSPhysicsAnalyzer &):
+ fRecPointsPtr(0),
+ fRootHistPtr(0),
+ fPHOSRadius(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSPhysicsAnalyzer & operator = (const AliHLTPHOSPhysicsAnalyzer &)
+ {
+ //Assignement
+ return *this;
+ }
+
void SetHistogram(TH1F* histPtr) {fRootHistPtr = histPtr;}
/**
/** Copy constructor */
AliHLTPHOSPhysicsAnalyzerSpectrum(const AliHLTPHOSPhysicsAnalyzerSpectrum &);
- /*
+
+ /** Assignment */
AliHLTPHOSPhysicsAnalyzerSpectrum & operator = (const AliHLTPHOSPhysicsAnalyzerSpectrum)
{
+ //Assignment
return *this;
}
- */
+
/** Destructor */
virtual ~AliHLTPHOSPhysicsAnalyzerSpectrum();
}
-// PTH AliHLTPHOSPhysicsAnalyzerSpectrumComponent::AliHLTPHOSPhysicsAnalyzerSpectrumComponent(const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &):AliHLTProcessor(), fAnalyzerPtr(0),
-// fPeakFitter(0), fRootHistPtr(0),
-// fWriteInterval(0)
-//{
+AliHLTPHOSPhysicsAnalyzerSpectrumComponent::AliHLTPHOSPhysicsAnalyzerSpectrumComponent(const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &) :
+ AliHLTPHOSProcessor(),
+ fAnalyzerPtr(0),
+ fPeakFitter(0),
+ fRootHistPtr(0)
+ //fWriteInterval(0)
+{
//Copy constructor not implemented
-//}
+}
Int_t
AliHLTPHOSPhysicsAnalyzerSpectrumComponent::Deinit()
AliHLTPHOSPhysicsAnalyzerSpectrumComponent::GetOutputDataType()
{
// return AliHLTPHOSPhysicsDefinitions::fgkAliHLTSpectrumDataType;
- return AliHLTPHOSDefinitions::fgkAliHLTSpectrumDataType;
+ return AliHLTPHOSDefinitions::fgkSpectrumDataType;
}
void
Int_t
AliHLTPHOSPhysicsAnalyzerSpectrumComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks,
- AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& /*size*/,
+ AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* /*outputPtr*/, AliHLTUInt32_t& /*size*/,
std::vector<AliHLTComponentBlockData>& /*outputBlocks*/)
{
//Do event
{
iter = blocks+ndx;
- if(iter->fDataType != AliHLTPHOSDefinitions::fgkAliHLTRecPointDataType)
+ if(iter->fDataType != AliHLTPHOSDefinitions::fgkRecPointDataType)
{
- cout << "Warning: data type is not fgkAliHLTClusterDataType " << endl;
+ cout << "Warning: data type is not fgkRecPointDataType " << endl;
continue;
}
/** Destructor */
~AliHLTPHOSPhysicsAnalyzerSpectrumComponent();
-
- // PTH AliHLTPHOSPhysicsAnalyzerSpectrumComponent(const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &);
- // AliHLTPHOSPhysicsAnalyzerSpectrumComponent & operator = (const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &)
- // {
- // return *this;
- // }
+
+ /** Copy constructor */
+ AliHLTPHOSPhysicsAnalyzerSpectrumComponent(const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &);
+
+ /** Assignment */
+ AliHLTPHOSPhysicsAnalyzerSpectrumComponent & operator = (const AliHLTPHOSPhysicsAnalyzerSpectrumComponent &)
+ {
+ // Assignment
+ return *this;
+ }
/** interface function, see @ref AliHLTComponent for description */
const char* GetComponentID();
const AliHLTComponentDataType AliHLTPHOSProcessor::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; //'zero' terminated array
-AliHLTPHOSProcessor::AliHLTPHOSProcessor():AliHLTProcessor(), AliHLTPHOSBase(), fModuleID(0), fPrintInfoFrequncy(1000), fRunNumber(0)
+AliHLTPHOSProcessor::AliHLTPHOSProcessor():AliHLTProcessor(), AliHLTPHOSBase(), fPhosEventCount(0), fModuleID(0), fPrintInfo(0), fPrintInfoFrequncy(1000), fRunNumber(0)
{
ScanRunNumberFromFile();
}
cout << "ERROR, could not find file " << tmpFileName <<endl;
}
}
+int
+AliHLTPHOSProcessor::ScanArguments(int argc, const char** argv)
+{
+ fPrintInfo = kFALSE;
+ int iResult=0;
+ TString argument="";
+
+ for(int i=0; i<argc && iResult>=0; i++)
+ {
+ argument=argv[i];
+
+ if (argument.IsNull())
+ {
+ continue;
+ }
+
+ if (argument.CompareTo("-printinfo") == 0)
+ {
+ if(i+1 <= argc)
+ {
+ argument=argv[i+1];
+ fPrintInfoFrequncy = atoi(argv[i+1]);
+ fPrintInfo = kTRUE;
+ }
+ else
+ {
+ cout << "WARNING: asking for event info, but no update frequency is specified, option is ignored" << endl;
+ }
+ }
+
+ }
+ return 0;
+}
protected:
void ScanRunNumberFromFile();
+ virtual int ScanArguments(int argc, const char** argv);
int fPhosEventCount; /**<Global event counter for this component*/
AliHLTUInt8_t fModuleID; /**<ID of the module this component read data from (0-4)*/
Bool_t fPrintInfo; /**<wether or not to print debugg info to std out*/
#include "AliHLTPHOSMapper.h"
#include "AliHLTPHOSSanityInspector.h"
#include "AliHLTPHOSBaseline.h"
+#include "AliHLTPHOSDigitContainerDataStruct.h"
+#include "AliHLTPHOSDigitMaker.h"
#include "TFile.h"
#include "TTree.h"
#include "TClonesArray.h"
+#include "TH2F.h"
#include "AliAltroDecoder.h" // decoder for altro payload
#include "AliAltroData.h" // container for altro payload
#include "AliAltroBunch.h" // container for altro bunches
fSendChannelData(kFALSE),
fOutPtr(0),
fMapperPtr(0),
+ fSanityInspectorPtr(0),
fUseBaselineSubtraction(false),
fDecoderPtr(0),
fAltroDataPtr(0),
- fAltroBunchPtr(0)
- // fRawMemoryReader(0), fPHOSRawStream(0)
+ fAltroBunchPtr(0),
+ fDoPushCellEnergies(false),
+ fDoMakeDigits(false),
+ fDigitMakerPtr(0),
+ fDigitContainerPtr(0),
+ fDoSelectiveReadOut(false),
+ fSelectedChannelsList(0),
+ fDoCheckDataSize(false)
+ //fRawMemoryReader(0), fPHOSRawStream(0)
{
//comment
fMapperPtr = new AliHLTPHOSMapper();
fAltroBunchPtr = new AliAltroBunch();
fDecoderPtr = new AliAltroDecoder();
fSanityInspectorPtr = new AliHLTPHOSSanityInspector();
+ fSelectedChannelsList = new AliHLTUInt16_t[N_XCOLUMNS_RCU*N_ZROWS_RCU*N_GAINS];
}
-
-
-
AliHLTPHOSRawAnalyzerComponent::~AliHLTPHOSRawAnalyzerComponent()
{
//comment
return "AliPhosTestRaw";
}
-
void
AliHLTPHOSRawAnalyzerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
{
}
}
-
AliHLTComponentDataType
AliHLTPHOSRawAnalyzerComponent::GetOutputDataType()
{
//comment
- return AliHLTPHOSDefinitions::fgkCellEnergyDataType;
+ return kAliHLTMultipleDataType;
+ // return AliHLTPHOSDefinitions::fgkDigitDataType;
}
+int
+AliHLTPHOSRawAnalyzerComponent::GetOutputDataTypes(AliHLTComponentDataTypeList& tgtList)
+{
+ // Added by OD
+ // see header file for class documentation
+ tgtList.clear();
+ tgtList.push_back(AliHLTPHOSDefinitions::fgkCellEnergyDataType);
+ tgtList.push_back(AliHLTPHOSDefinitions::fgkDigitDataType);
+ tgtList.push_back(kAliHLTDataTypeHwAddr16);
+ return tgtList.size();
+}
void
AliHLTPHOSRawAnalyzerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
-
{
//comment
constBase = 30;
UInt_t mysize = 0;
UInt_t tSize = 0;
Float_t baseline = 0;
+ UInt_t digitCount = 0;
+
AliHLTUInt8_t* outBPtr;
outBPtr = outputPtr;
const AliHLTComponentBlockData* iter = NULL;
Int_t *rawDataBufferPos = (Int_t *)outputPtr;
AliHLTPHOSValidCellDataStruct *validCellPtr = 0;
- Int_t x = -1;
- Int_t z = -1;
- Int_t gain = -1;
UInt_t nSamples = 0;
+ UInt_t nSelected = 0;
+
UInt_t specification = 0;
for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
{
continue;
}
- specification = specification|iter->fSpecification;
- if( fPhosEventCount%100 == 0)
- {
- cout << "event count = "<< fPhosEventCount <<endl;
- }
-
+ specification = specification|iter->fSpecification;
+
fDecoderPtr->SetMemory(reinterpret_cast<UChar_t*>( iter->fPtr ), iter->fSize);
fDecoderPtr->Decode();
fOutPtr = (AliHLTPHOSRcuCellEnergyDataStruct*)outBPtr;
{
nSamples = fAltroDataPtr->GetDataSize() - 2;
- if(nSamples != fNTotalSamples)
- {
- cout << "Error, fDataSize = " << nSamples + 2 << endl;
- continue;
- }
- else
+ if(fDoCheckDataSize)
{
- // cout << "Info, fDataSize = " << fAltroDataPtr->GetDataSize() << endl;
+ if(nSamples != fNTotalSamples)
+ {
+ //cout << "Error, fDataSize = " << nSamples + 2 << endl;
+ //continue;
+ }
+ else
+ {
+ //cout << "Info, fDataSize = " << fAltroDataPtr->GetDataSize() << endl;
+ }
}
crazyness = fSanityInspectorPtr->CheckInsanity(fAltroDataPtr->GetData(), fAltroDataPtr->GetDataSize() - 2);
fAnalyzerPtr->SetData(fAltroDataPtr->GetData());
fAnalyzerPtr->Evaluate(0, fAltroDataPtr->GetDataSize() -2);
-
- validCellPtr = &(fOutPtr->fValidData
- [fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fXCol]
- [fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fZRow]
- [fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fGain]);
- validCellPtr->fX = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fXCol;
- validCellPtr->fZ = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fZRow;
- validCellPtr->fGain = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fGain;
+ Int_t x = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fXCol;
+ Int_t z = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fZRow;
+ Int_t gain = fMapperPtr->fHw2geomapPtr[fAltroDataPtr->GetHadd()].fGain;
+ validCellPtr = &(fOutPtr->fValidData[x][z][gain]);
+ validCellPtr->fX = x;
+ validCellPtr->fZ = z;
+ validCellPtr->fGain = gain;
if(fUseBaselineSubtraction)
{
baseline = fBaselines[validCellPtr->fX][validCellPtr->fZ][ validCellPtr->fGain];
}
baseline = 0;
+
validCellPtr->fEnergy = (float)fAnalyzerPtr->GetEnergy() - baseline;
validCellPtr->fTime = (float)fAnalyzerPtr->GetTiming();
validCellPtr->fCrazyness = (int)crazyness;
validCellPtr->fID = tmpChannelCnt;
validCellPtr->fData = rawDataBufferPos;
const UInt_t *tmpData = fAltroDataPtr->GetData();
-
- for(Int_t sample = 0; sample < nSamples; sample++)
+
+ if(fDoPushCellEnergies)
+ {
+ for(UInt_t sample = 0; sample < nSamples; sample++)
+ {
+ (validCellPtr->fData)[sample] = tmpData[sample] - (int)baseline;
+ }
+ }
+ if(fDoSelectiveReadOut)
{
- (validCellPtr->fData)[sample] = tmpData[sample] - (int)baseline;
+ if(validCellPtr->fEnergy > fSelectiveReadOutThresholds[x][z][gain])
+ {
+ fSelectedChannelsList[nSelected] = (AliHLTUInt16_t)(fAltroDataPtr->GetHadd());
+ nSelected++;
+ }
}
UInt_t tmpSize = sizeof(Int_t)*(validCellPtr->fNSamples);
- mysize += sizeof(Int_t)*(validCellPtr->fNSamples);
+ // mysize += sizeof(Int_t)*(validCellPtr->fNSamples);
mysize += tmpSize;
+ // mysize += tmpSize;
rawDataBufferPos += tmpSize/sizeof(Int_t);
+
tmpChannelCnt ++;
+
}
- fOutPtr->fCnt = tmpChannelCnt;
+ fOutPtr->fCnt = tmpChannelCnt;
fOutPtr->fSize = mysize;
-
- AliHLTComponentBlockData bd;
- FillBlockData( bd );
- bd.fOffset = offset;
- bd.fSize = mysize;
-
- bd.fDataType = AliHLTPHOSDefinitions::fgkCellEnergyDataType;
- bd.fSpecification = specification;
- outputBlocks.push_back( bd );
-
- tSize += mysize;
- outBPtr += mysize;
+
+ if(fDoPushCellEnergies)
+ {
+ AliHLTComponentBlockData bdCellEnergy;
+ FillBlockData( bdCellEnergy );
+ bdCellEnergy.fOffset = offset;
+ bdCellEnergy.fSize = mysize;
+ bdCellEnergy.fDataType = AliHLTPHOSDefinitions::fgkCellEnergyDataType;
+ bdCellEnergy.fSpecification = specification;
+ outputBlocks.push_back( bdCellEnergy );
+
+ tSize += mysize;
+ outBPtr += mysize;
+ }
+
+ //Making Digits
+ if(fDoMakeDigits)
+ {
+ Int_t digitSize = 0;
+ fDigitMakerPtr->SetDigitContainerStruct((AliHLTPHOSDigitContainerDataStruct*)outBPtr);
+ digitCount = fDigitMakerPtr->MakeDigits(fOutPtr);
+ offset = tSize;
+ digitSize += sizeof(AliHLTPHOSDigitContainerDataStruct);
+
+ AliHLTComponentBlockData bdDigits;
+ FillBlockData(bdDigits);
+ bdDigits.fOffset = offset;
+ bdDigits.fSize = mysize;
+ bdDigits.fDataType = AliHLTPHOSDefinitions::fgkDigitDataType;
+ bdDigits.fSpecification = specification;
+ outputBlocks.push_back( bdDigits );
+
+ tSize += digitSize;
+ outBPtr += digitSize;
+ fDigitMakerPtr->Reset();
+ }
+
+ //Pushing selected channel addresses
+ if(fDoSelectiveReadOut)
+ {
+ UInt_t hwAddSize = sizeof(AliHLTUInt16_t);
+ offset = tSize;
+ for(UInt_t n = 0; n < nSelected; n++)
+ {
+ ((AliHLTUInt16_t*)outBPtr)[n] = fSelectedChannelsList[n];
+ }
+ mysize = nSelected*hwAddSize;
+ AliHLTComponentBlockData bdHwAdd;
+ FillBlockData(bdHwAdd);
+ bdHwAdd.fOffset = offset;
+ bdHwAdd.fSize = mysize;
+ bdHwAdd.fDataType = kAliHLTDataTypeHwAddr16;
+ bdHwAdd.fSpecification = specification;
+ outputBlocks.push_back( bdHwAdd );
+
+ tSize += mysize;
+ outBPtr += mysize;
+ }
if( tSize > size )
{
{
if(fPhosEventCount%fPrintInfoFrequncy == 0)
{
- cout <<"Analyzing event " << fPhosEventCount << "for Equippment " << fkEquippmentID << endl;
+ cout << "Analyzing event " << fPhosEventCount << " for Equippment " << fkEquippmentID << endl;
+ if(fDoSelectiveReadOut) cout << "# of selected channels: " << nSelected << endl;
+ if(fDoMakeDigits) cout << "# of digits: " << digitCount << endl;
}
}
AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv )
{
//See base class for documentation
- cout <<"AliHLTPHOSRawAnalyzerComponent::DoInit( int argc, const char** argv ) "<< endl;
-
+
fSendChannelData = kFALSE;
fPrintInfo = kFALSE;
int iResult=0;
TString argument="";
iResult = ScanArguments(argc, argv);
+ int nSigmas = 3;
+
+ fDigitMakerPtr = new AliHLTPHOSDigitMaker();
+
for(int i = 0; i < argc; i++)
{
+ if(!strcmp("-rmsfilepath", argv[i]))
+ {
+ fDigitMakerPtr->SetDigitThresholds(argv[i+1], nSigmas);
+ SetSelectiveReadOutThresholds(argv[i+1], nSigmas);
+ }
if(!strcmp("-baselinefile", argv[i]))
{
- cout << "Getting baselines from " << argv[i+1] << endl;
SetBaselines(argv[i+1]);
}
+ if(!strcmp("-lowgainfactor", argv[i]))
+ {
+ fDigitMakerPtr->SetGlobalLowGainFactor(atof(argv[i+1]));
+ }
+ if(!strcmp("-highgainfactor", argv[i]))
+ {
+ fDigitMakerPtr->SetGlobalHighGainFactor(atof(argv[i+1]));
+ }
+ if(!strcmp("-selectivereadout", argv[i]))
+ {
+ fDoSelectiveReadOut = true;
+ }
+ if(!strcmp("-makedigits", argv[i]))
+ {
+ fDoMakeDigits = true;
+ }
+ if(!strcmp("-pushcellenergies", argv[i]))
+ {
+ fDoPushCellEnergies = true;
+ }
+ if(!strcmp("-checkdatasize", argv[i]))
+ {
+ fDoCheckDataSize = true;
+ }
}
if(fIsSetEquippmentID == kFALSE)
//comment
// for(unsigned int mod = 0; mod < N_MODULES; mod ++)
//{
- for(unsigned int x = 0; x < N_XCOLUMNS_MOD; x ++)
+ for(unsigned int x = 0; x < N_XCOLUMNS_RCU; x ++)
{
- for(unsigned int z = 0; z < N_ZROWS_MOD; z ++)
+ for(unsigned int z = 0; z < N_ZROWS_RCU; z ++)
{
for(unsigned int gain = 0; gain < N_GAINS; gain ++ )
{
if((baseline->GetZ() < (Int_t)((fRcuZ + 1)*N_ZROWS_RCU)) && (baseline->GetZ() >= (Int_t)(fRcuZ*N_ZROWS_RCU)))
{
fBaselines[baseline->GetX() - fRcuX*N_XCOLUMNS_RCU][baseline->GetZ() - fRcuZ*N_ZROWS_RCU][baseline->GetGain()] = baseline->GetBaseline();
- // cout << fBaselines[baseline->GetX() - fRcuX*N_XCOLUMNS_RCU][baseline->GetZ() - fRcuZ*N_ZROWS_RCU][baseline->GetGain()] << endl;
}
}
}
delete baselineFile;
baselineFile = 0;
}
+
+void
+AliHLTPHOSRawAnalyzerComponent::SetSelectiveReadOutThresholds(const char* filepath, Int_t nSigmas)
+{
+ //See header file for documentation
+
+ TFile *histFile = new TFile(filepath);
+
+ TH2F *lgHist = (TH2F*)histFile->Get("RMSLGMapHist");
+ TH2F *hgHist = (TH2F*)histFile->Get("RMSHGMapHist");
+
+ for(UInt_t x = 0; x < N_XCOLUMNS_MOD; x++)
+ {
+ for(UInt_t z = 0; z < N_ZROWS_MOD; z++)
+ {
+ fSelectiveReadOutThresholds[x][z][LOW_GAIN] = lgHist->GetBinContent(x, z) * nSigmas;
+ fSelectiveReadOutThresholds[x][z][HIGH_GAIN] = hgHist->GetBinContent(x, z) * nSigmas;
+ }
+ }
+}
class AliAltroDecoder; // decoder for altro payload
class AliAltroData; // container for altro payload
class AliAltroBunch; // container for altro bunches
-
+class AliHLTPHOSDigitMaker;
+class AliHLTPHOSDigitContainerDataStruct;
class AliHLTPHOSRawAnalyzerComponent: public AliHLTPHOSRcuProcessor
{
virtual const char* GetComponentID() = 0;
virtual void GetInputDataTypes( vector <AliHLTComponentDataType>& list);
virtual AliHLTComponentDataType GetOutputDataType();
+ virtual int GetOutputDataTypes(AliHLTComponentDataTypeList& list);
virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
virtual AliHLTComponent* Spawn() = 0;
protected:
private:
void Reset(AliHLTPHOSRcuCellEnergyDataStruct* cellDataPtr);
void ResetDataPtr(int startindex = 0, int sampleCnt = 0);
- void SetBaselines(const char* baselineFile);
+ void SetBaselines(const char* baselineFile);
+ void SetSelectiveReadOutThresholds(const char* filepath, Int_t nSignams);
Bool_t fSendChannelData; /**<wether or not to send raw data from the component into shared memory*/
Double_t fTmpChannelData[ALTRO_MAX_SAMPLES]; /**<temporary variable to store raw samples from a single altro channel*/
Double_t fMaxValues[N_MODULES][N_ZROWS_MOD][N_XCOLUMNS_MOD][N_GAINS]; /**<array to store cell energies*/
AliAltroDecoder *fDecoderPtr; // decoder for altro payload
AliAltroData *fAltroDataPtr; // container for altro payload
AliAltroBunch *fAltroBunchPtr; // container for altro bunches
+
+ /** Are we pushing the cell energies (raw data) */
+ Bool_t fDoPushCellEnergies; //Added by OD
+
+ /** Are we making digits? */
+ Bool_t fDoMakeDigits; //Added by OD
+
+ /** The digit maker */
+ AliHLTPHOSDigitMaker *fDigitMakerPtr; //! transient Added by OD
+
+ /** The digit containerto use for digit making */
+ AliHLTPHOSDigitContainerDataStruct *fDigitContainerPtr; //! transient Added by OD
+
+ /** Are we doing selective read out? */
+ Bool_t fDoSelectiveReadOut; //Added by OD
+
+ /** Threshold for selective readout ( zero suppression threshold) */
+ Float_t fSelectiveReadOutThresholds[N_XCOLUMNS_MOD][N_ZROWS_MOD][N_GAINS]; //Added by OD
+
+ /** The selected HW addresses */
+ AliHLTUInt16_t *fSelectedChannelsList; //! transient Added by OD
+
+ /** Should we check data size? */
+ Bool_t fDoCheckDataSize; //Added by OD
};
#endif
AliHLTPHOSRcuCalibrationProcessorComponent::AliHLTPHOSRcuCalibrationProcessorComponent() :
AliHLTCalibrationProcessor(),
+ fCalibDataPtr(0),
fRcuCalibProcessorPtr(0),
- fCalibDataPtr(0)
+ fShmPtr(0)
{
}
{
}
-AliHLTPHOSRcuCalibrationProcessorComponent::AliHLTPHOSRcuCalibrationProcessorComponent(const AliHLTPHOSRcuCalibrationProcessorComponent&)
- // fHistogramProducer(0)
+AliHLTPHOSRcuCalibrationProcessorComponent::AliHLTPHOSRcuCalibrationProcessorComponent(const AliHLTPHOSRcuCalibrationProcessorComponent&) :
+ AliHLTCalibrationProcessor(),
+ fCalibDataPtr(0),
+ fRcuCalibProcessorPtr(0),
+ fShmPtr(0)
{
HLTFatal("copy constructor untested");
}
AliHLTPHOSRcuProcessor();
virtual ~AliHLTPHOSRcuProcessor();
const AliHLTUInt16_t GetEquippmentID() const;
- int ScanArguments(int argc, const char** argv);
+ virtual int ScanArguments(int argc, const char** argv);
void SetEquippmentID(AliHLTUInt16_t id);
void SetCoordinates(AliHLTUInt16_t equippmentID);
const AliHLTUInt16_t fkEquippmentID; /**<Equippment ID as defined by ALICE*/
UInt_t fNRecPoints;
/** Array of rec points in the container */
- AliHLTPHOSRecPointDataStruct fRecPointArray[200];
+ AliHLTPHOSRecPointDataStruct fRecPointArray[100];
};
Float_t fZ; //COMMENT
/** Module number */
- Float_t fModule; //COMMENT
+ Int_t fModule; //COMMENT
/** The total energy of the rec point */
Float_t fAmp; //COMMENT
Float_t fDistanceToBadChannel; //COMMENT
/** Array of digits in the rec point */
- AliHLTPHOSDigitDataStruct fDigitsList[64]; //COMMENT
+ AliHLTPHOSDigitDataStruct fDigitsList[128]; //COMMENT
};
/* Destructor */
virtual ~AliHLTPHOSSanityInspector();
+
+ /** Copy constructor */
+ AliHLTPHOSSanityInspector(const AliHLTPHOSSanityInspector &) :
+ AliHLTPHOSBase(),
+ fMaxDifference(0)
+ {
+ //Copy constructor not implemented
+ }
+
+ /** Assignment */
+ AliHLTPHOSSanityInspector & operator = (const AliHLTPHOSSanityInspector)
+ {
+ //Assignment
+ return *this;
+ }
+
// Int_t CheckInsanity(UInt_t* data, Int_t nSamples);
fCellEnergiesPtr(0),
fIsSetMemory(false),
fMaxCnt(0),
+ fCurrentX(0),
+ fCurrentZ(0),
+ fCurrentGain(0),
fCurrentCnt(0),
fCharDataOffset(0),
fCharPtr(0),
return fCurrentChannel;
}
*/
- // Added by OD
+ // Changed by OD
if(fCurrentCnt < fMaxCnt)
{
for(Int_t x = 0; x < N_XCOLUMNS_MOD; x++)
for(Int_t gain = 0; gain < N_GAINS; gain++)
{
fCurrentChannel = &(fCellEnergiesPtr->fValidData[x][z][gain]);
- if(fCurrentChannel->fEnergy > 0)
+ if(fCurrentChannel->fID == fCurrentCnt)
{
- if(fCurrentChannel->fID == fCurrentCnt)
- {
- fCurrentChannel->fData = fIntPtr;
- fIntPtr += fCurrentChannel->fNSamples;
- fCurrentCnt ++;
- return fCurrentChannel;
- }
+ fCurrentChannel->fData = fIntPtr;
+ fIntPtr += fCurrentChannel->fNSamples;
+ fCurrentCnt ++;
+ return fCurrentChannel;
}
}
}