From 9abc660be80f9d4ed3f4481577896f9cac86383d Mon Sep 17 00:00:00 2001 From: jthaeder Date: Mon, 3 Oct 2011 11:54:20 +0000 Subject: [PATCH] update HLT cluster reading --- TPC/AliTPCRecoParam.cxx | 2 ++ TPC/AliTPCRecoParam.h | 6 +++- TPC/AliTPCclustererMI.cxx | 63 +++++++++++++++++++++++++++++++-------- TPC/AliTPCclustererMI.h | 4 +-- 4 files changed, 60 insertions(+), 15 deletions(-) diff --git a/TPC/AliTPCRecoParam.cxx b/TPC/AliTPCRecoParam.cxx index 9d740d2d12b..356607154e3 100644 --- a/TPC/AliTPCRecoParam.cxx +++ b/TPC/AliTPCRecoParam.cxx @@ -61,6 +61,7 @@ Bool_t AliTPCRecoParam::fgUseTimeCalibration=kTRUE; // flag usage the time depen //_____________________________________________________________________________ AliTPCRecoParam::AliTPCRecoParam(): AliDetectorRecoParam(), + fUseHLTClusters(1), // use RAW data fBClusterSharing(kTRUE), fCtgRange(1.05), fMaxSnpTracker(0.95), @@ -206,6 +207,7 @@ AliTPCRecoParam *AliTPCRecoParam::GetLaserTestParam(Bool_t bPedestal){ param->fMaxC = 0.02; param->fBSpecialSeeding = kTRUE; param->fUseTOFCorrection=kFALSE; + param->fUseHLTClusters=1; // always RAW data // // param->SetName("Laser Flux"); diff --git a/TPC/AliTPCRecoParam.h b/TPC/AliTPCRecoParam.h index 50f711d6b10..6c9e7b466cc 100644 --- a/TPC/AliTPCRecoParam.h +++ b/TPC/AliTPCRecoParam.h @@ -20,6 +20,9 @@ class AliTPCRecoParam : public AliDetectorRecoParam virtual void Print(const Option_t* option="") const; static Bool_t GetUseTimeCalibration(); static void SetUseTimeCalibration(Bool_t useTimeCalibration); + + void SetUseHLTClusters(Int_t useHLTClusters){fUseHLTClusters=useHLTClusters;} + Int_t GetUseHLTClusters() const {return fUseHLTClusters;} void SetClusterSharing(Bool_t sharing){fBClusterSharing=sharing;} Bool_t GetClusterSharing() const {return fBClusterSharing;} Double_t GetCtgRange() const { return fCtgRange;} @@ -126,6 +129,7 @@ class AliTPCRecoParam : public AliDetectorRecoParam static AliTPCRecoParam *GetCosmicTestParam(Bool_t bPedestal); // special setting for cosmic // protected: + Int_t fUseHLTClusters; // allows usage of HLT clusters instead of RAW data Bool_t fBClusterSharing; // allows or disable cluster sharing during tracking Double_t fCtgRange; // +-fCtgRange is the ctg(Theta) window used for clusterization and tracking (MI) Double_t fMaxSnpTracker; // max sin of local angle - for TPC tracker @@ -196,7 +200,7 @@ public: // to be switched off for pass 0 reconstruction // Use static function, other option will be to use // additional specific storage ? - ClassDef(AliTPCRecoParam, 14) + ClassDef(AliTPCRecoParam, 15) }; diff --git a/TPC/AliTPCclustererMI.cxx b/TPC/AliTPCclustererMI.cxx index 1743512857a..3af4a8c4226 100644 --- a/TPC/AliTPCclustererMI.cxx +++ b/TPC/AliTPCclustererMI.cxx @@ -24,6 +24,12 @@ // 1.c HLT clusters - Digits2Clusters and Digits2Clusters(AliRawReader* rawReader) // invoke ReadHLTClusters() // +// fUseHLTClusters - switches between different inputs +// 1 -> only TPC raw/sim data +// 2 -> if present TPC raw/sim data, otherwise HLT clusters +// 3 -> only HLT clusters +// 4 -> if present HLT clusters, otherwise TPC raw/sim data +// // 2. The Output data // 2.a TTree with clusters - if SetOutput(TTree * tree) invoked // 2.b TObjArray - Faster option for HLT @@ -112,7 +118,7 @@ AliTPCclustererMI::AliTPCclustererMI(const AliTPCParam* par, const AliTPCRecoPar fRecoParam(0), fBDumpSignal(kFALSE), fBClonesArray(kFALSE), - fBUseHLTClusters(kFALSE), + fUseHLTClusters(1), fAllBins(NULL), fAllSigBins(NULL), fAllNSigBins(NULL) @@ -193,7 +199,7 @@ AliTPCclustererMI::AliTPCclustererMI(const AliTPCclustererMI ¶m) fRecoParam(0), fBDumpSignal(kFALSE), fBClonesArray(kFALSE), - fBUseHLTClusters(kFALSE), + fUseHLTClusters(1), fAllBins(NULL), fAllSigBins(NULL), fAllNSigBins(NULL) @@ -719,13 +725,30 @@ void AliTPCclustererMI::Digits2Clusters() //----------------------------------------------------------------- // Use HLT clusters //----------------------------------------------------------------- - if (fBUseHLTClusters) { + fUseHLTClusters = fRecoParam->GetUseHLTClusters(); + + printf(" HLT TPC Reco foo : %d \n",fUseHLTClusters ); + if (fUseHLTClusters == 3 && fUseHLTClusters == 4) { AliInfo("Using HLT clusters for TPC off-line reconstruction"); fZWidth = fParam->GetZWidth(); - ReadHLTClusters(); - - return; - } + Int_t iResult = ReadHLTClusters(); + + // HLT clusters present + if (!iResult) + return; + // HLT clusters not present + else if(iResult == -1) { + if (fUseHLTClusters == 3) { + AliError("No HLT clusters present, but requiered."); + return; + } + } + // Some other problem during cluster reading + else { + AliWarning("Some problem while unpacking of HLT clusters."); + return; + } + } // if (fUseHLTClusters == 3 && fUseHLTClusters == 4) { //----------------------------------------------------------------- // Run TPC off-line clusterer @@ -962,13 +985,29 @@ void AliTPCclustererMI::Digits2Clusters(AliRawReader* rawReader) //----------------------------------------------------------------- // Use HLT clusters //----------------------------------------------------------------- - if (fBUseHLTClusters) { + fUseHLTClusters = fRecoParam->GetUseHLTClusters(); + + if (fUseHLTClusters == 3 && fUseHLTClusters == 4) { AliInfo("Using HLT clusters for TPC off-line reconstruction"); fZWidth = fParam->GetZWidth(); - ReadHLTClusters(); - - return; - } + Int_t iResult = ReadHLTClusters(); + + // HLT clusters present + if (!iResult) + return; + // HLT clusters not present + else if(iResult == -1) { + if (fUseHLTClusters == 3) { + AliError("No HLT clusters present, but requiered."); + return; + } + } + // Some other problem during cluster reading + else { + AliWarning("Some problem while unpacking of HLT clusters."); + return; + } + } // if (fUseHLTClusters == 3 && fUseHLTClusters == 4) { //----------------------------------------------------------------- // Run TPC off-line clusterer diff --git a/TPC/AliTPCclustererMI.h b/TPC/AliTPCclustererMI.h index 91d15a65f7c..d2ea1abec3f 100644 --- a/TPC/AliTPCclustererMI.h +++ b/TPC/AliTPCclustererMI.h @@ -97,7 +97,7 @@ private: const AliTPCRecoParam * fRecoParam; //! reconstruction parameters Bool_t fBDumpSignal; // dump signal flag Bool_t fBClonesArray; // output clusters stored in TClonesArray - Bool_t fBUseHLTClusters; // use HLT clusters instead of offline clusters + Int_t fUseHLTClusters; // use HLT clusters instead of offline clusters // Non-persistent arrays @@ -106,7 +106,7 @@ private: Int_t* fAllNSigBins;//! Number of signal bins in a sector - ClassDef(AliTPCclustererMI,2) // Time Projection Chamber digits + ClassDef(AliTPCclustererMI,3) // Time Projection Chamber digits }; inline Bool_t AliTPCclustererMI::IsMaximum(Float_t q,Int_t max,const Float_t *bins) const { -- 2.43.0