]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALReconstructor.cxx
standardizing access to AliEMCALRecParams through AliEMCALReconstructor
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALReconstructor.cxx
index a3e6d153b2a28a5f20744db526099e7e33588b8f..8f952fdf7e4d9f557a8b3ecedbb1a8bdc865cdc2 100644 (file)
@@ -60,7 +60,7 @@
 
 ClassImp(AliEMCALReconstructor) 
 
-AliEMCALRecParam* AliEMCALReconstructor::fgkRecParam = 0;  // EMCAL rec. parameters
+const AliEMCALRecParam* AliEMCALReconstructor::fgkRecParam = 0;  // EMCAL rec. parameters
 AliEMCALRawUtils* AliEMCALReconstructor::fgRawUtils = 0;   // EMCAL raw utilities class
 AliEMCALClusterizer* AliEMCALReconstructor::fgClusterizer = 0;   // EMCAL clusterizer class
 TClonesArray*     AliEMCALReconstructor::fgDigitsArr = 0;  // shoud read just once at event
@@ -119,16 +119,23 @@ void AliEMCALReconstructor::InitRecParam() const
   // Check if the instance of AliEMCALRecParam exists, 
   // if not, get it from OCDB if available, otherwise create a default one
 
+  if(!fgkRecParam) {
+    fgkRecParam = dynamic_cast<const AliEMCALRecParam*>(AliReconstructor::GetRecoParam(6));
+  }
+
+  /*
  if (!fgkRecParam  && (AliCDBManager::Instance()->IsDefaultStorageSet())) {
     AliCDBEntry *entry = (AliCDBEntry*) 
       AliCDBManager::Instance()->Get("EMCAL/Config/RecParam");
     if (entry) fgkRecParam =  (AliEMCALRecParam*) entry->GetObject();
   }
+  */
   
   if(!fgkRecParam){
     AliWarning("The Reconstruction parameters for EMCAL nonitialized - Used default one");
-    fgkRecParam = new AliEMCALRecParam;
+    fgkRecParam = new AliEMCALRecParam();
   }
+
 }
 
 //____________________________________________________________________________
@@ -171,7 +178,7 @@ void AliEMCALReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
 
   rawReader->Reset() ; 
 
-  TClonesArray *digitsArr = new TClonesArray("AliEMCALDigit",100);
+  TClonesArray *digitsArr = new TClonesArray("AliEMCALDigit",200);
   Int_t bufsize = 32000;
   digitsTree->Branch("EMCAL", &digitsArr, bufsize);
 
@@ -263,7 +270,7 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
   //printf("\n triggerAmplitudes ");
   //for(int i=0; i<4; i++) printf(" %i %f : ", i, triggerAmplitudes[i]);
   //printf("\n");
-  tr.Print("");
+  //tr.Print("");
   //
   // Trigger jet staff
   //
@@ -412,7 +419,7 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
       ec->SetM02(elipAxis[0]*elipAxis[0]) ;
       ec->SetM20(elipAxis[1]*elipAxis[1]) ;
       ec->SetTOF(clust->GetTime()) ; //time-of-fligh
-
+      ec->SetNExMax(clust->GetNExMax());          //number of local maxima
       TArrayI arrayTrackMatched(1);// Only one track, temporal solution.
       arrayTrackMatched[0]= matchedTrack[iClust];
       ec->AddTracksMatched(arrayTrackMatched);
@@ -423,8 +430,8 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
       // add the cluster to the esd object
      esd->AddCaloCluster(ec);
       delete ec;
-     //delete [] newAbsIdList ;
-     //delete [] newFracList ;
+      delete [] newAbsIdList ;
+      //delete [] newFracList ;
    }
  } // cycle on clusters