Preparation for upcoming changes for HLT
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jun 2010 11:34:57 +0000 (11:34 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 Jun 2010 11:34:57 +0000 (11:34 +0000)
PWG1/TRD/info/AliTRDpidInfo.h
TRD/AliTRDclusterizer.cxx
TRD/AliTRDclusterizer.h
TRD/AliTRDrecoParam.cxx
TRD/AliTRDrecoParam.h
TRD/AliTRDtransform.cxx
TRD/AliTRDtransform.h

index f13b6d2..9b55d27 100644 (file)
@@ -39,8 +39,8 @@ private:
   Int_t         fNtracklets;  // number of tracklets
   AliTRDpidData *fData;       //[fNtracklets] PID data array
 
-  AliTRDpidInfo(const AliTRDpidInfo::AliTRDpidInfo& ref);
-  AliTRDpidInfo& operator=(const AliTRDpidInfo::AliTRDpidInfo& ref);
+  AliTRDpidInfo(const AliTRDpidInfo& ref);
+  AliTRDpidInfo& operator=(const AliTRDpidInfo& ref);
 
   ClassDef(AliTRDpidInfo, 1)  // track PID data representation
 };
index 5ec0a8a..6611a82 100644 (file)
@@ -783,6 +783,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
   fSigThresh            = (Short_t)recoParam->GetClusSigThresh();
   fMinMaxCutSigma       = recoParam->GetMinMaxCutSigma();
   fMinLeftRightCutSigma = recoParam->GetMinLeftRightCutSigma();
+  const Int_t iEveryNTB = recoParam->GetRecEveryNTB();
 
   Int_t istack  = fIndexes->GetStack();
   fLayer  = fIndexes->GetLayer();
@@ -866,7 +867,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
 
   // Here the clusterfining is happening
   
-  for(curr.time = 0; curr.time < fTimeTotal; curr.time++){
+  for(curr.time = 0; curr.time < fTimeTotal; curr.time+=iEveryNTB){
     while(fIndexes->NextRCIndex(curr.row, curr.col)){
       if(fDigits->GetData(curr.row, curr.col, curr.time) > fMaxThreshTest && IsMaximum(curr, curr.padStatus, &curr.signals[0])){
         if(last.row>-1){
@@ -1028,7 +1029,7 @@ void AliTRDclusterizer::CreateCluster(const MaxStruct &Max)
   cluster.SetLabel(Max.time,2);
 
   //needed for HLT reconstruction
-  AddClusterToArray(&cluster); 
+  AddClusterToArray(&cluster);
 
   // Store the index of the first cluster in the current ROC
   if (firstClusterROC < 0) firstClusterROC = fNoOfClusters;
index e1c856e..89022f5 100644 (file)
@@ -102,16 +102,16 @@ class AliTRDclusterizer : public TNamed
   Int_t            GetAddedClusters() const {return fNoOfClusters;}
   Int_t            GetNTimeBins() const {return fTimeTotal;}
 
-  Bool_t   IsClustersOwner() const {return TestBit(kClOwner);}
+  Bool_t           IsClustersOwner() const {return TestBit(kClOwner);}
   virtual void     SetClustersOwner(Bool_t own=kTRUE) {SetBit(kClOwner, own); if(!own) {fRecPoints = 0x0; fNoOfClusters=0;} }
-  void     SetTrackletsOwner(Bool_t own=kTRUE) {SetBit(kTrOwner, own); if(!own) {fTracklets = 0x0; } }
+  void             SetTrackletsOwner(Bool_t own=kTRUE) {SetBit(kTrOwner, own); if(!own) {fTracklets = 0x0; } }
 
 protected:
 
   void             DeConvExp (Short_t *const arr, const Int_t nTime, const Int_t nexp);
   void             TailCancelation(const AliTRDrecoParam* const recoParam);
 
-  Float_t  Unfold(Double_t eps, Int_t layer, const Double_t *const padSignal) const;
+  Float_t          Unfold(Double_t eps, Int_t layer, const Double_t *const padSignal) const;
   
   void             SetPadStatus(const UChar_t status, UChar_t &encoding) const;
   UChar_t          GetPadStatus(UChar_t encoding) const;
index 78f8ae6..b00241b 100644 (file)
@@ -51,13 +51,14 @@ AliTRDrecoParam::AliTRDrecoParam()
   ,fkChi2Y(.25)
   ,fkChi2YSlope(7.73)
   ,fkChi2ZSlope(0.069)
-       ,fkChi2YCut(0.5)
+  ,fkChi2YCut(0.5)
   ,fkPhiSlope(10.6)
   ,fkNMeanClusters(20.)
   ,fkNSigmaClusters(2.)
   ,fkNClusterNoise(0.)
   ,fkNMeanTracklets(5.5)
   ,fkTrackLikelihood(-15.)
+  ,fNumberOfConfigs(3)
   ,fFlags(0)
   ,fRawStreamVersion("REAL")
   ,fMinMaxCutSigma(4.)
@@ -65,6 +66,7 @@ AliTRDrecoParam::AliTRDrecoParam()
   ,fClusMaxThresh(4.5)
   ,fClusSigThresh(3.5)
   ,fTCnexp(1)
+  ,fRecEveryNTB(1)
   ,fNumberOfPresamples(0)
   ,fNumberOfPostsamples(0)
 {
@@ -118,13 +120,14 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
   ,fkChi2Y(ref.fkChi2Y)
   ,fkChi2YSlope(ref.fkChi2YSlope)
   ,fkChi2ZSlope(ref.fkChi2ZSlope)
-       ,fkChi2YCut(ref.fkChi2YCut)
+  ,fkChi2YCut(ref.fkChi2YCut)
   ,fkPhiSlope(ref.fkPhiSlope)
   ,fkNMeanClusters(ref.fkNMeanClusters)
   ,fkNSigmaClusters(ref.fkNSigmaClusters)
   ,fkNClusterNoise(ref.fkNClusterNoise)
   ,fkNMeanTracklets(ref.fkNMeanTracklets)
   ,fkTrackLikelihood(ref.fkTrackLikelihood)
+  ,fNumberOfConfigs(ref.fNumberOfConfigs)
   ,fFlags(ref.fFlags)
   ,fRawStreamVersion(ref.fRawStreamVersion)
   ,fMinMaxCutSigma(ref.fMinMaxCutSigma)
@@ -132,6 +135,7 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
   ,fClusMaxThresh(ref.fClusMaxThresh)
   ,fClusSigThresh(ref.fClusSigThresh)
   ,fTCnexp(ref.fTCnexp)
+  ,fRecEveryNTB(ref.fRecEveryNTB)
   ,fNumberOfPresamples(ref.fNumberOfPresamples)
   ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
 {
@@ -160,6 +164,20 @@ AliTRDrecoParam *AliTRDrecoParam::GetLowFluxParam()
 }
 
 //______________________________________________________________
+AliTRDrecoParam *AliTRDrecoParam::GetLowFluxHLTParam()
+{
+  //
+  // Parameters for the high flux environment in HLT
+  //
+
+  AliTRDrecoParam *rec = GetLowFluxParam();
+  rec->fNumberOfConfigs = 3;
+  rec->fRecEveryNTB = 1;
+  return rec;
+
+}
+
+//______________________________________________________________
 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
 {
   //
@@ -175,6 +193,20 @@ AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
 }
 
 //______________________________________________________________
+AliTRDrecoParam *AliTRDrecoParam::GetHighFluxHLTParam()
+{
+  //
+  // Parameters for the high flux environment in HLT
+  //
+
+  AliTRDrecoParam *rec = GetHighFluxParam();
+  rec->fNumberOfConfigs = 1;
+  rec->fRecEveryNTB = 2;
+  return rec;
+
+}
+
+//______________________________________________________________
 AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
 {
   //
index cc5f369..d40f32a 100644 (file)
@@ -80,6 +80,8 @@ public:
   Int_t    GetTCnexp() const                { return fTCnexp;          };
   Int_t    GetNumberOfPresamples()  const   { return fNumberOfPresamples;}
   Int_t    GetNumberOfPostsamples() const   { return fNumberOfPostsamples;}
+  Int_t    GetNumberOfSeedConfigs() const   { return fNumberOfConfigs;}
+  Int_t    GetRecEveryNTB() const           { return fRecEveryNTB; }
   Bool_t   IsArgon() const                  { return TESTBIT(fFlags, kDriftGas); }
   Bool_t   IsCheckTimeConsistency() const   { return kCheckTimeConsistency;}
   Bool_t   IsOverPtThreshold(Double_t pt) const {return Bool_t(pt>fkPtThreshold);}
@@ -94,7 +96,9 @@ public:
   Bool_t   UseTailCancelation() const       { return TESTBIT(fFlags, kTailCancelation); }
         
   static   AliTRDrecoParam *GetLowFluxParam();
+  static   AliTRDrecoParam *GetLowFluxHLTParam();
   static   AliTRDrecoParam *GetHighFluxParam();
+  static   AliTRDrecoParam *GetHighFluxHLTParam();
   static   AliTRDrecoParam *GetCosmicTestParam();
 
   void     SetArgon(Bool_t b = kTRUE)                         {if(b) SETBIT(fFlags, kDriftGas); else CLRBIT(fFlags, kDriftGas);}
@@ -157,7 +161,7 @@ private:
   Double_t  fkChi2Y;                 // Max chi2 on the y direction for seeding clusters Rieman fit
   Double_t  fkChi2YSlope;            // Slope of the chi2-distribution in y-direction
   Double_t  fkChi2ZSlope;            // Slope of the chi2-distribution in z-direction
-       Double_t  fkChi2YCut;                                                    // Cut on the Chi2 in y-direction in the likelihood filter
+  Double_t  fkChi2YCut;                                                         // Cut on the Chi2 in y-direction in the likelihood filter
   Double_t  fkPhiSlope;              // Slope of the distribution of the deviation between track angle and tracklet angle
   Double_t  fkNMeanClusters;         // Mean number of clusters per tracklet
   Double_t  fkNSigmaClusters;        // Sigma of the number of clusters per tracklet
@@ -167,6 +171,7 @@ private:
   
   Double_t  fSysCovMatrix[5];        // Systematic uncertainty from calibration and alignment for each tracklet
   Double_t  fPIDThreshold[AliTRDCalPID::kNMom];   // PID Thresholds for Electron candidate decision
+  Int_t     fNumberOfConfigs;        // Used number of seed configurations
 
   // Reconstruction Options for TRD reconstruction
   Int_t     fStreamLevel[kTRDreconstructionTasks]; // Stream Level
@@ -182,7 +187,8 @@ private:
   Double_t  fClusSigThresh;          // Threshold value for cluster signal
   Int_t     fTCnexp;                 // Number of exponentials, digital filter
   Double_t  fTCParams[8];            // Tail Cancellation parameters for drift gases 
-  
+  Int_t     fRecEveryNTB;            // Reconstruct each nth timebin
+
   // ADC parameter
   Int_t     fNumberOfPresamples;     // number of presamples 
   Int_t     fNumberOfPostsamples;     // number of postsamples 
index bc3c360..3ea14e2 100644 (file)
 
 ClassImp(AliTRDtransform)
 
+AliTRDgeometry* AliTRDtransform::fgGeo = NULL;
+
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform()
   :TObject()
-  ,fGeo(0x0)
   ,fDetector(0)
   ,fParam(0x0)
   ,fCalibration(0x0)
@@ -60,9 +61,11 @@ AliTRDtransform::AliTRDtransform()
   // AliTRDtransform default constructor
   //
 
-  fGeo               = new AliTRDgeometry();
-  if (!fGeo->CreateClusterMatrixArray()) {
-    AliError("Could not get transformation matrices\n");
+  if(!fgGeo){
+    fgGeo = new AliTRDgeometry();
+    if (!fgGeo->CreateClusterMatrixArray()) {
+      AliError("Could not get transformation matrices\n");
+    }
   }
 
   fParam             = AliTRDCommonParam::Instance();
@@ -85,7 +88,6 @@ AliTRDtransform::AliTRDtransform()
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform(Int_t det)
   :TObject()
-  ,fGeo(0x0)
   ,fDetector(0)
   ,fParam(0x0)
   ,fCalibration(0x0)
@@ -105,9 +107,11 @@ AliTRDtransform::AliTRDtransform(Int_t det)
   // AliTRDtransform constructor for a given detector
   //
 
-  fGeo               = new AliTRDgeometry();
-  if (!fGeo->CreateClusterMatrixArray()) {
-    AliError("Could not get transformation matrices\n");
+  if(!fgGeo){
+    fgGeo = new AliTRDgeometry();
+    if (!fgGeo->CreateClusterMatrixArray()) {
+      AliError("Could not get transformation matrices\n");
+    }
   }
 
   fParam             = AliTRDCommonParam::Instance();
@@ -132,7 +136,6 @@ AliTRDtransform::AliTRDtransform(Int_t det)
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform(const AliTRDtransform &t)
   :TObject(t)
-  ,fGeo(0x0)
   ,fDetector(t.fDetector)
   ,fParam(0x0)
   ,fCalibration(0x0)
@@ -152,12 +155,6 @@ AliTRDtransform::AliTRDtransform(const AliTRDtransform &t)
   // AliTRDtransform copy constructor
   //
 
-  if (fGeo) {
-    delete fGeo;
-  }
-  fGeo               = new AliTRDgeometry();
-  fGeo->CreateClusterMatrixArray();
-
   fParam             = AliTRDCommonParam::Instance();
   if (!fParam) {
     AliError("Could not get common parameters\n");
@@ -180,10 +177,6 @@ AliTRDtransform::~AliTRDtransform()
   // AliTRDtransform destructor
   //
 
-  if (fGeo) {
-    delete fGeo;
-  }
-
 }
 
 //_____________________________________________________________________________
@@ -206,13 +199,13 @@ void AliTRDtransform::SetDetector(Int_t det)
   fCalT0DetValue     = fkCalT0Det->GetValue(det);
 
   // Shift needed to define Z-position relative to middle of chamber
-  Int_t layer        = fGeo->GetLayer(det);
-  Int_t stack        = fGeo->GetStack(det);
-  fPadPlane          = fGeo->GetPadPlane(layer,stack);
+  Int_t layer        = fgGeo->GetLayer(det);
+  Int_t stack        = fgGeo->GetStack(det);
+  fPadPlane          = fgGeo->GetPadPlane(layer,stack);
   fZShiftIdeal       = 0.5 * (fPadPlane->GetRow0() + fPadPlane->GetRowEnd());
 
   // Get the current transformation matrix
-  fMatrix            = fGeo->GetClusterMatrix(det);
+  fMatrix            = fgGeo->GetClusterMatrix(det);
 
 }
 
index d42b621..7f7383a 100644 (file)
@@ -42,7 +42,7 @@ class AliTRDtransform : public TObject {
 
 protected:
 
-  AliTRDgeometry     *fGeo;                 //  TRD geometry
+  static AliTRDgeometry *fgGeo;              //  TRD geometry
   Int_t               fDetector;            //  Detector number
 
   AliTRDCommonParam  *fParam;               //  TRD common parameters