]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- added handlers for reconstruction parameters
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Mar 2010 16:45:29 +0000 (16:45 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 19 Mar 2010 16:45:29 +0000 (16:45 +0000)
HLT/CALO/AliHLTCaloRecoParamHandler.cxx [new file with mode: 0644]
HLT/CALO/AliHLTCaloRecoParamHandler.h [new file with mode: 0644]
HLT/EMCAL/AliHLTEMCALRecoParamHandler.cxx [new file with mode: 0644]
HLT/EMCAL/AliHLTEMCALRecoParamHandler.h [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRecoParamHandler.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSRecoParamHandler.h [new file with mode: 0644]

diff --git a/HLT/CALO/AliHLTCaloRecoParamHandler.cxx b/HLT/CALO/AliHLTCaloRecoParamHandler.cxx
new file mode 100644 (file)
index 0000000..caf1257
--- /dev/null
@@ -0,0 +1,33 @@
+/**************************************************************************
+ * 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
+   
+}
+
diff --git a/HLT/CALO/AliHLTCaloRecoParamHandler.h b/HLT/CALO/AliHLTCaloRecoParamHandler.h
new file mode 100644 (file)
index 0000000..d19f622
--- /dev/null
@@ -0,0 +1,73 @@
+
+/**************************************************************************
+ * 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
diff --git a/HLT/EMCAL/AliHLTEMCALRecoParamHandler.cxx b/HLT/EMCAL/AliHLTEMCALRecoParamHandler.cxx
new file mode 100644 (file)
index 0000000..bb0e840
--- /dev/null
@@ -0,0 +1,75 @@
+/**************************************************************************
+ * 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;
+}
+
diff --git a/HLT/EMCAL/AliHLTEMCALRecoParamHandler.h b/HLT/EMCAL/AliHLTEMCALRecoParamHandler.h
new file mode 100644 (file)
index 0000000..6d30ada
--- /dev/null
@@ -0,0 +1,58 @@
+/**************************************************************************
+ * 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
diff --git a/HLT/PHOS/AliHLTPHOSRecoParamHandler.cxx b/HLT/PHOS/AliHLTPHOSRecoParamHandler.cxx
new file mode 100644 (file)
index 0000000..40f1244
--- /dev/null
@@ -0,0 +1,80 @@
+/**************************************************************************
+ * 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);
+}
+
diff --git a/HLT/PHOS/AliHLTPHOSRecoParamHandler.h b/HLT/PHOS/AliHLTPHOSRecoParamHandler.h
new file mode 100644 (file)
index 0000000..3c7b8d3
--- /dev/null
@@ -0,0 +1,55 @@
+/**************************************************************************
+ * 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