]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
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 f13b6d22f55dda56bc842f36bd72b9bf81e03a3e..9b55d27a83a2b4026102b4c4dc466b96d12e8262 100644 (file)
@@ -39,8 +39,8 @@ private:
   Int_t         fNtracklets;  // number of tracklets
   AliTRDpidData *fData;       //[fNtracklets] PID data array
 
   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
 };
 
   ClassDef(AliTRDpidInfo, 1)  // track PID data representation
 };
index 5ec0a8ad5637eea54a99f0b0ce80182bb62c8089..6611a8276d9c829a9e19b4914aa1d6276f506598 100644 (file)
@@ -783,6 +783,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
   fSigThresh            = (Short_t)recoParam->GetClusSigThresh();
   fMinMaxCutSigma       = recoParam->GetMinMaxCutSigma();
   fMinLeftRightCutSigma = recoParam->GetMinLeftRightCutSigma();
   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();
 
   Int_t istack  = fIndexes->GetStack();
   fLayer  = fIndexes->GetLayer();
@@ -866,7 +867,7 @@ Bool_t AliTRDclusterizer::MakeClusters(Int_t det)
 
   // Here the clusterfining is happening
   
 
   // 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){
     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
   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;
 
   // Store the index of the first cluster in the current ROC
   if (firstClusterROC < 0) firstClusterROC = fNoOfClusters;
index e1c856ee51066eeca507929fddde4af0d982b400..89022f586e4c56aa1c017b4da75c4c40b7fd8c6a 100644 (file)
@@ -102,16 +102,16 @@ class AliTRDclusterizer : public TNamed
   Int_t            GetAddedClusters() const {return fNoOfClusters;}
   Int_t            GetNTimeBins() const {return fTimeTotal;}
 
   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;} }
   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);
 
 
 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;
   
   void             SetPadStatus(const UChar_t status, UChar_t &encoding) const;
   UChar_t          GetPadStatus(UChar_t encoding) const;
index 78f8ae63f0d80f3344b990e6858eb9dbf750bf74..b00241b3af6ad3d161763b2aaabc17c7dc63d983 100644 (file)
@@ -51,13 +51,14 @@ AliTRDrecoParam::AliTRDrecoParam()
   ,fkChi2Y(.25)
   ,fkChi2YSlope(7.73)
   ,fkChi2ZSlope(0.069)
   ,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.)
   ,fkPhiSlope(10.6)
   ,fkNMeanClusters(20.)
   ,fkNSigmaClusters(2.)
   ,fkNClusterNoise(0.)
   ,fkNMeanTracklets(5.5)
   ,fkTrackLikelihood(-15.)
+  ,fNumberOfConfigs(3)
   ,fFlags(0)
   ,fRawStreamVersion("REAL")
   ,fMinMaxCutSigma(4.)
   ,fFlags(0)
   ,fRawStreamVersion("REAL")
   ,fMinMaxCutSigma(4.)
@@ -65,6 +66,7 @@ AliTRDrecoParam::AliTRDrecoParam()
   ,fClusMaxThresh(4.5)
   ,fClusSigThresh(3.5)
   ,fTCnexp(1)
   ,fClusMaxThresh(4.5)
   ,fClusSigThresh(3.5)
   ,fTCnexp(1)
+  ,fRecEveryNTB(1)
   ,fNumberOfPresamples(0)
   ,fNumberOfPostsamples(0)
 {
   ,fNumberOfPresamples(0)
   ,fNumberOfPostsamples(0)
 {
@@ -118,13 +120,14 @@ AliTRDrecoParam::AliTRDrecoParam(const AliTRDrecoParam &ref)
   ,fkChi2Y(ref.fkChi2Y)
   ,fkChi2YSlope(ref.fkChi2YSlope)
   ,fkChi2ZSlope(ref.fkChi2ZSlope)
   ,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)
   ,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)
   ,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)
   ,fClusMaxThresh(ref.fClusMaxThresh)
   ,fClusSigThresh(ref.fClusSigThresh)
   ,fTCnexp(ref.fTCnexp)
+  ,fRecEveryNTB(ref.fRecEveryNTB)
   ,fNumberOfPresamples(ref.fNumberOfPresamples)
   ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
 {
   ,fNumberOfPresamples(ref.fNumberOfPresamples)
   ,fNumberOfPostsamples(ref.fNumberOfPostsamples)
 {
@@ -159,6 +163,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()
 {
 //______________________________________________________________
 AliTRDrecoParam *AliTRDrecoParam::GetHighFluxParam()
 {
@@ -174,6 +192,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()
 {
 //______________________________________________________________
 AliTRDrecoParam *AliTRDrecoParam::GetCosmicTestParam()
 {
index cc5f3691ce22f74401fe364181a5266c63ed018f..d40f32a82c182ef643096fbd45009d2dc5972ad4 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    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);}
   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();
   Bool_t   UseTailCancelation() const       { return TESTBIT(fFlags, kTailCancelation); }
         
   static   AliTRDrecoParam *GetLowFluxParam();
+  static   AliTRDrecoParam *GetLowFluxHLTParam();
   static   AliTRDrecoParam *GetHighFluxParam();
   static   AliTRDrecoParam *GetHighFluxParam();
+  static   AliTRDrecoParam *GetHighFluxHLTParam();
   static   AliTRDrecoParam *GetCosmicTestParam();
 
   void     SetArgon(Bool_t b = kTRUE)                         {if(b) SETBIT(fFlags, kDriftGas); else CLRBIT(fFlags, kDriftGas);}
   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  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
   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
   
   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
 
   // 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 
   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 
   // ADC parameter
   Int_t     fNumberOfPresamples;     // number of presamples 
   Int_t     fNumberOfPostsamples;     // number of postsamples 
index bc3c360da9227b6d00cf42d3c584460fa82d6727..3ea14e21a19cc099d2dc60b381a9896e44c37132 100644 (file)
 
 ClassImp(AliTRDtransform)
 
 
 ClassImp(AliTRDtransform)
 
+AliTRDgeometry* AliTRDtransform::fgGeo = NULL;
+
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform()
   :TObject()
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform()
   :TObject()
-  ,fGeo(0x0)
   ,fDetector(0)
   ,fParam(0x0)
   ,fCalibration(0x0)
   ,fDetector(0)
   ,fParam(0x0)
   ,fCalibration(0x0)
@@ -60,9 +61,11 @@ AliTRDtransform::AliTRDtransform()
   // AliTRDtransform default constructor
   //
 
   // 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();
   }
 
   fParam             = AliTRDCommonParam::Instance();
@@ -85,7 +88,6 @@ AliTRDtransform::AliTRDtransform()
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform(Int_t det)
   :TObject()
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform(Int_t det)
   :TObject()
-  ,fGeo(0x0)
   ,fDetector(0)
   ,fParam(0x0)
   ,fCalibration(0x0)
   ,fDetector(0)
   ,fParam(0x0)
   ,fCalibration(0x0)
@@ -105,9 +107,11 @@ AliTRDtransform::AliTRDtransform(Int_t det)
   // AliTRDtransform constructor for a given detector
   //
 
   // 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();
   }
 
   fParam             = AliTRDCommonParam::Instance();
@@ -132,7 +136,6 @@ AliTRDtransform::AliTRDtransform(Int_t det)
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform(const AliTRDtransform &t)
   :TObject(t)
 //_____________________________________________________________________________
 AliTRDtransform::AliTRDtransform(const AliTRDtransform &t)
   :TObject(t)
-  ,fGeo(0x0)
   ,fDetector(t.fDetector)
   ,fParam(0x0)
   ,fCalibration(0x0)
   ,fDetector(t.fDetector)
   ,fParam(0x0)
   ,fCalibration(0x0)
@@ -152,12 +155,6 @@ AliTRDtransform::AliTRDtransform(const AliTRDtransform &t)
   // AliTRDtransform copy constructor
   //
 
   // AliTRDtransform copy constructor
   //
 
-  if (fGeo) {
-    delete fGeo;
-  }
-  fGeo               = new AliTRDgeometry();
-  fGeo->CreateClusterMatrixArray();
-
   fParam             = AliTRDCommonParam::Instance();
   if (!fParam) {
     AliError("Could not get common parameters\n");
   fParam             = AliTRDCommonParam::Instance();
   if (!fParam) {
     AliError("Could not get common parameters\n");
@@ -180,10 +177,6 @@ AliTRDtransform::~AliTRDtransform()
   // AliTRDtransform destructor
   //
 
   // 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
   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
   fZShiftIdeal       = 0.5 * (fPadPlane->GetRow0() + fPadPlane->GetRowEnd());
 
   // Get the current transformation matrix
-  fMatrix            = fGeo->GetClusterMatrix(det);
+  fMatrix            = fgGeo->GetClusterMatrix(det);
 
 }
 
 
 }
 
index d42b621abd41835c6dea9170783d8f3ba5530091..7f7383aa148e2b1858d79df89303eae236237d74 100644 (file)
@@ -42,7 +42,7 @@ class AliTRDtransform : public TObject {
 
 protected:
 
 
 protected:
 
-  AliTRDgeometry     *fGeo;                 //  TRD geometry
+  static AliTRDgeometry *fgGeo;              //  TRD geometry
   Int_t               fDetector;            //  Detector number
 
   AliTRDCommonParam  *fParam;               //  TRD common parameters
   Int_t               fDetector;            //  Detector number
 
   AliTRDCommonParam  *fParam;               //  TRD common parameters