]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
remove from digits array those channels with bad timing or which only produced Low...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 May 2010 14:17:52 +0000 (14:17 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 6 May 2010 14:17:52 +0000 (14:17 +0000)
EMCAL/AliEMCALDigit.cxx
EMCAL/AliEMCALDigit.h
EMCAL/AliEMCALRawUtils.cxx
EMCAL/AliEMCALRawUtils.h
EMCAL/AliEMCALReconstructor.cxx

index 6a2d67c68a502c4d9fd5a805bc421843eacab162..9856a69acaf35db09094d74796b7a95ddd86a25d 100644 (file)
@@ -60,33 +60,33 @@ AliDigitNew(),
   fTimeR(0.),
   fChi2(0.),
   fNDF(0),
-  fTriggerDigit(kFALSE)
+  fDigitType(kUnknown)
 
 {
   // default ctor 
 
   // Need to initialise for reading old files
-  fPrimary = new Int_t[fNMaxPrimary] ;
+  fPrimary   = new Int_t[fNMaxPrimary] ;
   fDEPrimary = new Float_t[fNMaxPrimary] ;
-  fIparent = new Int_t[fNMaxiparent] ; 
-  fDEParent = new Float_t[fNMaxiparent] ; 
+  fIparent   = new Int_t[fNMaxiparent] ; 
+  fDEParent  = new Float_t[fNMaxiparent] ; 
   for ( Int_t i = 0; i < fNMaxPrimary ; i++) {
-    fPrimary[i]  = -1 ;
+    fPrimary[i]    = -1 ;
     fDEPrimary[i]  = 0 ;
   } 
 
   for ( Int_t i = 0; i < fNMaxiparent ; i++) {
-    fIparent[i] = -1 ;
+    fIparent[i]  = -1 ;
     fDEParent[i] = 0 ;
   }
 }
 
 //____________________________________________________________________________
-AliEMCALDigit::AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Float_t digEnergy, Float_t time, Bool_t trigger, Int_t index, Float_t dE) 
+AliEMCALDigit::AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Float_t digEnergy, Float_t time, Int_t type, Int_t index, Float_t dE) 
   : AliDigitNew(),
     fAmpFloat(digEnergy),
     fNSamples(0),
-       fSamples(0x0),
+    fSamples(0x0),
     fNSamplesHG(0),
     fSamplesHG(0x0),
     fNprimary(0),
@@ -102,7 +102,7 @@ AliEMCALDigit::AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Float_t dig
     fTimeR(time),
     fChi2(0.),
     fNDF(0),
-       fTriggerDigit(trigger)
+    fDigitType(type)
 {  
   // ctor with all data 
 
@@ -112,10 +112,10 @@ AliEMCALDigit::AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Float_t dig
   fIndexInList = index ; 
 
   // data member  
-  fPrimary = new Int_t[fNMaxPrimary] ;
+  fPrimary   = new Int_t[fNMaxPrimary] ;
   fDEPrimary = new Float_t[fNMaxPrimary] ;
-  fIparent = new Int_t[fNMaxiparent] ; 
-  fDEParent = new Float_t[fNMaxiparent] ; 
+  fIparent   = new Int_t[fNMaxiparent] ; 
+  fDEParent  = new Float_t[fNMaxiparent] ; 
   if( primary != -1){
     fNprimary    = 1 ; 
     fPrimary[0]  = primary ;  
@@ -147,9 +147,9 @@ AliEMCALDigit::AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Float_t dig
 //____________________________________________________________________________
 AliEMCALDigit::AliEMCALDigit(const AliEMCALDigit & digit) 
   : AliDigitNew(digit),
-       fAmpFloat(digit.fAmpFloat),     
-       fNSamples(digit.fNSamples),
-       fSamples(0x0),
+    fAmpFloat(digit.fAmpFloat),        
+    fNSamples(digit.fNSamples),
+    fSamples(0x0),
     fNSamplesHG(digit.fNSamplesHG),
     fSamplesHG(0x0),
     fNprimary(digit.fNprimary),
@@ -165,7 +165,7 @@ AliEMCALDigit::AliEMCALDigit(const AliEMCALDigit & digit)
     fTimeR(digit.fTimeR), 
     fChi2(digit.fChi2), 
     fNDF(digit.fNDF),
-       fTriggerDigit(digit.fTriggerDigit)
+    fDigitType(digit.fDigitType)
 {
   // copy ctor
   
@@ -260,7 +260,7 @@ Float_t AliEMCALDigit::GetPhi() const
 Bool_t AliEMCALDigit::GetFALTROSample(const Int_t iSample, Int_t& timeBin, Int_t& amp) const
 {
        //Get FALTRO sample in time bin iSample
-       if (iSample >= fNSamples || iSample < 0 || !fTriggerDigit) return kFALSE;
+       if (iSample >= fNSamples || iSample < 0 || fDigitType==kTrigger) return kFALSE;
        
        amp     =  fSamples[iSample] & 0xFFF;
        timeBin = (fSamples[iSample] >> 12) & 0xFF;
@@ -271,7 +271,7 @@ Bool_t AliEMCALDigit::GetFALTROSample(const Int_t iSample, Int_t& timeBin, Int_t
 Bool_t AliEMCALDigit::GetALTROSampleLG(const Int_t iSample, Int_t& timeBin, Int_t& amp) const
 {
        //Get Low Gain ALTRO sample in time bin iSample
-       if (iSample >= fNSamples || iSample < 0 || fTriggerDigit) return kFALSE;
+       if (iSample >= fNSamples || iSample < 0 || fDigitType==kLG) return kFALSE;
        
        amp     =  fSamples[iSample] & 0xFFF;
        timeBin = (fSamples[iSample] >> 12) & 0xFF;
@@ -302,7 +302,7 @@ void AliEMCALDigit::SetALTROSamplesHG(const Int_t nSamples, Int_t *samples)
 Bool_t AliEMCALDigit::GetALTROSampleHG(const Int_t iSample, Int_t& timeBin, Int_t& amp) const
 {
        //Get High Gain ALTRO sample in time bin iSample
-       if (iSample >= fNSamplesHG || iSample < 0 || fTriggerDigit) return kFALSE;
+       if (iSample >= fNSamplesHG || iSample < 0 || fDigitType==kHG) return kFALSE;
        
        amp     =  fSamplesHG[iSample] & 0xFFF;
        timeBin = (fSamplesHG[iSample] >> 12) & 0xFF;
@@ -498,9 +498,9 @@ ostream& operator << ( ostream& out , const AliEMCALDigit & digit)
 void AliEMCALDigit::Print(const Option_t* /*opt*/) const
 {
     //Print
-       printf("===\nDigit id: %4d / Energy %2.3f ; Time %e ; Time samples %d ; Chi2 %2.3f, NDF %d, Trigger? %d \n",
-                  fId, fAmpFloat,fTime, fNSamples, fChi2, fNDF, fTriggerDigit);
-       if(fTriggerDigit){
+       printf("===\nDigit id: %4d / Energy %2.3f ; Time %e ; Time samples %d ; Chi2 %2.3f, NDF %d, Type? %d \n",
+                  fId, fAmpFloat,fTime, fNSamples, fChi2, fNDF, fDigitType);
+       if(fDigitType==kTrigger){
                printf("FALTRO: ");
                for (Int_t i=0; i < GetNFALTROSamples(); i++) 
                {
index bc5b1ad4b3dc13e9c85cc96744d45232deaf4ec4..00effe80691a5ac537f589f622b3d1daa9c66031 100644 (file)
@@ -31,7 +31,7 @@ class AliEMCALDigit : public AliDigitNew {
  public:
   
   AliEMCALDigit() ;
-  AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Float_t digEnergy, Float_t time, Bool_t trigger,Int_t index = -1, Float_t dE = 0) ;
+  AliEMCALDigit(Int_t primary, Int_t iparent, Int_t id, Float_t digEnergy, Float_t time, Int_t type,Int_t index = -1, Float_t dE = 0) ;
   AliEMCALDigit(const AliEMCALDigit & digit) ;
   virtual ~AliEMCALDigit() ;
 
@@ -40,6 +40,8 @@ class AliEMCALDigit : public AliDigitNew {
   AliEMCALDigit operator*(Float_t factor) ; 
   const AliEMCALDigit& operator = (const AliEMCALDigit &) {return *this;}
 
+  enum digitType{kUnknown=-1, kHG=0, kLG=1, kLGnoHG=2, kTrigger=3};
+       
   Int_t   Compare(const TObject * obj) const ;
   Float_t GetAmplitude()   const { if(!fAmp)return fAmpFloat ; else return fAmp ;}//Keep backward compatibility.
   Float_t GetEta()         const ; 
@@ -55,32 +57,32 @@ class AliEMCALDigit : public AliDigitNew {
   Float_t GetChi2(void)    const { return fChi2  ;}
   Int_t   GetNDF(void)     const { return fNDF   ;}
   Bool_t  IsSortable()     const { return kTRUE  ;}
-  Bool_t  IsTriggerDigit() const { return fTriggerDigit ;}
+  Int_t   GetType()        const { return fDigitType ;}
        
-  void    SetAmp(Int_t amp)         { fAmp      = amp  ;} //old
-  void    SetAmplitude(Float_t amp) { fAmpFloat = amp  ;}
-  void    SetId(Int_t id)           { fId       = id   ;}
-  void    SetTime(Float_t time)     { fTime     = time ;}
-  void    SetTimeR(Float_t time)    { fTimeR    = time ;}
-  void    SetChi2(Float_t chi)      { fChi2     = chi  ;}
-  void    SetNDF(Int_t ndf)         { fNDF      = ndf  ;}
-  void    SetTriggerDigit(Bool_t b) { fTriggerDigit = b ;}
+  void    SetAmp(Int_t amp)         { fAmp       = amp  ;} //old
+  void    SetAmplitude(Float_t amp) { fAmpFloat  = amp  ;}
+  void    SetId(Int_t idt)          { fId        = idt  ;}
+  void    SetTime(Float_t time)     { fTime      = time ;}
+  void    SetTimeR(Float_t time)    { fTimeR     = time ;}
+  void    SetChi2(Float_t chi)      { fChi2      = chi  ;}
+  void    SetNDF(Int_t ndf)         { fNDF       = ndf  ;}
+  void    SetType(Int_t t)          { fDigitType = t    ;}
   void    ShiftPrimary(Int_t shift); // shift to separate different TreeK in merging
        
   //Raw time sample
   //ALTRO
-  Int_t   GetNALTROSamplesLG() const {if(!fTriggerDigit)return fNSamples; else return 0;}
+  Int_t   GetNALTROSamplesLG() const {if(fDigitType==kLG)return fNSamples; else return 0;}
   Bool_t  GetALTROSampleLG(const Int_t iSample, Int_t& timeBin, Int_t& amp) const;
-  Int_t   GetNALTROSamplesHG() const {if(!fTriggerDigit) return fNSamplesHG; else return 0;}
+  Int_t   GetNALTROSamplesHG() const {if(fDigitType==kHG) return fNSamplesHG; else return 0;}
   Bool_t  GetALTROSampleHG(const Int_t iSample, Int_t& timeBin, Int_t& amp) const;
   //FALTRO, trigger. Same data members as Low Gain     
   Int_t   GetNFALTROSamples() const 
-       {if(fTriggerDigit) return fNSamples; else return 0;}
+       {if(fDigitType==kTrigger) return fNSamples; else return 0;}
   Bool_t  GetFALTROSample(const Int_t iSample, Int_t& timeBin, Int_t& amp) const ;
        
   void SetALTROSamplesHG (const Int_t nSamplesHG, Int_t *samplesHG);
   void SetALTROSamplesLG (const Int_t nSamplesLG, Int_t *samplesLG);
-  void SetFALTROSamples  (const Int_t nSamples,   Int_t *samples) { if(fTriggerDigit) SetALTROSamplesLG(nSamples, samples);} 
+  void SetFALTROSamples  (const Int_t nSamples,   Int_t *samples) { if(fDigitType==kTrigger) SetALTROSamplesLG(nSamples, samples);} 
 
   void Print(const Option_t* /*opt*/) const;
        
@@ -106,11 +108,11 @@ class AliEMCALDigit : public AliDigitNew {
   Float_t fTimeR ;      // Earliest time: to be used by Digits2Raw
   //Fit quality parameters
   Float_t fChi2;        // Fit Chi aquare      
-  Int_t   fNDF;          // Fit Number of Degrees of Freedom
+  Int_t   fNDF;         // Fit Number of Degrees of Freedom
        
-  Bool_t fTriggerDigit; // This is a trigger digit or not 
+  Int_t fDigitType;     // This is a trigger digit(0), HG (1) or LG (3)
        
-  ClassDef(AliEMCALDigit,4)   // Digit in EMCAL 
+  ClassDef(AliEMCALDigit,5)   // Digit in EMCAL 
 
 } ;
 
index 992068d2bba530ca95c40594d3a9cb54613e9b7c..ada2819f9794160694fe4b584b399881cd78ae95 100644 (file)
@@ -77,7 +77,9 @@ Double_t AliEMCALRawUtils::fgFEENoise = 3.;          // 3 ADC channels of noise
 AliEMCALRawUtils::AliEMCALRawUtils(fitAlgorithm fitAlgo)
   : fHighLowGainFactor(0.), fOrder(0), fTau(0.), fNoiseThreshold(0),
     fNPedSamples(0), fGeom(0), fOption(""),
-    fRemoveBadChannels(kTRUE),fFittingAlgorithm(0),fUseFALTRO(kFALSE),fRawAnalyzer(0)
+    fRemoveBadChannels(kTRUE),fFittingAlgorithm(0),  
+    fTimeMin(-1.),fTimeMax(1.),
+    fUseFALTRO(kFALSE),fRawAnalyzer(0)
 {
 
   //These are default parameters.  
@@ -118,7 +120,9 @@ AliEMCALRawUtils::AliEMCALRawUtils(fitAlgorithm fitAlgo)
 AliEMCALRawUtils::AliEMCALRawUtils(AliEMCALGeometry *pGeometry, fitAlgorithm fitAlgo)
   : fHighLowGainFactor(0.), fOrder(0), fTau(0.), fNoiseThreshold(0),
     fNPedSamples(0), fGeom(pGeometry), fOption(""),
-    fRemoveBadChannels(kTRUE),fFittingAlgorithm(0),fUseFALTRO(kFALSE),fRawAnalyzer()
+    fRemoveBadChannels(kTRUE),fFittingAlgorithm(0),
+    fTimeMin(-1.),fTimeMax(1.),
+    fUseFALTRO(kFALSE),fRawAnalyzer()
 {
   //
   // Initialize with the given geometry - constructor required by HLT
@@ -163,6 +167,7 @@ AliEMCALRawUtils::AliEMCALRawUtils(const AliEMCALRawUtils& rawU)
     fOption(rawU.fOption),
     fRemoveBadChannels(rawU.fRemoveBadChannels),
     fFittingAlgorithm(rawU.fFittingAlgorithm),
+    fTimeMin(rawU.fTimeMin),fTimeMax(rawU.fTimeMax),
        fUseFALTRO(rawU.fUseFALTRO),
     fRawAnalyzer(rawU.fRawAnalyzer)
 {
@@ -188,6 +193,8 @@ AliEMCALRawUtils& AliEMCALRawUtils::operator =(const AliEMCALRawUtils &rawU)
     fOption            = rawU.fOption;
     fRemoveBadChannels = rawU.fRemoveBadChannels;
     fFittingAlgorithm  = rawU.fFittingAlgorithm;
+       fTimeMin           = rawU.fTimeMin;
+       fTimeMax           = rawU.fTimeMax;
     fUseFALTRO         = rawU.fUseFALTRO;
     fRawAnalyzer       = rawU.fRawAnalyzer;
     fMapping[0]        = rawU.fMapping[0];
@@ -502,16 +509,19 @@ void AliEMCALRawUtils::Raw2Digits(AliRawReader* reader,TClonesArray *digitsArr,
    } // end while over channel   
   } //end while over DDL's, of input stream 
 
+  TrimDigits(digitsArr);
+       
   return ; 
 }
 
 //____________________________________________________________________________ 
 void AliEMCALRawUtils::AddDigit(TClonesArray *digitsArr, Int_t id, Int_t timeSamples[], Int_t nSamples) 
 {
-       new((*digitsArr)[digitsArr->GetEntriesFast()]) AliEMCALRawDigit(id, timeSamples, nSamples);     
-       
-       //      Int_t idx = digitsArr->GetEntriesFast()-1;
-       //      AliEMCALRawDigit* d = (AliEMCALRawDigit*)digitsArr->At(idx);
+  //Add raw sample to raw digit 
+  new((*digitsArr)[digitsArr->GetEntriesFast()]) AliEMCALRawDigit(id, timeSamples, nSamples);  
+  
+  //   Int_t idx = digitsArr->GetEntriesFast()-1;
+  //   AliEMCALRawDigit* d = (AliEMCALRawDigit*)digitsArr->At(idx);
 }
 
 //____________________________________________________________________________ 
@@ -526,31 +536,78 @@ void AliEMCALRawUtils::AddDigit(TClonesArray *digitsArr, Int_t id, Int_t lowGain
   AliEMCALDigit *digit = 0, *tmpdigit = 0;
   TIter nextdigit(digitsArr);
   while (digit == 0 && (tmpdigit = (AliEMCALDigit*) nextdigit())) {
-    if (tmpdigit->GetId() == id)
-      digit = tmpdigit;
+    if (tmpdigit->GetId() == id) digit = tmpdigit;
   }
 
   if (!digit) { // no digit existed for this tower; create one
-    if (lowGain && amp > fgkOverflowCut) 
-      amp *= fHighLowGainFactor; 
-    Int_t idigit = digitsArr->GetEntries();
-    new((*digitsArr)[idigit]) AliEMCALDigit( -1, -1, id, amp, time, kFALSE, idigit) ;  
-  }
+               Int_t type = AliEMCALDigit::kHG; // use enum in AliEMCALDigit
+               if (lowGain) { 
+                       amp *= fHighLowGainFactor;
+                       type = AliEMCALDigit::kLGnoHG;
+               } 
+               Int_t idigit = digitsArr->GetEntries();
+               new((*digitsArr)[idigit]) AliEMCALDigit( -1, -1, id, amp, time, type, idigit) ; 
+               AliDebug(2,Form("Add digit Id %d for the first time, type %d", id, type));
+  }//digit added first time
   else { // a digit already exists, check range 
-         // (use high gain if signal < cut value, otherwise low gain)
-    if (lowGain) { // new digit is low gain
-      if (digit->GetAmplitude() > fgkOverflowCut) {  // use if stored digit is out of range
-       digit->SetAmplitude(fHighLowGainFactor * amp);
-       digit->SetTime(time);
-      }
+               // (use high gain if signal < cut value, otherwise low gain)
+               if (lowGain) { // new digit is low gain
+                       if (digit->GetAmplitude() > fgkOverflowCut) {  // use if previously stored (HG) digit is out of range
+                               digit->SetAmplitude(fHighLowGainFactor * amp);
+                               digit->SetTime(time);
+                               digit->SetType(AliEMCALDigit::kLG);
+                               AliDebug(2,Form("Add LG digit ID %d for the second time, type %d", digit->GetId(), digit->GetType()));
+                       }
+               }//new low gain digit
+               else { // new digit is high gain 
+                       if (amp < fgkOverflowCut) { // new digit is high gain; use if not out of range
+                               digit->SetAmplitude(amp);
+                               digit->SetTime(time);
+                               digit->SetType(AliEMCALDigit::kHG);
+                               AliDebug(2,Form("Add HG digit ID %d for the second time, type %d", digit->GetId(), digit->GetType()));
+                       }
+                       else { // HG out of range, just change flag value to show that HG did exist
+                               digit->SetType(AliEMCALDigit::kLG);
+                               AliDebug(2,Form("Change LG digit to HG, ID %d, type %d", digit->GetId(), digit->GetType()));
+                       }
+               }//new high gain digit
+  }//digit existed replace it
+  
+}
+
+//____________________________________________________________________________ 
+void AliEMCALRawUtils::TrimDigits(TClonesArray *digitsArr) 
+{
+  // Remove digits with only low gain and large time
+  
+  AliEMCALDigit *digit = 0;
+  Int_t n = 0;
+  Int_t nDigits = digitsArr->GetEntriesFast();
+  TIter nextdigit(digitsArr);
+  while ((digit = (AliEMCALDigit*) nextdigit())) {
+    
+    //Check if only LG existed, remove if so
+    if (digit->GetType() == AliEMCALDigit::kLGnoHG) {
+      AliDebug(1,Form("Remove digit with id %d, LGnoHG",digit->GetId()));
+      digitsArr->Remove(digit);
     }
-    else if (amp < fgkOverflowCut) { // new digit is high gain; use if not out of range
-      digit->SetAmplitude(amp);
-      digit->SetTime(time);
+    //Check if time if too large or too small, remove if so
+    else if(fTimeMin > digit->GetTime() || fTimeMax < digit->GetTime()) {
+      digitsArr->Remove(digit);
+      AliDebug(1,Form("Remove digit with id %d, Bad Time %e",digit->GetId(), digit->GetTime()));
     }
-  }
+    //Good digit, just reassign the index of the digit in case there was a previous removal
+    else {
+      digit->SetIndexInList(n);        
+      n++;
+    }    
+  }//while
+  
+  digitsArr->Compress();
+  AliDebug(1,Form("N Digits before trimming : %d; after array compression %d",nDigits,digitsArr->GetEntriesFast()));
+          
 }
-
+       
 //____________________________________________________________________________ 
 void AliEMCALRawUtils::FitRaw(const Int_t firstTimeBin, const Int_t lastTimeBin, Float_t & amp, Float_t & time, Bool_t & fitDone) const 
 { // Fits the raw signal time distribution
index 19c5f8758d5e2e58c6223a4ef8911b2766d7330f..ee92e6d442b9e004f6fa34bf74f5e766910d45da 100644 (file)
@@ -45,6 +45,7 @@ class AliEMCALRawUtils : public TObject {
 
   void AddDigit(TClonesArray *digitsArr, Int_t id, Int_t lowGain, Float_t amp, Float_t time);
   void AddDigit(TClonesArray *digitsArr, Int_t id, Int_t timeSamples[], Int_t nSamples);
+  void TrimDigits(TClonesArray *digitsArr);
 
   // Signal shape parameters
   Double_t GetRawFormatHighLowGainFactor() const { return fHighLowGainFactor ;}
@@ -52,14 +53,17 @@ class AliEMCALRawUtils : public TObject {
   Double_t GetRawFormatTau()               const { return fTau ; }    
   Int_t    GetNoiseThreshold()             const { return fNoiseThreshold; }
   Int_t    GetNPedSamples()                const { return fNPedSamples; }
+       
   // get methods for fast fit simulation
   Int_t    GetPedestalValue()     const {return fgPedestalValue;}
   Double_t GetFEENoise()          const {return fgFEENoise;}
 
   Bool_t   GetRemoveBadChannels() const {return fRemoveBadChannels;}
   Int_t    GetFittingAlgorithm()  const {return fFittingAlgorithm; }
+  Float_t  GetTimeMax()           const {return fTimeMax ;}
+  Float_t  GetTimeMin()           const {return fTimeMin ;}
   Bool_t   UseFALTRO()            const {return fUseFALTRO; }
-       
+
   void SetRawFormatHighLowGainFactor(Double_t val) {fHighLowGainFactor=val;}
   void SetRawFormatOrder(Int_t val)                {fOrder=val; }   
   void SetRawFormatTau(Double_t val)               {fTau=val; }    
@@ -67,6 +71,8 @@ class AliEMCALRawUtils : public TObject {
   void SetNPedSamples(Int_t val)                   {fNPedSamples=val; }
   void SetRemoveBadChannels(Bool_t val)            {fRemoveBadChannels=val; }
   void SetFittingAlgorithm(Int_t val) ;             
+  void SetTimeMin(Float_t t)                       {fTimeMin   = t          ;}
+  void SetTimeMax(Float_t t)                       {fTimeMax   = t          ;}
   void SetFALTROUsage(Bool_t val)                  {fUseFALTRO=val; }
        
   // set methods for fast fit simulation
@@ -104,7 +110,7 @@ class AliEMCALRawUtils : public TObject {
   Double_t fTau ;                       // tau parameter of gamma function for the RO signal
   Int_t fNoiseThreshold;                // threshold to consider signal or noise
   Int_t fNPedSamples;                   // number of samples to use in pedestal calculation
-
+       
   static const Int_t fgkOverflowCut = 950;  // cut to discriminate overflowed channels
   static const Int_t fgkRawSignalOverflow = 0x3FF; // maximum signal (10 bits)
   static Int_t fgTimeBins; // number of sampling bins of the raw RO signal
@@ -116,18 +122,20 @@ class AliEMCALRawUtils : public TObject {
   static Int_t fgPedestalValue;         // pedestal value for Digits2Raw
   static Double_t fgFEENoise;           // electronics noise in ADC units
 
-  AliEMCALGeometry* fGeom;              //geometry
-  AliAltroMapping*  fMapping[4];        //only two for now
+  AliEMCALGeometry* fGeom;              // geometry
+  AliAltroMapping*  fMapping[4];        // only two for now
 
   TString fOption;                      //! option passed from Reconstructor
 
-  Bool_t fRemoveBadChannels;            // select if bad channels are removed before fitting
-  Int_t  fFittingAlgorithm;             // select the fitting algorithm
-  Bool_t fUseFALTRO;                                   // use FALTRO and pass it to the digits
+  Bool_t  fRemoveBadChannels;           // select if bad channels are removed before fitting
+  Int_t   fFittingAlgorithm;            // select the fitting algorithm
+  Float_t fTimeMin;                     // minimum threshold for the time of the signal
+  Float_t fTimeMax;                     // maximum threshold for the time of the signal
+  Bool_t  fUseFALTRO;                  // use FALTRO and pass it to the digits
        
   AliCaloRawAnalyzer *fRawAnalyzer;     // e.g. for sample selection for fits
 
-  ClassDef(AliEMCALRawUtils,6)          // utilities for raw signal fitting
+  ClassDef(AliEMCALRawUtils,7)          // utilities for raw signal fitting
 };
 
 #endif
index 0d1401f922c0070bcc25f643fa8d08aa3bbc8c3b..8125ea7df63525d8a87775325b1b8646630b438e 100644 (file)
@@ -237,6 +237,8 @@ void AliEMCALReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
   fgRawUtils->SetRemoveBadChannels(GetRecParam()->GetRemoveBadChannels());
   fgRawUtils->SetFittingAlgorithm(GetRecParam()->GetFittingAlgorithm());
   fgRawUtils->SetFALTROUsage(GetRecParam()->UseFALTRO());
+  fgRawUtils->SetTimeMin(GetRecParam()->GetTimeMin());
+  fgRawUtils->SetTimeMax(GetRecParam()->GetTimeMax());
        
   fgRawUtils->Raw2Digits(rawReader,digitsArr,fPedestalData,digitsTrg);