]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
timing cut on fast ors
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Sep 2011 15:39:23 +0000 (15:39 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 6 Sep 2011 15:39:23 +0000 (15:39 +0000)
PWG4/UserTasks/EmcalTasks/AliAnalysisTaskEMCALClusterizeFast.cxx
PWG4/UserTasks/EmcalTasks/AliAnalysisTaskEMCALClusterizeFast.h

index dd71759b9bd546fcde064068f743574097993b6a..5bcf8bddec85c2be805633d202fd013280e0e470 100644 (file)
@@ -80,7 +80,9 @@ AliAnalysisTaskEMCALClusterizeFast::AliAnalysisTaskEMCALClusterizeFast()
     fShiftPhi(2),
     fShiftEta(2),
     fTRUShift(0),
-    fClusterizeFastORs(0)
+    fClusterizeFastORs(0),
+    fMinFastORtime(0),
+    fMaxFastORtime(20)
 { 
   // Constructor
 }
@@ -117,7 +119,9 @@ AliAnalysisTaskEMCALClusterizeFast::AliAnalysisTaskEMCALClusterizeFast(const cha
     fShiftPhi(2),
     fShiftEta(2),
     fTRUShift(0),
-    fClusterizeFastORs(0)
+    fClusterizeFastORs(0),
+    fMinFastORtime(0),
+    fMaxFastORtime(20)
 { 
   // Constructor
 
@@ -239,7 +243,7 @@ void AliAnalysisTaskEMCALClusterizeFast::FillDigitsArray()
   
   fDigitsArr->Clear("C");
   
-  if (fCreatePattern) {
+  if (fCreatePattern) {  // Fill digits from a pattern
     AliEMCALGeometry *fGeom = AliEMCALGeometry::GetInstance(fGeomName);
     Int_t maxd = fGeom->GetNCells() / 4;
     for (Int_t idigit = 0; idigit < maxd; idigit++){
@@ -253,7 +257,7 @@ void AliAnalysisTaskEMCALClusterizeFast::FillDigitsArray()
       digit->SetAmplitude(0.1);
     }
 
-  } else if (fClusterizeFastORs) {
+  } else if (fClusterizeFastORs) { // Fill digits from FastORs
     
     AliEMCALGeometry *fGeom = AliEMCALGeometry::GetInstance(fGeomName);
   
@@ -271,7 +275,7 @@ void AliAnalysisTaskEMCALClusterizeFast::FillDigitsArray()
     Int_t idigit = 0;
     triggers->Reset();
     
-    while ((triggers->Next())){
+    while ((triggers->Next())) {
       Float_t triggerAmplitude = 0;
       triggers->GetAmplitude(triggerAmplitude);
       if (triggerAmplitude <= 0)
@@ -280,12 +284,15 @@ void AliAnalysisTaskEMCALClusterizeFast::FillDigitsArray()
       Int_t triggerTime = 0;
       Int_t ntimes = 0;
       triggers->GetNL0Times(ntimes);
-      if (ntimes > 0){
+      if (ntimes > 0) {
         Int_t trgtimes[25];
         triggers->GetL0Times(trgtimes);
         triggerTime = trgtimes[0];
       }
       
+      if (triggerTime < fMinFastORtime || triggerTime > fMaxFastORtime)
+        continue;
+      
       Int_t triggerCol = 0, triggerRow = 0;
       triggers->GetPosition(triggerCol, triggerRow);
       
@@ -301,7 +308,7 @@ void AliAnalysisTaskEMCALClusterizeFast::FillDigitsArray()
       if (!ret)
         continue;
       
-      for (Int_t idxpos = 0; idxpos < 4; idxpos++){
+      for (Int_t idxpos = 0; idxpos < 4; idxpos++) {
         Int_t triggerNumber = cidx[idxpos];
         AliEMCALDigit *digit = static_cast<AliEMCALDigit*>(fDigitsArr->New(idigit));
         digit->SetId(triggerNumber);
index 3619d6adcd73f38edf9cdae6e91d1214c829fb7b..cf88b9bcd90f12fd27a38c5f4853f67f4db3b86b 100644 (file)
@@ -26,49 +26,51 @@ class AliAnalysisTaskEMCALClusterizeFast : public AliAnalysisTaskSE {
   virtual void           UserCreateOutputObjects();
   virtual void           UserExec(Option_t *option);
 
-  Bool_t                 GetAttachClusters()                  const  { return fAttachClusters               ; }
-  Bool_t                 GetRecalibrateOnly()                 const  { return fRecalibOnly                  ; }
-  Bool_t                 GetSubBackground()                   const  { return fSubBackground                ; }
-  const TObjArray       *GetClusters()                        const  { return fClusterArr                   ; }
-  const TClonesArray    *GetDigits()                          const  { return fDigitsArr                    ; }
-  const TString         &GeometryName()                       const  { return fGeomName                     ; }  
-  AliEMCALRecParam      *GetRecParam()                        const  { return fRecParam                     ; }
-  AliEMCALRecoUtils     *GetRecoUtils()                       const  { return fRecoUtils                    ; }
-  AliEMCALCalibData     *GetCalibData()                       const  { return fCalibData                    ; }
-  AliCaloCalibPedestal  *GetPedData()                         const  { return fPedestalData                 ; }
-  TGeoHMatrix           *GetGeometryMatrix(Int_t i)           const  { return fGeomMatrix[i]                ; }
-  Bool_t                 GetCreatePattern()                   const  { return fCreatePattern                ; }
-  Bool_t                 GetOverwrite()                       const  { return fOverwrite                    ; }
-  const TString         &GetNewClusterArrayName()             const  { return fNewClusterArrayName          ; }
-  Int_t                  GetnPhi()                            const  { return fNPhi                         ; }
-  Int_t                  GetnEta()                            const  { return fNEta                         ; }
-  Int_t                  GetShiftPhi()                        const  { return fShiftPhi                     ; }
-  Int_t                  GetShiftEta()                        const  { return fShiftEta                     ; }
-  Bool_t                 GetTRUShift()                        const  { return fTRUShift                     ; }
-  Bool_t                 GetClusterizeFastORs()               const  { return fClusterizeFastORs            ; }
-  void                   JustUnfold(Bool_t yesno)                    { fJustUnfold                  = yesno ; }
-  void                   LoadOwnGeometryMatrices(Bool_t b)           { fLoadGeomMatrices            = b     ; }
-  void                   SetAODBranchName(const char *name)          { fOutputAODBrName             = name  ; }
-  void                   SetAttachClusters(Bool_t b)                 { fAttachClusters              = b     ; }
-  void                   SetCalibData(AliEMCALCalibData *d)          { fCalibData                   = d     ; }
-  void                   SetEMCALRecoUtils(AliEMCALRecoUtils *ru)    { fRecoUtils                   = ru    ; }
-  void                   SetGeometryMatrix(TGeoHMatrix* m, Int_t i)  { fGeomMatrix[i]               = m     ; }
-  void                   SetGeometryName(const char *name)           { fGeomName                    = name  ; }
-  void                   SetLoadCalib(Bool_t b)                      { fLoadCalib                   = b     ; }
-  void                   SetLoadPed(Bool_t b)                        { fLoadPed                     = b     ; }
-  void                   SetOCDBPath(const char *path)               { fOCDBpath                    = path  ; }
-  void                   SetPedestalData(AliCaloCalibPedestal *d)    { fPedestalData                = d     ; }
-  void                   SetRecalibrateCellsOnly(Bool_t b)           { fRecalibOnly                 = b     ; }
-  void                   SetSubBackground(Bool_t b)                  { fSubBackground               = b     ; }
-  void                   SetCreatePattern(Bool_t yes)                { fCreatePattern               = yes   ; if (yes) fOverwrite = kTRUE; }
-  void                   SetOverwrite(Bool_t yes)                    { fOverwrite                   = yes   ; if (yes) fOverwrite = kTRUE; }
-  void                   SetNewClusterArrayName(TString name)        { fNewClusterArrayName         = name  ; }
-  void                   SetnPhi(Int_t n)                            { fNPhi                        = n     ; }
-  void                   SetnEta(Int_t n)                            { fNEta                        = n     ; }
-  void                   SetShiftPhi(Int_t n)                        { fShiftPhi                    = n     ; }
-  void                   SetShiftEta(Int_t n)                        { fShiftEta                    = n     ; }
-  void                   SetTRUShift(Bool_t yes)                     { fTRUShift                    = yes   ; }
-  void                   SetClusterizeFastORs(Bool_t yes)            { fClusterizeFastORs           = yes   ; if (yes) fOverwrite = kFALSE; }
+  Bool_t                 GetAttachClusters()                          const   { return fAttachClusters               ; }
+  Bool_t                 GetRecalibrateOnly()                         const   { return fRecalibOnly                  ; }
+  Bool_t                 GetSubBackground()                           const   { return fSubBackground                ; }
+  const TObjArray       *GetClusters()                                const   { return fClusterArr                   ; }
+  const TClonesArray    *GetDigits()                                  const   { return fDigitsArr                    ; }
+  const TString         &GeometryName()                               const   { return fGeomName                     ; }  
+  AliEMCALRecParam      *GetRecParam()                                const   { return fRecParam                     ; }
+  AliEMCALRecoUtils     *GetRecoUtils()                               const   { return fRecoUtils                    ; }
+  AliEMCALCalibData     *GetCalibData()                               const   { return fCalibData                    ; }
+  AliCaloCalibPedestal  *GetPedData()                                 const   { return fPedestalData                 ; }
+  TGeoHMatrix           *GetGeometryMatrix(Int_t i)                   const   { return fGeomMatrix[i]                ; }
+  Bool_t                 GetCreatePattern()                           const   { return fCreatePattern                ; }
+  Bool_t                 GetOverwrite()                               const   { return fOverwrite                    ; }
+  const TString         &GetNewClusterArrayName()                     const   { return fNewClusterArrayName          ; }
+  Int_t                  GetnPhi()                                    const   { return fNPhi                         ; }
+  Int_t                  GetnEta()                                    const   { return fNEta                         ; }
+  Int_t                  GetShiftPhi()                                const   { return fShiftPhi                     ; }
+  Int_t                  GetShiftEta()                                const   { return fShiftEta                     ; }
+  Bool_t                 GetTRUShift()                                const   { return fTRUShift                     ; }
+  Bool_t                 GetClusterizeFastORs()                       const   { return fClusterizeFastORs            ; }
+  void                   GetFastORtimeCut(Int_t &lower, Int_t &upper) const   { lower = fMinFastORtime               ; upper = fMaxFastORtime     ; }
+  void                   JustUnfold(Bool_t yesno)                             { fJustUnfold                  = yesno ; }
+  void                   LoadOwnGeometryMatrices(Bool_t b)                    { fLoadGeomMatrices            = b     ; }
+  void                   SetAODBranchName(const char *name)                   { fOutputAODBrName             = name  ; }
+  void                   SetAttachClusters(Bool_t b)                          { fAttachClusters              = b     ; }
+  void                   SetCalibData(AliEMCALCalibData *d)                   { fCalibData                   = d     ; }
+  void                   SetEMCALRecoUtils(AliEMCALRecoUtils *ru)             { fRecoUtils                   = ru    ; }
+  void                   SetGeometryMatrix(TGeoHMatrix* m, Int_t i)           { fGeomMatrix[i]               = m     ; }
+  void                   SetGeometryName(const char *name)                    { fGeomName                    = name  ; }
+  void                   SetLoadCalib(Bool_t b)                               { fLoadCalib                   = b     ; }
+  void                   SetLoadPed(Bool_t b)                                 { fLoadPed                     = b     ; }
+  void                   SetOCDBPath(const char *path)                        { fOCDBpath                    = path  ; }
+  void                   SetPedestalData(AliCaloCalibPedestal *d)             { fPedestalData                = d     ; }
+  void                   SetRecalibrateCellsOnly(Bool_t b)                    { fRecalibOnly                 = b     ; }
+  void                   SetSubBackground(Bool_t b)                           { fSubBackground               = b     ; }
+  void                   SetCreatePattern(Bool_t yes)                         { fCreatePattern               = yes   ; if (yes) fOverwrite = kTRUE; }
+  void                   SetOverwrite(Bool_t yes)                             { fOverwrite                   = yes   ; if (yes) fOverwrite = kTRUE; }
+  void                   SetNewClusterArrayName(TString name)                 { fNewClusterArrayName         = name  ; }
+  void                   SetnPhi(Int_t n)                                     { fNPhi                        = n     ; }
+  void                   SetnEta(Int_t n)                                     { fNEta                        = n     ; }
+  void                   SetShiftPhi(Int_t n)                                 { fShiftPhi                    = n     ; }
+  void                   SetShiftEta(Int_t n)                                 { fShiftEta                    = n     ; }
+  void                   SetTRUShift(Bool_t yes)                              { fTRUShift                    = yes   ; }
+  void                   SetClusterizeFastORs(Bool_t yes)                     { fClusterizeFastORs           = yes   ; if (yes) fOverwrite = kFALSE; }
+  void                   SetFastORtimeCut(Int_t lower, Int_t upper)           { fMinFastORtime               = lower ; fMaxFastORtime = upper      ; }
 
  protected:
   virtual void           Clusterize();
@@ -109,6 +111,8 @@ class AliAnalysisTaskEMCALClusterizeFast : public AliAnalysisTaskSE {
   Int_t                  fShiftEta;                       // ShiftEta (for FixedWindowsClusterizer)
   Bool_t                 fTRUShift;                       // Shifting inside a TRU (true) or through the whole calorimeter (false) (for FixedWindowsClusterizer)
   Bool_t                 fClusterizeFastORs;              // If true, clusterize FastORs instead of cells
+  Int_t                  fMinFastORtime;                  // Lower FastOR time cut
+  Int_t                  fMaxFastORtime;                  // Upper FastOR time cut
 
  private:
   AliAnalysisTaskEMCALClusterizeFast(const AliAnalysisTaskEMCALClusterizeFast&);            // not implemented