]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Introduced "void AliEMCALClusterizer::SetJustClusters(Bool_t val)" which one needs...
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 Mar 2011 14:47:07 +0000 (14:47 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 Mar 2011 14:47:07 +0000 (14:47 +0000)
Also in Calibrate check if fCaloPed is an actual pointer before trying to apply the dead/hot channel maps.

EMCAL/AliEMCALClusterizer.cxx
EMCAL/AliEMCALClusterizer.h
EMCAL/AliEMCALClusterizerNxN.cxx
EMCAL/AliEMCALClusterizerv1.cxx

index 4737d6a6c7143ecaa9d4bfec0f5d6eed0c18ebbe..2120f10e829d9ae5b4bef11e2f36cdca0b08897b 100644 (file)
@@ -62,6 +62,7 @@ ClassImp(AliEMCALClusterizer)
 //____________________________________________________________________________
 AliEMCALClusterizer::AliEMCALClusterizer():
   fIsInputCalibrated(kFALSE),
+  fJustClusters(kFALSE),
   fDigitsArr(NULL),
   fTreeR(NULL),
   fRecPoints(NULL),
@@ -83,6 +84,7 @@ AliEMCALClusterizer::AliEMCALClusterizer():
 //____________________________________________________________________________
 AliEMCALClusterizer::AliEMCALClusterizer(AliEMCALGeometry* geometry): 
   fIsInputCalibrated(kFALSE),
+  fJustClusters(kFALSE),
   fDigitsArr(NULL),
   fTreeR(NULL),
   fRecPoints(NULL),
@@ -121,6 +123,7 @@ AliEMCALClusterizer::AliEMCALClusterizer(AliEMCALGeometry *geometry,
                                          AliEMCALCalibData *calib, 
                                          AliCaloCalibPedestal *caloped): 
   fIsInputCalibrated(kFALSE),
+  fJustClusters(kFALSE),
   fDigitsArr(NULL),
   fTreeR(NULL),
   fRecPoints(NULL),
@@ -201,10 +204,12 @@ Float_t AliEMCALClusterizer::Calibrate(const Float_t amp, const Float_t time, co
   // Gustavo: 15-12-09 In case of RAW data this selection is already done, but not in simulation.
   // for the moment keep it here but remember to do the selection at the sdigitizer level 
   // and remove it from here
-  Int_t channelStatus = (Int_t)(fCaloPed->GetDeadMap(iSupMod))->GetBinContent(ieta,iphi);
-  if(channelStatus == AliCaloCalibPedestal::kHot || channelStatus == AliCaloCalibPedestal::kDead) {
-    AliDebug(2,Form("Tower from SM %d, ieta %d, iphi %d is BAD : status %d !!!",iSupMod,ieta,iphi, channelStatus));
-    return 0;
+  if (fCaloPed) {
+    Int_t channelStatus = (Int_t)(fCaloPed->GetDeadMap(iSupMod))->GetBinContent(ieta,iphi);
+    if(channelStatus == AliCaloCalibPedestal::kHot || channelStatus == AliCaloCalibPedestal::kDead) {
+      AliDebug(2,Form("Tower from SM %d, ieta %d, iphi %d is BAD : status %d !!!",iSupMod,ieta,iphi, channelStatus));
+      return 0;
+    }
   }
   //Check if time is too large or too small, indication of a noisy channel, remove in this case
   if(time > fTimeMax || time < fTimeMin) return 0;
@@ -493,3 +498,12 @@ void AliEMCALClusterizer::SetInputCalibrated(Bool_t val)
 
   fIsInputCalibrated = val;
 }
+
+//___________________________________________________________________
+void AliEMCALClusterizer::SetJustClusters(Bool_t val)
+{
+  // Flag to indicate that we are running on ESDs, when calling 
+  // rp->EvalAll(fECAW0,fDigitsArr,fJustClusters); in derived classes
+
+  fJustClusters = val;
+}
index 77866d78695d28b8f9d0b52be89c019cd21c2978..b3916cf18f769a339d331cb42207bd283f9fb39d 100644 (file)
@@ -79,7 +79,8 @@ public:
   virtual void PrintRecPoints(Option_t *option);
   virtual void PrintRecoInfo();
 
-  void    SetInputCalibrated(Bool_t val);
+  void         SetInputCalibrated(Bool_t val);
+  void         SetJustClusters(Bool_t val);
   
   virtual const char *Version() const { Warning("Version", "Not Defined"); return 0; } 
 
@@ -92,7 +93,7 @@ protected:
   virtual void MakeClusters() = 0;
   
   Bool_t fIsInputCalibrated; // to enable reclusterization from ESD cells
-  
+  Bool_t fJustClusters;      // false for standard reco  
   TClonesArray *fDigitsArr;  // array with EMCAL digits
   TTree        *fTreeR;      // tree with output clusters
   TObjArray    *fRecPoints;  // array with EMCAL clusters
@@ -126,6 +127,6 @@ protected:
   AliEMCALClusterizer(const AliEMCALClusterizer &);
   AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
   
-  ClassDef(AliEMCALClusterizer,5)  // Clusterization algorithm class 
+  ClassDef(AliEMCALClusterizer,6)  // Clusterization algorithm class 
 };
 #endif // AliEMCALCLUSTERIZER_H
index 11bcb272f2bf8dd756b011082f3452890aa61afe..ce248cee10da8ab6cd4bd4290755077f06c9dd98 100644 (file)
@@ -123,7 +123,7 @@ void AliEMCALClusterizerNxN::Digits2Clusters(Option_t * option)
   for (Int_t index = 0; index < fRecPoints->GetEntries(); index++) { 
     AliEMCALRecPoint * rp = dynamic_cast<AliEMCALRecPoint *>(fRecPoints->At(index));
     if (rp) {
-      rp->EvalAll(fECAW0,fDigitsArr,fIsInputCalibrated);
+      rp->EvalAll(fECAW0,fDigitsArr,fJustClusters);
       AliDebug(5, Form("MAX INDEX %d ", rp->GetMaximalEnergyIndex()));
       //For each rec.point set the distance to the nearest bad crystal
       if (fCaloPed)
index f5678cee4d1ccdfdf3a81b1aba40c15afce3a946..0b3f7b0a1af4f47b4ea9075a96388423cf1bea34 100644 (file)
@@ -115,7 +115,7 @@ void AliEMCALClusterizerv1::Digits2Clusters(Option_t * option)
   for(index = 0; index < fRecPoints->GetEntries(); index++) {
     AliEMCALRecPoint * rp = dynamic_cast<AliEMCALRecPoint *>(fRecPoints->At(index));
     if(rp){
-      rp->EvalAll(fECAW0,fDigitsArr,fIsInputCalibrated);
+      rp->EvalAll(fECAW0,fDigitsArr,fJustClusters);
       //For each rec.point set the distance to the nearest bad crystal
       if (fCaloPed)
         rp->EvalDistanceToBadChannels(fCaloPed);