]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSMonitorTriggerComponent.cxx
Preparation to do trackmatching on AOD with tender
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSMonitorTriggerComponent.cxx
index 294c5f45777388a07b040eab3fa10aa99d1b0c4c..90d8716f0cc5fad88f288d06c8fa2d2f0c884655 100644 (file)
  **************************************************************************/
 
 #include <iostream>
-
+#include "AliHLTPHOSDefinitions.h" // PTH
 #include "AliHLTPHOSMonitorTriggerComponent.h"
-#include "AliHLTPHOSCaloClusterHeaderStruct.h"
-#include "AliHLTPHOSCaloClusterDataStruct.h"
+#include "AliHLTCaloClusterDataStruct.h"
 #include "AliHLTDataTypes.h"
 
 /** @file   AliHLTPHOSMonitorTriggerComponent.h
@@ -46,7 +45,7 @@ AliHLTPHOSMonitorTriggerComponent gAliHLTPHOSMonitorTriggerComponent;
 
 
 AliHLTPHOSMonitorTriggerComponent::AliHLTPHOSMonitorTriggerComponent(): 
-  AliHLTPHOSProcessor(), 
+  AliHLTCaloProcessor(), 
   fCheckClusterEnergy(false),
   fCheckClusterMultiplicities(false),
   fClusterEnergyThreshold(1),
@@ -131,7 +130,7 @@ AliHLTPHOSMonitorTriggerComponent::DoEvent(const AliHLTComponentEventData& evtDa
        }
       specification |= iter->fSpecification;
 
-      monitorflag += CheckClusters(reinterpret_cast<AliHLTPHOSCaloClusterHeaderStruct*>(iter->fPtr));
+      monitorflag += CheckClusters(reinterpret_cast<AliHLTCaloClusterHeaderStruct*>(iter->fPtr));
        
     }
 
@@ -189,27 +188,27 @@ AliHLTPHOSMonitorTriggerComponent::DoEvent(const AliHLTComponentEventData& evtDa
 }
 
 Bool_t
-AliHLTPHOSMonitorTriggerComponent::CheckClusters(AliHLTPHOSCaloClusterHeaderStruct* clusterHeaderPtr)
+AliHLTPHOSMonitorTriggerComponent::CheckClusters(AliHLTCaloClusterHeaderStruct* clusterHeaderPtr)
 {
   //See headerfile for documentation
   
   UInt_t nClusters = clusterHeaderPtr->fNClusters;
-  Float_t* ampFracPtr = 0;
+//  Float_t* ampFracPtr = 0;
 
-  AliHLTPHOSCaloClusterDataStruct* clusterPtr = 0;
+  AliHLTCaloClusterDataStruct* clusterPtr = 0;
 
-  clusterPtr = reinterpret_cast<AliHLTPHOSCaloClusterDataStruct*>(clusterHeaderPtr + sizeof(AliHLTPHOSCaloClusterHeaderStruct));
+  clusterPtr = reinterpret_cast<AliHLTCaloClusterDataStruct*>((UChar_t*)(clusterHeaderPtr + 1));
       
   for(UInt_t n = 0; n < nClusters; n++)
     {
       if(fCheckClusterEnergy == true && clusterPtr->fEnergy > fClusterEnergyThreshold && clusterPtr->fNCells > fDigitMultiplicityThreshold)
        {
-         ampFracPtr = &(clusterPtr->fCellsAmpFraction);
+/*       ampFracPtr = &(clusterPtr->fCellsAmpFraction);
          for(UInt_t i = 0; i < clusterPtr->fNCells; i++)
            {
              if(*ampFracPtr > fLowerCentrality && *ampFracPtr < fUpperCentrality) return true;
              ampFracPtr += 6; // 6 = sizeof(Short_t) + sizeof(Float_t)
-           }
+           }*/
        }
       if(fCheckClusterMultiplicities == true && clusterPtr->fEnergy > fMultEnergyThreshold && clusterPtr->fNCells > fMultDigitMultiplicityThreshold)
        {
@@ -219,7 +218,7 @@ AliHLTPHOSMonitorTriggerComponent::CheckClusters(AliHLTPHOSCaloClusterHeaderStru
              return true;
            }
        }
-      clusterPtr += sizeof(AliHLTPHOSCaloClusterDataStruct) + 5*clusterPtr->fNCells; //5 = sizeof(Short_t) + sizeof(Float_t) - 1(pair already included)
+      clusterPtr += sizeof(AliHLTCaloClusterDataStruct) + 5*clusterPtr->fNCells; //5 = sizeof(Short_t) + sizeof(Float_t) - 1(pair already included)
     }
 
   return false;