--- /dev/null
+/**************************************************************************
+ * 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 "AliHLTCaloRecoParamHandler.h"
+
+AliHLTCaloRecoParamHandler::AliHLTCaloRecoParamHandler ( TString det ) :
+AliHLTCaloConstantsHandler(det)
+,fLogWeight(4.5)
+,fRecPointMemberThreshold(0.01)
+,fRecPointThreshold(0.1)
+{
+ // See header file for class documentation
+
+}
+
+
+AliHLTCaloRecoParamHandler::~AliHLTCaloRecoParamHandler()
+{
+ // See header file for class documentation
+
+}
+
--- /dev/null
+
+/**************************************************************************
+ * 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. *
+ **************************************************************************/
+
+
+#ifndef ALIHLTCALORECOPARAMHANDLER_H
+#define ALIHLTCALORECOPARAMHANDLER_H
+
+#include "AliHLTCaloConstantsHandler.h"
+
+class AliHLTCaloRecoParamHandler: public AliHLTCaloConstantsHandler
+ {
+
+ public:
+
+ /** Constructor, */
+ AliHLTCaloRecoParamHandler(TString det); // See above
+
+ /** Destructor */
+ virtual ~AliHLTCaloRecoParamHandler(); // See above
+
+ /** Get the parameters from CDB, must be implemented by the child classes */
+ virtual Int_t GetParametersFromCDB() = 0; // See above
+
+ /** Get the corrected energy, should really be implemented by the child classes */
+ virtual Float_t GetCorrectedEnergy(Float_t e) { return e; }
+
+ /** Get the log weight */
+ Float_t GetLogWeight() { return fLogWeight; }
+
+ /** Get rec point threshold */
+ Float_t GetRecPointThreshold() { return fRecPointThreshold; }
+
+ /** Get rec point member threshold */
+ Float_t GetRecPointMemberThreshold() { return fRecPointMemberThreshold; }
+
+ protected:
+ /** The log weight used in calculating the cluster position */
+ Float_t fLogWeight; //COMMENT
+
+ /** The threshold for adding a digit to a recpoint */
+ Float_t fRecPointMemberThreshold; //COMMENT
+
+ /** The threshold for starting a recpoint */
+ Float_t fRecPointThreshold; //COMMENT
+
+
+ private:
+
+ /** Default constructor, inhibited */
+ AliHLTCaloRecoParamHandler(); // See above
+
+ /** Copy constructor, not implemented */
+ AliHLTCaloRecoParamHandler (const AliHLTCaloRecoParamHandler &); //COMMENT
+
+ /** Assignment operator, not implemented */
+ AliHLTCaloRecoParamHandler & operator = (const AliHLTCaloRecoParamHandler &); //COMMENT
+
+
+ };
+
+#endif // ALIHLTCALORECOPARAMHANDLER_H
--- /dev/null
+/**************************************************************************
+ * 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 "AliHLTEMCALRecoParamHandler.h"
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
+
+AliHLTEMCALRecoParamHandler::AliHLTEMCALRecoParamHandler() :
+AliHLTCaloRecoParamHandler("EMCAL")
+{
+ // See header file for class documentation
+
+ fEMCALPidPtr = new AliEMCALPIDv1();
+
+}
+
+
+AliHLTEMCALRecoParamHandler::~AliHLTEMCALRecoParamHandler()
+{
+ // See header file for class documentation
+ if(fRecoParamPtr) delete fRecoParamPtr; fRecoParamPtr = 0;
+
+}
+
+Int_t AliHLTEMCALRecoParamHandler::GetParametersFromCDB()
+{
+ // See header file for documentation
+ AliCDBPath path("EMCAL","Calib","RecoParam");
+ if(path.GetPath())
+ {
+// HLTInfo("configure from entry %s", path.GetPath());
+ AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
+ if (pEntry)
+ {
+ if(!fRecoParamPtr)
+ {
+ delete fRecoParamPtr;
+ fRecoParamPtr = 0;
+ }
+ TObjArray *paramArray = dynamic_cast<TObjArray*>(pEntry->GetObject());
+ fRecoParamPtr = dynamic_cast<AliEMCALRecoParam*>(paramArray)->At(0);
+ if(!fRecoParamPtr)
+ {
+ return -1;
+ }
+ fLogWeight = fRecoParamPtr->GetEMCLogWeight();
+ fRecPointMemberThreshold = fRecoParamPtr->GetEMCMinE();
+ fRecPointThreshold = fRecoParamPtr->GetEMCClusteringThreshold();
+ }
+ else
+ {
+// HLTError("can not fetch object \"%s\" from OCDB", path);
+ return -1;
+ }
+ }
+ return 0;
+}
+
+Float_t AliHLTEMCALRecoParamHandler::GetCorrectedEnergy ( Float_t e )
+{
+ // See header file for class documentation
+ return e;
+}
+
--- /dev/null
+/**************************************************************************
+ * 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. *
+ **************************************************************************/
+
+#ifndef ALIHLTEMCALRECOPARAMHANDLER_H
+#define ALIHLTEMCALRECOPARAMHANDLER_H
+
+#include "AliHLTCaloRecoParamHandler.h"
+
+class AliEMCALRecoParam;
+class AliEMCALPIDv1;
+
+class AliHLTEMCALRecoParamHandler : public AliHLTCaloRecoParamHandler
+ {
+ public:
+
+ /** Constructor */
+ AliHLTEMCALRecoParamHandler();
+
+ /** Destructor */
+ virtual ~AliHLTEMCALRecoParamHandler();
+
+ /** See base class for documentation */
+ virtual Int_t GetParametersFromCDB();
+
+ /** Get the energy corrected for non-linear effects etc. */
+ virtual Float_t GetCorrectedEnergy(Float_t e);
+
+ /** Get the log weight */
+ Float_t GetLogWeight() { return fLogWeight; }
+
+ /** Get rec point threshold */
+ Float_t GetRecPointThreshold() { return fRecPointThreshold; }
+
+ /** Get rec point member threshold */
+ Float_t GetRecPointMemberThreshold() { return fRecPointMemberThreshold; }
+
+ private:
+
+ /** Copy constructor, not implemented */
+ AliHLTEMCALRecoParamHandler (const AliHLTEMCALRecoParamHandler &); //COMMENT
+
+ /** Assignment operator, not implemented */
+ AliHLTEMCALRecoParamHandler & operator = (const AliHLTEMCALRecoParamHandler &); //COMMENT
+
+ };
+
+#endif // ALIHLTPHOSRECOPARAMHANDLER_H
--- /dev/null
+/**************************************************************************
+ * 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 "AliHLTPHOSRecoParamHandler.h"
+#include "AliCDBManager.h"
+#include "AliCDBEntry.h"
+#include "AliPHOSRecoParam.h"
+#include "AliPHOSPIDv1.h"
+#include "TObjArray.h"
+
+AliHLTPHOSRecoParamHandler::AliHLTPHOSRecoParamHandler() :
+AliHLTCaloRecoParamHandler("PHOS")
+,fRecoParamPtr(0),
+fPHOSPidPtr(0)
+{
+ // See header file for class documentation
+
+ fPHOSPidPtr = new AliPHOSPIDv1();
+
+}
+
+
+AliHLTPHOSRecoParamHandler::~AliHLTPHOSRecoParamHandler()
+{
+ // See header file for class documentation
+ if(fRecoParamPtr) delete fRecoParamPtr; fRecoParamPtr = 0;
+
+}
+
+Int_t AliHLTPHOSRecoParamHandler::GetParametersFromCDB()
+{
+ // See header file for documentation
+ AliCDBPath path("PHOS","Calib","RecoParam");
+ if(path.GetPath())
+ {
+// HLTInfo("configure from entry %s", path.GetPath());
+ AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
+ if (pEntry)
+ {
+ if(!fRecoParamPtr)
+ {
+ delete fRecoParamPtr;
+ fRecoParamPtr = 0;
+ }
+ TObjArray *paramArray = dynamic_cast<TObjArray*>(pEntry->GetObject());
+ fRecoParamPtr = dynamic_cast<AliPHOSRecoParam*>(paramArray->At(0));
+ if(!fRecoParamPtr)
+ {
+ return -1;
+ }
+ fLogWeight = fRecoParamPtr->GetEMCLogWeight();
+ fRecPointMemberThreshold = fRecoParamPtr->GetEMCMinE();
+ fRecPointThreshold = fRecoParamPtr->GetEMCClusteringThreshold();
+ }
+ else
+ {
+// HLTError("can not fetch object \"%s\" from OCDB", path);
+ return -1;
+ }
+ }
+ return 0;
+}
+
+Float_t AliHLTPHOSRecoParamHandler::GetCorrectedEnergy ( Float_t e )
+{
+ // See header file for class documentation
+ return fPHOSPidPtr->GetCalibratedEnergy(e);
+}
+
--- /dev/null
+/**************************************************************************
+ * 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. *
+ **************************************************************************/
+
+#ifndef ALIHLTPHOSRECOPARAMHANDLER_H
+#define ALIHLTPHOSRECOPARAMHANDLER_H
+
+#include "AliHLTCaloRecoParamHandler.h"
+
+class AliPHOSRecoParam;
+class AliPHOSPIDv1;
+
+class AliHLTPHOSRecoParamHandler : public AliHLTCaloRecoParamHandler
+ {
+ public:
+
+ /** Constructor */
+ AliHLTPHOSRecoParamHandler();
+
+ /** Destructor */
+ virtual ~AliHLTPHOSRecoParamHandler();
+
+ /** See base class for documentation */
+ virtual Int_t GetParametersFromCDB();
+
+ /** Get the energy corrected for non-linear effects etc. */
+ virtual Float_t GetCorrectedEnergy(Float_t e);
+
+ private:
+
+ /** Copy constructor, not implemented */
+ AliHLTPHOSRecoParamHandler (const AliHLTPHOSRecoParamHandler &); //COMMENT
+
+ /** Assignment operator, not implemented */
+ AliHLTPHOSRecoParamHandler & operator = (const AliHLTPHOSRecoParamHandler &); //COMMENT
+
+ /** The reco param object */
+ AliPHOSRecoParam *fRecoParamPtr; // COMMENT
+
+ /** PHOS PID class */
+ AliPHOSPIDv1 *fPHOSPidPtr; // COMMENT
+
+ };
+
+#endif // ALIHLTPHOSRECOPARAMHANDLER_H