]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/PHOS/AliHLTPHOSESDMaker.cxx
- reconstruction classes no using the reco param handlers to get the reconstruction...
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSESDMaker.cxx
index b3fd555a8fd51ef4fd2cc2346c6c8b331b211922..1444880d5d20f5cb4f6ae491a7e416ffeac66df6 100644 (file)
@@ -1,3 +1,5 @@
+// $Id$
+
 /**************************************************************************
  * This file is property of and copyright by the ALICE HLT Project        * 
  * All rights reserved.                                                   *
@@ -13,6 +15,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
+
 /** 
  * @file   AliHLTPHOSESDMaker.cxx
  * @author Oystein Djuvsland
@@ -28,8 +31,8 @@
 
 #include "AliHLTPHOSESDMaker.h"
 #include "AliHLTPHOSCaloClusterContainerStruct.h"
-#include "AliHLTPHOSBase.h"
-#include "AliHLTPHOSCaloClusterDataStruct.h"
+//#include "AliHLTPHOSBase.h"
+#include "AliHLTCaloClusterDataStruct.h"
 #include "AliESDEvent.h"
 #include "AliESDCaloCluster.h"
 #include "TClonesArray.h"
@@ -37,7 +40,7 @@
 ClassImp(AliHLTPHOSESDMaker);
 
 AliHLTPHOSESDMaker::AliHLTPHOSESDMaker() : 
-  AliHLTPHOSBase(),
+  //  AliHLTPHOSBase(),
   fNCaloClusters(0),
   fCaloClustersPtr(0),
   fESDEventPtr(0),
@@ -62,30 +65,31 @@ AliHLTPHOSESDMaker::FillESDCaloClusters()
 {
   //See header file for documentation
 
-  AliESDCaloCluster *caloCluster = 0;
-  AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
+//   AliESDCaloCluster *caloCluster = 0;
+//   AliHLTCaloClusterDataStruct* caloClusterStruct = 0;
 
   for(UInt_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
     {
-      caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->At(i + fNCaloClusters);
-      caloClusterStruct = &(fCaloClusterContainerPtr->fCaloClusterArray[i]);
-      caloCluster->SetID(caloClusterStruct->fID);
-      caloCluster->SetClusterType(caloClusterStruct->fClusterType);
-      caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
-      caloCluster->SetE(caloClusterStruct->fEnergy);
-      caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
-      caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
-      caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
-      caloCluster->SetM20(caloClusterStruct->fM20);
-      caloCluster->SetM02(caloClusterStruct->fM02);
-      caloCluster->SetM11(caloClusterStruct->fM11);
-      caloCluster->SetNExMax(caloClusterStruct->fNExMax);
-      caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
-      caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
-      caloCluster->SetNCells(caloClusterStruct->fNCells);
-      caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
-      caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
-      fNCaloClusters++;
+
+//       caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->At(i + fNCaloClusters);
+//       caloClusterStruct = &(fCaloClusterContainerPtr->fCaloClusterArray[i]);
+//       caloCluster->SetID(caloClusterStruct->fID);
+//       caloCluster->SetClusterType(caloClusterStruct->fClusterType);
+//       caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
+//       caloCluster->SetE(caloClusterStruct->fEnergy);
+//       caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
+//       caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
+//       caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
+//       caloCluster->SetM20(caloClusterStruct->fM20);
+//       caloCluster->SetM02(caloClusterStruct->fM02);
+//       // PT   caloCluster->SetM11(caloClusterStruct->fM11);
+//       caloCluster->SetNExMax(caloClusterStruct->fNExMax);
+//       caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
+//       caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
+//       caloCluster->SetNCells(caloClusterStruct->fNCells);
+//       caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
+//       caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
+//       fNCaloClusters++;
     }
 
   return 0;
@@ -96,34 +100,32 @@ AliHLTPHOSESDMaker::FillESDEvent()
 {
   //See header file for documentation
   
-  AliESDCaloCluster *caloCluster = 0;
-  AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
+//   AliESDCaloCluster *caloCluster = 0;
+//   AliHLTCaloClusterDataStruct* caloClusterStruct = 0;
   for(UInt_t i = 0; i < fCaloClusterContainerPtr->fNCaloClusters; i++)
     {
-      //      caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
-      caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i);
-      caloClusterStruct = &(fCaloClusterContainerPtr->fCaloClusterArray[i]);
-      //cout << caloCluster << endl;
-      //cout << "Cells = " << caloClusterStruct->fNCells << endl;
-      caloCluster->SetID(caloClusterStruct->fID);
-      caloCluster->SetClusterType(caloClusterStruct->fClusterType);
-      caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
-      caloCluster->SetE(caloClusterStruct->fEnergy);
-      caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
-      caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
-      caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
-      caloCluster->SetM20(caloClusterStruct->fM20);
-      caloCluster->SetM02(caloClusterStruct->fM02);
-      caloCluster->SetM11(caloClusterStruct->fM11);
-      caloCluster->SetNExMax(caloClusterStruct->fNExMax);
-      caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
-      caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
-      caloCluster->SetNCells(caloClusterStruct->fNCells);
-      caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
-      caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
-      fESDEventPtr->AddCaloCluster(caloCluster);
-      //cout << caloCluster->E() << endl;
-      fNCaloClusters++;  
+//       //      caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
+//       caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i);
+//       caloClusterStruct = &(fCaloClusterContainerPtr->fCaloClusterArray[i]);
+
+//       caloCluster->SetID(caloClusterStruct->fID);
+//       caloCluster->SetClusterType(caloClusterStruct->fClusterType);
+//       caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
+//       caloCluster->SetE(caloClusterStruct->fEnergy);
+//       caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
+//       caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
+//       caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
+//       caloCluster->SetM20(caloClusterStruct->fM20);
+//       caloCluster->SetM02(caloClusterStruct->fM02);
+//       //     caloCluster->SetM11(caloClusterStruct->fM11);
+//       caloCluster->SetNExMax(caloClusterStruct->fNExMax);
+//       caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
+//       caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
+//       caloCluster->SetNCells(caloClusterStruct->fNCells);
+//       caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
+//       caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
+//       fESDEventPtr->AddCaloCluster(caloCluster);
+//       fNCaloClusters++;  
     }
   
   return 0;
@@ -132,37 +134,37 @@ Int_t
 AliHLTPHOSESDMaker::FillESDEvent(AliHLTPHOSCaloClusterContainerStruct* caloClusterContainerPtr)
 {
   //See header file for documentation
-
-  caloClusterContainerPtr--;
-  caloClusterContainerPtr++;
   
-  //  AliESDCaloCluster *caloCluster = 0;
-  //  AliHLTPHOSCaloClusterDataStruct* caloClusterStruct = 0;
+//   AliESDCaloCluster *caloCluster = 0;
+//   AliHLTCaloClusterDataStruct* caloClusterStruct = 0;
   
-  for(UInt_t i = 0; i < 1/*caloClusterContainerPtr->fNCaloClusters*/; i++)
+  //cout << "ESD: # of clusters: " << caloClusterContainerPtr->fNCaloClusters << endl; 
+  for(UInt_t i = 0; i < caloClusterContainerPtr->fNCaloClusters; i++)
     {
-      //      caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
-      //caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
-      /*      caloClusterStruct = &(caloClusterContainerPtr->fCaloClusterArray[i]);
-      caloCluster->SetID(caloClusterStruct->fID);
-      caloCluster->SetClusterType(caloClusterStruct->fClusterType);
-      caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
-      caloCluster->SetE(caloClusterStruct->fEnergy);
-      caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
-      caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
-      caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
-      caloCluster->SetM20(caloClusterStruct->fM20);
-      caloCluster->SetM02(caloClusterStruct->fM02);
-      caloCluster->SetM11(caloClusterStruct->fM11);
-      caloCluster->SetNExMax(caloClusterStruct->fNExMax);
-      caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
-      caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
-      caloCluster->SetNCells(caloClusterStruct->fNCells);
-      caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
-      caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
-      fESDEventPtr->AddCaloCluster(caloCluster);
-      //cout << caloCluster->E() << endl;*/
-      fNCaloClusters++;  
+      // caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
+//       caloCluster = (AliESDCaloCluster*)fCaloClustersPtr->New(i + fNCaloClusters);
+//       caloClusterStruct = &(caloClusterContainerPtr->fCaloClusterArray[i]);
+//       caloCluster->SetID(caloClusterStruct->fID);
+//       caloCluster->SetClusterType(caloClusterStruct->fClusterType);
+//       //      caloCluster->SetPosition((Float_t*)&caloClusterStruct->fGlobalPos[0]);
+//       caloCluster->SetPosition((Float_t*)caloClusterStruct->fGlobalPos);
+//       caloCluster->SetE(caloClusterStruct->fEnergy);
+//       // cout << "\t\t ESD: Cluster energy: " << caloClusterStruct->fEnergy << endl;
+// //       cout << "\t\t ESD: Position: x = " << caloClusterStruct->fGlobalPos[0] << " - y = " << caloClusterStruct->fGlobalPos[1] << " - z = " << caloClusterStruct->fGlobalPos[2] << endl;
+//       caloCluster->SetClusterDisp(caloClusterStruct->fDispersion);
+//       caloCluster->SetClusterChi2(caloClusterStruct->fFitQuality);
+//       caloCluster->SetPid((Float_t*)&caloClusterStruct->fPID[0]);
+//       caloCluster->SetM20(caloClusterStruct->fM20);
+//       caloCluster->SetM02(caloClusterStruct->fM02);
+//       caloCluster->SetNExMax(caloClusterStruct->fNExMax);
+//       caloCluster->SetEmcCpvDistance(caloClusterStruct->fEmcCpvDistance);
+//       caloCluster->SetDistanceToBadChannel(caloClusterStruct->fDistToBadChannel);
+//       caloCluster->SetNCells(caloClusterStruct->fNCells);
+//       caloCluster->SetCellsAbsId(caloClusterStruct->fCellsAbsId);
+//       caloCluster->SetCellsAmplitudeFraction(caloClusterStruct->fCellsAmpFraction);
+//       fESDEventPtr->AddCaloCluster(caloCluster);
+      
+//       fNCaloClusters++;  
     }
   
   return 0;