From 9bf87c6f79c32002e4f8b17223c587a3b09f596c Mon Sep 17 00:00:00 2001 From: phille Date: Sun, 7 Sep 2008 22:30:29 +0000 Subject: [PATCH] Improved Clusterizer and rawanalyzer --- HLT/PHOS/AliHLTPHOSBaselineAnalyzer.cxx | 2 +- .../AliHLTPHOSCaloClusterContainerStruct.h | 2 +- .../AliHLTPHOSClusterAnalyserComponent.cxx | 5 +- HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx | 4 +- HLT/PHOS/AliHLTPHOSDefinitions.cxx | 1 + HLT/PHOS/AliHLTPHOSDefinitions.h | 1 + HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx | 8 +- HLT/PHOS/AliHLTPHOSESDMakerComponent.cxx | 2 +- HLT/PHOS/AliHLTPHOSHistogramProducer.cxx | 117 ++++++++++ HLT/PHOS/AliHLTPHOSHistogramProducer.h | 80 +++++++ .../AliHLTPHOSHistogramProducerComponent.cxx | 201 ++++++++++++++++++ .../AliHLTPHOSHistogramProducerComponent.h | 128 +++++++++++ HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.cxx | 31 ++- HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.h | 2 + HLT/PHOS/AliHLTPHOSRecPointContainerStruct.h | 2 +- 15 files changed, 566 insertions(+), 20 deletions(-) create mode 100644 HLT/PHOS/AliHLTPHOSHistogramProducer.cxx create mode 100644 HLT/PHOS/AliHLTPHOSHistogramProducer.h create mode 100644 HLT/PHOS/AliHLTPHOSHistogramProducerComponent.cxx create mode 100644 HLT/PHOS/AliHLTPHOSHistogramProducerComponent.h diff --git a/HLT/PHOS/AliHLTPHOSBaselineAnalyzer.cxx b/HLT/PHOS/AliHLTPHOSBaselineAnalyzer.cxx index bbc9a0ea0a1..dec76b74332 100644 --- a/HLT/PHOS/AliHLTPHOSBaselineAnalyzer.cxx +++ b/HLT/PHOS/AliHLTPHOSBaselineAnalyzer.cxx @@ -330,7 +330,7 @@ AliHLTPHOSBaselineAnalyzer::WriteChannelHistograms(const Char_t* filename) int hwAddress = ((branch << 11) | (card << 7) | (chip << 4) | channel); int xoff = 0; int zoff = 0; - if(rcu == 1 || rcu == 3) xoff = 1; + if(rcu == 0 || rcu == 2) xoff = 1; if(rcu == 2 || rcu == 3) zoff = 1; z = fMapperPtr->fHw2geomapPtr[hwAddress].fZRow + zoff*N_ZROWS_RCU; x = fMapperPtr->fHw2geomapPtr[hwAddress].fXCol + xoff*N_XCOLUMNS_RCU; diff --git a/HLT/PHOS/AliHLTPHOSCaloClusterContainerStruct.h b/HLT/PHOS/AliHLTPHOSCaloClusterContainerStruct.h index 0436416bec1..4e987048370 100644 --- a/HLT/PHOS/AliHLTPHOSCaloClusterContainerStruct.h +++ b/HLT/PHOS/AliHLTPHOSCaloClusterContainerStruct.h @@ -42,7 +42,7 @@ struct AliHLTPHOSCaloClusterContainerStruct UInt_t fNCaloClusters; /** Array of rec points in the container */ - AliHLTPHOSCaloClusterDataStruct fCaloClusterArray[100]; + AliHLTPHOSCaloClusterDataStruct fCaloClusterArray[400]; }; diff --git a/HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.cxx b/HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.cxx index 02f35fe4cb8..2d460bcf39d 100644 --- a/HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.cxx @@ -109,7 +109,7 @@ AliHLTPHOSClusterAnalyserComponent::GetOutputDataSize(unsigned long& constBase, { //See headerfile for documentation - constBase = 0; + constBase = sizeof(AliHLTPHOSCaloClusterContainerStruct); inputMultiplier = 1; } @@ -193,7 +193,8 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD Logging( kHLTLogInfo, __FILE__ , "Clusters analyzed", "Has analyzed %lu for this event", nClusters); } } - + + size = mysize; return 0; } diff --git a/HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx b/HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx index 912dc9ef34b..ae2fff61381 100644 --- a/HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx @@ -138,7 +138,7 @@ AliHLTPHOSClusterizerComponent::GetOutputDataSize(unsigned long& constBase, doub { //See headerfile for documentation - constBase = 30; + constBase = sizeof(AliHLTPHOSRecPointContainerStruct); inputMultiplier = 1; } @@ -227,6 +227,8 @@ AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData, , tSize, size ); return EMSGSIZE; } + + size = mysize; return 0; diff --git a/HLT/PHOS/AliHLTPHOSDefinitions.cxx b/HLT/PHOS/AliHLTPHOSDefinitions.cxx index 3b52b3bf79b..0db78b416be 100644 --- a/HLT/PHOS/AliHLTPHOSDefinitions.cxx +++ b/HLT/PHOS/AliHLTPHOSDefinitions.cxx @@ -30,6 +30,7 @@ /////////////////////////////////////////////////////////////////////////////// #include "AliHLTPHOSDefinitions.h" +const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkPhosHistDataType = { sizeof(AliHLTComponentDataType), {'H','I','S','T','O','G','R','A'},{'P','H','O','S'}};; //CRAP PTH const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkFourierTransform = { sizeof(AliHLTComponentDataType), {'F','O','U','R','I','E','R','T'},{'P','H','O','S'}};; const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkChannelDataType = { sizeof(AliHLTComponentDataType), {'C','H','A','N','N','E','L','T'},{'P','H','O','S'}};; diff --git a/HLT/PHOS/AliHLTPHOSDefinitions.h b/HLT/PHOS/AliHLTPHOSDefinitions.h index 6e314895691..c857c09d3cf 100644 --- a/HLT/PHOS/AliHLTPHOSDefinitions.h +++ b/HLT/PHOS/AliHLTPHOSDefinitions.h @@ -15,6 +15,7 @@ class AliHLTPHOSDefinitions { public: + static const AliHLTComponentDataType fgkPhosHistDataType; /**Fourier transform of time dependent signals*/ static const AliHLTComponentDataType fgkFourierTransform; /**Fourier transform of time dependent signals*/ static const AliHLTComponentDataType fgkChannelDataType; /**Reset(); - + + size = mysize; + return 0; } diff --git a/HLT/PHOS/AliHLTPHOSESDMakerComponent.cxx b/HLT/PHOS/AliHLTPHOSESDMakerComponent.cxx index 840802064b3..3ac792c183b 100644 --- a/HLT/PHOS/AliHLTPHOSESDMakerComponent.cxx +++ b/HLT/PHOS/AliHLTPHOSESDMakerComponent.cxx @@ -129,7 +129,7 @@ AliHLTPHOSESDMakerComponent::GetOutputDataSize(unsigned long& constBase, double& //See headerfile for documentation constBase = 30; - inputMultiplier = 2; + inputMultiplier = 4; } Int_t diff --git a/HLT/PHOS/AliHLTPHOSHistogramProducer.cxx b/HLT/PHOS/AliHLTPHOSHistogramProducer.cxx new file mode 100644 index 00000000000..93b3b36f27b --- /dev/null +++ b/HLT/PHOS/AliHLTPHOSHistogramProducer.cxx @@ -0,0 +1,117 @@ +/************************************************************************** + * This file is property of and copyright by the ALICE HLT Project * + * All rights reserved. * + * * + * Primary Authors: Oystein Djuvsland * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +/** + * @file AliHLTPHOSHistogramProducer.cxx + * @author Oystein Djuvsland + * @date + * @brief Histogram producer for PHOS HLT + */ + +// see header file for class documentation +// or +// refer to README to build package +// or +// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt + +#include "AliHLTPHOSHistogramProducer.h" +#include "AliHLTPHOSBase.h" +#include "AliHLTPHOSCaloClusterContainerStruct.h" +#include "AliHLTPHOSCaloClusterDataStruct.h" + +#include "TH1D.h" +#include "TNtuple.h" + +AliHLTPHOSHistogramProducer::AliHLTPHOSHistogramProducer(): + AliHLTPHOSBase(), + fClusterEnergiesHistPtr(0), + fMultiplicitiesHistPtr(0), + fClusterNtuplePtr(0), + fFillClusterEnergies(false), + fFillMultiplicities(false), + fFillNtuple(false), + fMaxNtupleEntries(1000000000) +{ + //comment +} + +AliHLTPHOSHistogramProducer::~AliHLTPHOSHistogramProducer() +{ + //comment + if(fClusterEnergiesHistPtr) + { + delete fClusterEnergiesHistPtr; + fClusterEnergiesHistPtr = 0; + } + if(fMultiplicitiesHistPtr) + { + delete fMultiplicitiesHistPtr; + fMultiplicitiesHistPtr = 0; + } + if(fClusterNtuplePtr) + { + delete fClusterNtuplePtr; + fClusterNtuplePtr = 0; + } +} + +Int_t +AliHLTPHOSHistogramProducer::Fill(AliHLTPHOSCaloClusterContainerStruct* clusterContainerPtr) +{ + //comment + AliHLTPHOSCaloClusterDataStruct* tmpClusterPtr = 0; + + for(Int_t i = 0; i < clusterContainerPtr->fNCaloClusters; i++) + { + tmpClusterPtr = &(clusterContainerPtr->fCaloClusterArray[i]); + if(fFillClusterEnergies) + { + fClusterEnergiesHistPtr->Fill(tmpClusterPtr->fEnergy); + } + if(fFillMultiplicities) + { + fMultiplicitiesHistPtr->Fill(tmpClusterPtr->fNCells); + } + if(fFillNtuple) + { + if(fClusterNtuplePtr->GetEntries() > fMaxNtupleEntries) + { + delete fClusterNtuplePtr; + fClusterNtuplePtr = new TNtuple("cluster_ntuple", "Cluster Ntuple", "energy:multiplicity:x:y:z"); + } + fClusterNtuplePtr->Fill(tmpClusterPtr->fEnergy, tmpClusterPtr->fNCells, tmpClusterPtr->fGlobalPos[0], tmpClusterPtr->fGlobalPos[1], tmpClusterPtr->fGlobalPos[2]); + } + } + return 0; +} + +Int_t +AliHLTPHOSHistogramProducer::InitializeObjects() +{ + //comment + if(fFillClusterEnergies) + { + fClusterEnergiesHistPtr = new TH1D("energy_dist", "Energy spectrum - all clusters", 2000, 0, 99); + } + if(fFillMultiplicities) + { + fMultiplicitiesHistPtr = new TH1D("multiplicity_dist", "Multiplicities - all clusters", 100, 0, 99); + } + if(fFillNtuple) + { + fClusterNtuplePtr = new TNtuple("cluster_ntuple", "Cluster Ntuple", "energy:multiplicity:x:y:z"); + } + return 0; +} diff --git a/HLT/PHOS/AliHLTPHOSHistogramProducer.h b/HLT/PHOS/AliHLTPHOSHistogramProducer.h new file mode 100644 index 00000000000..896b7761513 --- /dev/null +++ b/HLT/PHOS/AliHLTPHOSHistogramProducer.h @@ -0,0 +1,80 @@ + /************************************************************************** + * This file is property of and copyright by the ALICE HLT Project * + * All rights reserved. * + * * + * Primary Authors: Oystein Djuvsland * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +#ifndef ALIHLTPHOSHISTOGRAMPRODUCER_H +#define ALIHLTPHOSHISTOGRAMPRODUCER_H + + +/** + * Class does + * + * @file AliHLTPHOSHistogramProducer.h + * @author Oystein Djuvsland + * @date + * @brief + */ + +// see header file for class documentation +// or +// refer to README to build package +// or +// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt + +#include "AliHLTPHOSBase.h" + +class TH1D; +class TNtuple; +class AliHLTPHOSCaloClusterContainerStruct; +/** + * @class AliHLTPHOSHistogramProducer + * + * @ingroup alihlt_phos + */ +class AliHLTPHOSHistogramProducer : public AliHLTPHOSBase +{ + +public: + + AliHLTPHOSHistogramProducer(); + ~AliHLTPHOSHistogramProducer(); + + Int_t Fill(AliHLTPHOSCaloClusterContainerStruct* clusterContainerPtr); + + Int_t InitializeObjects(); + + TH1D* GetClusterEnergiesHistogram() { return fClusterEnergiesHistPtr; } + TH1D* GetMultiplicitiesHistogram() { return fMultiplicitiesHistPtr; } + TNtuple* GetClusterNtuple() { return fClusterNtuplePtr; } + + void SetFillClusterEnergies(bool val) { fFillClusterEnergies = val; } + void SetFillMultiplicities(bool val) { fFillMultiplicities = val; } + void SetFillClusterNtuple(bool val) { fFillNtuple = val; } + void SetMaxNtupleEntries(Int_t n) { fMaxNtupleEntries = n; } + +private: + + TH1D* fClusterEnergiesHistPtr; + TH1D* fMultiplicitiesHistPtr; + TNtuple* fClusterNtuplePtr; + + bool fFillClusterEnergies; + bool fFillMultiplicities; + bool fFillNtuple; + + Int_t fMaxNtupleEntries; + +}; + +#endif diff --git a/HLT/PHOS/AliHLTPHOSHistogramProducerComponent.cxx b/HLT/PHOS/AliHLTPHOSHistogramProducerComponent.cxx new file mode 100644 index 00000000000..cc0741190e1 --- /dev/null +++ b/HLT/PHOS/AliHLTPHOSHistogramProducerComponent.cxx @@ -0,0 +1,201 @@ + /************************************************************************** + * This file is property of and copyright by the ALICE HLT Project * + * All rights reserved. * + * * + * Primary Authors: Oystein Djuvsland * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +#include "AliHLTPHOSHistogramProducerComponent.h" +#include "AliHLTPHOSProcessor.h" +#include "TH1D.h" +#include "TNtuple.h" +#include "AliHLTPHOSHistogramProducer.h" +#include "AliHLTPHOSCaloClusterContainerStruct.h" + +/** + * @file AliHLTPHOSHistogramProducerComponent.cxx + * @author Oystein Djuvsland + * @date + * @brief A digit maker component for PHOS HLT +*/ + +// see below for class documentation +// or +// refer to README to build package +// or +// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt + + +const AliHLTComponentDataType AliHLTPHOSHistogramProducerComponent::fgkInputDataTypes[]={kAliHLTVoidDataType,{0,"",""}}; + +AliHLTPHOSHistogramProducerComponent gAliHLTPHOSHistogramProducerComponent; + +AliHLTPHOSHistogramProducerComponent::AliHLTPHOSHistogramProducerComponent() : + AliHLTPHOSProcessor(), + fClusterEnergiesHistPtr(0), + fMultiplicitiesHistPtr(0), + fClusterNtuplePtr(0), + fDoFillClusterEnergies(false), + fDoFillMultiplicities(false), + fDoFillNtuple(false), + fHistogramProducerPtr(0) +{ + //see header file for documentation +} + +AliHLTPHOSHistogramProducerComponent::~AliHLTPHOSHistogramProducerComponent() +{ + //see header file for documentation +} + +int +AliHLTPHOSHistogramProducerComponent::Deinit() +{ + //see header file for documentation +} + +const char* +AliHLTPHOSHistogramProducerComponent::GetComponentID() +{ + //see header file for documentation + return "PhosHistoProducer"; +} + + +void +AliHLTPHOSHistogramProducerComponent::GetInputDataTypes(vector& list) +{ + //see header file for documentation + list.clear(); + list.push_back(AliHLTPHOSDefinitions::fgkChannelDataType); + +// const AliHLTComponentDataType* pType=fgkInputDataTypes; +// while (pType->fID!=0) { +// list.push_back(*pType); +// pType++; +// } +} + +AliHLTComponentDataType +AliHLTPHOSHistogramProducerComponent::GetOutputDataType() +{ + //see header file for documentation + return AliHLTPHOSDefinitions::fgkPhosHistDataType; +} + + +void +AliHLTPHOSHistogramProducerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier) +{ + //see header file for documentation + constBase = 30; + inputMultiplier = 5; +} + +// int +// AliHLTPHOSHistogramProducerComponent::DoEvent(const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, +// AliHLTComponentTriggerData& /*trigData*/, AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, +// std::vector& outputBlocks) + +int +AliHLTPHOSHistogramProducerComponent::DoEvent(const AliHLTComponentEventData& evtData, + AliHLTComponentTriggerData& trigData) + + +{ + //see header file for documentation + + UInt_t specification = 0; + + AliHLTPHOSCaloClusterContainerStruct* tmpClusters = 0; + + const AliHLTComponentBlockData* block = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkClusterDataType); + + while(block != 0) + { + fHistogramProducerPtr->Fill(reinterpret_cast(block->fPtr)); + block = GetNextInputBlock(); + } + + if(fDoFillClusterEnergies) + { + PushBack(fClusterEnergiesHistPtr, AliHLTPHOSDefinitions::fgkPhosHistDataType); + } + if(fDoFillMultiplicities) + { + PushBack(fMultiplicitiesHistPtr, AliHLTPHOSDefinitions::fgkPhosHistDataType); + } + if(fDoFillNtuple) + { + PushBack(fClusterNtuplePtr, AliHLTPHOSDefinitions::fgkPhosHistDataType); + } + + return 0; +} + + +int +AliHLTPHOSHistogramProducerComponent::DoInit(int argc, const char** argv ) +{ + //see header file for documentation + + fHistogramProducerPtr = new AliHLTPHOSHistogramProducer(); + + for(int i = 0; i < argc; i++) + { + if(!strcmp("-dofillclusterenergies", argv[i])) + { + fHistogramProducerPtr->SetFillClusterEnergies(true); + fDoFillClusterEnergies = true; + } + if(!strcmp("-dofillmultiplicities", argv[i])) + { + fHistogramProducerPtr->SetFillMultiplicities(true); + fDoFillMultiplicities = true; + } + if(!strcmp("-dofillntuple", argv[i])) + { + fHistogramProducerPtr->SetFillClusterNtuple(true); + fDoFillNtuple = true; + } + if(!strcmp("-maxntupleentries", argv[i])) + { + fHistogramProducerPtr->SetMaxNtupleEntries(atoi(argv[i+1])); + } + } + + fHistogramProducerPtr->InitializeObjects(); + + if(fDoFillClusterEnergies) + { + fClusterEnergiesHistPtr = fHistogramProducerPtr->GetClusterEnergiesHistogram(); + } + if(fDoFillMultiplicities) + { + fMultiplicitiesHistPtr = fHistogramProducerPtr->GetMultiplicitiesHistogram(); + } + if(fDoFillNtuple) + { + fClusterNtuplePtr = fHistogramProducerPtr->GetClusterNtuple(); + } + + //fDigitMakerPtr->SetDigitThreshold(2); + + return 0; +} + +AliHLTComponent* +AliHLTPHOSHistogramProducerComponent::Spawn() +{ + //see header file for documentation + return new AliHLTPHOSHistogramProducerComponent(); +} + diff --git a/HLT/PHOS/AliHLTPHOSHistogramProducerComponent.h b/HLT/PHOS/AliHLTPHOSHistogramProducerComponent.h new file mode 100644 index 00000000000..36e5d0f494d --- /dev/null +++ b/HLT/PHOS/AliHLTPHOSHistogramProducerComponent.h @@ -0,0 +1,128 @@ + +/************************************************************************** + * This file is property of and copyright by the ALICE HLT Project * + * All rights reserved. * + * * + * Primary Authors: Oystein Djuvsland * + * * + * Permission to use, copy, modify and distribute this software and its * + * documentation strictly for non-commercial purposes is hereby granted * + * without fee, provided that the above copyright notice appears in all * + * copies and that both the copyright notice and this permission notice * + * appear in the supporting documentation. The authors make no claims * + * about the suitability of this software for any purpose. It is * + * provided "as is" without express or implied warranty. * + **************************************************************************/ + +#ifndef ALIHLTPHOSHISTOGRAMPRODUCERCOMPONENT_H +#define ALIHLTPHOSHISTOGRAMPRODUCERCOMPONENT_H + + + +/** + * + * + * @file AliHLTPHOSHistogramProducerComponent.cxx + * @author Oystein Djuvsland + * @date + * @brief +*/ + +// see below for class documentation +// or +// refer to README to build package +// or +// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt + +#include "AliHLTPHOSProcessor.h" + +class TH1D; +class TNtuple; +class AliHLTPHOSHistogramProducer; +class AliHLTPHOSCaloClusterContainerStruct; + +/** + * @class AliHLTPHOSHistogramProducerComponent + * + * + * @ingroup alihlt_phos + */ +class AliHLTPHOSHistogramProducerComponent: public AliHLTPHOSProcessor +{ + public: + + /** Constructor */ + AliHLTPHOSHistogramProducerComponent(); + + /** Destructor */ + virtual ~AliHLTPHOSHistogramProducerComponent(); + + /** Copy constructor */ + AliHLTPHOSHistogramProducerComponent(const AliHLTPHOSHistogramProducerComponent &) : + AliHLTPHOSProcessor(), + fClusterEnergiesHistPtr(0), + fMultiplicitiesHistPtr(0), + fClusterNtuplePtr(0), + fDoFillClusterEnergies(false), + fDoFillMultiplicities(false), + fDoFillNtuple(false), + fHistogramProducerPtr(0) + { + //Copy constructor not implemented + } + + /** Assignment */ + AliHLTPHOSHistogramProducerComponent & operator = (const AliHLTPHOSHistogramProducerComponent) + { + //Assignment + return *this; + } + + /** interface function, see @ref AliHLTComponent for description */ + const char* GetComponentID(); + + /** interface function, see @ref AliHLTComponent for description */ + void GetInputDataTypes(std::vector& list); + + /** interface function, see @ref AliHLTComponent for description */ + AliHLTComponentDataType GetOutputDataType(); + + /** interface function, see @ref AliHLTComponent for description */ + void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier); + + /** interface function, see @ref AliHLTComponent for description */ + + using AliHLTPHOSProcessor::DoEvent; + + int DoEvent(const AliHLTComponentEventData& evtData, + AliHLTComponentTriggerData& trigData); + + // Int_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData); + /** interface function, see @ref AliHLTComponent for description */ + AliHLTComponent* Spawn(); + +protected: + + /** interface function, see @ref AliHLTComponent for description */ + int DoInit(int argc, const char** argv); + + /** interface function, see @ref AliHLTComponent for description */ + int Deinit(); + + private: + + TH1D* fClusterEnergiesHistPtr; + TH1D* fMultiplicitiesHistPtr; + TNtuple* fClusterNtuplePtr; + + bool fDoFillClusterEnergies; + bool fDoFillMultiplicities; + bool fDoFillNtuple; + + AliHLTPHOSHistogramProducer* fHistogramProducerPtr; + + /** interface function, see @ref AliHLTComponent for description */ + static const AliHLTComponentDataType fgkInputDataTypes[]; //COMMENT +}; + +#endif diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.cxx index 43c5495294b..a323ab5cc41 100644 --- a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.cxx +++ b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.cxx @@ -29,14 +29,16 @@ AliHLTPHOSRawAnalyzerComponentv2::AliHLTPHOSRawAnalyzerComponentv2():AliHLTPHOSRcuProcessor(), - fAnalyzerPtr(0), - fMapperPtr(0), - fSanityInspectorPtr(0), - fDecoderPtr(0), - fAltroDataPtr(0), - fAltroBunchPtr(0), - fNOKBlocks(0), - fAlgorithm(0) + fAnalyzerPtr(0), + fMapperPtr(0), + fSanityInspectorPtr(0), + fDecoderPtr(0), + fAltroDataPtr(0), + fAltroBunchPtr(0), + fNOKBlocks(0), + fAlgorithm(0), + fOffset(0) + { //comment fMapperPtr = new AliHLTPHOSMapper(); @@ -154,7 +156,8 @@ AliHLTPHOSRawAnalyzerComponentv2::DoEvent( const AliHLTComponentEventData& evtDa } fPhosEventCount++; - + size = blockSize; + return 0; }//end DoEvent @@ -205,7 +208,7 @@ AliHLTPHOSRawAnalyzerComponentv2::DoIt(const AliHLTComponentBlockData* iter, Ali fAnalyzerPtr->Evaluate(0, fAltroBunchPtr->GetBunchSize()); channelDataPtr->fChannelID = fMapperPtr->GetChannelID(iter->fSpecification, fAltroDataPtr->GetHadd()); - channelDataPtr->fEnergy = static_cast(fAnalyzerPtr->GetEnergy()); + channelDataPtr->fEnergy = static_cast(fAnalyzerPtr->GetEnergy()) - fOffset; channelDataPtr->fTime = static_cast(fAnalyzerPtr->GetTiming()); channelDataPtr->fCrazyness = static_cast(crazyness); channelCount++; @@ -233,6 +236,14 @@ AliHLTPHOSRawAnalyzerComponentv2::DoInit( int argc, const char** argv ) fPrintInfo = kFALSE; int iResult=0; fMapperPtr = new AliHLTPHOSMapper(); + + for(int i = 0; i < argc; i++) + { + if(!strcmp("-offset", argv[i])) + { + fOffset = atoi(argv[i+1]); + } + } if(fMapperPtr->GetIsInitializedMapping() == false) { diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.h index b7198c93bee..b79b0510585 100644 --- a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.h +++ b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.h @@ -56,6 +56,8 @@ class AliHLTPHOSRawAnalyzerComponentv2 : public AliHLTPHOSRcuProcessor Short_t fAlgorithm; + Int_t fOffset; + }; #endif diff --git a/HLT/PHOS/AliHLTPHOSRecPointContainerStruct.h b/HLT/PHOS/AliHLTPHOSRecPointContainerStruct.h index fc41cc12b57..103822024db 100644 --- a/HLT/PHOS/AliHLTPHOSRecPointContainerStruct.h +++ b/HLT/PHOS/AliHLTPHOSRecPointContainerStruct.h @@ -42,7 +42,7 @@ struct AliHLTPHOSRecPointContainerStruct UInt_t fNRecPoints; /** Array of rec points in the container */ - AliHLTPHOSRecPointDataStruct fRecPointArray[100]; + AliHLTPHOSRecPointDataStruct fRecPointArray[400]; }; -- 2.43.5