]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- fixes due to new PHOS mapping
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Aug 2009 18:29:23 +0000 (18:29 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 14 Aug 2009 18:29:23 +0000 (18:29 +0000)
- changing the format of the digits
- adding histogram producer for physics histograms
- adding support for new RCU firmware
- adding readers for accessing memory blocks of structs
- adding reconstruction macros
- small bug fixes

56 files changed:
HLT/PHOS/AliHLTPHOSAgent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSAgent.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSBase.h
HLT/PHOS/AliHLTPHOSCaloClusterHeaderStruct.h
HLT/PHOS/AliHLTPHOSCaloClusterReader.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSCaloClusterReader.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSClusterAnalyser.cxx
HLT/PHOS/AliHLTPHOSClusterAnalyser.h
HLT/PHOS/AliHLTPHOSClusterAnalyserComponent.cxx
HLT/PHOS/AliHLTPHOSClusterizer.cxx
HLT/PHOS/AliHLTPHOSClusterizer.h
HLT/PHOS/AliHLTPHOSClusterizerComponent.cxx
HLT/PHOS/AliHLTPHOSClusterizerComponent.h
HLT/PHOS/AliHLTPHOSDefinitions.cxx
HLT/PHOS/AliHLTPHOSDefinitions.h
HLT/PHOS/AliHLTPHOSDigitMaker.cxx
HLT/PHOS/AliHLTPHOSDigitMaker.h
HLT/PHOS/AliHLTPHOSDigitMakerComponent.cxx
HLT/PHOS/AliHLTPHOSESDCaloClusterMaker.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSESDCaloClusterMaker.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSESDCaloClusterMakerComponent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSESDCaloClusterMakerComponent.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSESDCaloClusterWriterComponent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSESDCaloClusterWriterComponent.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSESDEntriesMakerComponent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSESDEntriesMakerComponent.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSESDMaker.h
HLT/PHOS/AliHLTPHOSHistogramProducer.cxx
HLT/PHOS/AliHLTPHOSHistogramProducer.h
HLT/PHOS/AliHLTPHOSHistogramProducerComponent.cxx
HLT/PHOS/AliHLTPHOSHistogramProducerComponent.h
HLT/PHOS/AliHLTPHOSLinkDef.h
HLT/PHOS/AliHLTPHOSMapper.cxx
HLT/PHOS/AliHLTPHOSMapper.h
HLT/PHOS/AliHLTPHOSModuleCalibrationProcessorComponent.cxx
HLT/PHOS/AliHLTPHOSPhysicsAnalyzer.cxx
HLT/PHOS/AliHLTPHOSPhysicsHistogramProducer.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSPhysicsHistogramProducer.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzer.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzer.h
HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv2.h
HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.cxx
HLT/PHOS/AliHLTPHOSRawAnalyzerCrude.h
HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponentv3.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponentv3.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRcuCalibrationProcessorComponent.cxx
HLT/PHOS/AliHLTPHOSRcuProperties.cxx
HLT/PHOS/AliHLTPHOSUtilities.cxx
HLT/PHOS/AliHLTPHOSUtilities.h
HLT/PHOS/OnlineDisplay/Makefile
HLT/PHOS/macros/rec-hlt-phos-v3.C [new file with mode: 0644]
HLT/PHOS/macros/rec-hlt-phos.C [new file with mode: 0644]
HLT/libAliHLTPHOS.pkg

diff --git a/HLT/PHOS/AliHLTPHOSAgent.cxx b/HLT/PHOS/AliHLTPHOSAgent.cxx
new file mode 100644 (file)
index 0000000..828f404
--- /dev/null
@@ -0,0 +1,280 @@
+
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project        * 
+//* ALICE Experiment at CERN, 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   AliHLTPHOSAgent.cxx
+    @author Oystein Djuvsland
+    @date   
+    @brief  Agent of the libAliHLTPHOS library
+*/
+
+#include "AliHLTPHOSAgent.h"
+#include "AliHLTConfiguration.h"
+#include "AliHLTPHOSDefinitions.h"
+#include "AliHLTOUT.h"
+#include "AliHLTOUTHandlerChain.h"
+#include "AliRunLoader.h"
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
+#include "AliHLTPHOSConstants.h"
+#include "AliHLTPHOSMapper.h"
+
+/** global instance for agent registration */
+AliHLTPHOSAgent gAliHLTPHOSAgent;
+
+// component headers
+#include "AliHLTPHOSCalibrationComponent.h"
+#include "AliHLTPHOSClusterAnalyserComponent.h"
+#include "AliHLTPHOSClusterizerComponent.h"
+#include "AliHLTPHOSDigitMakerComponent.h"
+#include "AliHLTPHOSESDEntriesMakerComponent.h"
+#include "AliHLTPHOSHistogramProducerComponent.h"
+#include "AliHLTPHOSModuleCalibrationProcessorComponent.h"
+#include "AliHLTPHOSMonitorTriggerComponent.h"
+#include "AliHLTPHOSRawAnalyzerComponent.h"
+#include "AliHLTPHOSRawAnalyzerCrudeComponentv2.h"
+#include "AliHLTPHOSRawAnalyzerPeakFinderComponent.h"
+#include "AliHLTPHOSRcuCalibrationProcessorComponent.h"
+#include "AliHLTPHOSRcuDAComponent.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTPHOSAgent)
+
+AliHLTPHOSAgent::AliHLTPHOSAgent()
+  :
+  AliHLTModuleAgent("PHOS"),
+  fRawDataHandler(NULL)
+{
+  // see header file for class documentation
+  // or
+  // refer to README to build package
+  // or
+  // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+}
+
+AliHLTPHOSAgent::~AliHLTPHOSAgent()
+{
+  // see header file for class documentation
+}
+
+int AliHLTPHOSAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
+                                         AliRawReader* /*rawReader*/,
+                                        AliRunLoader* /*runloader*/) const
+{
+  // see header file for class documentation
+  if (handler) 
+    {
+      //      const char* cdbEntry="PHOS/Calib/Parameters";
+      //      AliCDBManager* pMan=AliCDBManager::Instance();
+//       AliPHOSParam* pPHOSParam=NULL;
+//       if (pMan) 
+//     {
+//       AliCDBEntry *pEntry = pMan->Get(cdbEntry);
+//       if (pEntry && 
+//           pEntry->GetObject() &&
+//           (pPHOSParam=dynamic_cast<AliPHOSParam*>(pEntry->GetObject()))) 
+//         {
+//         } else 
+//         {
+//           HLTWarning("can not load AliPHOSParam from CDB entry %s", cdbEntry);
+//         }
+//     }
+
+
+      int moduleStart = 0;
+      int moduleEnd = PhosHLTConst::NMODULES - 1;
+      int rcuStart = 0;
+      int rcuEnd = PhosHLTConst::NRCUSPERMODULE - 1;
+    
+      TString mergerInput;
+      TString sinkClusterInput;
+      TString emInput;
+      for (int module = moduleStart; module < moduleEnd; module++) 
+       {
+         TString clInput;
+
+         for(int rcu = rcuStart; rcu < rcuEnd; rcu++) 
+           {
+             TString arg, publisher, ra, dm;
+             // raw data publisher components
+             publisher.Form("PHOS-RP_%02d_%d", module, rcu);
+       
+             arg.Form("-datatype 'DDL_RAW ' 'PHOS'  -dataspec 0x ", 0x1 << (module*PhosHLTConst::NRCUSPERMODULE + rcu));
+             handler->CreateConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
+
+             // Raw analyzer
+             arg = "";
+             ra.Form("PHOS-RA_%02d_%d", module, rcu);
+             handler->CreateConfiguration(ra.Data(), "PhosRawCrudev2", publisher.Data(), arg.Data());
+
+             // digit maker components
+             dm.Form("PHOS-DM_%02d_%d", module, rcu);
+             arg="";
+             arg.Form("-sethighgainfactor 0.005 -setlowgainfactor 0.08 -setdigitthresholds 0.005 0.002");
+             handler->CreateConfiguration(dm.Data(), "PhosDigitMaker", ra.Data(), arg.Data());
+
+             if(clInput.Length() > 0) clInput += " ";
+             clInput+=dm;
+           }
+         TString arg, cl, ca;
+
+         cl.Form("PHOS-CF_%02d", module);
+         arg = "";
+         arg.Form("-digitthreshold 0.005 -recpointthreshold 0.1 -modulemode");
+         handler->CreateConfiguration(cl.Data(), "PhosClusterizer", clInput.Data(), arg.Data());
+       
+         ca.Form("PHOS-CA_%02d", module);
+         arg = " ";
+         handler->CreateConfiguration(ca.Data(), "PhosClusterAnalyser", cl.Data(), arg.Data());
+
+         if(emInput.Length() > 0) emInput += " ";
+         emInput += ca;
+       }
+      
+      TString arg, em;
+  
+      // tracker finder components
+      em.Form("PHOS-EM");
+      arg = " ";
+      handler->CreateConfiguration(em.Data(), "PhosEsdEntriesMaker", emInput.Data(), " ");
+    }
+  return 0;
+}
+
+const char* AliHLTPHOSAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
+                                                   AliRunLoader* runloader) const
+{
+  // see header file for class documentation
+  if (runloader) {
+    // reconstruction chains for AliRoot simulation
+    // Note: run loader is only available while running embedded into
+    // AliRoot simulation
+    if (runloader->GetLoader("PHOSLoader") != NULL)
+      return "PHOS-EM";
+  }
+  return NULL;
+}
+
+const char* AliHLTPHOSAgent::GetRequiredComponentLibraries() const
+{
+  // see header file for class documentation
+  return NULL;
+}
+
+int AliHLTPHOSAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
+{
+  // see header file for class documentation
+  if (!pHandler) return -EINVAL;
+  pHandler->AddComponent(new AliHLTPHOSRawAnalyzerCrudeComponentv2);
+  pHandler->AddComponent(new AliHLTPHOSDigitMakerComponent);
+  pHandler->AddComponent(new AliHLTPHOSClusterizerComponent);
+  pHandler->AddComponent(new AliHLTPHOSClusterAnalyserComponent);                       
+  pHandler->AddComponent(new AliHLTPHOSESDEntriesMakerComponent);
+
+  return 0;
+}
+
+int AliHLTPHOSAgent::GetHandlerDescription(AliHLTComponentDataType dt,
+                                         AliHLTUInt32_t spec,
+                                         AliHLTOUTHandlerDesc& desc) const
+{
+  // see header file for class documentation
+
+  AliHLTPHOSMapper mapper;
+  mapper.InitDDLSpecificationMapping();
+  
+  // raw data blocks to be fed into offline reconstruction
+  if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginPHOS)) 
+    {
+      if(mapper.GetDDLFromSpec(spec) >= 0)
+       {
+         desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
+         return 1;
+       } 
+      else 
+       {
+         HLTWarning("Handler can not process data inconsistent with a single PHOS DDL from specification % d", spec);
+         return 0;
+       }
+    }
+  return 0;
+}
+
+AliHLTOUTHandler* AliHLTPHOSAgent::GetOutputHandler(AliHLTComponentDataType dt,
+                                                  AliHLTUInt32_t /*spec*/)
+{
+  // see header file for class documentation
+
+  // raw data blocks to be fed into offline reconstruction
+  if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginPHOS)) 
+    {
+      if (!fRawDataHandler) 
+       {
+         fRawDataHandler = new AliHLTPHOSAgent::AliHLTPHOSRawDataHandler;
+       }
+      return fRawDataHandler;
+    }
+
+  return NULL;
+}
+
+int AliHLTPHOSAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
+{
+  // see header file for class documentation
+  if (pInstance==NULL) return -EINVAL;
+
+  if (pInstance==fRawDataHandler) {
+    delete fRawDataHandler;
+    fRawDataHandler=NULL;
+  }
+  return 0;
+}
+
+AliHLTPHOSAgent::AliHLTPHOSRawDataHandler::AliHLTPHOSRawDataHandler()
+{
+  // see header file for class documentation
+}
+
+AliHLTPHOSAgent::AliHLTPHOSRawDataHandler::~AliHLTPHOSRawDataHandler()
+{
+  // see header file for class documentation
+}
+
+int AliHLTPHOSAgent::AliHLTPHOSRawDataHandler::ProcessData(AliHLTOUT* pData)
+{
+  // see header file for class documentation
+  if (!pData) return -EINVAL;
+
+  AliHLTPHOSMapper mapper;
+  mapper.InitDDLSpecificationMapping();
+
+  AliHLTComponentDataType dt = kAliHLTVoidDataType;
+  AliHLTUInt32_t spec=kAliHLTVoidDataSpec;
+  int iResult = pData->GetDataBlockDescription(dt, spec);
+  if (iResult>=0) 
+    {
+      int ddl = -1;
+      if((ddl = mapper.GetDDLFromSpec(spec)) >=0)
+       {
+         iResult = ddl;
+       }
+    } 
+  else 
+    {
+      HLTError("Handler can not process data inconsistent with a single PHOS DDL from specification % d", spec);
+      iResult=-EBADMSG;
+    }
+  return iResult;
+}
diff --git a/HLT/PHOS/AliHLTPHOSAgent.h b/HLT/PHOS/AliHLTPHOSAgent.h
new file mode 100644 (file)
index 0000000..7f1dabd
--- /dev/null
@@ -0,0 +1,135 @@
+
+#ifndef ALIHLTPHOSAGENT_H
+#define ALIHLTPHOSAGENT_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/** @file   AliHLTPHOSAgent.h
+    @author Oystein Djuvsland
+    @date   
+    @brief  Agent of the libAliHLTPHOS library
+*/
+
+#include "AliHLTModuleAgent.h"
+#include "AliHLTOUTHandlerEquId.h"
+
+class AliHLTOUTHandlerChain;
+
+/**
+ * @class AliHLTPHOSAgent
+ * This is the agent for the AliHLTPHOS library.
+ *
+ * @ingroup alihlt_system
+ */
+class AliHLTPHOSAgent : public AliHLTModuleAgent {
+ public:
+  /**
+   * standard constructor. The agent is automatically registered in the
+   * global agent manager
+   */
+  AliHLTPHOSAgent();
+  /** destructor */
+  virtual ~AliHLTPHOSAgent();
+
+  /**
+   * Register all configurations belonging to this module with the
+   * AliHLTConfigurationHandler. The agent can adapt the configurations
+   * to be registered to the current AliRoot setup by checking the
+   * runloader.
+   * @param handler      the configuration handler
+   * @param rawReader    AliRawReader instance
+   * @param runloader    AliRoot runloader
+   * @return neg. error code if failed
+   */
+  int CreateConfigurations(AliHLTConfigurationHandler* handler,
+                          AliRawReader* rawReader=NULL,
+                          AliRunLoader* runloader=NULL) const;
+
+  /**
+   * Get the top configurations belonging to this module.
+   * A top configuration describes a processing chain. It can simply be
+   * described by the last configuration(s) in the chain. 
+   * The agent can adapt the configurations to be registered to the current
+   * AliRoot setup by checking the runloader.
+   * @param rawReader    AliRawReader instance
+   * @param runloader    AliRoot runloader
+   * @return number of configurations, neg. error code if failed
+   */
+  const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
+                                     AliRunLoader* runloader=NULL) const;
+
+  /**
+   * Component libraries which the configurations of this agent depend on.
+   * @return list of component libraries as a blank-separated string.
+   */
+  const char* GetRequiredComponentLibraries() const;
+
+  /**
+   * Register components for the AliHLTPHOS library.
+   * @param pHandler  [in] instance of the component handler          
+   */
+  int RegisterComponents(AliHLTComponentHandler* pHandler) const;
+
+  /**
+   * Get handler decription for PHOS data in the HLTOUT data stream.
+   * @param dt        [in] data type of the block
+   * @param spec      [in] specification of the block
+   * @param desc      [out] handler description
+   * @return 1 if the agent can provide a handler, 0 if not
+   */
+  int GetHandlerDescription(AliHLTComponentDataType dt,
+                           AliHLTUInt32_t spec,
+                           AliHLTOUTHandlerDesc& desc) const;
+
+  /**
+   * Get specific handler for PHOS data in the HLTOUT data stream.
+   * @param dt        [in] data type of the block
+   * @param spec      [in] specification of the block
+   * @return pointer to handler
+   */
+  AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
+                                    AliHLTUInt32_t spec);
+
+  /**
+   * Delete an HLTOUT handler.
+   * @param pInstance      pointer to handler
+   */
+  int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
+
+  /**
+   * The handler for PHOS RAW data in the HLTOUT stream.
+   */
+  class AliHLTPHOSRawDataHandler : public AliHLTOUTHandlerEquId {
+  public:
+    /** constructor */
+    AliHLTPHOSRawDataHandler();
+    /** destructor */
+    ~AliHLTPHOSRawDataHandler();
+
+    /**
+     * Process a data block.
+     * Decode specification and return equipment id of the data block.
+     * The data itsself i untouched.
+     * @return equipment id the block should be used for.
+     */
+    int ProcessData(AliHLTOUT* pData);
+
+  private:
+
+  };
+
+ protected:
+
+ private:
+  /** copy constructor prohibited */
+  AliHLTPHOSAgent(const AliHLTPHOSAgent&);
+  /** assignment operator prohibited */
+  AliHLTPHOSAgent& operator=(const AliHLTPHOSAgent&);
+
+  /** handler for PHOS raw data in the HLTOUT stream */
+  AliHLTPHOSRawDataHandler* fRawDataHandler; //!transient
+
+  ClassDef(AliHLTPHOSAgent, 1);
+};
+
+#endif
index f9d079fac51f4952e14244c8e99281e3fe419647..3bb1d00d396fb552a013fe253af716c04bafcf82 100644 (file)
@@ -32,7 +32,7 @@
 #include "AliHLTLogging.h"
 
 using namespace PhosHLTConst;
-using namespace std;
+
 
 //
 // Base class for all PHOS HLT classes.
index 23c52cb8e5d429a088d51916e9f6cae9c33fe3ce..bdbe80a0f0a4b7e9c8da293b1ddec48eb1014857 100644 (file)
@@ -24,8 +24,7 @@
 
 struct AliHLTPHOSCaloClusterHeaderStruct
 {
-  //  Int_t fShmAddress;
-  Short_t fNClusters;         
+  Short_t fNClusters;
 };
 
 #endif
diff --git a/HLT/PHOS/AliHLTPHOSCaloClusterReader.cxx b/HLT/PHOS/AliHLTPHOSCaloClusterReader.cxx
new file mode 100644 (file)
index 0000000..ba6707f
--- /dev/null
@@ -0,0 +1,77 @@
+/**************************************************************************
+ * 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 "AliHLTPHOSCaloClusterReader.h"
+#include "AliHLTPHOSCaloClusterDataStruct.h"
+#include "AliHLTPHOSCaloClusterHeaderStruct.h"
+
+AliHLTPHOSCaloClusterReader::AliHLTPHOSCaloClusterReader(): 
+  fCurrentClusterPtr(0),
+  fIsSetMemory(false),
+  fMaxCnt(0),
+  fCurrentCnt(0)
+{
+  //See header file for documentation
+}
+
+
+AliHLTPHOSCaloClusterReader::~AliHLTPHOSCaloClusterReader()
+{
+  //See header file for documentation
+}
+
+
+AliHLTPHOSCaloClusterDataStruct*   
+AliHLTPHOSCaloClusterReader::NextCluster()
+{
+  // See header file for documentation
+  AliHLTPHOSCaloClusterDataStruct* tmpChannelPtr = 0;
+  if(fIsSetMemory == false) 
+    {
+      return 0;
+    }
+  if(fCurrentCnt < fMaxCnt)
+    {
+      //cout << "Reader: E = " << fCurrentClusterPtr->fEnergy << endl;
+      tmpChannelPtr = reinterpret_cast<AliHLTPHOSCaloClusterDataStruct*>(fCurrentClusterPtr);
+      fCurrentCnt++;
+      fCurrentClusterPtr = (AliHLTPHOSCaloClusterDataStruct*)((UChar_t*)fCurrentClusterPtr + sizeof(AliHLTPHOSCaloClusterDataStruct) + (fCurrentClusterPtr->fNCells-1)*(sizeof(Float_t) + sizeof(Short_t)));
+      return tmpChannelPtr;
+    }
+  else
+    {
+      Reset();
+      return 0;
+    }
+  return 0;
+}
+
+void
+AliHLTPHOSCaloClusterReader::SetMemory(AliHLTPHOSCaloClusterHeaderStruct* clusterHeaderPtr)
+{
+  //See header file for documentation
+  fMaxCnt = clusterHeaderPtr->fNClusters;
+  fCurrentClusterPtr = reinterpret_cast<AliHLTPHOSCaloClusterDataStruct*>((UChar_t*)(clusterHeaderPtr) + sizeof(AliHLTPHOSCaloClusterHeaderStruct));
+  fIsSetMemory = true;
+}
+
+
+void
+AliHLTPHOSCaloClusterReader::Reset()
+{
+  //See header file for documentation
+  fCurrentCnt = 0;
+  fIsSetMemory = false;
+}
diff --git a/HLT/PHOS/AliHLTPHOSCaloClusterReader.h b/HLT/PHOS/AliHLTPHOSCaloClusterReader.h
new file mode 100644 (file)
index 0000000..0c44079
--- /dev/null
@@ -0,0 +1,56 @@
+
+#ifndef ALIHLTPHOSCALOCLUSTERREADER_H
+#define ALIHLTPHOSCALOCLUSTERREADER_H
+
+/**************************************************************************
+ * This file is property of and copyright by the Experimental Nuclear     *
+ * Physics Group, Dep. of Physics                                         *
+ * University of Oslo, Norway, 2007                                       *
+ *                                                                        *
+ * Author: Per Thomas Hille <perthi@fys.uio.no> for the ALICE HLT Project.*
+ * Contributors are mentioned in the code where appropriate.              *
+ * Please report bugs to perthi@fys.uio.no                                *
+ *                                                                        *
+ * 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 "Rtypes.h"
+#include "AliHLTPHOSBase.h"
+
+class AliHLTPHOSCaloClusterDataStruct;
+class AliHLTPHOSCaloClusterHeaderStruct;
+
+class  AliHLTPHOSCaloClusterReader
+{
+ public:
+  AliHLTPHOSCaloClusterReader();
+  virtual ~AliHLTPHOSCaloClusterReader();
+  AliHLTPHOSCaloClusterDataStruct*   NextCluster();
+  void SetMemory(AliHLTPHOSCaloClusterHeaderStruct* clusterHeaderPtr);
+  void Reset();
+
+ private:
+  AliHLTPHOSCaloClusterReader(const  AliHLTPHOSCaloClusterReader & );
+  AliHLTPHOSCaloClusterReader & operator = (const  AliHLTPHOSCaloClusterReader &);
+  
+  /* Pointer to the current cluster to be read */
+  AliHLTPHOSCaloClusterDataStruct* fCurrentClusterPtr; // !transient Pointer to the current cluster to be read
+
+  /* Check if the memory has been set */
+  bool fIsSetMemory; //Check if the memory has been set
+
+  /* Max number of clusters */
+  int fMaxCnt;  // Max number of clusters
+
+  /* The current number of clusters */
+  int fCurrentCnt; // The current number of clusters
+
+};
+
+#endif
index bc1fe8956f12f25a2b1d362971d06ce1e3c6b9ec..c377c2c4e9af45e7533acf85fa77e640cdae5cbb 100644 (file)
@@ -34,8 +34,9 @@
 #include "AliHLTPHOSCaloClusterHeaderStruct.h"
 #include "AliHLTPHOSCaloClusterDataStruct.h"
 #include "AliHLTPHOSPhysicsAnalyzer.h"
-#include "AliPHOSGeometry.h"
+#include "AliPHOSGeoUtils.h"
 #include "TMath.h"
+#include "TVector3.h"
 
 ClassImp(AliHLTPHOSClusterAnalyser);
 
@@ -57,7 +58,8 @@ AliHLTPHOSClusterAnalyser::AliHLTPHOSClusterAnalyser() :
   fLogWeight = 4.5;
 
   fAnalyzerPtr = new AliHLTPHOSPhysicsAnalyzer();
-  fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
+  //  fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
+  fPHOSGeometry = new AliPHOSGeoUtils("PHOS", "noCPV");
 }
 
 AliHLTPHOSClusterAnalyser::~AliHLTPHOSClusterAnalyser() 
@@ -102,7 +104,7 @@ AliHLTPHOSClusterAnalyser::CalculateCenterOfGravity()
          
          xi = digit->fX;
          zi = digit->fZ;
-         //cout << "COG digits (x:z:amp:time): " << xi << " : " << zi << " : " << digit->fEnergy << " : " << digit->fTime << endl;
+         //  cout << "COG digits (x:z:E:time): " << xi << " : " << zi << " : " << digit->fEnergy << " : " << digit->fTime << endl;
          if (recPoint->fAmp > 0 && digit->fEnergy > 0) 
            {
              Float_t w = TMath::Max( 0., fLogWeight + TMath::Log( digit->fEnergy / recPoint->fAmp ) ) ;
@@ -164,33 +166,29 @@ AliHLTPHOSClusterAnalyser::CreateClusters(UInt_t availableSize, UInt_t& totSize)
   UShort_t* cellIDPtr = &(caloClusterPtr->fCellsAbsId);
   Float_t* cellAmpFracPtr = &(caloClusterPtr->fCellsAmpFraction);
   
-  Float_t localPos[2];
-
-  Float_t globalPos[3];
   Int_t id = -1;
-  
-  //fPHOSGeometry = AliPHOSGeometry::GetInstance("noCPV");
+  TVector3 globalPos;
 
-  for(Int_t i = 0; i < fNRecPoints; i++) //FIXME needs fix when we start unfolding (number of clusters not necessarily same as number of recpoints gotten from the clusterizer
+  for(Int_t i = 0; i < fNRecPoints; i++) //TODO needs fix when we start unfolding (number of clusters not necessarily same as number of recpoints gotten from the clusterizer
     {
       
       if(availableSize < (totSize + maxClusterSize)) 
        {
          return -1; //Might get out of buffer, exiting
        }
-      localPos[0] = recPointPtr->fX;
-      localPos[1] = recPointPtr->fZ;
+      //      localPos[0] = recPointPtr->fX;
+      //      localPos[1] = recPointPtr->fZ;
+      //       fAnalyzerPtr->GlobalPosition( localPos, globalPos, recPointPtr->fModule);
       
-      fAnalyzerPtr->GlobalPosition( localPos, globalPos, recPointPtr->fModule);
+
+      //      cout << "Local Position (x:z:module): " << recPointPtr->fX << " : "<< recPointPtr->fZ << " : " << recPointPtr->fModule << endl;
+      fPHOSGeometry->Local2Global(recPointPtr->fModule + 1, recPointPtr->fX, recPointPtr->fZ, globalPos);
+      // cout << "Global Position (x:y:z): " << globalPos[0] << " : "<< globalPos[1] << " : " << globalPos[2] << endl << endl;
 
       caloClusterPtr->fGlobalPos[0] = globalPos[0];
       caloClusterPtr->fGlobalPos[1] = globalPos[1];
       caloClusterPtr->fGlobalPos[2] = globalPos[2];
 
-      //cout << "Local Position (x:z:module): " << localPos[0] << " : "<< localPos[1] << " : " << recPointPtr->fModule << endl;
-
-      //cout << "Global Position (x:y:z): " << globalPos[0] << " : "<< globalPos[1] << " : " << globalPos[2] << endl << endl;
-
       caloClusterPtr->fNCells = recPointPtr->fMultiplicity;
   
       cellIDPtr = &(caloClusterPtr->fCellsAbsId);
@@ -198,7 +196,7 @@ AliHLTPHOSClusterAnalyser::CreateClusters(UInt_t availableSize, UInt_t& totSize)
      
       for(UInt_t j = 0; j < caloClusterPtr->fNCells; j++)
        {
-         // fPHOSGeometry->RelPosToAbsId((Int_t)(recPointPtr->fModule + 1), (double)(digitPtr->fX), (double)(digitPtr->fZ), id);
+         fPHOSGeometry->RelPosToAbsId((Int_t)(recPointPtr->fModule + 1), (double)(digitPtr->fX), (double)(digitPtr->fZ), id);
          *cellIDPtr = id;
          *cellAmpFracPtr = digitPtr->fEnergy/recPointPtr->fAmp;
          digitPtr++;
@@ -207,7 +205,7 @@ AliHLTPHOSClusterAnalyser::CreateClusters(UInt_t availableSize, UInt_t& totSize)
        }
 
       caloClusterPtr->fEnergy = recPointPtr->fAmp;
-      
+      //      cout << "CA: Energy End: " << caloClusterPtr->fEnergy << endl;
       if(fDoClusterFit)
        {
          FitCluster(recPointPtr);
@@ -249,13 +247,16 @@ AliHLTPHOSClusterAnalyser::CreateClusters(UInt_t availableSize, UInt_t& totSize)
        }
 
       caloClusterPtr->fClusterType = '\0';
-      totSize += sizeof(AliHLTPHOSCaloClusterDataStruct) + (caloClusterPtr->fNCells)*(sizeof(Short_t) +sizeof(Float_t)-1);   
+      //      totSize += sizeof(AliHLTPHOSCaloClusterDataStruct) + (caloClusterPtr->fNCells)*(sizeof(Short_t) +sizeof(Float_t)-1);   
+      totSize += sizeof(AliHLTPHOSCaloClusterDataStruct) + (caloClusterPtr->fNCells-1)*(sizeof(Short_t) + sizeof(Float_t));   
 
-      caloClusterPtr = reinterpret_cast<AliHLTPHOSCaloClusterDataStruct*>(cellAmpFracPtr);
+      //      caloClusterPtr = reinterpret_cast<AliHLTPHOSCaloClusterDataStruct*>(cellAmpFracPtr);
+      caloClusterPtr = reinterpret_cast<AliHLTPHOSCaloClusterDataStruct*>(cellIDPtr);
       recPointPtr = reinterpret_cast<AliHLTPHOSRecPointDataStruct*>(digitPtr);
       digitPtr = &(recPointPtr->fDigits);  
     }
+  //  cout << "CA: Energy End: " << fCaloClusterDataPtr->fEnergy << endl;
+  //cout << "CA totSize: " << totSize << endl;
   return fNRecPoints;
 
 }
index 793fc0205237bdba547e24fff7c61339189163b7..5a037aa11ca42541c2e6ece98149485de8e99e18 100644 (file)
@@ -41,7 +41,7 @@ class AliHLTPHOSRecPointHeaderStruct;
 class AliHLTPHOSRecPointDataStruct;
 class AliHLTPHOSCaloClusterHeaderStruct;
 class AliHLTPHOSCaloClusterDataStruct;
-class AliPHOSGeometry;
+class AliPHOSGeoUtils;
 
 /** 
  * @class AliHLTPHOSClusterAnalyser
@@ -196,7 +196,7 @@ private:
   AliHLTPHOSCaloClusterHeaderStruct *fCaloClusterHeaderPtr;   //! transient
 
   /** Instance of the PHOS geometry */
-  AliPHOSGeometry *fPHOSGeometry;                           //! transient
+  AliPHOSGeoUtils *fPHOSGeometry;                           //! transient
 
   //TODO: should not use PhysicsAnalyzer for global coord!
   /** */
index 48e3a8ec82e4afb47975deb4257c899119dfe576..9de96d749f0f62427ac8ca02b8c01ecae7b4709f 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "AliHLTPHOSClusterAnalyserComponent.h"
 #include "AliHLTPHOSClusterAnalyser.h"
-#include "AliHLTPHOSRecPointContainerStruct.h"
+#include "AliHLTPHOSRecPointHeaderStruct.h"
 #include "AliHLTPHOSCaloClusterDataStruct.h"
 #include "AliHLTPHOSCaloClusterHeaderStruct.h"
 
@@ -97,7 +97,7 @@ AliHLTPHOSClusterAnalyserComponent::GetOutputDataType()
 {
   //See headerfile for documentation
 
-  return AliHLTPHOSDefinitions::fgkClusterDataType;
+  return AliHLTPHOSDefinitions::fgkCaloClusterDataType;
 }
 
 void
@@ -149,6 +149,8 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
         }
       specification = specification|iter->fSpecification;
       fClusterAnalyserPtr->SetRecPointDataPtr(reinterpret_cast<AliHLTPHOSRecPointHeaderStruct*>(iter->fPtr));
+      HLTDebug("Number of rec points: %d", (reinterpret_cast<AliHLTPHOSRecPointHeaderStruct*>(iter->fPtr))->fNRecPoints);
+
       if(fDoDeconvolution)
        {
          fClusterAnalyserPtr->DeconvoluteClusters();
@@ -166,6 +168,11 @@ AliHLTPHOSClusterAnalyserComponent::DoEvent(const AliHLTComponentEventData& evtD
       HLTError("Running out of buffer, exiting for safety.");
       return -ENOBUFS;
     }
+  for(int i = 0; i < nClusters; i++)
+    {
+
+    }
+
   HLTDebug("Number of clusters: %d", nClusters); 
   caloClusterHeaderPtr->fNClusters = nClusters;
   mysize += sizeof(AliHLTPHOSCaloClusterHeaderStruct); 
index 2870d7eed0aa5b340d0c822475e4921aee31ae25..3b29763ea65c82dc0d00fb36d67f1e8682b270d4 100644 (file)
@@ -75,6 +75,7 @@ AliHLTPHOSClusterizer::~AliHLTPHOSClusterizer()
 void 
 AliHLTPHOSClusterizer::SetRecPointDataPtr(AliHLTPHOSRecPointDataStruct* recPointDataPtr)
 {
+  // See header file for documentation
   fRecPointDataPtr = recPointDataPtr;
 }
 
@@ -123,6 +124,7 @@ AliHLTPHOSClusterizer::ClusterizeEvent(UInt_t availableSize, UInt_t& totSize)
 
       fRecPointDataPtr->fAmp = 0;
       fRecPointDataPtr->fModule = fDigitContainerPtr->fDigitDataStruct[i].fModule;
+
       // Assigning digit data to the digit pointer
       fRecPointDataPtr->fDigits = fDigitContainerPtr->fDigitDataStruct[i];
 
@@ -187,15 +189,36 @@ AliHLTPHOSClusterizer::AreNeighbours(AliHLTPHOSDigitDataStruct* digit1,
   //see header file for documentation
   if ( (digit1->fModule == digit2->fModule) /*&& (coord1[1]==coord2[1])*/ ) // inside the same PHOS module
     { 
-      Int_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ );  
-      Int_t coldiff = TMath::Abs( digit1->fX - digit2->fX ); 
-      if (( coldiff <= 1   &&  rowdiff < 1 ) || ( coldiff < 1   &&  rowdiff <= 1 ))
+//       Int_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ );  
+//       Int_t coldiff = TMath::Abs( digit1->fX - digit2->fX ); 
+//       if (( coldiff <= 1   &&  rowdiff == 0 ) || ( coldiff == 0 &&  rowdiff <= 1 ))
+//     {
+//       cout << "Are neighbours: digit (E = "  << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << 
+//         " is neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl;
+
+//       if(TMath::Abs(digit1->fTime - digit2->fTime ) < fEmcTimeGate)
+//         {
+//           return 1; 
+//         }
+//     }
+
+      Float_t rowdiff = TMath::Abs( digit1->fZ - digit2->fZ );  
+      Float_t coldiff = TMath::Abs( digit1->fX - digit2->fX ); 
+      if (( coldiff <= 2.4   &&  rowdiff < 0.4 ) || ( coldiff < 0.4 &&  rowdiff <= 2.4 ))
        {
+         //      cout << "Are neighbours: digit (E = "  << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << 
+         //        " is neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl;
+
          if(TMath::Abs(digit1->fTime - digit2->fTime ) < fEmcTimeGate)
            {
              return 1; 
            }
        }
+      else
+       {
+         //  cout << "Not neighbours: digit (E = "  << digit1->fEnergy << ") with x = " << digit1->fX << " and z = " << digit1->fZ << 
+         //  " is not neighbour with digit (E = " << digit2->fEnergy << ") with x = " << digit2->fX << " and z = " << digit2->fZ << endl;
+       }
     }
   return 0;
 }
index 65e2fa10f747d15b2dd7ca550144e07a52eedc30..38058370cb0abee02aba2d408b9535ff43221e32 100644 (file)
@@ -157,7 +157,7 @@ protected:
   /** Maximum difference in index to be a neighbour */
   Int_t fMaxDigitIndexDiff;                                    //COMMENT
 
-  ClassDef(AliHLTPHOSClusterizer, 1);
+  ClassDef(AliHLTPHOSClusterizer, 0);
 };
 
 #endif
index 3094ff6d6c7825d93a0ed79765c353d8da040340..a3a8d5b83d73e44eea0be3051a1354e889f8c8da 100644 (file)
 using namespace std;
 #endif
 
-const AliHLTComponentDataType AliHLTPHOSClusterizerComponent::fgkInputDataTypes[]=
-  {
-    kAliHLTVoidDataType,{0,"",""}
-  };
+// const AliHLTComponentDataType AliHLTPHOSClusterizerComponent::fgkInputDataTypes[]=
+//   {
+//     kAliHLTVoidDataType,{0,"",""}
+//   };
 
 AliHLTPHOSClusterizerComponent gAliHLTPHOSClusterizerComponent;
 
@@ -119,13 +119,13 @@ const Char_t*
 AliHLTPHOSClusterizerComponent::GetComponentID()
 {
   //See headerfile for documentation
-
   return "PhosClusterizer";
 }
 
 void
 AliHLTPHOSClusterizerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
 {
+  //See headerfile for documentation
   list.clear();
   list.push_back(AliHLTPHOSDefinitions::fgkDigitDataType);
 }
@@ -153,7 +153,6 @@ AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData,
 {
   //See headerfile for documentation
   
-  UInt_t tSize            = 0;
   UInt_t offset           = 0;
   UInt_t mysize           = 0;
   Int_t nRecPoints        = 0;
@@ -187,15 +186,18 @@ AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData,
              fAllDigitsPtr->fDigitDataStruct[j].fX = digitDataPtr->fX;
              fAllDigitsPtr->fDigitDataStruct[j].fZ = digitDataPtr->fZ;
              fAllDigitsPtr->fDigitDataStruct[j].fEnergy = digitDataPtr->fEnergy;
-             //  HLTDebug("Digit energy: %f", digitDataPtr->fEnergy);
+             //HLTDebug("Digit energy: %f", digitDataPtr->fEnergy);
              fAllDigitsPtr->fDigitDataStruct[j].fTime = digitDataPtr->fTime;
              fAllDigitsPtr->fDigitDataStruct[j].fCrazyness = digitDataPtr->fCrazyness;
+             fAllDigitsPtr->fDigitDataStruct[j].fModule = digitDataPtr->fModule;
              j++;
              digitDataPtr++;
            }
        }
     }
+
   fAllDigitsPtr->fNDigits = j;
+  HLTDebug("Number of digits: %d", j);
   nRecPoints = fClusterizerPtr->ClusterizeEvent(size, mysize);
 
   if(nRecPoints == -1)
@@ -209,22 +211,26 @@ AliHLTPHOSClusterizerComponent::DoEvent(const AliHLTComponentEventData& evtData,
   
   HLTDebug("Number of clusters: %d", nRecPoints);
 
-  AliHLTComponentBlockData bd;
-  FillBlockData( bd );
-  bd.fOffset = offset;
-  bd.fSize = mysize;
-  bd.fDataType = AliHLTPHOSDefinitions::fgkClusterDataType;
-  bd.fSpecification = specification;
-  outputBlocks.push_back( bd );
-     
-  if ( tSize > size )
+//   if(nRecPoints > 0)
+//     {
+
+      AliHLTComponentBlockData clusterBd;
+      FillBlockData( clusterBd );
+      clusterBd.fOffset = offset;
+      clusterBd.fSize = mysize;
+      clusterBd.fDataType = AliHLTPHOSDefinitions::fgkRecPointDataType;
+      clusterBd.fSpecification = specification;
+      outputBlocks.push_back( clusterBd );
+//     }
+
+  // if(fAllDigitsPtr->fNDigits)
+  if(false)
     {
-      Logging( kHLTLogFatal, "HLT::AliHLTPHOSClusterizerComponent::DoEvent", "Too much data",
-               "Data written over allowed buffer. Amount written: %lu, allowed amount: %lu."
-               , tSize, size );
-      return EMSGSIZE;
+      AliHLTComponentBlockData digitBd;
+      FillBlockData(digitBd);
     }
-
+  
+       
   size = mysize;
   
   return 0;
index d72e598d1b29d82b4d0280b96c977de90b3aea1b..8fbc67849909e3bbf3a9370e085c3d7b36c3f59c 100644 (file)
@@ -58,6 +58,53 @@ class AliHLTPHOSDigitContainerDataStruct;
  *                         rec point
  * @ingroup alihlt_phos
  */
+
+/**
+ * @class AliHLTPHOSClusterizerComponent
+ *
+ * Class for running clusterization for PHOS in HLT. 
+ *
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b PhosClusterizer <br>
+ * Library: \b libAliHLTPHOS.so     <br>
+ * Input Data Types: @ref AliHLTPHOSDefinitions::fgkDigitDataType<br>
+ * Output Data Types: @ref AliHLTPHOSDefinitions::fgkRecPointDataType<br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li No mandatory arguments for component                           <br>
+ *
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -digitthreshold      <i> value </i> <br>
+ *      threshold for a digit to be added to a rec point in GeV (default value: 0.03)
+ * \li -recpointthreshold <i> value </i> <br>
+ *      threshold for starting a new rec point  (default value: 0.2)
+ * \li -partitionmode
+ *      if we want to do clusterisation on the partition level (not available...) (defaul value: false)
+ *
+ * <h2>Configuration:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li No configuration arguments 
+ *
+ * <h2>Default CDB entries:</h2>
+ * \li No CDB entry yet, will come.
+ *
+ * <h2>Performance:</h2>
+ * Pretty good (~ 3 kHz), depends on amount of data...
+ *
+ * <h2>Memory consumption:</h2>
+ * Depends on the amount of data, but pretty godd
+ *
+ * <h2>Output size:</h2>
+ * Depends on the amount of data...
+ *
+ * More detailed description. (At some point...)
+ *
+ * @ingroup alihlt_phos
+ */ 
+
 class AliHLTPHOSClusterizerComponent: public AliHLTPHOSProcessor
 {
  public:
@@ -139,7 +186,7 @@ protected:
   Bool_t fNoCrazyness;                                          //COMMENT
 
   /** interface function, see @ref AliHLTComponent for description */
-  static const AliHLTComponentDataType fgkInputDataTypes[];     //COMMENT
+  //  static const AliHLTComponentDataType fgkInputDataTypes[];     //COMMENT
 };
 
 #endif
index 0db78b416be39a8b14b08dec165d133d673db68e..bf29fd11e070f33fc3b3a1f1b587d2eeec5391dd 100644 (file)
@@ -55,5 +55,8 @@ const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkMIPDataType
 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'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkESDCaloClusterDataType        = { sizeof(AliHLTComponentDataType),       {'E','S','D','C','L','U','S','T'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkESDCaloCellsDataType          = { sizeof(AliHLTComponentDataType),       {'E','S','D','C','E','L','L','S'},{'P','H','O','S'}};;
+const AliHLTComponentDataType AliHLTPHOSDefinitions::fgkPhysicsHistogramsDataType     = { sizeof(AliHLTComponentDataType),       {'P','H','Y','S','H','I','S','T'},{'P','H','O','S'}};;
 
 
index 0715e67bf613fc7c26dbaebece3c1208bf7c118d..3bfda24900132d097be7008f5e9f52f7ace53a33 100644 (file)
@@ -39,6 +39,10 @@ public:
   static const AliHLTComponentDataType fgkSandboxDataType; //General data type
   static const AliHLTComponentDataType fgkEmcCalibDataType; //Calibration data type
   static const AliHLTComponentDataType fgkCaloClusterDataType; //Calo cluster data type
+  static const AliHLTComponentDataType fgkESDCaloClusterDataType; //Calo cluster data type
+  static const AliHLTComponentDataType fgkESDCaloCellsDataType; //Calo cells data type
+  static const AliHLTComponentDataType fgkPhysicsHistogramsDataType; //hist data type
+
 };
 
 #endif
index 0d36b41183b4b7cd93910a7f1122341fcd1a254c..0286b7333c29e5e679d28c7fa80daf5424929a66 100644 (file)
@@ -39,7 +39,7 @@
 #include "AliHLTPHOSChannelDataHeaderStruct.h"
 #include "AliHLTPHOSDigitDataStruct.h"
 #include "AliHLTPHOSSharedMemoryInterfacev2.h" // added by PTH
-
+#include "AliPHOSEMCAGeometry.h"
 #include "TH2F.h"
 
 ClassImp(AliHLTPHOSDigitMaker);
@@ -69,7 +69,6 @@ AliHLTPHOSDigitMaker::AliHLTPHOSDigitMaker() :
        }
     }    
   fMapperPtr = new AliHLTPHOSMapper();
-
 }
    
 AliHLTPHOSDigitMaker::~AliHLTPHOSDigitMaker() 
@@ -90,6 +89,7 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
   
   UShort_t coord1[4];
   UShort_t coord2[4];
+  Float_t locCoord[3];
   
   
   AliHLTPHOSChannelDataStruct* currentchannel = 0;
@@ -114,8 +114,8 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
 
              if(currentchannel->fEnergy < MAXBINVALUE) // Make sure we don't have signal overflow
                {
-
-                 AddDigit(currentchannel, coord1);
+                 AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
+                 AddDigit(currentchannel, coord1, locCoord);
                  j++;        
                  totSize += sizeof(AliHLTPHOSDigitDataStruct);
 
@@ -133,14 +133,15 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
 
              else // Ooops, overflow, we try the next channel... 
                {
+       
                  currentchannel = fShmPtr->NextChannel();
                  if(currentchannel != 0) // There was a next channel
                    {
                      AliHLTPHOSMapper::GetChannelCoord(currentchannel->fChannelID, coord2);
                      if(coord2[0] == coord1[0] && coord2[1] == coord1[1]) // It is a low gain channel with the same coordinates, we may use it
                        {
-                         
-                         AddDigit(currentchannel, coord2);
+                         AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
+                         AddDigit(currentchannel, coord2, locCoord);
                          j++;
                          totSize += sizeof(AliHLTPHOSDigitDataStruct);
                          currentchannel = fShmPtr->NextChannel();                    
@@ -148,7 +149,8 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
                      
                      else // No low gain channel with information about the overflow channel so we just use the overflowed one...
                        {
-                         AddDigit(tmpchannel, coord1);
+                         AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
+                         AddDigit(tmpchannel, coord1, locCoord);
                          j++;        
                          totSize += sizeof(AliHLTPHOSDigitDataStruct);
                          // no need to get the next channel here, we already did...
@@ -158,8 +160,9 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
                }
            }
          else // Well, there seem to be missing a high gain channel for this crystal, let's use the low gain one
-           {      
-             AddDigit(tmpchannel, coord1);
+           {    
+             AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);  
+             AddDigit(tmpchannel, coord1, locCoord);
              j++;            
              totSize += sizeof(AliHLTPHOSDigitDataStruct);
              currentchannel = fShmPtr->NextChannel(); 
@@ -181,15 +184,17 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
                    {
                      if(currentchannel->fEnergy < MAXBINVALUE)  // To overflow or not to overflow?
                        {
-
-                         AddDigit(currentchannel, coord2);
+                         AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
+                         AddDigit(currentchannel, coord2, locCoord);
                          j++;
                          totSize += sizeof(AliHLTPHOSDigitDataStruct);
                          currentchannel = fShmPtr->NextChannel();
                        }
                      else // Oh well, better use the low gain channel then
                        {
-                         AddDigit(currentchannelLG, coord1);
+                         //                      cout << "Reverse: Overflow!" << endl;
+                         AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
+                         AddDigit(currentchannelLG, coord1, locCoord);
                          j++;
                          totSize += sizeof(AliHLTPHOSDigitDataStruct);
                          currentchannel = fShmPtr->NextChannel();
@@ -197,21 +202,24 @@ AliHLTPHOSDigitMaker::MakeDigits(AliHLTPHOSChannelDataHeaderStruct* channelDataH
                    }
                  else // No available high gain channel for this crystal, adding the low gain one
                    {
-                     AddDigit(currentchannelLG, coord1);
+                     AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
+                     AddDigit(currentchannelLG, coord1, locCoord);
                      j++;
                      totSize += sizeof(AliHLTPHOSDigitDataStruct);
                    }
                }
              else //Fine, no more channels, better add this one...
                {
-                 AddDigit(currentchannelLG, coord1);
+                 AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
+                 AddDigit(currentchannelLG, coord1, locCoord);
                  j++;
                  totSize += sizeof(AliHLTPHOSDigitDataStruct);
                }
            } 
          else // Cool, no annoying low gain channel for this channel
            {
-             AddDigit(currentchannel, coord1);
+             AliHLTPHOSMapper::GetLocalCoord(currentchannel->fChannelID, locCoord);
+             AddDigit(currentchannel, coord1, locCoord);
              j++;
              currentchannel = fShmPtr->NextChannel();
            }
index e9194199735ef08acbedc2ae068e91bfc1c26b97..fe183ec4f9a89a08c2f59ca24f028895765b677f 100644 (file)
@@ -131,17 +131,21 @@ private:
    * @param channelData is the channel data
    * @param coordinates is the coordinates of the channel, including gain and module
    */
-  void AddDigit(AliHLTPHOSChannelDataStruct* channelData, UShort_t* coordinates) 
+  void AddDigit(AliHLTPHOSChannelDataStruct* channelData, UShort_t* channelCoordinates, Float_t* localCoordinates)
   {
-    fDigitStructPtr->fX = coordinates[0];
-    fDigitStructPtr->fZ = coordinates[1];
-    if(coordinates[2] == HIGHGAIN)
-      fDigitStructPtr->fAmplitude = channelData->fEnergy*fHighGainFactors[coordinates[0]][coordinates[1]];
+    fDigitStructPtr->fX = localCoordinates[0];
+    fDigitStructPtr->fZ = localCoordinates[1];
+    if(channelCoordinates[2] == HIGHGAIN)
+      {
+       fDigitStructPtr->fEnergy = channelData->fEnergy*fHighGainFactors[channelCoordinates[0]][channelCoordinates[1]];
+      }
     else
-      fDigitStructPtr->fAmplitude = channelData->fEnergy*fLowGainFactors[coordinates[0]][coordinates[1]];
-    fDigitStructPtr->fTime = channelData->fTime * 0.0000001; //CRAP
+      {
+       fDigitStructPtr->fEnergy = channelData->fEnergy*fLowGainFactors[channelCoordinates[0]][channelCoordinates[1]];
+      }
+    fDigitStructPtr->fTime = channelData->fTime * 0.0000001; //TODO
     fDigitStructPtr->fCrazyness = channelData->fCrazyness;
-    fDigitStructPtr->fModule = coordinates[3];
+    fDigitStructPtr->fModule = channelCoordinates[3];
     fDigitStructPtr++;
   }
 
@@ -169,7 +173,8 @@ private:
   /** Bad channel mask */
   Float_t fBadChannelMask[NXCOLUMNSMOD][NZROWSMOD][NGAINS]; //COMMENT
 
-  ClassDef(AliHLTPHOSDigitMaker, 1); 
+
+  ClassDef(AliHLTPHOSDigitMaker, 0); 
 
 };
 
index 6d79bfaeacd7d42a6b8124a78792e04c2eba9c0e..34a94113076109fb965112824b7d6acf1f0109d1 100644 (file)
@@ -1,4 +1,4 @@
-// $Id$
+ // $Id$
 
  /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        *
@@ -118,7 +118,6 @@ AliHLTPHOSDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData,
                                        std::vector<AliHLTComponentBlockData>& outputBlocks)
 {
   //see header file for documentation
-  UInt_t tSize            = 0;
   UInt_t offset           = 0; 
   UInt_t mysize           = 0;
   Int_t digitCount        = 0;
@@ -156,24 +155,21 @@ AliHLTPHOSDigitMakerComponent::DoEvent(const AliHLTComponentEventData& evtData,
       digitCount += ret; 
     }
   
-  mysize = digitCount*sizeof(AliHLTPHOSDigitDataStruct);
+  mysize += digitCount*sizeof(AliHLTPHOSDigitDataStruct);
 
   HLTDebug("# of digits: %d, used memory size: %d, available size: %d", digitCount, mysize, size);
-  
-  AliHLTComponentBlockData bd;
-  FillBlockData( bd );
-  bd.fOffset = offset;
-  bd.fSize = mysize;
-  bd.fDataType = AliHLTPHOSDefinitions::fgkDigitDataType;
-  bd.fSpecification = specification;
-  outputBlocks.push_back(bd);
-       
-  if( tSize > size )
+
+
+  if(mysize > 0) 
     {
-      Logging( kHLTLogFatal, "HLT::AliHLTPHOSDigitMakerComponent::DoEvent", "Too much data", "Data written over allowed buffer. Amount written: %lu, allowed amount: %lu.", tSize, size );
-      return EMSGSIZE;
+      AliHLTComponentBlockData bd;
+      FillBlockData( bd );
+      bd.fOffset = offset;
+      bd.fSize = mysize;
+      bd.fDataType = AliHLTPHOSDefinitions::fgkDigitDataType;
+      bd.fSpecification = specification;
+      outputBlocks.push_back(bd);
     }
-
   fDigitMakerPtr->Reset();
 
   size = mysize; 
diff --git a/HLT/PHOS/AliHLTPHOSESDCaloClusterMaker.cxx b/HLT/PHOS/AliHLTPHOSESDCaloClusterMaker.cxx
new file mode 100644 (file)
index 0000000..ba23e92
--- /dev/null
@@ -0,0 +1,104 @@
+
+/**************************************************************************
+ * 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   AliHLTPHOSESDCaloClusterMaker.cxx
+ * @author Oystein Djuvsland
+ * @date 
+ * @brief  ESD Calo Cluster maker 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 "AliHLTPHOSESDCaloClusterMaker.h"
+#include "AliHLTPHOSCaloClusterHeaderStruct.h"
+#include "AliHLTPHOSBase.h"
+#include "AliHLTPHOSCaloClusterDataStruct.h"
+#include "AliESDCaloCluster.h"
+#include "TClonesArray.h"
+#include "AliHLTPHOSCaloClusterReader.h"
+#include "TH1F.h"
+#include "TFile.h"
+#include "TNtuple.h"
+
+ClassImp(AliHLTPHOSESDCaloClusterMaker);
+
+
+
+AliHLTPHOSESDCaloClusterMaker::AliHLTPHOSESDCaloClusterMaker() : 
+  AliHLTPHOSBase(),
+  fNCaloClusters(0),
+  fClusterReaderPtr(0),
+  fESDCaloClusterPtr(0)
+{
+  //See header file for documentation
+  fClusterReaderPtr = new AliHLTPHOSCaloClusterReader();
+  fESDCaloClusterPtr = new AliESDCaloCluster();
+
+}
+
+AliHLTPHOSESDCaloClusterMaker::~AliHLTPHOSESDCaloClusterMaker()
+{
+  //See header file for documentation
+
+}
+
+Int_t
+AliHLTPHOSESDCaloClusterMaker::FillESDCaloClusters(TClonesArray* esdClustersPtr, AliHLTPHOSCaloClusterHeaderStruct* caloClusterHeaderPtr)
+{
+  //See header file for documentation
+
+  //  AliESDCaloCluster* caloCluster = 0;
+  AliHLTPHOSCaloClusterDataStruct* caloClusterStructPtr = 0;
+  fClusterReaderPtr->SetMemory(caloClusterHeaderPtr);
+
+  //  fESDCaloClusterPtr = new AliESDCaloCluster();
+  //  fNCaloClusters = 0;
+  fNCaloClusters = esdClustersPtr->GetEntries();
+  int count = 0;
+  while((caloClusterStructPtr = fClusterReaderPtr->NextCluster()) != 0)
+    {
+      new((*esdClustersPtr)[fNCaloClusters]) AliESDCaloCluster();
+      fESDCaloClusterPtr = static_cast<AliESDCaloCluster*>((*esdClustersPtr)[fNCaloClusters]);
+
+      fESDCaloClusterPtr->SetID(caloClusterStructPtr->fID);
+      fESDCaloClusterPtr->SetClusterType(caloClusterStructPtr->fClusterType);
+      fESDCaloClusterPtr->SetPosition((Float_t*)&caloClusterStructPtr->fGlobalPos[0]);
+      fESDCaloClusterPtr->SetE(caloClusterStructPtr->fEnergy);
+      fESDCaloClusterPtr->SetTOF(caloClusterStructPtr->fTOF);
+      fESDCaloClusterPtr->SetClusterDisp(caloClusterStructPtr->fDispersion);
+      fESDCaloClusterPtr->SetClusterChi2(caloClusterStructPtr->fFitQuality);
+      fESDCaloClusterPtr->SetPid((Float_t*)&caloClusterStructPtr->fPID[0]);
+      fESDCaloClusterPtr->SetM20(caloClusterStructPtr->fM20);
+      fESDCaloClusterPtr->SetM02(caloClusterStructPtr->fM02);
+      fESDCaloClusterPtr->SetNExMax(caloClusterStructPtr->fNExMax);
+      fESDCaloClusterPtr->SetEmcCpvDistance(caloClusterStructPtr->fEmcCpvDistance);
+      fESDCaloClusterPtr->SetDistanceToBadChannel(caloClusterStructPtr->fDistToBadChannel);
+      fESDCaloClusterPtr->SetNCells(caloClusterStructPtr->fNCells);
+      //       fESDCaloClusterPtr->SetCellsAbsId(caloClusterStructPtr->fCellsAbsId);
+      //       fESDCaloClusterPtr->SetCellsAmplitudeFraction(caloClusterStructPtr->fCellsAmpFraction);
+      fNCaloClusters++;
+      count++;
+    }
+  //  delete fESDCaloClusterPtr;
+  return count;
+
+}
diff --git a/HLT/PHOS/AliHLTPHOSESDCaloClusterMaker.h b/HLT/PHOS/AliHLTPHOSESDCaloClusterMaker.h
new file mode 100644 (file)
index 0000000..fb78b27
--- /dev/null
@@ -0,0 +1,97 @@
+
+/**************************************************************************
+ * 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 ALIHLTPHOSESDCALOCLUSTERMAKER_H
+#define ALIHLTPHOSESDCALOCLUSTERMAKER_H
+
+/**
+ * Class writes ESDs
+ *
+ * @file   AliHLTPHOSESDCaloClusterMaker.h
+ * @author Oystein Djuvsland
+ * @date
+ * @brief  ESD writer 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 "AliHLTPHOSBase.h"
+
+class AliHLTPHOSCaloClusterHeaderStruct;
+class AliHLTPHOSCaloClusterReader;
+class TClonesArray;
+class AliESDCaloCluster;
+
+/** 
+ * @class AliHLTPHOSESDCaloClusterMaker
+ * Makes ESD Clusters out of AliHLTPHOSCaloClusterContainerStructs
+ * @ingroup alihlt_phos
+ */
+
+class AliHLTPHOSESDCaloClusterMaker : public AliHLTPHOSBase
+{
+
+ public:
+  
+  
+  /** Constructor */
+  AliHLTPHOSESDCaloClusterMaker();
+  
+  /** Destructor */
+  virtual ~AliHLTPHOSESDCaloClusterMaker();
+
+  /** Copy constructor */  
+  AliHLTPHOSESDCaloClusterMaker(const AliHLTPHOSESDCaloClusterMaker &) : 
+    AliHLTPHOSBase(),
+    fNCaloClusters(0),
+    fClusterReaderPtr(0),
+    fESDCaloClusterPtr(0)
+    {
+      //Copy constructor not implemented
+    }
+  
+  /** Assignment */
+  AliHLTPHOSESDCaloClusterMaker & operator = (const AliHLTPHOSESDCaloClusterMaker)
+    {
+      //Assignment
+      return *this; 
+    }
+
+  /** 
+   * Create AliESDCaloClusters from the AliHLTPHOSCaloClusterContainerStruct
+   * @return number of clusters created
+   */
+  Int_t FillESDCaloClusters(TClonesArray* esdClusters, AliHLTPHOSCaloClusterHeaderStruct* clusterContainer);
+
+ private: 
+  
+  /* Number of clusters */
+  Int_t fNCaloClusters;  // Number of clusters
+
+  /* The reader */
+  AliHLTPHOSCaloClusterReader* fClusterReaderPtr; // !transient The reader
+
+  /* An ESD Calo Cluster */
+  AliESDCaloCluster* fESDCaloClusterPtr; // !transient An ESD Calo Cluster
+
+  ClassDef(AliHLTPHOSESDCaloClusterMaker, 0);
+};
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSESDCaloClusterMakerComponent.cxx b/HLT/PHOS/AliHLTPHOSESDCaloClusterMakerComponent.cxx
new file mode 100644 (file)
index 0000000..ac571d1
--- /dev/null
@@ -0,0 +1,168 @@
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors: Oystein Djuvsland <oysteind@ift.uib.no>                       *
+ *                                                                        *
+ * 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 <iostream>
+
+#include "AliHLTPHOSESDCaloClusterMakerComponent.h"
+#include "AliHLTPHOSESDCaloClusterMaker.h"
+#include "AliHLTPHOSCaloClusterContainerStruct.h"
+#include "AliESDEvent.h"
+#include "AliHLTPHOSDefinitions.h"
+#include "AliHLTDataTypes.h"
+#include "AliESDCaloCluster.h"
+
+/** @file   AliHLTPHOSESDCaloClusterMakerComponent.cxx
+    @author Oystein Djuvsland
+    @date   
+    @brief  An ESD maker component 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
+
+#if __GNUC__>= 3
+using namespace std;
+#endif
+
+
+AliHLTPHOSESDCaloClusterMakerComponent::AliHLTPHOSESDCaloClusterMakerComponent(): 
+  AliHLTPHOSProcessor(), 
+  fESDCaloClusterMakerPtr(0),
+  fESDCaloClustersPtr(0)
+{
+  //See headerfile for documentation
+}
+
+AliHLTPHOSESDCaloClusterMakerComponent::~AliHLTPHOSESDCaloClusterMakerComponent()
+{
+  //See headerfile for documentation
+
+  if (fESDCaloClusterMakerPtr)
+    {
+      delete fESDCaloClusterMakerPtr;
+      fESDCaloClusterMakerPtr = 0;
+    }
+}
+
+
+int
+AliHLTPHOSESDCaloClusterMakerComponent::Deinit()
+{
+  //See headerfile for documentation
+
+  if (fESDCaloClusterMakerPtr)
+    {
+      delete fESDCaloClusterMakerPtr;
+      fESDCaloClusterMakerPtr = 0;
+    }
+  return 0;
+}
+
+const Char_t*
+AliHLTPHOSESDCaloClusterMakerComponent::GetComponentID()
+{
+  //See headerfile for documentation
+
+  return "PhosEsdCaloClusterMaker";
+}
+
+void
+AliHLTPHOSESDCaloClusterMakerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+{
+  //See headerfile for documentation
+  list.clear();
+  list.push_back(AliHLTPHOSDefinitions::fgkCaloClusterDataType);
+//   const AliHLTComponentDataType* pType=fgkInputDataTypes;
+//   while (pType->fID!=0)
+//     {
+//       list.push_back(*pType);
+//       pType++;
+//     }
+}
+
+AliHLTComponentDataType
+AliHLTPHOSESDCaloClusterMakerComponent::GetOutputDataType()
+{
+  //See headerfile for documentation
+
+  return AliHLTPHOSDefinitions::fgkCaloClusterDataType;
+}
+
+void
+AliHLTPHOSESDCaloClusterMakerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
+
+{
+  //See headerfile for documentation
+
+  constBase = 30;
+  inputMultiplier = 2;
+}
+Int_t 
+AliHLTPHOSESDCaloClusterMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) 
+{
+  
+  // see header file for class documentation
+//   fESDCaloClustersPtr->Delete();
+//   AliHLTPHOSCaloClusterContainerStruct* caloClusterContainerPtr = 0;
+  
+//   const AliHLTComponentBlockData* iter = 0;
+
+//   UInt_t specification = 0;
+
+//   for ( iter = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkCaloClusterDataType); iter != 0; iter = GetNextInputBlock()) 
+//     {
+//       specification = specification|iter->fSpecification;
+//       caloClusterContainerPtr = reinterpret_cast<AliHLTPHOSCaloClusterContainerStruct*>(iter->fPtr);
+//       fESDCaloClusterMakerPtr->FillESDCaloClusters(fESDCaloClustersPtr, caloClusterContainerPtr);
+//       //      fESDCaloClusterMakerPtr->SetCaloClusterContainer(caloClusterContainerPtr);
+//     }
+  
+//   PushBack(fESDCaloClustersPtr, AliHLTPHOSDefinitions::fgkESDCaloClusterDataType|kAliHLTDataOriginPHOS, specification);
+
+  return 0;
+}
+
+
+int
+AliHLTPHOSESDCaloClusterMakerComponent::DoInit(int argc, const char** argv )
+{
+  //See headerfile for documentation
+
+//   fESDCaloClusterMakerPtr = new AliHLTPHOSESDCaloClusterMaker();
+
+//   fESDCaloClustersPtr = new TClonesArray("AliESDCaloCluster", 0);
+
+//   ScanArgumentsModule(argc, argv);
+//   for (int i = 0; i < argc; i++)
+//     {
+      
+//     }
+
+  return 0;
+}
+
+AliHLTComponent*
+AliHLTPHOSESDCaloClusterMakerComponent::Spawn()
+{
+  //See headerfile for documentation
+
+  return new AliHLTPHOSESDCaloClusterMakerComponent();
+}
diff --git a/HLT/PHOS/AliHLTPHOSESDCaloClusterMakerComponent.h b/HLT/PHOS/AliHLTPHOSESDCaloClusterMakerComponent.h
new file mode 100644 (file)
index 0000000..68ed4ad
--- /dev/null
@@ -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.                  *
+ **************************************************************************/
+
+#ifndef ALIHLTPHOSESDCALOCLUSTERMAKERCOMPONENT_H
+#define ALIHLTPHOSESDCALOCLUSTERMAKERCOMPONENT_H
+
+
+
+
+/**
+ * ESD maker component for PHOS HLT
+ *
+ * @file   AliHLTPHOSESDCaloClusterMakerComponent.h
+ * @author Oystein Djuvsland
+ * @date   
+ * @brief  An ESD 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
+
+#include "AliHLTPHOSProcessor.h"
+
+class AliHLTPHOSESDCaloClusterMaker;
+class AliHLTPHOSCaloClusterContainerStruct;
+class TClonesArray;
+
+/**
+ * @class AliHLTPHOSESDCaloClusterMakerComponent
+ *
+ * HLT component for making AliESDEvent from AliHLTPHOSCaloClusterDataStructs 
+ *
+ * @ingroup alihlt_phos
+ */
+class AliHLTPHOSESDCaloClusterMakerComponent: public AliHLTPHOSProcessor
+{
+ public:
+
+  /** Constructor */
+
+  AliHLTPHOSESDCaloClusterMakerComponent();
+
+  /** Destructor */
+  virtual ~AliHLTPHOSESDCaloClusterMakerComponent();
+
+  /** Copy constructor */  
+  AliHLTPHOSESDCaloClusterMakerComponent(const AliHLTPHOSESDCaloClusterMakerComponent &) : 
+    AliHLTPHOSProcessor(),
+    fESDCaloClusterMakerPtr(0),
+    fESDCaloClustersPtr(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSESDCaloClusterMakerComponent & operator = (const AliHLTPHOSESDCaloClusterMakerComponent)
+  {
+    //Assignment
+    return *this; 
+  }
+
+  /** interface function, see @ref AliHLTComponent for description */
+  const char* GetComponentID();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetInputDataTypes(std::vector<AliHLTComponentDataType>& 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_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:
+
+  /** Pointer to the ESD maker it self */
+  AliHLTPHOSESDCaloClusterMaker* fESDCaloClusterMakerPtr; //! transient
+
+  /** Pointer to the ESD calo cluster array*/
+  TClonesArray* fESDCaloClustersPtr; //! transient
+
+};
+
+
+#endif
+
diff --git a/HLT/PHOS/AliHLTPHOSESDCaloClusterWriterComponent.cxx b/HLT/PHOS/AliHLTPHOSESDCaloClusterWriterComponent.cxx
new file mode 100644 (file)
index 0000000..ebf952b
--- /dev/null
@@ -0,0 +1,232 @@
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors: Oystein Djuvsland <oysteind@ift.uib.no>                       *
+ *                                                                        *
+ * 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 <iostream>
+
+#include "AliHLTPHOSESDCaloClusterWriterComponent.h"
+#include "AliESDCaloCluster.h"
+#include "TTree.h"
+#include "TClonesArray.h"
+#include "TFile.h"
+
+/** @file   AliHLTPHOSESDCaloClusterWriterComponent.cxx
+    @author Oystein Djuvsland
+    @date   
+    @brief  An ESD calo cluster writer component 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
+
+#if __GNUC__>= 3
+using namespace std;
+#endif
+
+AliHLTPHOSESDCaloClusterWriterComponent gAliHLTPHOSESDCaloClusterWriterComponent;
+
+AliHLTPHOSESDCaloClusterWriterComponent::AliHLTPHOSESDCaloClusterWriterComponent(): 
+  AliHLTPHOSProcessor(), 
+  fOutfile(0),
+  fOutfileName(0),
+  fWriteModulo(1000),
+  fESDCaloClusterTreePtr(0),
+  fESDCaloClustersPtr(0)
+{
+  //See headerfile for documentation
+}
+
+AliHLTPHOSESDCaloClusterWriterComponent::~AliHLTPHOSESDCaloClusterWriterComponent()
+{
+  //See headerfile for documentation
+
+  if(fESDCaloClustersPtr)
+    {
+      fESDCaloClustersPtr->Write();
+      delete fESDCaloClustersPtr;
+      fESDCaloClustersPtr = 0;
+    }
+  if (fOutfile)
+    {
+      fOutfile->Close();
+      delete fOutfile;
+      fOutfile = 0;
+    }
+}
+
+
+int
+AliHLTPHOSESDCaloClusterWriterComponent::Deinit()
+{
+  //See headerfile for documentation
+
+  if(fESDCaloClustersPtr)
+    {
+      fESDCaloClustersPtr->Write();
+      delete fESDCaloClustersPtr;
+      fESDCaloClustersPtr = 0;
+    }
+  if (fOutfile)
+    {
+      fOutfile->Close();
+      delete fOutfile;
+      fOutfile = 0;
+    }
+    return 0;
+}
+
+const Char_t*
+AliHLTPHOSESDCaloClusterWriterComponent::GetComponentID()
+{
+  //See headerfile for documentation
+
+  return "PhosEsdCaloClusterWriter";
+}
+
+void
+AliHLTPHOSESDCaloClusterWriterComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+{
+  //See headerfile for documentation
+  list.clear();
+  list.push_back(AliHLTPHOSDefinitions::fgkESDCaloClusterDataType);
+
+}
+
+AliHLTComponentDataType
+AliHLTPHOSESDCaloClusterWriterComponent::GetOutputDataType()
+{
+  //See headerfile for documentation
+  return kAliHLTAnyDataType;
+}
+
+void
+AliHLTPHOSESDCaloClusterWriterComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
+
+{
+  //See headerfile for documentation
+
+  constBase = 30;
+  inputMultiplier = 2;
+}
+Int_t 
+AliHLTPHOSESDCaloClusterWriterComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) 
+{
+  // see header file for class documentation
+  const TObject* iter = 0;
+  //  const AliHLTComponentBlockData* iter = 0;
+
+  //UInt_t specification = 0;
+  //  iter = GetFirstInputObject(AliHLTPHOSDefinitions::fgkESDCaloClusterDataType);
+  //cout << iter << endl;
+  for(iter = GetFirstInputObject(AliHLTPHOSDefinitions::fgkESDCaloClusterDataType); iter != NULL; iter = GetNextInputObject())
+      {
+
+
+       //fESDCaloClustersPtr->AddAll(reinterpret_cast<const TClonesArray*>(iter));
+       fESDCaloClustersPtr = reinterpret_cast<TClonesArray*>(const_cast<TObject*>(iter)->Clone());
+       
+      }
+
+
+
+    //  iter = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkESDCaloClusterDataType);
+
+//   if(iter)
+//     {
+//       specification = specification|iter->fSpecification;
+//      cout << (reinterpret_cast<TClonesArray*>(iter->fPtr))->GetEntries() << endl;
+//       //      fESDCaloClustersPtr->AddAll(reinterpret_cast<TClonesArray*>(iter->fPtr));
+//       while((iter = GetNextInputBlock()))
+//     {
+//       //      fESDCaloClustersPtr->AddAll(reinterpret_cast<TClonesArray*>(iter->fPtr));
+//     }
+      
+//     }
+//  HLTError("Number of clusters: %d", fESDCaloClustersPtr->GetEntries());
+  fESDCaloClusterTreePtr->Fill();
+
+  fPhosEventCount++;
+
+  if(fPhosEventCount % fWriteModulo == 0) 
+    {
+      WriteTree();
+    }
+
+  //fESDCaloClustersPtr->Delete();
+
+  return 0;
+}
+
+int 
+AliHLTPHOSESDCaloClusterWriterComponent::WriteTree()
+{
+
+  // See headerfile for documentation
+  char tmpFilename[128];
+  sprintf(tmpFilename, "%s_%d.root", fOutfileName, fPhosEventCount/fWriteModulo);
+
+  fOutfile = TFile::Open(tmpFilename, "RECREATE");
+  if(fOutfile == 0)
+    {
+      HLTError("Could not open file %s for writing", tmpFilename);
+      return -1;
+    }
+  fESDCaloClusterTreePtr->Write();
+  fOutfile->Close();
+  fESDCaloClusterTreePtr->Reset();
+  return 0;
+}
+
+int
+AliHLTPHOSESDCaloClusterWriterComponent::DoInit(int argc, const char** argv )
+{
+  //See headerfile for documentation
+  fOutfileName = new char[128];
+  char tmpFilename[128];
+  ScanArgumentsModule(argc, argv);
+  for (int i = 0; i < argc; i++)
+    {
+      if(!strcmp("-filename", argv[i]))
+       {
+         sprintf(fOutfileName, "/tmp/%s", argv[i+1]);
+         sprintf(tmpFilename, "%s_0.root", fOutfileName);
+       }
+      if(!strcmp("-writemodulo", argv[i]))
+       {
+         fWriteModulo = atoi(argv[i+1]);
+       }
+    }
+  //  fESDCaloClustersPtr = new TClonesArray(AliESDCaloCluster::Class(), 0);
+  fESDCaloClusterTreePtr = new TTree("caloClusterTree", "Tree containing AliESDCaloClusters reconstructed in HLT");
+  fESDCaloClusterTreePtr->Branch("CaloClusters", &fESDCaloClustersPtr);
+
+    //fESDCaloClusterTreePtr->SetBranchAddress("CaloClusters", &fESDCaloClustersPtr);
+
+  return 0;
+}
+
+AliHLTComponent*
+AliHLTPHOSESDCaloClusterWriterComponent::Spawn()
+{
+  //See headerfile for documentation
+
+  return new AliHLTPHOSESDCaloClusterWriterComponent();
+}
diff --git a/HLT/PHOS/AliHLTPHOSESDCaloClusterWriterComponent.h b/HLT/PHOS/AliHLTPHOSESDCaloClusterWriterComponent.h
new file mode 100644 (file)
index 0000000..de76057
--- /dev/null
@@ -0,0 +1,129 @@
+/**************************************************************************
+ * 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 ALIHLTPHOSESDCALOCLUSTERWRITERCOMPONENT_H
+#define ALIHLTPHOSESDCALOCLUSTERWRITERCOMPONENT_H
+
+/**
+ * ESD Calo cluster writer component for PHOS HLT
+ *
+ * @file   AliHLTPHOSESDCaloClusterWriterComponent.h
+ * @author Oystein Djuvsland
+ * @date   
+ * @brief  An ESD 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
+
+#include "AliHLTPHOSProcessor.h"
+
+class TClonesArray;
+class TTree;
+class TFile;
+/**
+ * @class AliHLTPHOSESDCaloClusterWriterComponent
+ *
+ * HLT component for making AliESDEvent from AliHLTPHOSCaloClusterDataStructs 
+ *
+ * @ingroup alihlt_phos
+ */
+class AliHLTPHOSESDCaloClusterWriterComponent: public AliHLTPHOSProcessor
+{
+ public:
+
+  /** Constructor */
+
+  AliHLTPHOSESDCaloClusterWriterComponent();
+
+  /** Destructor */
+  virtual ~AliHLTPHOSESDCaloClusterWriterComponent();
+
+  /** Copy constructor */  
+  AliHLTPHOSESDCaloClusterWriterComponent(const AliHLTPHOSESDCaloClusterWriterComponent &) : 
+    AliHLTPHOSProcessor(),
+    fOutfile(0),
+    fOutfileName(0),
+    fWriteModulo(1000),
+    fESDCaloClusterTreePtr(0),
+    fESDCaloClustersPtr(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSESDCaloClusterWriterComponent & operator = (const AliHLTPHOSESDCaloClusterWriterComponent)
+  {
+    //Assignment
+    return *this; 
+  }
+
+  /** interface function, see @ref AliHLTComponent for description */
+  const char* GetComponentID();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetInputDataTypes(std::vector<AliHLTComponentDataType>& 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_t DoEvent( const AliHLTComponentEventData& evtData, AliHLTComponentTriggerData& trigData);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  AliHLTComponent* Spawn();
+  
+  /** Function for writing the tree containing the clusters */
+  int WriteTree();
+
+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:
+
+
+  /** The file to which we will write */
+  TFile* fOutfile;
+
+  /** The filename */
+  char* fOutfileName;
+
+  /** Write modulo */
+  UInt_t fWriteModulo;
+
+  /** Pointer to the ESD calo cluster tree*/
+  TTree* fESDCaloClusterTreePtr; //! transient
+
+  /** Pointer to the array of clusters */
+  TClonesArray* fESDCaloClustersPtr; //! transient
+
+
+};
+
+
+#endif
diff --git a/HLT/PHOS/AliHLTPHOSESDEntriesMakerComponent.cxx b/HLT/PHOS/AliHLTPHOSESDEntriesMakerComponent.cxx
new file mode 100644 (file)
index 0000000..571e2bf
--- /dev/null
@@ -0,0 +1,179 @@
+
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Authors: Oystein Djuvsland <oysteind@ift.uib.no>                       *
+ *                                                                        *
+ * 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 <iostream>
+
+#include "AliHLTPHOSESDEntriesMakerComponent.h"
+#include "AliHLTPHOSESDCaloClusterMaker.h"
+#include "AliHLTPHOSCaloClusterHeaderStruct.h"
+#include "AliHLTPHOSDigitDataStruct.h"
+#include "AliESDEvent.h"
+#include "AliHLTPHOSDefinitions.h"
+#include "AliHLTDataTypes.h"
+#include "AliESDCaloCluster.h"
+
+/** @file   AliHLTPHOSESDEntriesMakerComponent.cxx
+    @author Oystein Djuvsland
+    @date   
+    @brief  An ESD entries maker component 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
+
+#if __GNUC__>= 3
+using namespace std;
+#endif
+
+AliHLTPHOSESDEntriesMakerComponent gAliHLTPHOSESDEntriesMakerComponent;
+
+AliHLTPHOSESDEntriesMakerComponent::AliHLTPHOSESDEntriesMakerComponent(): 
+  AliHLTPHOSProcessor(), 
+  fESDCaloClusterMakerPtr(0),
+  fESDCaloClustersPtr(0)
+{
+  //See headerfile for documentation
+}
+
+AliHLTPHOSESDEntriesMakerComponent::~AliHLTPHOSESDEntriesMakerComponent()
+{
+  //See headerfile for documentation
+  if (fESDCaloClusterMakerPtr)
+    {
+      delete fESDCaloClusterMakerPtr;
+      fESDCaloClusterMakerPtr = 0;
+    }
+}
+
+int
+AliHLTPHOSESDEntriesMakerComponent::Deinit()
+{
+  //See headerfile for documentation
+  if (fESDCaloClusterMakerPtr)
+    {
+      delete fESDCaloClusterMakerPtr;
+      fESDCaloClusterMakerPtr = 0;
+    }
+  return 0;
+}
+
+const Char_t*
+AliHLTPHOSESDEntriesMakerComponent::GetComponentID()
+{
+  //See headerfile for documentation
+  return "PhosEsdEntriesMaker";
+}
+
+void
+AliHLTPHOSESDEntriesMakerComponent::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+{
+  //See headerfile for documentation
+  list.clear();
+  list.push_back(AliHLTPHOSDefinitions::fgkCaloClusterDataType);
+}
+
+AliHLTComponentDataType
+AliHLTPHOSESDEntriesMakerComponent::GetOutputDataType()
+{
+  //See headerfile for documentation
+  return AliHLTPHOSDefinitions::fgkESDCaloClusterDataType;
+}
+
+void
+AliHLTPHOSESDEntriesMakerComponent::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
+
+{
+  //See headerfile for documentation
+  constBase = 30;
+  inputMultiplier = 2;
+}
+Int_t 
+AliHLTPHOSESDEntriesMakerComponent::DoEvent( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) 
+{
+  
+  // see header file for class documentation
+  fESDCaloClustersPtr->Delete();
+  //fESDCaloClustersPtr = new TClonesArray(AliESDCaloCluster::Class(), 10);
+  AliHLTPHOSCaloClusterHeaderStruct* caloClusterHeaderPtr = 0;
+
+  const AliHLTComponentBlockData* iter = 0;
+  UInt_t nClusters = 0;
+
+  UInt_t clusterSpecification = 0;
+  //  UInt_t digitSpecification  = 0;
+  //UInt_t nDigits = 0;
+
+  for ( iter = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkCaloClusterDataType); iter != 0; iter = GetNextInputBlock()) 
+    {
+      clusterSpecification = clusterSpecification|iter->fSpecification;
+      caloClusterHeaderPtr = reinterpret_cast<AliHLTPHOSCaloClusterHeaderStruct*>(iter->fPtr);
+      HLTDebug("%d HLT clusters", caloClusterHeaderPtr->fNClusters);
+      nClusters = fESDCaloClusterMakerPtr->FillESDCaloClusters(fESDCaloClustersPtr, caloClusterHeaderPtr);
+    }
+
+//   for(iter = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkDigitDataType); iter != 0; iter =GetNextInputBlock())
+//     {
+//       digitSpecification = digitSpecification|iter->fSpecification;
+//       digitsPtr = reinterpret_cast<AliHLTPHOSDigitDataStruct*>(iter->fPtr);
+//       nDigits = iter->fSize/sizeof(AliHLTPHOSDigitDataStruct);
+//       fESDCaloCellMaker->FillESDCaloCells(fESDCaloCellsPtr, digitsPtr, nDigits);
+//     }
+  
+  // for(int i = 0; i < nClusters; i++)
+  //   {
+  //     HLTDebug("Cluster energy: %f", ((AliESDCaloCluster*)(fESDCaloClustersPtr->At(i)))->E());
+  //   }
+
+  ///  HLTError("Number of ESD clusters: %d", nClusters);
+  PushBack(fESDCaloClustersPtr, AliHLTPHOSDefinitions::fgkESDCaloClusterDataType|kAliHLTDataOriginPHOS);
+  //  PushBack(fESDCaloCellsPtr, AliHLTPHOSDefinitions::fgkESDCaloCellsDataType|kAliHLTDataOriginPHOS, digitSpecification);
+  
+  //delete fESDCaloClustersPtr; 
+
+  return 0;
+}
+
+
+int
+AliHLTPHOSESDEntriesMakerComponent::DoInit(int argc, const char** argv )
+{
+  //See headerfile for documentation
+
+  fESDCaloClusterMakerPtr = new AliHLTPHOSESDCaloClusterMaker();
+
+  fESDCaloClustersPtr = new TClonesArray(AliESDCaloCluster::Class(), 10);
+
+  ScanArgumentsModule(argc, argv);
+  for (int i = 0; i < argc; i++)
+    {
+      
+    }
+
+  return 0;
+}
+
+AliHLTComponent*
+AliHLTPHOSESDEntriesMakerComponent::Spawn()
+{
+  //See headerfile for documentation
+
+  return new AliHLTPHOSESDEntriesMakerComponent();
+}
diff --git a/HLT/PHOS/AliHLTPHOSESDEntriesMakerComponent.h b/HLT/PHOS/AliHLTPHOSESDEntriesMakerComponent.h
new file mode 100644 (file)
index 0000000..e112c3f
--- /dev/null
@@ -0,0 +1,120 @@
+/**************************************************************************
+ * 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 ALIHLTPHOSESDENTRIESMAKERCOMPONENT_H
+#define ALIHLTPHOSESDENTRIESMAKERCOMPONENT_H
+
+
+
+
+/**
+ * ESD maker component for PHOS HLT
+ *
+ * @file   AliHLTPHOSESDEntriesMakerComponent.h
+ * @author Oystein Djuvsland
+ * @date   
+ * @brief  An ESD 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
+
+#include "AliHLTPHOSProcessor.h"
+
+class AliHLTPHOSESDCaloClusterMaker;
+class AliHLTPHOSCaloClusterContainerStruct;
+class TClonesArray;
+
+/**
+ * @class AliHLTPHOSESDEntriesMakerComponent
+ *
+ * HLT component for making AliESDEvent from AliHLTPHOSCaloClusterDataStructs 
+ *
+ * @ingroup alihlt_phos
+ */
+class AliHLTPHOSESDEntriesMakerComponent: public AliHLTPHOSProcessor
+{
+ public:
+
+  /** Constructor */
+
+  AliHLTPHOSESDEntriesMakerComponent();
+
+  /** Destructor */
+  virtual ~AliHLTPHOSESDEntriesMakerComponent();
+
+  /** Copy constructor */  
+  AliHLTPHOSESDEntriesMakerComponent(const AliHLTPHOSESDEntriesMakerComponent &) : 
+    AliHLTPHOSProcessor(),
+    fESDCaloClusterMakerPtr(0),
+    fESDCaloClustersPtr(0)
+  {
+    //Copy constructor not implemented
+  }
+  
+  /** Assignment */
+  AliHLTPHOSESDEntriesMakerComponent & operator = (const AliHLTPHOSESDEntriesMakerComponent)
+  {
+    //Assignment
+    return *this; 
+  }
+
+  /** interface function, see @ref AliHLTComponent for description */
+  const char* GetComponentID();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  void GetInputDataTypes(std::vector<AliHLTComponentDataType>& 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_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:
+
+  /** Pointer to the ESD cluster maker */
+  AliHLTPHOSESDCaloClusterMaker* fESDCaloClusterMakerPtr; //! transient
+
+  /** Pointer to the ESD calo cluster array*/
+  TClonesArray* fESDCaloClustersPtr; //! transient
+
+//   /** Pointer to the cell maker */
+//   AliHLTPHOSCaloCellMaker* fCaloCellMaker; //! transient
+
+};
+
+
+#endif
+
index b1e912467f473fc5a37c0ff04c72a5ba9f0624ff..16429ffde21c6b19fe3d96c2dab8d656ca43d8d0 100644 (file)
@@ -132,7 +132,7 @@ private:
   /** The AliHLTPHOSCaloClusterContainerStruct */               
   AliHLTPHOSCaloClusterContainerStruct* fCaloClusterContainerPtr;   //! transient
 
-  ClassDef(AliHLTPHOSESDMaker, 1);
+  ClassDef(AliHLTPHOSESDMaker, 0);
 };
 
 #endif
index e1fb607084e36b8f2d3168e0a79d403fdf83139f..551b4317f15e3bc90f6eb2c25e1c7ff819619a0d 100644 (file)
@@ -1,5 +1,3 @@
-// $Id$
-
 /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        * 
  * All rights reserved.                                                   *
index 10cc02b94ba1a8e6f54d41d1a34aaed8ef67f91b..50c8e2e4f9edfaa777ccd67032191bdfc0c5a9b2 100644 (file)
@@ -1,6 +1,3 @@
-//-*- Mode: C++ -*-
-// $Id$
-
  /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        * 
  * All rights reserved.                                                   *
@@ -54,26 +51,6 @@ public:
   AliHLTPHOSHistogramProducer();
   ~AliHLTPHOSHistogramProducer();
   
-
-  AliHLTPHOSHistogramProducer(const AliHLTPHOSHistogramProducer &) :
-    AliHLTPHOSBase(),
-    fClusterEnergiesHistPtr(0),
-    fMultiplicitiesHistPtr(0),
-    fClusterNtuplePtr(0),
-    fFillClusterEnergies(false),
-    fFillMultiplicities(false),
-    fFillNtuple(false),
-    fMaxNtupleEntries(1000000000)
-  {
-    //comment
-  }
-  
-  AliHLTPHOSHistogramProducer & operator = (const AliHLTPHOSHistogramProducer)
-  {
-    //Assignment
-    return *this;
-  }
-
   Int_t Fill(AliHLTPHOSCaloClusterContainerStruct* clusterContainerPtr);
 
   Int_t InitializeObjects();
@@ -88,7 +65,8 @@ public:
   void SetMaxNtupleEntries(Int_t n) { fMaxNtupleEntries = n; }
   
 private:
-
+AliHLTPHOSHistogramProducer(const AliHLTPHOSHistogramProducer  & );
+AliHLTPHOSHistogramProducer  & operator = (const AliHLTPHOSHistogramProducer &);
   TH1D* fClusterEnergiesHistPtr;
   TH1D* fMultiplicitiesHistPtr;
   TNtuple* fClusterNtuplePtr;
index 374423f646da922157633fb7490fa353e1ebab4c..c50090a7995d36a1d3f605da047efb6648d766c9 100644 (file)
 #include "AliHLTPHOSProcessor.h"
 #include "TH1D.h"
 #include "TNtuple.h"
+#include "TFile.h"
 #include "AliHLTPHOSHistogramProducer.h"
+#include "AliHLTPHOSPhysicsHistogramProducer.h"
 #include "AliHLTPHOSCaloClusterContainerStruct.h"
-
+#include "TClonesArray.h"
 /** 
  * @file   AliHLTPHOSHistogramProducerComponent.cxx
  * @author Oystein Djuvsland
  * @date   
- * @brief  A digit maker component for PHOS HLT
+ * @brief  A histogram producer component for PHOS HLT
 */
 
 // see below for class documentation
 // 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)
+  fPhysicsHistogramProducerPtr(0),
+  fPushModulo(1)
 {
   //see header file for documentation
 }
@@ -62,6 +57,12 @@ int
 AliHLTPHOSHistogramProducerComponent::Deinit()
 { 
   //see header file for documentation
+  if(fPhysicsHistogramProducerPtr != 0)
+    {
+      delete fPhysicsHistogramProducerPtr;
+      fPhysicsHistogramProducerPtr = 0;
+    }
+
   return 0;
 }
 
@@ -78,13 +79,9 @@ AliHLTPHOSHistogramProducerComponent::GetInputDataTypes(vector<AliHLTComponentDa
 { 
   //see header file for documentation
   list.clear();
-  list.push_back(AliHLTPHOSDefinitions::fgkChannelDataType);
+  list.push_back(AliHLTPHOSDefinitions::fgkESDCaloClusterDataType);
+  list.push_back(AliHLTPHOSDefinitions::fgkESDCaloCellsDataType);
 
-//   const AliHLTComponentDataType* pType=fgkInputDataTypes;
-//   while (pType->fID!=0) {
-//     list.push_back(*pType); 
-//     pType++;
-//   }
 }
 
 AliHLTComponentDataType 
@@ -116,30 +113,30 @@ AliHLTPHOSHistogramProducerComponent::DoEvent(const AliHLTComponentEventData& /*
 {
   //see header file for documentation
 
-  //  UInt_t specification = 0;
-
-  //  AliHLTPHOSCaloClusterContainerStruct* tmpClusters = 0;
-
-  const AliHLTComponentBlockData* block = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkClusterDataType);
+  const AliHLTComponentBlockData* block = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkESDCaloClusterDataType);
   
-  while(block != 0)
+  if(block != 0)
     {
-      fHistogramProducerPtr->Fill(reinterpret_cast<AliHLTPHOSCaloClusterContainerStruct*>(block->fPtr));
-      block = GetNextInputBlock();
+      HLTError("Number of clusters: %d", reinterpret_cast<TClonesArray*>(const_cast<AliHLTComponentBlockData*>(block))->GetEntries());
+      fPhysicsHistogramProducerPtr->AnalyseClusters(reinterpret_cast<TClonesArray*>(const_cast<AliHLTComponentBlockData*>(block)));
     }
   
-  if(fDoFillClusterEnergies)
-    {
-      PushBack(fClusterEnergiesHistPtr, AliHLTPHOSDefinitions::fgkPhosHistDataType);
-    }
-  if(fDoFillMultiplicities)
-    {
-      PushBack(fMultiplicitiesHistPtr, AliHLTPHOSDefinitions::fgkPhosHistDataType);
-    }
-  if(fDoFillNtuple)
+  //  block = GetFirstInputBlock(AliHLTPHOSDefinitions::fgkESDCaloCellsDataType);
+                            
+
+  if(block != 0)
     {
-      PushBack(fClusterNtuplePtr, AliHLTPHOSDefinitions::fgkPhosHistDataType);
+      
     }
+  //  if(fEventCount%fPushModulo == 0)
+  //  {
+
+  HLTError("WRITING HISTOGRAMS!");
+  TFile* file = TFile::Open("/tmp/hist.root", "RECREATE");
+  (fPhysicsHistogramProducerPtr->GetHistograms())->Write();
+  file->Close();
+  PushBack(fPhysicsHistogramProducerPtr->GetHistograms(), AliHLTPHOSDefinitions::fgkPhysicsHistogramsDataType);
+      // }
     
   return 0;
 }
@@ -150,47 +147,16 @@ AliHLTPHOSHistogramProducerComponent::DoInit(int argc, const char** argv )
 {
   //see header file for documentation
 
-  fHistogramProducerPtr = new AliHLTPHOSHistogramProducer();
+  fPhysicsHistogramProducerPtr = new AliHLTPHOSPhysicsHistogramProducer();
   
   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]))
+      if(!strcmp("-pushmodulo", argv[i]))
        {
-         fHistogramProducerPtr->SetFillClusterNtuple(true);
-         fDoFillNtuple = true;
-       }
-      if(!strcmp("-maxntupleentries", argv[i]))
-       {
-         fHistogramProducerPtr->SetMaxNtupleEntries(atoi(argv[i+1]));
+       
+         fPushModulo = 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;
 }
index 43bf80cb78b2e7d297ca643d9b29674e3b993f41..040fa5b0951d9ff0954b17eda1e5f00118ec7574 100644 (file)
 
 #include "AliHLTPHOSProcessor.h"
 
-class TH1D;
-class TNtuple;
-class AliHLTPHOSHistogramProducer;
-class AliHLTPHOSCaloClusterContainerStruct;
-
+class AliHLTPHOSPhysicsHistogramProducer;
 /**
  * @class AliHLTPHOSHistogramProducerComponent
  *
@@ -61,15 +57,10 @@ class AliHLTPHOSHistogramProducerComponent: public AliHLTPHOSProcessor
   virtual ~AliHLTPHOSHistogramProducerComponent();
 
   /** Copy constructor */  
-  AliHLTPHOSHistogramProducerComponent(const AliHLTPHOSHistogramProducerComponent &) : 
+  AliHLTPHOSHistogramProducerComponent(const AliHLTPHOSHistogramProducerComponent & ) : 
     AliHLTPHOSProcessor(),
-    fClusterEnergiesHistPtr(0),
-    fMultiplicitiesHistPtr(0),
-    fClusterNtuplePtr(0),
-    fDoFillClusterEnergies(false),
-    fDoFillMultiplicities(false),
-    fDoFillNtuple(false),
-    fHistogramProducerPtr(0)
+    fPhysicsHistogramProducerPtr(0),
+    fPushModulo(0)
   {
     //Copy constructor not implemented
   }
@@ -114,18 +105,9 @@ protected:
 
  private:
 
-  TH1D* fClusterEnergiesHistPtr; 
-  TH1D* fMultiplicitiesHistPtr; 
-  TNtuple* fClusterNtuplePtr; 
-
-  bool fDoFillClusterEnergies;
-  bool fDoFillMultiplicities;
-  bool fDoFillNtuple;
+  AliHLTPHOSPhysicsHistogramProducer* fPhysicsHistogramProducerPtr;
+  UInt_t fPushModulo;
 
-  AliHLTPHOSHistogramProducer* fHistogramProducerPtr;
-
-  /** interface function, see @ref AliHLTComponent for description */
-  static const AliHLTComponentDataType fgkInputDataTypes[];     //COMMENT
 };
 
 #endif
index 49a0b7e806de5591c1965302853ae41cd70076be..1d54e4dd2bbc6c9a8823ac9ee9a697830fa5f2f1 100644 (file)
@@ -8,7 +8,9 @@
 #pragma link off all classes;
 #pragma link off all functions;
 
-#pragma link C++ class AliHLTPHOSClusterizer;  
+//#pragma link C++ class AliHLTPHOSAgent+;
+#pragma link C++ class AliHLTPHOSClusterizer+;  
+#pragma link C++ class AliHLTPHOSESDCaloClusterMaker+;  
 #pragma link C++ class AliHLTPHOSEmcCalibData+;  
 #pragma link C++ class AliHLTPHOSPhysicsAnalyzer+;  
 #pragma link C++ class AliHLTPHOSPulseGenerator+;  
@@ -21,6 +23,7 @@
 #pragma link C++ class AliHLTPHOSSanityInspector+; 
 #pragma link C++ class AliHLTPHOSESDMaker+; 
 #pragma link C++ class AliHLTPHOSClusterAnalyser+; 
+#pragma link C++ class AliHLTPHOSPhysicsHistogramProducer+;
 
 //#pragma link C++ class AliHLTPHOSChannelBadness+;
 
index a3403dbce46d57a8982a3c8f647314ebc4d89dc3..72246b2b9b24819a30b33b3d2059b7126d07186d 100644 (file)
@@ -24,6 +24,7 @@
 //
 //
 
+#include "AliPHOSEMCAGeometry.h"
 #include "AliHLTPHOSMapper.h"
 #include "AliHLTPHOSConstants.h"
 #include "AliHLTLogging.h"
@@ -36,9 +37,12 @@ AliHLTPHOSMapper::AliHLTPHOSMapper():  AliHLTLogging(),
                                       fHw2geomapPtr(0),
                                       fIsInitializedMapping(false),
                                       fSpecificationMapPtr(0)
+                                      //                              fPHOSGeometry(0)
 {
   InitAltroMapping(); 
   InitDDLSpecificationMapping();
+  //  fPHOSGeometry = new AliPHOSEMCAGeometry();
+
 }
 
 
@@ -61,7 +65,7 @@ AliHLTPHOSMapper::InitAltroMapping()
   int tmpZRow = 0;
   int tmpXCol = 0;
   int tmpGain = 0;
-  int res = 0; //OD to get rid of warnings
+  int res = 0; 
   if(base !=0)
     {
       sprintf(fFilepath,"%s/PHOS/mapping/RCU0.data", base);
@@ -184,7 +188,7 @@ AliHLTPHOSMapper::GetChannelID(Int_t specification, Int_t hwAddress)
   else if(specification == 0x80000) index = 19;
 
   else HLTError("Specification 0x%X not consistent with single DDL in PHOS", specification);
-
+  
   return ((fHw2geomapPtr[hwAddress].fXCol + fSpecificationMapPtr[index].fRcuXOffset) |
          ((fHw2geomapPtr[hwAddress].fZRow + fSpecificationMapPtr[index].fRcuZOffset) << 6) |
          (fHw2geomapPtr[hwAddress].fGain << 12) |
@@ -199,3 +203,46 @@ AliHLTPHOSMapper::GetChannelCoord(UShort_t channelId, UShort_t* channelCoord)
   channelCoord[2] = (channelId >> 12)&0x1;
   channelCoord[3] = (channelId >> 13)&0x1f;
 }
+
+void
+AliHLTPHOSMapper::GetLocalCoord(UShort_t channelId, Float_t* channelCoord)
+{
+  channelCoord[0] = (static_cast<Float_t>(channelId&0x3f) - NXCOLUMNSMOD/2)* fCellStep;
+  channelCoord[1] = (static_cast<Float_t>((channelId >> 6)&0x3f) - NZROWSMOD/2) * fCellStep;
+  channelCoord[2] = (channelId >> 12)&0x1;
+  channelCoord[2] = (channelId >> 13)&0x1f;
+}
+
+Int_t 
+AliHLTPHOSMapper::GetDDLFromSpec(Int_t specification)
+{
+  Int_t index = -1;
+  if(specification == 0x00001) index = 0;
+  else if(specification == 0x00002) index = 1;
+  else if(specification == 0x00004) index = 2;
+  else if(specification == 0x00008) index = 3;
+
+  else if(specification == 0x00010) index = 4;
+  else if(specification == 0x00020) index = 5;
+  else if(specification == 0x00040) index = 6;
+  else if(specification == 0x00080) index = 7;
+
+  else if(specification == 0x00100) index = 8;
+  else if(specification == 0x00200) index = 9;
+  else if(specification == 0x00400) index = 10;
+  else if(specification == 0x00800) index = 11;
+
+  else if(specification == 0x01000) index = 12;
+  else if(specification == 0x02000) index = 13;
+  else if(specification == 0x04000) index = 14;
+  else if(specification == 0x08000) index = 15;
+
+  else if(specification == 0x10000) index = 16;
+  else if(specification == 0x20000) index = 17;
+  else if(specification == 0x40000) index = 18;
+  else if(specification == 0x80000) index = 19;
+
+  else HLTError("Specification 0x%X not consistent with single DDL in PHOS", specification);
+
+  return index;
+}
index 9ae4c8c262e219bb6572f135fef6fd1e33aab0f8..19f859e9a05305c40ea510da9e8ad4b9d8f30030 100644 (file)
@@ -28,6 +28,9 @@
 //using namespace PhosHLTConst;
 #include "Rtypes.h"
 #include "AliHLTLogging.h"
+
+#include "AliPHOSEMCAGeometry.h"
+
 class AliHLTPHOSMapper : public AliHLTLogging
 //class AliHLTPHOSMapper 
 {
@@ -41,6 +44,8 @@ class AliHLTPHOSMapper : public AliHLTLogging
 
   UShort_t GetChannelID(Int_t specification, Int_t hwAddress);
   static void GetChannelCoord(UShort_t channelId, UShort_t* channelCoord);
+  static void GetLocalCoord(UShort_t channelId, Float_t* localCoord);
+  int GetDDLFromSpec(Int_t specification);
 
   struct fAltromap{ 
     int fZRow; // Coordinate in Z direction (beam direction) relatve too one RCU
@@ -67,7 +72,8 @@ class AliHLTPHOSMapper : public AliHLTLogging
   AliHLTPHOSMapper & operator = (const AliHLTPHOSMapper &);
   
   fDDLSpecificationMap* fSpecificationMapPtr;
-  
+  //AliPHOSEMCAGeometry fPHOSGeometry;
+  static const Float_t fCellStep = 2.2;//2.*fPHOSGeometry.GetAirCellHalfSize()[0];
 };
 
 #endif
index 54d105946bc942e99ed71d831931206dc64939a4..3cd00c73497192dbd8f08cb9ac2d8472ab80bf1b 100644 (file)
@@ -120,7 +120,6 @@ Int_t AliHLTPHOSModuleCalibrationProcessorComponent::DeinitCalibration()
 {
    //See header file for documentation
 
-  cout << "Int_t AliHLTPHOSModuleCalibrationProcessorComponent::DeinitCalibration()"  << endl;
   //AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) {
   
   AliHLTComponentEventData dummyEvtData;
@@ -225,42 +224,35 @@ Int_t AliHLTPHOSModuleCalibrationProcessorComponent::ProcessCalibration(const Al
 
   
 Int_t 
-AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) {
+AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS( const AliHLTComponentEventData& /*evtData*/, AliHLTComponentTriggerData& /*trigData*/ ) 
+{
+
 
-  cout << "AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS TP0" << endl;
  
   //://:ShipDataToFXS(
 
   // see header file for class documentation
  
   // ** PushBack data to FXS ...
-  cout << "AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS TP0.1" << endl;
   Char_t filename[200];
 
   for(int i=0; i < 200; i++)
     {
       filename[i] = 0;
     }
-
-  cout << "AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS TP0.2" << endl;
  
   fPHOSDAPtr->GetModule();
 
   sprintf(filename, "PHOS_Module%d_Calib_HLT.root",  fPHOSDAPtr->GetModule() );
-  cout << "AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS TP0.3" << endl;
-  cout << "AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS TP1" << endl;
 
   for(Int_t x = 0; x < NXCOLUMNSRCU; x++)
     {
       for(Int_t z = 0; z < NZROWSRCU; z++)
        {
-         cout << "AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS TP2" << endl;
          PushToFXS( (TObject*) fPHOSDAPtr->GetHgLgRatioHistogram(x, z), "PHOS", filename);
          for(Int_t gain = 0; gain < NGAINS; gain++)
            {
-             cout << "AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS TP3" << endl; 
              PushToFXS( (TObject*) fPHOSDAPtr->GetTimeEnergyHistogram(x, z, gain), "PHOS", filename);
-             cout << "AliHLTPHOSModuleCalibrationProcessorComponent::ShipDataToFXS TP4" << endl;
            }
        }
     }
index 281b7c43494ec7338a987c15be8240f9e494a649..ca3e148f9d6bcf9a98e9eed44784bb281ee61fce 100644 (file)
@@ -47,17 +47,18 @@ AliHLTPHOSPhysicsAnalyzer::AliHLTPHOSPhysicsAnalyzer():
 {
   //Constructor
   //See header file for documentation
-  AliPHOSGeometry *geom=AliPHOSGeometry::GetInstance("noCPV");
+  //  AliPHOSGeometry *geom=AliPHOSGeometry::GetInstance("noCPV");
+  AliPHOSGeometry *geom=AliPHOSGeometry::GetInstance("IHEP");
 
   //  fPHOSRadius = geom->GetIPtoCrystalSurface();
   fPHOSRadius = geom->GetIPtoCrystalSurface();
 
   for(int i = 0; i < NMODULES; i++)
     {
-//       fRotParametersCos[i] = cos((geom->GetPHOSAngle(i+1))*2*TMath::Pi()/360);
-//       fRotParametersSin[i] = sin((geom->GetPHOSAngle(i+1))*2*TMath::Pi()/360);
-      fRotParametersCos[i] = cos((geom->GetPHOSAngle(i))*2*TMath::Pi()/360);
-      fRotParametersSin[i] = sin((geom->GetPHOSAngle(i))*2*TMath::Pi()/360);
+       fRotParametersCos[i] = cos((geom->GetPHOSAngle(i+1))*2*TMath::Pi()/360);
+       fRotParametersSin[i] = sin((geom->GetPHOSAngle(i+1))*2*TMath::Pi()/360);
+//      fRotParametersCos[i] = cos((geom->GetPHOSAngle(i))*2*TMath::Pi()/360);
+//      fRotParametersSin[i] = sin((geom->GetPHOSAngle(i))*2*TMath::Pi()/360);
 
     }
 }
@@ -128,7 +129,7 @@ AliHLTPHOSPhysicsAnalyzer::GlobalPosition(Float_t* locPositionPtr, Float_t* posi
 
   positionPtr[1] = kCRYSTALSIZE*(locPositionPtr[0]-NXCOLUMNSMOD/2)*fRotParametersSin[module] - fPHOSRadius*fRotParametersCos[module];
   
-  positionPtr[2] = kCRYSTALSIZE*(locPositionPtr[1]-NZROWSMOD);
+  positionPtr[2] = kCRYSTALSIZE*(locPositionPtr[1]-NZROWSMOD/2);
 
 }
 
diff --git a/HLT/PHOS/AliHLTPHOSPhysicsHistogramProducer.cxx b/HLT/PHOS/AliHLTPHOSPhysicsHistogramProducer.cxx
new file mode 100644 (file)
index 0000000..8ebc9fb
--- /dev/null
@@ -0,0 +1,249 @@
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Albin Gaignette
+ *                                                                        *
+ * 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   AliHLTPHOSPhysicsHistogramProducer
+ * @author Albin Gaignette
+ * @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 "AliHLTPHOSPhysicsHistogramProducer.h"
+#include "AliESDCaloCluster.h"
+#include "TMath.h"
+#include "TClonesArray.h"
+#include <iostream>
+#include "TH1F.h"
+#include "TH2F.h"
+
+AliHLTPHOSPhysicsHistogramProducer::AliHLTPHOSPhysicsHistogramProducer() :
+    AliHLTPHOSBase(),
+    fHistNcls(0),
+    fHistEnergy(0),
+    fHistTotEnergy(0),
+    fHistTwoClusterInvMass(0),
+    fHistNcells(0),
+    fHistNcellsPercentage(0),
+    fHistCellsEnergy(0),
+    fHistNclusterTotE(0),
+    fHistNcellsSumCells(0),
+    fHistArrayPtr(0)
+{
+  // See header file for documentation
+  fHistArrayPtr = new TObjArray;
+
+  fHistNcls = new TH1F("fHistNcls", "Number of clusters per event", 20, 0, 20);
+  fHistNcls->GetXaxis()->SetTitle("Number of clusters per event");
+  fHistNcls->GetYaxis()->SetTitle("# of counts");
+  fHistArrayPtr ->AddLast(fHistNcls);
+  
+  fHistEnergy = new TH1F("fHistEnergy", "Energy in each cluster", 200, 0, 100);
+  fHistEnergy->GetXaxis()->SetTitle("E_{T} GeV");
+  fHistEnergy->GetYaxis()->SetTitle("# of counts");
+  fHistEnergy->SetMarkerStyle(21);
+  fHistArrayPtr->AddLast(fHistEnergy);
+
+  fHistTotEnergy = new TH1F("fHistTotEnergy", "Total energy in each event", 200, 0, 200);
+  fHistTotEnergy->GetXaxis()->SetTitle("E_{T} GeV");
+  fHistTotEnergy->GetYaxis()->SetTitle("# of counts");
+  fHistTotEnergy->SetMarkerStyle(21);
+  fHistArrayPtr ->AddLast(fHistTotEnergy);
+
+  fHistTwoClusterInvMass = new TH1F("fHistTwoClusterInvMass", "Invariant mass of two clusters", 200, 0, 1);
+  fHistTwoClusterInvMass->GetXaxis()->SetTitle("m_{#gamma#gamma} GeV");
+  fHistTwoClusterInvMass->GetYaxis()->SetTitle("Number of counts");
+  fHistTwoClusterInvMass->SetMarkerStyle(21);
+  fHistArrayPtr->AddLast(fHistTwoClusterInvMass);
+
+  fHistNcells = new TH1F("fHistNcells", "Number of cells in each cluster", 200, 0, 100);
+  fHistNcells->GetXaxis()->SetTitle("# of cells in the cluster");
+  fHistNcells->GetYaxis()->SetTitle("# of counts");
+  fHistNcells->SetMarkerStyle(21); 
+  fHistArrayPtr ->AddLast(fHistNcells);
+
+  fHistNcellsPercentage = new TH1F("fHistNcellsPercentage", "Percentage of cells in the cluster", 200, 0, 10);
+  fHistNcellsPercentage->GetXaxis()->SetTitle("100* #frac{Total # of cells in the cluster}{Total # of cells in PHOS}");
+  fHistNcellsPercentage->GetYaxis()->SetTitle("# of counts");
+  fHistNcellsPercentage->SetMarkerStyle(21);
+  fHistArrayPtr ->AddLast(fHistNcellsPercentage);
+
+  fHistCellsEnergy = new TH2F("fHistCellsEnergy","# of cells in the cluster vs cluster Energy",100,0,60,100,1,60);
+  fHistCellsEnergy->GetXaxis()->SetTitle("Cluster Energy [GeV]");
+  fHistCellsEnergy->GetYaxis()->SetTitle("# of cells in the cluster");
+  fHistArrayPtr ->AddLast(fHistCellsEnergy);
+
+  fHistNclusterTotE = new TH2F("fHistNclusterTotE","# of clusters vs total Energy",100,0,200,100,1,15);
+  fHistNclusterTotE->GetXaxis()->SetTitle("total Energy in the event [GeV]");
+  fHistNclusterTotE->GetYaxis()->SetTitle("# of clusters in each event");
+  fHistArrayPtr ->AddLast(fHistNclusterTotE);
+
+  fHistNcellsSumCells = new TH2F("fHistNcellsSumCells","# of cells in PHOS vs sum cells in the clusters",100,0,300,100,17910,17930);
+  fHistNcellsSumCells->GetXaxis()->SetTitle("# of cells in the clusters");
+  fHistNcellsSumCells->GetYaxis()->SetTitle("Total # of cells in PHOS");
+  fHistArrayPtr->AddLast(fHistNcellsSumCells);
+}
+
+AliHLTPHOSPhysicsHistogramProducer::~AliHLTPHOSPhysicsHistogramProducer()
+{
+  // See header file for documentation
+  if(fHistNcls)
+    {
+      delete fHistNcls;
+      fHistNcls = 0;
+    }
+  if(fHistEnergy)
+    {
+      delete fHistEnergy;
+      fHistEnergy = 0;
+    }
+  if(fHistTotEnergy)
+    {
+      delete fHistTotEnergy;
+      fHistTotEnergy = 0;
+    }
+  if(fHistTwoClusterInvMass)
+    {
+      delete fHistTwoClusterInvMass;
+      fHistTwoClusterInvMass = 0;
+    }
+  if(fHistNcells)
+    {
+      delete fHistNcells;
+      fHistNcells = 0;
+    }
+  if(fHistNcellsPercentage)
+    {
+      delete fHistNcellsPercentage;
+      fHistNcellsPercentage = 0;
+    }
+  if(fHistCellsEnergy)
+    {
+      delete fHistCellsEnergy;
+      fHistCellsEnergy = 0;
+    }
+  if(fHistNclusterTotE)
+    {
+      delete fHistNclusterTotE;
+      fHistNclusterTotE = 0;
+    }
+  if(fHistNcellsSumCells)
+    {
+      delete fHistNcellsSumCells;
+      fHistNcellsSumCells = 0;
+    }
+  if(fHistArrayPtr)
+    {
+      delete fHistArrayPtr;
+      fHistArrayPtr = 0;
+    }
+}
+
+TObjArray* AliHLTPHOSPhysicsHistogramProducer::GetHistograms()
+{  
+  // See header file for documentation
+  return fHistArrayPtr;
+}
+
+Int_t AliHLTPHOSPhysicsHistogramProducer::AnalyseClusters(TClonesArray* clusters)
+{   
+  // See header file for documentation
+  Int_t nPHOSModules = 3;
+  Int_t totClustersAll=0;
+  Int_t totClustersAllwithprob=0;
+  Int_t totClustersFile=0; 
+  Int_t totClustersFilewithprob=0; 
+  Double_t theta=0.0; 
+  Double_t m=0.0;
+  Double_t TotalCells =0;
+  Double_t TotalCellsPHOS= NXCOLUMNSMOD*NZROWSMOD * nPHOSModules;
+  // 3584 crystals * 3 modules
+  Double_t Nclusters =0;
+  Double_t TotEnergy = 0.0;
+     
+  Int_t ncls = clusters->GetEntriesFast();
+
+  fHistNcls->Fill(ncls);
+  totClustersAll+=ncls;
+  totClustersFile+=ncls;
+  Double_t totE = 0;
+   
+  Nclusters=0;
+  TotEnergy=0.0;
+  TotalCells=0;
+          
+  Float_t** tabposition = new Float_t*[ncls];
+  Double_t* tabenergy=new Double_t[ncls];
+     
+  for(Int_t icls = 0; icls < ncls; icls++)
+    {
+      AliESDCaloCluster* cluster = (AliESDCaloCluster*)clusters->At(icls);
+               
+      totClustersFilewithprob+=icls;
+      totClustersAllwithprob+=icls;
+      totE += cluster->E();
+      fHistEnergy->Fill(cluster->E());
+
+      tabposition[icls] = new Float_t[3];
+      cluster->GetPosition(tabposition[icls]); 
+      tabenergy[icls] = cluster->E(); 
+         
+      TotalCells += cluster -> GetNCells();
+      fHistNcells->Fill(cluster -> GetNCells());
+      fHistCellsEnergy->Fill(cluster -> GetNCells(),cluster->E());
+      TotEnergy += cluster->E();
+      Nclusters++;
+    }
+  fHistNcellsPercentage->Fill(100*(TotalCells/TotalCellsPHOS));
+  fHistNclusterTotE->Fill(TotEnergy,Nclusters);
+  fHistNcellsSumCells->Fill(TotalCells,TotalCellsPHOS);        
+       
+  if(totE > 0)
+    fHistTotEnergy->Fill(totE);
+  
+  for(Int_t ipho = 0; ipho<(ncls-1) ; ipho++)
+    { 
+      for(Int_t jpho = ipho+1 ; jpho<ncls ; jpho++)
+       { 
+         // Calcul of the theta angle between two photons
+         theta =(2* asin(0.5*TMath::Sqrt((tabposition[ipho][0]-tabposition[jpho][0])*(tabposition[ipho][0]-tabposition[jpho][0]) +(tabposition[ipho][1]-tabposition[jpho][1])*(tabposition[ipho][1]-tabposition[jpho][1]))/460));
+             
+         // Calcul of the mass m of the pion 
+         m =(TMath::Sqrt(2 * tabenergy[ipho]* tabenergy[jpho]*(1-TMath::Cos(theta))));
+         fHistTwoClusterInvMass->Fill(m);
+       }
+    }
+    
+  for(Int_t j=0 ; j<ncls;j++)
+    {
+      delete[] tabposition[j];
+    }
+         
+  delete[] tabposition;
+  delete[] tabenergy;
+
+  return 0;
+}
+  
+
diff --git a/HLT/PHOS/AliHLTPHOSPhysicsHistogramProducer.h b/HLT/PHOS/AliHLTPHOSPhysicsHistogramProducer.h
new file mode 100644 (file)
index 0000000..8b167cb
--- /dev/null
@@ -0,0 +1,138 @@
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Albin Gaignette                                       *
+ *                                                                        *
+ * 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 ALIHLTPHOSPHYSICSHISTOGRAMPRODUCER_H
+#define ALIHLTPHOSPHYSICSHISTOGRAMPRODUCER_H
+
+/** 
+ * @file   AliHLTPHOSPhysicsHistogramProducer
+ * @author Albin Gaignette
+ * @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 "AliHLTPHOSBase.h"
+
+class TObjArray;
+class TH1F;
+class TH2F;
+
+
+/** 
+ * @class AliHLTPHOSPhysicsHistogramProducer
+ *
+ * Class produces physics histograms for PHOS. It takes a TClonesArray
+ * of AliESDCalocluster as input and fills several histograms
+ *
+ * Histograms (1D):
+ * - Total number of clusters per event
+ * - Energy distribution of clusters
+ * - Total energy in event
+ * - Invariant mass of two clusters
+ * - Number of cells in clusters
+ * - Fraction of cells with energy deposit
+ * 
+ * Histograms (2D):
+ * - Number of cells in cluster vs cluster energy
+ * - Number of clusters vs total energy
+ *
+ * @ingroup alihlt_phos
+ */
+
+
+
+class AliHLTPHOSPhysicsHistogramProducer : public AliHLTPHOSBase
+{
+ public:
+
+  /** Constructor */
+  AliHLTPHOSPhysicsHistogramProducer();
+
+  /** Destructor */
+  virtual ~AliHLTPHOSPhysicsHistogramProducer();
+
+  /** Copy constructor */
+  AliHLTPHOSPhysicsHistogramProducer(const AliHLTPHOSPhysicsHistogramProducer &) :
+    AliHLTPHOSBase(),
+    fHistNcls(0),
+    fHistEnergy(0),
+    fHistTotEnergy(0),
+    fHistTwoClusterInvMass(0),
+    fHistNcells(0),
+    fHistNcellsPercentage(0),
+    fHistCellsEnergy(0),
+    fHistNclusterTotE(0),
+    fHistNcellsSumCells(0),
+    fHistArrayPtr(0)
+  {
+    // Copy constructor not implemented
+  }
+
+  /** Assignment operator */
+  AliHLTPHOSPhysicsHistogramProducer & operator= (const AliHLTPHOSPhysicsHistogramProducer)
+  {
+    // assignment
+    return *this;
+  }
+
+  /** Analyse the clusters in the event */
+  Int_t AnalyseClusters(TClonesArray* clusters);
+
+  /** Get a pointer to the TObjArray of histograms */
+  TObjArray *GetHistograms();
+  
+ private:
+
+  /** Histogram of number of clusters */
+  TH1F *fHistNcls;                              //!transient
+
+  /** Histogram of the cluster energies */
+  TH1F *fHistEnergy;                            //!transient
+
+  /** Histogram of the total energy in PHOS */
+  TH1F *fHistTotEnergy;                         //!transient
+
+  /** Histogram of the 2 cluster invariant mass */
+  TH1F *fHistTwoClusterInvMass;                 //!transient
+
+  /** Histogram of the number of cells with energy */
+  TH1F *fHistNcells;                            //!transient
+
+  /** Histogram of the fraction of cells with energy deposit */
+  TH1F *fHistNcellsPercentage;                  //!transient
+  
+  /** Histogram of number of cells in cluster vs cluster energy */
+  TH2F *fHistCellsEnergy;                       //!transient
+
+  /** Histogram of number of clusters vs total energy */
+  TH2F *fHistNclusterTotE;                      //!transient
+  
+  /** Histogram of number of cells in the cluster vs total number of cells in PHOS */
+  TH2F *fHistNcellsSumCells;                    //!transient
+
+  /** Pointer to the array of histograms */
+  TObjArray *fHistArrayPtr;                     //!transient
+
+  ClassDef(AliHLTPHOSPhysicsHistogramProducer, 0);
+
+};
+#endif
index f361b80647b833b1307e6a3519fe3d845fe6d712..d7574acdff254f3a29e15de7deff1f3bb49ab8a4 100644 (file)
 #include "AliHLTPHOSRawAnalyzer.h"
 #include "AliHLTPHOSUtilities.h" 
 
-AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer(): AliHLTPHOSBase(),  
+AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer(): AliHLTPHOSBase(),   
                                                 //      fDoCorrectBaselineUsingFirstFiveSamples(false),
                                                 fDoCorrectBaselineUsingFirstFiveSamples(true),
                                                 fDoubleDataPtr(0), 
                                                 fIntDataPtr(0), 
+                                                fShortDataPtr(0),
                                                 fSampleFrequency(10),
                                                 fDTofGuess(-1),
                                                 fDAmplGuess(-1),
@@ -31,7 +32,9 @@ AliHLTPHOSRawAnalyzer:: AliHLTPHOSRawAnalyzer(): AliHLTPHOSBase(),
                                                 fDTof(99999), 
                                                 fDAmpl(99999),
                                                 fStartIndex(0),
+                                                fUseShortValues(false),
                                                 fUtilitiesPtr(0)
+
 {
   //  fIntDataPtr = new UInt_t[1008];
 
@@ -57,6 +60,7 @@ AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(double * /*dtaPtr*/, double fs): Al
                                                                              fDoCorrectBaselineUsingFirstFiveSamples(false),
                                                                              fDoubleDataPtr(0), 
                                                                              fIntDataPtr(0), 
+                                                                             fShortDataPtr(0),
                                                                              fSampleFrequency(10),
                                                                              fDTofGuess(-1),
                                                                              fDAmplGuess(-1),
@@ -64,7 +68,9 @@ AliHLTPHOSRawAnalyzer::AliHLTPHOSRawAnalyzer(double * /*dtaPtr*/, double fs): Al
                                                                              fDTof(99999), 
                                                                              fDAmpl(99999),
                                                                              fStartIndex(0),
+                                                                             fUseShortValues(false),
                                                                              fUtilitiesPtr(0)
+                                                                             
 {
   fSampleFrequency = fs;
 } //end  
@@ -184,6 +190,23 @@ AliHLTPHOSRawAnalyzer::GetEnergy() const
 
  }
 
+void
+ AliHLTPHOSRawAnalyzer::SetData(const UShort_t *data, const int length) 
+ // AliHLTPHOSRawAnalyzer::SetData(UInt_t *data, const int length) 
+// AliHLTPHOSRawAnalyzer::SetData(int *data, const int length) 
+ {
+
+   fShortDataPtr = const_cast<UShort_t *>(data);
+   fUseShortValues = true;
+   if(fDoCorrectBaselineUsingFirstFiveSamples == true)
+     {
+       CorrectBaselineUsingFirstFiveSamples(fIntDataPtr, length);
+     }
+
+   //   fIntDataPtr = data;
+
+ }
+
 
 
 
index 4b47657503995b8cfcc05699ccd5e26d5e4770e7..e084c0a53532b487b91c7ce428a38fdaabff8938 100644 (file)
@@ -34,6 +34,7 @@ class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
 
   //  void SetData(const double *data);
   void SetData(const UInt_t *data, const int length);
+  void SetData(const UShort_t *data, const int length);
   // void SetData(UInt_t *data, const int length);
 
   // void SetData(double *data, const int length);
@@ -65,6 +66,7 @@ class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
 
   double   *fDoubleDataPtr;   /**<Float representation of data that should be fitted */
   UInt_t   *fIntDataPtr;     /**<data that should be fitted */
+  UShort_t   *fShortDataPtr;     /**<data that should be fitted */
  //  int      *fIntDataPtr;     /**<data that should be fitted */
 
 
@@ -80,6 +82,8 @@ class AliHLTPHOSRawAnalyzer: public AliHLTPHOSBase
 
   //  double unsigned fTest;
 
+  bool fUseShortValues;
+
  protected:
   AliHLTPHOSUtilities *fUtilitiesPtr;
 
index d5cc6164cef77b2c8596430662ec687327947a1f..4a36df12b4aefde07af5c786103cb2b536b0f811 100644 (file)
@@ -46,6 +46,7 @@ AliHLTPHOSRawAnalyzerComponentv2::AliHLTPHOSRawAnalyzerComponentv2():
   fAltroBunchPtr = new AliAltroBunch();
   fDecoderPtr = new AliAltroDecoder();
   fSanityInspectorPtr = new AliHLTPHOSSanityInspector();
+
 }
 
 
@@ -184,7 +185,7 @@ AliHLTPHOSRawAnalyzerComponentv2::DoIt(const AliHLTComponentBlockData* iter, Ali
 
   //Adding to the total size of data written
   totSize += sizeof(AliHLTPHOSChannelDataHeaderStruct);
+  
   //Decoding data
   fDecoderPtr->SetMemory(reinterpret_cast<UChar_t*>( iter->fPtr ), iter->fSize);
   fDecoderPtr->Decode();
index 61da38d7b8bd2fd2560f4491f250645b358545d0..41b95ff369c897272a6a4c2a105e56a5b22c9107 100644 (file)
@@ -93,7 +93,7 @@ class AliHLTPHOSDigitContainerDataStruct;
  * <h2>Output size:</h2>
  * Depends on the amount of data...
  *
- * More detailed description. (Soon)
+ * More detailed description. (At some point...)
  *
  * @ingroup alihlt_phos
  */ 
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.cxx
new file mode 100644 (file)
index 0000000..1145b56
--- /dev/null
@@ -0,0 +1,276 @@
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Per Thomas Hille, 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 "AliHLTPHOSRawAnalyzer.h"
+#include "AliHLTPHOSRawAnalyzerComponentv3.h"
+#include "AliHLTPHOSChannelDataHeaderStruct.h"
+#include "AliHLTPHOSChannelDataStruct.h"
+#include "AliHLTPHOSMapper.h"
+#include "AliHLTPHOSSanityInspector.h"
+#include "AliAltroRawStreamV3.h"
+#include "AliRawReaderMemory.h"
+
+
+AliHLTPHOSRawAnalyzerComponentv3::AliHLTPHOSRawAnalyzerComponentv3():
+  AliHLTPHOSRcuProcessor(), 
+  fAnalyzerPtr(0), 
+  fMapperPtr(0), 
+  fSanityInspectorPtr(0),
+  fRawReaderMemoryPtr(0),
+  fAltroRawStreamPtr(0),
+  fAlgorithm(0),
+  fOffset(0),
+  fBunchSizeCut(0),
+  fMinPeakPosition(0),
+  fMaxPeakPosition(100)
+{
+  //comment
+  fMapperPtr = new AliHLTPHOSMapper();
+
+  fRawReaderMemoryPtr = new AliRawReaderMemory();
+
+  fAltroRawStreamPtr = new AliAltroRawStreamV3(fRawReaderMemoryPtr);
+
+  fSanityInspectorPtr = new AliHLTPHOSSanityInspector();
+
+}
+
+
+AliHLTPHOSRawAnalyzerComponentv3::~AliHLTPHOSRawAnalyzerComponentv3()
+{
+  //comment
+  Deinit();
+}
+
+int 
+AliHLTPHOSRawAnalyzerComponentv3::Deinit()
+{
+  //comment
+  if(fAnalyzerPtr)
+    {
+      delete fAnalyzerPtr;
+      fAnalyzerPtr = 0;
+    }
+  if(fMapperPtr)
+    {
+      delete  fMapperPtr;
+      fMapperPtr = 0;
+    }
+  if(fRawReaderMemoryPtr)
+    {
+      delete fRawReaderMemoryPtr;
+      fRawReaderMemoryPtr = 0;
+    }
+  if(fAltroRawStreamPtr)
+    {
+      delete fAltroRawStreamPtr;
+      fAltroRawStreamPtr = 0;
+    }
+  return 0;
+}
+
+const char* 
+AliHLTPHOSRawAnalyzerComponentv3::GetComponentID()
+{
+  //comment
+  return "PhosRawAnalyzerv3";
+}
+
+
+void
+AliHLTPHOSRawAnalyzerComponentv3::GetInputDataTypes( vector<AliHLTComponentDataType>& list)
+{
+  //comment
+  list.clear();
+  list.push_back( AliHLTPHOSDefinitions::fgkDDLPackedRawDataType | kAliHLTDataOriginPHOS);
+}
+
+AliHLTComponentDataType 
+AliHLTPHOSRawAnalyzerComponentv3::GetOutputDataType()
+{
+  //comment
+  return AliHLTPHOSDefinitions::fgkChannelDataType;
+}
+
+void
+AliHLTPHOSRawAnalyzerComponentv3::GetOutputDataSize(unsigned long& constBase, double& inputMultiplier )
+{
+  //comment
+  constBase = sizeof(AliHLTPHOSChannelDataHeaderStruct);
+  inputMultiplier = 0.5;
+}
+
+int 
+AliHLTPHOSRawAnalyzerComponentv3::DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, AliHLTComponentTriggerData& /*trigData*/, 
+                                        AliHLTUInt8_t* outputPtr, AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks )
+{
+  //comment
+  Int_t blockSize          = 0;
+  UInt_t totSize           = 0;
+
+  const AliHLTComponentBlockData* iter = NULL; 
+  unsigned long ndx;
+
+  for( ndx = 0; ndx < evtData.fBlockCnt; ndx++ )
+    {
+      iter = blocks+ndx;
+      if ( iter->fDataType != AliHLTPHOSDefinitions::fgkDDLPackedRawDataType  )
+       {
+         HLTDebug("Data block is not of type fgkDDLPackedRawDataType");
+         continue; 
+       }
+
+      blockSize = DoIt(iter, outputPtr, size, totSize); // Processing the block
+      if(blockSize == -1) // If the processing returns -1 we are out of buffer and return an error msg.
+       {
+         return -ENOBUFS;
+       }
+
+      totSize += blockSize; //Keeping track of the used size
+      // HLTDebug("Output data size: %d - Input data size: %d", totSize, iter->fSize);
+
+      //Filling the block data
+      AliHLTComponentBlockData bdChannelData;
+      FillBlockData( bdChannelData );
+      bdChannelData.fOffset = 0; //FIXME
+      bdChannelData.fSize = blockSize;
+      bdChannelData.fDataType = AliHLTPHOSDefinitions::fgkChannelDataType;
+      bdChannelData.fSpecification = iter->fSpecification;
+      outputBlocks.push_back(bdChannelData);
+
+      outputPtr += blockSize; //Updating position of the output buffer
+    }
+
+  fPhosEventCount++; 
+  size = totSize; //telling the framework how much buffer space we have used.
+  
+  return 0;
+}//end DoEvent
+
+Int_t
+AliHLTPHOSRawAnalyzerComponentv3::DoIt(const AliHLTComponentBlockData* iter, AliHLTUInt8_t* outputPtr, const AliHLTUInt32_t size, UInt_t& totSize)
+{
+  //comment
+  Int_t crazyness          = 0;
+  Int_t nSamples           = 0;
+  Short_t channelCount     = 0;
+
+  // Firs we want to write a header to the output
+  AliHLTPHOSChannelDataHeaderStruct *channelDataHeaderPtr = reinterpret_cast<AliHLTPHOSChannelDataHeaderStruct*>(outputPtr); 
+
+  // Then comes the channel data
+  AliHLTPHOSChannelDataStruct *channelDataPtr = reinterpret_cast<AliHLTPHOSChannelDataStruct*>(outputPtr+sizeof(AliHLTPHOSChannelDataHeaderStruct)); 
+
+  //Adding to the total size of data written
+  totSize += sizeof(AliHLTPHOSChannelDataHeaderStruct);
+
+  fRawReaderMemoryPtr->SetMemory(reinterpret_cast<UChar_t*>(iter->fPtr), static_cast<ULong_t>(size));
+  fRawReaderMemoryPtr->SetEquipmentID(fMapperPtr->GetDDLFromSpec(iter->fSpecification));
+  fRawReaderMemoryPtr->Reset();
+  fRawReaderMemoryPtr->NextEvent();
+
+  fAltroRawStreamPtr->NextDDL();
+  
+  //Looping over data
+  while(fAltroRawStreamPtr->NextChannel())
+    {          
+      //Want to get the "first in time" "bunch"
+      while(fAltroRawStreamPtr->NextBunch()) {}
+      
+      totSize += sizeof(AliHLTPHOSChannelDataStruct);
+      if(totSize > size)
+       {
+         HLTError("Buffer overflow: Trying to write data of size: %d bytes. Output buffer available: %d bytes.", totSize, size);
+         return -1;
+       }
+             
+      nSamples = fAltroRawStreamPtr->GetBunchLength();
+             
+      //crazyness = fSanityInspectorPtr->CheckInsanity(static_cast<const UInt_t*>(fAltroBunchPtr->GetData()), static_cast<const Int_t>(fAltroBunchPtr->GetBunchSize()));
+      
+      for(int i = 0; i < nSamples; i++)
+       {
+         cout << (fAltroRawStreamPtr->GetSignals())[i] << endl;
+       }
+
+      //Evalute signal amplitude and timing
+      fAnalyzerPtr->SetData(fAltroRawStreamPtr->GetSignals(), nSamples);
+      fAnalyzerPtr->Evaluate(0, nSamples);  
+             
+      //Checking for sane timing...
+      if(fAnalyzerPtr->GetTiming() > fMinPeakPosition && fAnalyzerPtr->GetTiming() < fMaxPeakPosition)
+       {
+         // Writing to the output buffer
+         channelDataPtr->fChannelID = fMapperPtr->GetChannelID(iter->fSpecification, fAltroRawStreamPtr->GetHWAddress());
+         //channelDataPtr->fChannelID = fMapperPtr->GetChannelID(1, fAltroDataPtr->GetHadd());
+         channelDataPtr->fEnergy = static_cast<Float_t>(fAnalyzerPtr->GetEnergy()) - fOffset;
+         channelDataPtr->fTime = static_cast<Float_t>(fAnalyzerPtr->GetTiming());
+         channelDataPtr->fCrazyness = static_cast<Short_t>(crazyness);
+         channelCount++;
+         channelDataPtr++; // Updating position of the free output.
+       }
+    }
+
+  //Writing the header
+  channelDataHeaderPtr->fNChannels  = channelCount;
+  channelDataHeaderPtr->fAlgorithm  = fAlgorithm;
+  channelDataHeaderPtr->fInfo       = 0;
+  channelDataHeaderPtr->fHasRawData = false;
+
+  HLTDebug("Number of channels: %d", channelCount);
+
+  //returning the size used
+  return sizeof(AliHLTPHOSChannelDataStruct)*channelCount + sizeof(AliHLTPHOSChannelDataHeaderStruct);
+}
+
+int
+AliHLTPHOSRawAnalyzerComponentv3::DoInit( int argc, const char** argv )
+{ 
+
+  //See base class for documentation
+  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(!strcmp("-bunchsizecut", argv[i]))
+       {
+         fBunchSizeCut = atoi(argv[i+1]);
+       }
+      if(!strcmp("-minpeakposition", argv[i]))
+       {
+         fMinPeakPosition = atoi(argv[i+1]);
+       }
+      if(!strcmp("-maxpeakposition", argv[i]))
+       {
+         fMaxPeakPosition = atoi(argv[i+1]);
+       }  
+    }
+  if(fMapperPtr->GetIsInitializedMapping() == false)
+    {
+      Logging(kHLTLogFatal, __FILE__ , IntToChar(  __LINE__ ) , "AliHLTPHOSMapper::Could not initialise mapping from file %s, aborting", fMapperPtr->GetFilePath());
+      return -4;
+    }
+
+  return iResult;
+}
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerComponentv3.h
new file mode 100644 (file)
index 0000000..01dbb07
--- /dev/null
@@ -0,0 +1,191 @@
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Per Thomas Hille, 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 ALIHLTPHOSRAWANALYZERCOMPONENTV3_H
+#define ALIHLTPHOSRAWANALYZERCOMPONENTV3_H
+
+
+/**
+ * Raw data analyzer component base class for PHOS HLT
+ *
+ * @file   AliHLTPHOSRawAnalyzerComponentv3.h
+ * @author Oystein Djuvsland
+ * @date   
+ * @brief  A clusterizer 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
+
+#include "AliHLTPHOSRcuProcessor.h"
+
+
+class AliHLTPHOSRawAnalyzer;
+class AliHLTPHOSRcuCellEnergyDataStruct;
+class AliHLTPHOSMapper;
+class AliHLTPHOSSanityInspector;
+class AliHLTPHOSDigitMaker;
+class AliHLTPHOSDigitContainerDataStruct;
+class AliRawReaderMemory;
+class AliAltroRawStreamV3;
+
+/**
+ * @class AliHLTPHOSRawAnalyzerComponentv3
+ * This the new and fast version of the component taking care of the decoding and energy and timing 
+ * extraction of the raw data from PHOS.
+ *
+ * <h2>General properties:</h2>
+ *
+ * Component ID: \b PhosRawAnalyzerv3 <br>
+ * Library: \b libAliHLTPHOS.so     <br>
+ * Input Data Types: @ref <br>
+ * Output Data Types: @ref AliHLTPHOSDefinitions::fgkChannelDataType<br>
+ *
+ * <h2>Mandatory arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li No mandatory arguments for component                           <br>
+ *
+ * <h2>Optional arguments:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li -offset      <i> value </i> <br>
+ *      gives the offset added to the data during zero suppression (default value: 0)
+ * \li -bunchsizecut <i> value </i> <br>
+ *      minimum number of samples a bunch must contain to be considered  (default value: 0)
+ * \li -minpeakposition <i> value </i> <br>
+ *      cut on minimum postion of the peak in the bunch (defaul value: 0)
+ * \li -maxpeakposition <i> value </i> <br>
+ *      cut on maximum postion of the peak in the bunch (defaul value: 100)
+ *
+ * <h2>Configuration:</h2>
+ * <!-- NOTE: ignore the \li. <i> and </i>: it's just doxygen formatting -->
+ * \li No configuration arguments 
+ *
+ * <h2>Default CDB entries:</h2>
+ * \li No CDB entry yet, will come.
+ *
+ * <h2>Performance:</h2>
+ * Pretty good (~ 3 kHz), depends on amount of data...
+ *
+ * <h2>Memory consumption:</h2>
+ * Depends on the amount of data, but pretty godd
+ *
+ * <h2>Output size:</h2>
+ * Depends on the amount of data...
+ *
+ * More detailed description. (Soon)
+ *
+ * @ingroup alihlt_phos
+ */ 
+
+
+class AliHLTPHOSRawAnalyzerComponentv3 : public AliHLTPHOSRcuProcessor
+{
+ public:
+
+  /** Standard constructor */
+  AliHLTPHOSRawAnalyzerComponentv3();
+
+  /** Destructor */
+  virtual ~AliHLTPHOSRawAnalyzerComponentv3();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual int DoInit(int argc =0, const char** argv  = 0);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual int Deinit();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual const char* GetComponentID() = 0;
+
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual void GetInputDataTypes( vector <AliHLTComponentDataType>& list);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual AliHLTComponentDataType GetOutputDataType();
+
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual void GetOutputDataSize(unsigned long& constBase, double& inputMultiplier);
+
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual AliHLTComponent* Spawn() = 0; 
+
+ protected:
+
+  /** interface function, see @ref AliHLTComponent for description */
+  using AliHLTPHOSRcuProcessor::DoEvent;
+
+  /** interface function, see @ref AliHLTComponent for description */
+  virtual int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
+                    AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
+                      AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );  
+
+  /** 
+   * Do the real processing in the component 
+   * @param iter is the pointer to the data blocks
+   * @param outputPtr is the pointer to the output buffer
+   * @param size is the available size for output
+   * @param totSize is the total size used for output
+   * @return the size output size used
+   */
+  virtual Int_t DoIt(const AliHLTComponentBlockData* iter, AliHLTUInt8_t* outputPtr, const AliHLTUInt32_t size, UInt_t& totSize); 
+
+
+  /** Pointer to an analyzer object used for raw data anlysis */ 
+  AliHLTPHOSRawAnalyzer *fAnalyzerPtr;   //COMMENT
+
+ private:
+
+  /** Keep the copy constructor private since it should not be used */
+  AliHLTPHOSRawAnalyzerComponentv3(const AliHLTPHOSRawAnalyzerComponentv3 & );
+
+  /** Keep the assignement operator private since it should not be used */
+  AliHLTPHOSRawAnalyzerComponentv3 & operator = (const AliHLTPHOSRawAnalyzerComponentv3 &);
+
+  /** Mapping from harware address to geometrical address */
+  AliHLTPHOSMapper *fMapperPtr;                       //!transient 
+
+  /** Pointer to object which may check the integrity of the data */
+  AliHLTPHOSSanityInspector *fSanityInspectorPtr;     //!transient
+
+  /** Pointer to the raw data reader which reads from memory */
+  AliRawReaderMemory* fRawReaderMemoryPtr;            //!transient
+  
+  /** Pointer to the raw stream */
+  AliAltroRawStreamV3* fAltroRawStreamPtr;              //!transient
+
+  /** Describing which algorithm we are using */
+  Short_t fAlgorithm;                                 //COMMENT
+
+  /** The offset applied before ZS */
+  Int_t fOffset;                                      //COMMENT
+
+  /** The minimum length a bunch can have to be considered */
+  Int_t fBunchSizeCut;                                //COMMENT
+
+  /** The lowest position a peak can have to be considered */
+  Int_t fMinPeakPosition;                             //COMMENT
+  
+  /** The maximum position a peak can have to be considered */
+  Int_t fMaxPeakPosition;                             //COMMENT
+
+};
+
+#endif
+
index 298329f2dd64d4440f152fe4961d5d100d031ad6..64d7faa8ec9f91e35898c10cda244e0de9e89aa3 100644 (file)
@@ -82,16 +82,53 @@ AliHLTPHOSRawAnalyzerCrude::Evaluate(int start, int length)
 
   //  DumpData(fDoubleDataPtr,50, 25);
 
+  if(fUseShortValues == true)
+    {
+      EvaluateShort(start, length);
+    }
+  else
+    {
+
+      double tmpAmplitudeMax =0; 
+      double tmpTime = 0;
+
+      for(int i=start; i<length; i++)
+       {
+         //   if(fDoubleDataPtr[i] >  tmpAmplitudeMax && i > 5)
+         if(fIntDataPtr[i] >  tmpAmplitudeMax && i > 5)
+           {
+             //          tmpAmplitudeMax = fDoubleDataPtr[i];
+             tmpAmplitudeMax = fIntDataPtr[i];
+             tmpTime = i;                   
+           }
+       }
+
+      fDAmpl = tmpAmplitudeMax;
+      fDTof =  tmpTime;
+    }
+  //thats all 
+} //end Crude
+
+void 
+AliHLTPHOSRawAnalyzerCrude::EvaluateShort(int start, int length)
+{
+  //  cout << "AliHLTPHOSRawAnalyzerCrude::Evaluate TP0"  << endl;
+
+  //DumpData(T
+
+  //  DumpData(fDoubleDataPtr,50, 25);
+
   double tmpAmplitudeMax =0; 
   double tmpTime = 0;
 
   for(int i=start; i<length; i++)
     {
         //   if(fDoubleDataPtr[i] >  tmpAmplitudeMax && i > 5)
-      if(fIntDataPtr[i] >  tmpAmplitudeMax && i > 5)
+      if(fShortDataPtr[i] >  tmpAmplitudeMax && i > 5)
        {
          //      tmpAmplitudeMax = fDoubleDataPtr[i];
-         tmpAmplitudeMax = fIntDataPtr[i];
+         tmpAmplitudeMax = fShortDataPtr[i];
          tmpTime = i;               
        }
     }
index e946885144d27cc2b9c2d612d9092849ba4e14c8..a8c0eb503e09dce77743edeb0749536a050833fc 100644 (file)
@@ -16,6 +16,7 @@ class AliHLTPHOSRawAnalyzerCrude : public AliHLTPHOSRawAnalyzer
   AliHLTPHOSRawAnalyzerCrude();
   virtual ~AliHLTPHOSRawAnalyzerCrude();
   virtual void Evaluate(int start = 0, int lenght = 100);
+  virtual void EvaluateShort(int start = 0, int lenght = 100);
  private:
   //  ClassDef(AliHLTPHOSRawAnalyzerCrude, 2) 
   
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponentv3.cxx b/HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponentv3.cxx
new file mode 100644 (file)
index 0000000..602c0ff
--- /dev/null
@@ -0,0 +1,69 @@
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Per Thomas Hille, 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 "AliHLTPHOSRawAnalyzerCrudeComponentv3.h"
+#include "AliHLTPHOSRawAnalyzerCrude.h"
+
+AliHLTPHOSRawAnalyzerCrudeComponentv3 gAliHLTPHOSRawAnalyzerCrudeComponentv3;
+
+//___________________________________________________________________________
+AliHLTPHOSRawAnalyzerCrudeComponentv3::AliHLTPHOSRawAnalyzerCrudeComponentv3() 
+{
+  fAnalyzerPtr = new AliHLTPHOSRawAnalyzerCrude();
+} 
+
+//___________________________________________________________________________
+AliHLTPHOSRawAnalyzerCrudeComponentv3::~AliHLTPHOSRawAnalyzerCrudeComponentv3()
+{
+  if(fAnalyzerPtr)
+    {
+      delete fAnalyzerPtr;
+      fAnalyzerPtr = 0;
+    }
+}
+
+//___________________________________________________________________________
+AliHLTPHOSRawAnalyzerCrudeComponentv3::AliHLTPHOSRawAnalyzerCrudeComponentv3(const AliHLTPHOSRawAnalyzerCrudeComponentv3 & ):AliHLTPHOSRawAnalyzerComponentv3()
+{
+
+}
+
+int
+AliHLTPHOSRawAnalyzerCrudeComponentv3::Deinit()
+{
+  
+  if(fAnalyzerPtr)
+    {
+      delete fAnalyzerPtr;
+      fAnalyzerPtr = 0;
+    }
+  return 0;
+}
+
+//___________________________________________________________________________
+const char* 
+AliHLTPHOSRawAnalyzerCrudeComponentv3::GetComponentID()
+{
+  return "PhosRawCrudev3";
+}
+
+//___________________________________________________________________________
+AliHLTComponent*
+AliHLTPHOSRawAnalyzerCrudeComponentv3::Spawn()
+{
+  return new AliHLTPHOSRawAnalyzerCrudeComponentv3;
+}
diff --git a/HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponentv3.h b/HLT/PHOS/AliHLTPHOSRawAnalyzerCrudeComponentv3.h
new file mode 100644 (file)
index 0000000..7b8fd72
--- /dev/null
@@ -0,0 +1,39 @@
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project        * 
+ * All rights reserved.                                                   *
+ *                                                                        *
+ * Primary Authors: Per Thomas Hille, 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 ALIHLTPHOSRAWANALYZERCRUDECOMPONENTV3_H
+#define ALIHLTPHOSRAWANALYZERCRUDECOMPONENTV3_H
+
+#include "AliHLTPHOSRawAnalyzerComponentv3.h"
+
+
+class AliHLTPHOSRawAnalyzerCrudeComponentv3: public AliHLTPHOSRawAnalyzerComponentv3
+{
+ public:
+  AliHLTPHOSRawAnalyzerCrudeComponentv3();
+  virtual ~AliHLTPHOSRawAnalyzerCrudeComponentv3();
+  AliHLTPHOSRawAnalyzerCrudeComponentv3(const AliHLTPHOSRawAnalyzerCrudeComponentv3 & );
+  AliHLTPHOSRawAnalyzerCrudeComponentv3 & operator = (const AliHLTPHOSRawAnalyzerCrudeComponentv3)
+  {
+    return *this;
+  };
+
+  virtual int Deinit();
+  virtual const char* GetComponentID();
+  virtual AliHLTComponent* Spawn();
+};
+
+#endif
index a16426f313f44563915a91f539280d248f1df94a..efae12b7a450a42178b3d54bb39219409ccba126 100644 (file)
@@ -126,7 +126,7 @@ Int_t AliHLTPHOSRcuCalibrationProcessorComponent::ProcessCalibration(const AliHL
 
   UInt_t specification = 0;
   const AliHLTComponentBlockData* iter = 0;
-  iter = GetFirstInputBlock( kAliHLTDataTypeDDLRaw | kAliHLTDataOriginTPC);
+  iter = GetFirstInputBlock();
   AliHLTPHOSRcuCellEnergyDataStruct* cellDataPtr = 0;
   AliHLTPHOSValidCellDataStruct* currentChannel = 0;
   int totalSamples = 1;
index 61b9087e9437865a60bb2e461e5a112f89240b58..a5a5dbbdb53e7d6576007d7e19a1a497df347c1b 100644 (file)
@@ -124,6 +124,30 @@ AliHLTPHOSRcuProperties::InitializeCoordinates(AliHLTUInt16_t /*equippmentID*/)
       fRcuX = 1; 
       fRcuZ = 1;
     }
+  // if( fRcuID  == 0)
+  //   {
+  //     fRcuX = 0; 
+  //     fRcuZ = 0;
+  //   }
+
+  // if( fRcuID  == 1)
+  //   {
+  //     fRcuX = 1; 
+  //     fRcuZ = 0;
+  //   }
+  // if( fRcuID == 2)
+  //   {
+  //     fRcuX = 2; 
+  //     fRcuZ = 0;
+  //   }
+
+  // if( fRcuID == 3)
+  //   {
+  //     fRcuX = 3; 
+  //     fRcuZ = 0;
+  //   }
 
   fRcuZOffset =  NZROWSRCU*fRcuZ;
   fRcuXOffset =  NXCOLUMNSRCU*fRcuX;
index ac2ac3acb3b48cde6e808223c1d06aefc1d9f8a8..8acaea829e8bd18189e6dc1930959f98fe4849e3 100644 (file)
@@ -19,7 +19,7 @@
  **************************************************************************/
 #include "AliHLTPHOSUtilities.h"
 #include <cstdlib>
-
+#include <cstdio>
 
 AliHLTPHOSUtilities::AliHLTPHOSUtilities()
 {
index 8611f54ee882f90626438d7c88dbd5bd50bc540e..1cc8dc56f28534c8bebe3ae65c122738653f668d 100644 (file)
@@ -23,7 +23,6 @@
  **************************************************************************/
 
 #include <iostream>
-#include <stdio.h>
 
 using namespace std;
 
@@ -49,12 +48,14 @@ class  AliHLTPHOSUtilities
        {
          if((i%nPerLine == 0)  &&  (i != 0))
            {
-             printf("\n");
+             //printf("\n");
+             cout << endl;
            }
 
          cout << array[i]<< "\t";
        }
-      printf("\n");
+      //     printf("\n");
+      cout << endl;
     }
 
   template<typename T> 
@@ -78,7 +79,6 @@ class  AliHLTPHOSUtilities
              tmpMax = array[i];
            }
        }
-  
       return tmpMax;
     }
 
index b42a0fea1687949bf2f7e18657b2aedbec525957..24f42bc727138216464fc8d98fd22922e99164d5 100755 (executable)
@@ -4,7 +4,7 @@ HeadSuf         = h
 
 
 #ROOTLIBS      = `root-config --libs --glibs` -lGed -lFTGL -lRGL -lEve -lEG -lGeom -lTreePlayer -lProofPlayer -lProof
-ROOTLIBS       = `root-config --libs --glibs` -lGed -lEG -lGeom -lTreePlayer -lProofPlayer -lProof
+ROOTLIBS       = `root-config --libs --glibs` -lGed -lEG -lGeom -lTreePlayer -lProofPlayer -lProof -lXMLParser
 ALIROOTLIBS    = -L$(ALICE_ROOT)/lib/tgt_$(ALICE_TARGET)  -lHLTbase -lAliHLTHOMER  -lAliHLTPHOS  -lRAWDatarec -lRAWDatabase -lESD -lSTEER -lSTEERBase -lCDB -lMinuit -lVMC -lPHOSbase -lPHOSshuttle -lPHOSUtils
 
 ALIHLTLIBS     = -L$(ALIHLT_LIBDIR) -lHLTbase -lAliHLTHOMER -lAliHLTPHOS
diff --git a/HLT/PHOS/macros/rec-hlt-phos-v3.C b/HLT/PHOS/macros/rec-hlt-phos-v3.C
new file mode 100644 (file)
index 0000000..f05ee2b
--- /dev/null
@@ -0,0 +1,121 @@
+
+#include "AliHLTPHOSConstants.h"
+
+//void rec_hlt_phos(const char* input="./")//, char* opt="decoder ESD")
+void rec_hlt_phos()//, char* opt="decoder ESD")
+{
+  if(!gSystem->AccessPathName("galice.root")){
+    cerr << "please delete the galice.root or run at different place." << endl;
+    return;
+  }
+//   if (!input) {
+//     cerr << "please specify input or run without arguments" << endl;
+//     return;
+//   }
+
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // init the HLT system in order to define the analysis chain below
+  //
+  AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // define the analysis chain to be run
+  //
+   
+  int moduleStart = 2;
+  int moduleEnd = 4;
+  int rcuStart = 0;
+  int rcuEnd = 3;
+  TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=ESD_WRITER";
+  //TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=PHS-EM";
+  TString emInput;
+  
+  for (int module = moduleStart; module <= moduleEnd; module++) 
+    {
+      TString clInput;
+      
+      for(int rcu = rcuStart; rcu <= rcuEnd; rcu++) 
+       {
+         TString arg, publisher, ra, dm;
+         // raw data publisher components
+         publisher.Form("PHS-RP_%02d_%d", module, rcu);
+         arg.Form("-minid %d -datatype 'DDL_RAW ' 'PHOS'  -dataspec 0x%x ", 1792 + module*(PhosHLTConst::NRCUSPERMODULE) + rcu, 0x1 << (module*PhosHLTConst::NRCUSPERMODULE + rcu));
+         cout << arg << endl;
+         AliHLTConfiguration pubConf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
+         
+         // Raw analyzer
+         arg = "";
+         ra.Form("PHS-RA_%02d_%d", module, rcu);
+         AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrudev3", 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");
+         cout << arg << endl;
+         AliHLTConfiguration dmConf(dm.Data(), "PhosDigitMaker", ra.Data(), arg.Data());
+
+         if(clInput.Length() > 0) clInput += " ";
+         clInput+=dm;
+       }
+      cout << clInput << endl;
+      TString arg, cl, ca;
+
+      cl.Form("PHS-CL_%02d", module);
+      arg = "";
+      arg.Form("-digitthreshold 0.005 -recpointthreshold 0.1 -modulemode");
+      cout << arg << endl;
+      AliHLTConfiguration clConf(cl.Data(), "PhosClusterizer", clInput.Data(), arg.Data());
+       
+      ca.Form("PHS-CA_%02d", module);
+      arg = "";
+      AliHLTConfiguration caConf(ca.Data(), "PhosClusterAnalyser", cl.Data(), arg.Data());
+
+      if(emInput.Length() > 0) emInput += " ";
+      emInput += ca;
+    }
+      
+  TString arg, em;
+  
+  // tracker finder components
+  em.Form("PHS-EM");
+  arg = "";
+
+  AliHLTConfiguration emConf(em.Data(), "PhosEsdEntriesMaker", emInput.Data(), " ");
+
+
+
+  //  AliHLTConfiguration writerConf("ESD_WRITER", "PhosEsdCaloClusterWriter", em.Data(), "-filename test.root -writemodulo 5");
+
+  //  AliHLTConfiguration esdWriter("ESD_WRITER", "ROOTFileWriter"   , "PHS-EM", "PhosEsdEntriesMaker", "-datafile ESDClusters -concatenate-events -overwrite");
+  AliHLTConfiguration esdWriter("ESD_WRITER", "ROOTFileWriter"   , em.Data(), "-datafile ESDClusters -concatenate-events -overwrite");
+
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // Init and run the reconstruction
+  // All but HLT reconstructio is switched off 
+  //
+  AliReconstruction rec;
+  //  rec.SetInput(input);
+  rec.SetInput("./");
+  rec.SetRunVertexFinder(kFALSE);
+  rec.SetRunLocalReconstruction("HLT PHOS");
+  rec.SetRunTracking(":");
+  rec.SetLoadAlignFromCDB(0);
+  rec.SetRunQA(":");
+
+  // NOTE: FillESD is a step in the AliReconstruction sequence and has
+  // nothing to do with the fact that this macro writes ESD output
+  // HLT processes the HLTOUT during FillESD and extracts data which
+  // has already been prepared. This step is currently not necessary for
+  // this macro
+  //  rec.SetRunLocalReconstruction("PHOS") ;
+
+  rec.SetFillESD("PHOS");
+    rec.SetOption("HLT", option);
+  //  rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=ESD_WRITER" )
+  rec.Run();
+}
diff --git a/HLT/PHOS/macros/rec-hlt-phos.C b/HLT/PHOS/macros/rec-hlt-phos.C
new file mode 100644 (file)
index 0000000..d64cd63
--- /dev/null
@@ -0,0 +1,125 @@
+
+#include "AliHLTPHOSConstants.h"
+
+//void rec_hlt_phos(const char* input="./")//, char* opt="decoder ESD")
+void rec_hlt_phos()//, char* opt="decoder ESD")
+{
+  if(!gSystem->AccessPathName("galice.root")){
+    cerr << "please delete the galice.root or run at different place." << endl;
+    return;
+  }
+//   if (!input) {
+//     cerr << "please specify input or run without arguments" << endl;
+//     return;
+//   }
+
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // init the HLT system in order to define the analysis chain below
+  //
+  AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // define the analysis chain to be run
+  //
+   
+  int moduleStart = 2;
+  int moduleEnd = 4;
+  int rcuStart = 0;
+  int rcuEnd = 3;
+  TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=ESD_WRITER";
+  //TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=PHS-HIST_PROD";
+  //TString option="libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=PHS-EM";
+  TString emInput;
+  
+  for (int module = moduleStart; module <= moduleEnd; module++) 
+    {
+      TString clInput;
+      
+      for(int rcu = rcuStart; rcu <= rcuEnd; rcu++) 
+       {
+         TString arg, publisher, ra, dm;
+         // raw data publisher components
+         publisher.Form("PHS-RP_%02d_%d", module, rcu);
+         arg.Form("-minid %d -datatype 'DDL_RAW ' 'PHOS'  -dataspec 0x%x ", 1792 + module*(PhosHLTConst::NRCUSPERMODULE) + rcu, 0x1 << (module*PhosHLTConst::NRCUSPERMODULE + rcu));
+         cout << arg << endl;
+         AliHLTConfiguration pubConf(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
+         
+         // Raw analyzer
+         arg = "";
+         ra.Form("PHS-RA_%02d_%d", module, rcu);
+         AliHLTConfiguration rawConf(ra.Data(), "PhosRawCrudev2", 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");
+         cout << arg << endl;
+         AliHLTConfiguration dmConf(dm.Data(), "PhosDigitMaker", ra.Data(), arg.Data());
+
+         if(clInput.Length() > 0) clInput += " ";
+         clInput+=dm;
+       }
+      //cout << clInput << endl;
+      TString arg, cl, ca;
+
+      cl.Form("PHS-CL_%02d", module);
+      arg = "";
+      arg.Form("-digitthreshold 0.005 -recpointthreshold 0.1 -modulemode");
+      cout << arg << endl;
+      AliHLTConfiguration clConf(cl.Data(), "PhosClusterizer", clInput.Data(), arg.Data());
+       
+      ca.Form("PHS-CA_%02d", module);
+      arg = "";
+      AliHLTConfiguration caConf(ca.Data(), "PhosClusterAnalyser", cl.Data(), arg.Data());
+
+      if(emInput.Length() > 0) emInput += " ";
+      emInput += ca;
+    }
+      
+  TString arg, em, hp;
+  
+  // tracker finder components
+  em.Form("PHS-EM");
+  arg = "";
+
+  AliHLTConfiguration emConf(em.Data(), "PhosEsdEntriesMaker", emInput.Data(), " ");
+  
+  hp.Form("PHS-HIST_PROD");
+  arg = "";
+
+  AliHLTConfiguration histConf(hp.Data(), "PhosHistoProducer", em.Data(), " ");
+
+  //  AliHLTConfiguration writerConf("ESD_WRITER", "PhosEsdCaloClusterWriter", em.Data(), "-filename test.root -writemodulo 5");
+
+  //  AliHLTConfiguration esdWriter("ESD_WRITER", "ROOTFileWriter"   , "PHS-EM", "PhosEsdEntriesMaker", "-datafile ESDClusters -concatenate-events -overwrite");
+  AliHLTConfiguration esdWriter("ESD_WRITER", "ROOTFileWriter"   , em.Data(), "-datafile ESDClusters -concatenate-events -overwrite");
+
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // Init and run the reconstruction
+  // All but HLT reconstructio is switched off 
+  //
+  AliReconstruction rec;
+  //  rec.SetInput(input);
+  rec.SetInput("./");
+  rec.SetRunVertexFinder(kFALSE);
+  rec.SetRunLocalReconstruction("HLT PHOS");
+  rec.SetRunTracking(":");
+  rec.SetLoadAlignFromCDB(0);
+  rec.SetRunQA(":");
+
+  // NOTE: FillESD is a step in the AliReconstruction sequence and has
+  // nothing to do with the fact that this macro writes ESD output
+  // HLT processes the HLTOUT during FillESD and extracts data which
+  // has already been prepared. This step is currently not necessary for
+  // this macro
+  //  rec.SetRunLocalReconstruction("PHOS") ;
+
+  rec.SetFillESD("PHOS");
+    rec.SetOption("HLT", option);
+  //  rec.SetOption("HLT", "libAliHLTUtil.so libAliHLTRCU.so libAliHLTPHOS.so loglevel=0x7f chains=ESD_WRITER" )
+  rec.Run();
+}
index 3cb0d8e5d0b53d5d35410bb9d4fe10b6f2f16ac1..d61401e45591853869ca8156936cd24057f8ea37 100644 (file)
@@ -6,6 +6,8 @@
 include $(MODDIR)/hlt.conf
 
 
+#CLASS_HDRS:=    AliHLTPHOSAgent.h 
+
 CLASS_HDRS:=     AliHLTPHOSBase.h \
                  AliHLTPHOSClusterizer.h \
                  AliHLTPHOSClusterizerComponent.h \
@@ -19,9 +21,11 @@ CLASS_HDRS:=   AliHLTPHOSBase.h \
                  AliHLTPHOSRawAnalyzerChiSquareFit.h \
                  AliHLTPHOSRawAnalyzerComponent.h \
                  AliHLTPHOSRawAnalyzerComponentv2.h \
+                 AliHLTPHOSRawAnalyzerComponentv3.h \
                  AliHLTPHOSRawAnalyzerCrude.h \
                  AliHLTPHOSRawAnalyzerCrudeComponent.h \
                  AliHLTPHOSRawAnalyzerCrudeComponentv2.h \
+                 AliHLTPHOSRawAnalyzerCrudeComponentv3.h \
                  AliHLTPHOSRawAnalyzerKLevel.h \
                  AliHLTPHOSRawAnalyzerLMS.h \
                  AliHLTPHOSRawAnalyzerPeakFinderComponent.h \
@@ -54,7 +58,13 @@ CLASS_HDRS:=   AliHLTPHOSBase.h \
                  AliHLTPHOSFourierComponent.h \
                  AliHLTPHOSHistogramProducer.h \
                  AliHLTPHOSHistogramProducerComponent.h \
-                 AliHLTPHOSMonitorTriggerComponent.h 
+                 AliHLTPHOSMonitorTriggerComponent.h \
+                 AliHLTPHOSESDCaloClusterMaker.h \
+                 AliHLTPHOSESDEntriesMakerComponent.h \
+                 AliHLTPHOSESDCaloClusterWriterComponent.h \
+                 AliHLTPHOSCaloClusterReader.h \
+                 AliHLTPHOSPhysicsHistogramProducer.h
+#                AliHLTPHOSESDCaloClusterMakerComponent.h 
 #                AliHLTPHOSTreeMaker.h \
 #                AliHLTPHOSTreeMakerComponent.h \
 #                AliHLTPHOSEmcCalibrationHistogramProducer.h 
@@ -66,7 +76,6 @@ MODULE_SRCS:=   $(CLASS_HDRS:.h=.cxx)
 MODULE_HDRS:=    $(CLASS_HDRS) \
                  AliHLTPHOSCommonDefs.h \
                  AliHLTPHOSConstants.h \
-                 AliHLTPHOSRecPointDataStruct.h \
                  AliHLTPHOSRawAnalyzer.h \
                  AliHLTPHOSDefinitions.h \
                  AliHLTPHOSModuleCellEnergyDataStruct.h\
@@ -77,6 +86,7 @@ MODULE_HDRS:=   $(CLASS_HDRS) \
                  AliHLTPHOSModuleCellAverageEnergyDataStruct.h \
                  AliHLTPHOSRcuCellAccumulatedEnergyDataStruct.h \
                  AliHLTPHOSRcuCellAverageEnergyDataStruct.h \
+                 AliHLTPHOSRecPointDataStruct.h \
                  AliHLTPHOSRecPointContainerStruct.h \
                  AliHLTPHOSDigitContainerDataStruct.h \
                  AliHLTPHOSRcuDigitContainerDataStruct.h \