AliHMPIDRecoParam class renamed AliHMPIDRecoParamV1 for backward compatibility
authorgvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Jul 2013 14:36:21 +0000 (14:36 +0000)
committergvolpe <gvolpe@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 4 Jul 2013 14:36:21 +0000 (14:36 +0000)
HMPID/AliHMPIDRecoParamV1.cxx [moved from HMPID/AliHMPIDRecoParam.cxx with 91% similarity]
HMPID/AliHMPIDRecoParamV1.h [moved from HMPID/AliHMPIDRecoParam.h with 71% similarity]
HMPID/AliHMPIDReconstructor.cxx
HMPID/AliHMPIDReconstructor.h
HMPID/AliHMPIDTracker.cxx
HMPID/CMakelibHMPIDrec.pkg
HMPID/HMPIDrecLinkDef.h
HMPID/MakeHMPIDRecoParam.C [deleted file]

similarity index 91%
rename from HMPID/AliHMPIDRecoParam.cxx
rename to HMPID/AliHMPIDRecoParamV1.cxx
index 655a7d9..0fed53a 100644 (file)
 //Email: domenico.dibari@ba.infn.it
 //
 #include "AliLog.h"
-#include "AliHMPIDRecoParam.h"
+#include "AliHMPIDRecoParamV1.h"
 #include "AliHMPIDParam.h"
 
-ClassImp(AliHMPIDRecoParam)
+ClassImp(AliHMPIDRecoParamV1)
 
 //_____________________________________________________________________________
-AliHMPIDRecoParam::AliHMPIDRecoParam():AliDetectorRecoParam(),   
+AliHMPIDRecoParamV1::AliHMPIDRecoParamV1():AliDetectorRecoParam(),   
   fHmpRecoMode(kTRUE),fHmpFixedDistCut(kTRUE),
   fHmpTrackMatchingDist(1.0)
 {
@@ -41,7 +41,7 @@ AliHMPIDRecoParam::AliHMPIDRecoParam():AliDetectorRecoParam(),
   for(Int_t iPol=0;iPol<5;iPol++) fHmpTrackMatchingDistParas[iPol]=0;
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPIDRecoParam::AliHMPIDRecoParam(const AliHMPIDRecoParam &p):AliDetectorRecoParam(p),   
+AliHMPIDRecoParamV1::AliHMPIDRecoParamV1(const AliHMPIDRecoParamV1 &p):AliDetectorRecoParam(p),   
     fHmpRecoMode(kTRUE),fHmpFixedDistCut(kTRUE),
     fHmpTrackMatchingDist(1.0)
 { 
@@ -55,7 +55,7 @@ AliHMPIDRecoParam::AliHMPIDRecoParam(const AliHMPIDRecoParam &p):AliDetectorReco
 }
 
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPIDRecoParam& AliHMPIDRecoParam::operator=(const AliHMPIDRecoParam &p)
+AliHMPIDRecoParamV1& AliHMPIDRecoParamV1::operator=(const AliHMPIDRecoParamV1 &p)
 {
 //
 // assign. operator
@@ -70,18 +70,18 @@ AliHMPIDRecoParam& AliHMPIDRecoParam::operator=(const AliHMPIDRecoParam &p)
   return *this;
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPIDRecoParam::~AliHMPIDRecoParam() 
+AliHMPIDRecoParamV1::~AliHMPIDRecoParamV1() 
 {
   //
   // dtor
   //  
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPIDRecoParam *AliHMPIDRecoParam::GetLowFluxParam(){
+AliHMPIDRecoParamV1 *AliHMPIDRecoParamV1::GetLowFluxParam(){
   //
   // Set HMPID Reco Params for Low Flux environment
   //
-  AliHMPIDRecoParam *hmpParam = new AliHMPIDRecoParam;
+  AliHMPIDRecoParamV1 *hmpParam = new AliHMPIDRecoParamV1;
   hmpParam->fHmpRecoMode = kTRUE;                                                     //kTRUE = normal reco. kFLASE = HTA
   hmpParam->fHmpUserCut[0] = 3;                                                       //HMPID Module 0 User DAQ Sigma cut
   hmpParam->fHmpUserCut[1] = 3;                                                       //HMPID Module 1 User DAQ Sigma cut
@@ -99,11 +99,11 @@ AliHMPIDRecoParam *AliHMPIDRecoParam::GetLowFluxParam(){
     
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPIDRecoParam *AliHMPIDRecoParam::GetHighFluxParam(){
+AliHMPIDRecoParamV1 *AliHMPIDRecoParamV1::GetHighFluxParam(){
   //
   // Set HMPID Reco Params for Low Flux environment
   //
-  AliHMPIDRecoParam *hmpParam = new AliHMPIDRecoParam;
+  AliHMPIDRecoParamV1 *hmpParam = new AliHMPIDRecoParamV1;
   hmpParam->fHmpRecoMode = kTRUE;                                                       //kTRUE = normal reco. kFLASE = HTA
   hmpParam->fHmpUserCut[0] = 3;                                                         //HMPID Module 0 User DAQ Sigma cut
   hmpParam->fHmpUserCut[1] = 3;                                                         //HMPID Module 1 User DAQ Sigma cut
@@ -121,11 +121,11 @@ AliHMPIDRecoParam *AliHMPIDRecoParam::GetHighFluxParam(){
     
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-AliHMPIDRecoParam *AliHMPIDRecoParam::GetCosmicParam(){
+AliHMPIDRecoParamV1 *AliHMPIDRecoParamV1::GetCosmicParam(){
   //
   // Set HMPID Reco Params for Low Flux environment
   //
-  AliHMPIDRecoParam *hmpParam = new AliHMPIDRecoParam;
+  AliHMPIDRecoParamV1 *hmpParam = new AliHMPIDRecoParamV1;
   hmpParam->fHmpRecoMode = kTRUE;                                                                   //kTRUE = normal reco. kFLASE = HTA
   hmpParam->fHmpUserCut[0] = 3;                                                                     //HMPID Module 0 User DAQ Sigma cut
   hmpParam->fHmpUserCut[1] = 3;                                                                     //HMPID Module 1 User DAQ Sigma cut
@@ -143,13 +143,13 @@ AliHMPIDRecoParam *AliHMPIDRecoParam::GetCosmicParam(){
     
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDRecoParam::PrintParameters() const
+void AliHMPIDRecoParamV1::PrintParameters() const
 {
   //
   // Printing of the used HMPID reconstruction parameters
   //
-   AliInfo(Form("%s",AliHMPIDRecoParam::GetName()));
-   AliInfo(Form("IsDefault: %d",AliHMPIDRecoParam::IsDefault()));
+   AliInfo(Form("%s",AliHMPIDRecoParamV1::GetName()));
+   AliInfo(Form("IsDefault: %d",AliHMPIDRecoParamV1::IsDefault()));
    AliInfo(Form(" Running HMPID Reco: %d (1=Standard, 0=HTA)",fHmpRecoMode));
    AliInfo(Form(" Is track matching distance fixed (1) or momentum dependent (0): %d",fHmpFixedDistCut));
    AliInfo(Form(" HMPID track matching distance cut: %.3lf",fHmpTrackMatchingDist));
similarity index 71%
rename from HMPID/AliHMPIDRecoParam.h
rename to HMPID/AliHMPIDRecoParamV1.h
index 9ac19c5..d7a2514 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALIHMPIDRECOPARAM_H
-#define ALIHMPIDRECOPARAM_H
+#ifndef ALIHMPIDRECOPARAMV1_H
+#define ALIHMPIDRECOPARAMV1_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -7,25 +7,27 @@
 //                                                                           //
 // Class to set HMPID reconstruction parameters (normal, HTA, UserCut ...    //
 //                                                                           //
+// This class is introduced as a copy of teh AliHMPIDRecoParam to solve      //
+// the problem occured in v4-17-Rev-18                                       //
 //                                                                           //
 //                                                                           //
 ///////////////////////////////////////////////////////////////////////////////
 
 #include "AliDetectorRecoParam.h"
 
-class AliHMPIDRecoParam : public AliDetectorRecoParam
+class AliHMPIDRecoParamV1 : public AliDetectorRecoParam
 {
  public: 
   
-  AliHMPIDRecoParam();                                                                                           //ctor
-  AliHMPIDRecoParam(const AliHMPIDRecoParam &p);                                                               //copy ctor 
-  AliHMPIDRecoParam& operator=(const AliHMPIDRecoParam &p);                                                    // ass. op.
-  virtual ~AliHMPIDRecoParam();                                                                                  //dtor
+  AliHMPIDRecoParamV1();                                                                                           //ctor
+  AliHMPIDRecoParamV1(const AliHMPIDRecoParamV1 &p);                                                               //copy ctor 
+  AliHMPIDRecoParamV1& operator=(const AliHMPIDRecoParamV1 &p);                                                    // ass. op.
+  virtual ~AliHMPIDRecoParamV1();                                                                                  //dtor
 
   
-  static AliHMPIDRecoParam *GetLowFluxParam();                                                                   // reco params for low flux env.
-  static AliHMPIDRecoParam *GetHighFluxParam();                                                                  // reco params for high flux env. 
-  static AliHMPIDRecoParam *GetCosmicParam();                                                                    // reco params for cosmic  
+  static AliHMPIDRecoParamV1 *GetLowFluxParam();                                                                   // reco params for low flux env.
+  static AliHMPIDRecoParamV1 *GetHighFluxParam();                                                                  // reco params for high flux env. 
+  static AliHMPIDRecoParamV1 *GetCosmicParam();                                                                    // reco params for cosmic  
     
   Bool_t   GetHmpRecoMode(            )        const            { return fHmpRecoMode;          }                  //kTRUE = normal tracking reco, kFALSE = HTA     
   void     SetHmpRecoMode(Bool_t recoMode)                       { fHmpRecoMode=recoMode;        }                 //kTRUE = normal tracking reco, kFALSE = HTA   
@@ -50,7 +52,7 @@ class AliHMPIDRecoParam : public AliDetectorRecoParam
   Double_t fHmpTrackMatchingDistParas[5];                   //Prevision for momentum dependen track matching
   
 
-  ClassDef(AliHMPIDRecoParam, 3) 
+  ClassDef(AliHMPIDRecoParamV1, 1) 
 };
 #endif
 
index 78170cf..1cd2236 100644 (file)
@@ -28,7 +28,7 @@
 #include <AliRawReader.h>          //Reconstruct() for raw digits
 #include <AliLog.h>                //
 #include "AliHMPIDRawStream.h"     //ConvertDigits()
-#include "AliHMPIDRecoParam.h"     //ctor
+#include "AliHMPIDRecoParamV1.h"     //ctor
 
 ClassImp(AliHMPIDReconstructor)
 
@@ -129,14 +129,14 @@ void AliHMPIDReconstructor::Reconstruct(TTree *pDigTree,TTree *pCluTree)const
    if(AliHMPIDReconstructor::GetRecoParam()) {
     for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
       pUserCut[iCh] = AliHMPIDReconstructor::GetRecoParam()->GetHmpUserCut(iCh);
-      AliDebug(1,Form("UserCut successfully loaded (from AliHMPIDRecoParam) for chamber %i -> %i ",iCh,pUserCut[iCh]));
+      AliDebug(1,Form("UserCut successfully loaded (from AliHMPIDRecoParamV1) for chamber %i -> %i ",iCh,pUserCut[iCh]));
     }
   }
   else {
     for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
       pUserCut[iCh] = 4;                                                                             // minimal requirement for sigma cut
       AliDebug(1,Form("UserCut loaded from defaults for chamber %i -> %i ",iCh,pUserCut[iCh]));
-      AliDebug(1,Form("Cannot get AliHMPIDRecoParam!"));
+      AliDebug(1,Form("Cannot get AliHMPIDRecoParamV1!"));
       }
     }  
   
@@ -173,14 +173,14 @@ void AliHMPIDReconstructor::ConvertDigits(AliRawReader *pRR,TTree *pDigTree)cons
    if(AliHMPIDReconstructor::GetRecoParam()) {
     for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
       pUserCut[iCh] = AliHMPIDReconstructor::GetRecoParam()->GetHmpUserCut(iCh);
-      AliDebug(1,Form("UserCut successfully loaded (from AliHMPIDRecoParam) for chamber %i -> %i ",iCh,pUserCut[iCh]));
+      AliDebug(1,Form("UserCut successfully loaded (from AliHMPIDRecoParamV1) for chamber %i -> %i ",iCh,pUserCut[iCh]));
     }
   }
   else {
     for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
       pUserCut[iCh] = 4;                                                                             // minimal requirement for sigma cut
       AliDebug(1,Form("UserCut loaded from defaults for chamber %i -> %i ",iCh,pUserCut[iCh]));
-      AliDebug(1,Form("Cannot get AliHMPIDRecoParam!"));
+      AliDebug(1,Form("Cannot get AliHMPIDRecoParamV1!"));
       }
     }  
       
index 6ec6835..4115df8 100644 (file)
@@ -8,7 +8,7 @@
 #include <AliReconstructor.h>        //base class
 #include "AliHMPIDTracker.h"         //CreateTracker()
 #include "AliHMPIDDigit.h"           //Dig2Clu(), UseDig()
-#include "AliHMPIDRecoParam.h"
+#include "AliHMPIDRecoParamV1.h"
 #include <TMatrixF.h>                //UseDig()
 #include <TClonesArray.h>            //UseDig()
 #include <TObjArray.h>               //SigConv()
@@ -38,7 +38,7 @@ public:
   static        void           FormClu (AliHMPIDCluster *pClu,AliHMPIDDigit *pDig,TClonesArray *pDigLst,TMatrixF *pPadMap);//cluster formation recursive algorithm
   static inline AliHMPIDDigit* UseDig  (Int_t padX,Int_t padY,                    TClonesArray *pDigLst,TMatrixF *pDigMap);//use this pad's digit to form a cluster
   inline Bool_t                IsDigSurvive(Int_t *pUserCut, AliHMPIDDigit *pDig                                         )const;//check for sigma cut
-  static const AliHMPIDRecoParam* GetRecoParam() { return dynamic_cast<const AliHMPIDRecoParam*>(AliReconstructor::GetRecoParam(5)); }  //5 is the HMPID detector code
+  static const AliHMPIDRecoParamV1* GetRecoParam() { return dynamic_cast<const AliHMPIDRecoParamV1*>(AliReconstructor::GetRecoParam(5)); }  //5 is the HMPID detector code
  
   protected:
   TObjArray *fDaqSig;                  // container for the pad pedestal sigmas
index fb25d8e..1fdc011 100644 (file)
@@ -4,7 +4,7 @@
 #include "AliHMPIDParam.h"       //GetTrackPoint(),PropagateBack()
 #include "AliHMPIDPid.h"         //Recon(),reconHTA()
 #include "AliHMPIDRecon.h"       //Recon()
-#include "AliHMPIDRecoParam.h"   //Recon()
+#include "AliHMPIDRecoParamV1.h"   //Recon()
 #include "AliHMPIDReconstructor.h"//Recon()
 #include "AliHMPIDReconHTA.h"    //ReconHTA()
 #include <AliLog.h>              //Recon()  
index 7d44279..a2961a0 100644 (file)
@@ -31,7 +31,7 @@ set ( SRCS
     AliHMPIDtrack.cxx 
     AliHMPIDTracker.cxx 
     AliHMPIDRecon.cxx 
-    AliHMPIDRecoParam.cxx 
+    AliHMPIDRecoParamV1.cxx 
     AliHMPIDReconHTA.cxx 
     AliHMPIDPid.cxx 
     AliHMPIDQADataMakerRec.cxx 
index c2e3683..02dadca 100644 (file)
@@ -8,7 +8,7 @@
 #pragma link C++ class  AliHMPIDTracker+;
 #pragma link C++ class  AliHMPIDRecon+;
 #pragma link C++ class  AliHMPIDPid+;
-#pragma link C++ class  AliHMPIDRecoParam+;
+#pragma link C++ class  AliHMPIDRecoParamV1+;
 #pragma link C++ class  AliHMPIDReconHTA+;
 #pragma link C++ class  AliHMPIDQADataMakerRec+;
 
diff --git a/HMPID/MakeHMPIDRecoParam.C b/HMPID/MakeHMPIDRecoParam.C
deleted file mode 100644 (file)
index 3609fd7..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-void MakeHMPIDRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult)
-{
-  //
-  // Create HMPID Reco Parameters in OCDB
-  //  
-  AliCDBManager* man = AliCDBManager::Instance();
-  if(!man->IsDefaultStorageSet()) man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
-  
-  TObjArray *recoParamArray = new TObjArray();
-  
-  {
-         AliHMPIDRecoParam* hmpRecoParam = AliHMPIDRecoParam::GetLowFluxParam();
-         hmpRecoParam->SetEventSpecie(AliRecoParam::kLowMult);
-          hmpRecoParam->SetAsDefault();
-         recoParamArray->AddLast(hmpRecoParam);
-          hmpRecoParam->PrintParameters();
-  }
-  {
-         AliHMPIDRecoParam* hmpRecoParam = AliHMPIDRecoParam::GetHighFluxParam();
-         hmpRecoParam->SetEventSpecie(AliRecoParam::kHighMult);
-         recoParamArray->AddLast(hmpRecoParam);
-          hmpRecoParam->PrintParameters();
-
-  }
-  {
-         AliHMPIDRecoParam* hmpRecoParam = AliHMPIDRecoParam::GetCosmicParam();
-         hmpRecoParam->SetEventSpecie(AliRecoParam::kCosmic);
-         recoParamArray->AddLast(hmpRecoParam);
-          hmpRecoParam->PrintParameters();
-  }
-  
-  // Set the default
-  Bool_t defaultIsSet = kFALSE;
-  for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
-    AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
-    if (!param) continue;
-    if (default & param->GetEventSpecie()) {
-      param->SetAsDefault();
-      defaultIsSet = kTRUE;
-    }
-  }
-  if (!defaultIsSet) {
-    Error("The default reconstruction parameters are not set! Exiting...");
-    return;
-  }
-  
-  AliCDBMetaData *md= new AliCDBMetaData();
-  md->SetResponsible("Giacomo Volpe");
-  md->SetComment("Reconstruction parameters of HMPID");
-  md->SetAliRootVersion(gSystem->Getenv("ARVERSION"));
-  md->SetBeamPeriod(0);
-  AliCDBId id("HMPID/Calib/RecoParam",0,AliCDBRunRange::Infinity());
-  man->GetDefaultStorage()->Put(recoParamArray,id, md);
-  
-  return;
-}