]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
- adding option to cut energy in the central crystal
authorodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 May 2010 15:26:26 +0000 (15:26 +0000)
committerodjuvsla <odjuvsla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 10 May 2010 15:26:26 +0000 (15:26 +0000)
HLT/global/physics/AliHLTCaloHistoComponent.cxx
HLT/global/physics/AliHLTCaloHistoComponent.h

index d01d8ff9d504d2817dacf706808230a98022bc28..7ef7d76e53155d497b6b57e06a46822621bf8ee3 100644 (file)
@@ -57,8 +57,10 @@ AliHLTCaloHistoComponent::AliHLTCaloHistoComponent() :
   fPhosHistogramArray(NULL),
   fEmcalHistogramArray(NULL),
   fDoEmcal(kFALSE),
-  fDoPhos(kFALSE)
-  
+  fDoPhos(kFALSE),
+  fCutOnCentrality(kFALSE),
+  fCentralityCut(0.9),
+  fCentralityCutEnergy(0.5)
 {
   //see header file for documentation
 }
@@ -158,7 +160,14 @@ Int_t AliHLTCaloHistoComponent::DoInit(int argc, const char** argv ) {
        HLTImportant("Adding PHOS track-matching histograms");
       }
     } 
-
+    
+      else if(!strcmp("-cutoncentrality", argv[i])) {
+        fCentralityCut = kTRUE;
+        HLTImportant("Cutting on centrality");
+         
+      }
+   
+     
     else {
       HLTError("Unknown argument \"%s\"", argv[i]);
     }
@@ -318,16 +327,17 @@ Int_t AliHLTCaloHistoComponent::ProcessBlocks(const AliHLTComponentBlockData * p
   Bool_t cutCluster = false;
   while( (clusterStruct = fClusterReader->NextCluster()) != 0) {
     cutCluster = false;
-
-    if(clusterStruct->fEnergy > 0.5) {
-      for(UInt_t i = 0; i < clusterStruct->fNCells; i++) {
-       fClusterReader->GetCell(clusterStruct, cellId, ampFrac, i);
-       if(ampFrac > 0.9) {
-         cutCluster = true;
-         break;
-       }
+      if(fCutOnCentrality){
+        if(clusterStruct->fEnergy > 0.5) {
+           for(UInt_t i = 0; i < clusterStruct->fNCells; i++) {
+              fClusterReader->GetCell(clusterStruct, cellId, ampFrac, i);
+              if(ampFrac > 0.9) {
+                 cutCluster = true;
+                 break;
+              }
+           }
+        }
       }
-    }
     
     if(!cutCluster) {
       clustersVector.push_back(clusterStruct);  
index 17f9eba55a514b90c3ef50e3a3d8427d61891b7f..826146cc12efa0a0a9e2e21fc6e28cbad0420d1a 100644 (file)
@@ -110,6 +110,10 @@ protected:
   
   Bool_t fDoEmcal;  //Fill EMCAL histos?
   Bool_t fDoPhos;   //Fill PHOS histos?
+  
+  Bool_t fCutOnCentrality; // Cut on centrality on cluters with high energy
+  Float_t fCentralityCut; //How large fraction of the energy do we want in the central tower to make the cut?
+  Float_t fCentralityCutEnergy; //The minimum energy of the cluster to make the cut.
 
   ClassDef(AliHLTCaloHistoComponent, 0);