00001 #ifndef __mEmcClusterizerv0_h__
00002 #define __mEmcClusterizerv0_h__
00003
00004
00005
00006
00007
00008
00009
00010 #include "phool.h"
00011 #include "EMCModule.h"
00012 #include <vector>
00013
00014 class PHCompositeNode;
00015 class mEmcGeometryModule;
00016 class EmcModule;
00017 class emcTowerContainer;
00018 class emcClusterContainer;
00019 class EmcSectorRec;
00020 class EmcPeakarea;
00021 class EmcCluster;
00022 class SecGeom;
00023
00028 class mEmcClusterizerv0: public EMCModule
00029 {
00030 public:
00031
00032 mEmcClusterizerv0(mEmcGeometryModule*);
00033 virtual ~mEmcClusterizerv0();
00034
00035 void SetMinClusterEnergy(float eClMin)
00036 { fMinClusterEnergySc=eClMin; fMinClusterEnergyGl=eClMin; }
00037 void SetMinClusterEnergyPbSc(float eClMin) { fMinClusterEnergySc=eClMin; }
00038 void SetMinClusterEnergyPbGl(float eClMin) { fMinClusterEnergyGl=eClMin; }
00039 void SetTowerThreshold(float Thresh);
00040 void SetTowerThreshold(int is, float Thresh);
00041 void SetTowerThresholdPbSc(float Thresh);
00042 void SetTowerThresholdPbGl(float Thresh);
00043 void SetPeakThreshold(float Thresh);
00044 void SetPeakThreshold(int is, float Thresh);
00045
00046 PHBoolean event(PHCompositeNode* root);
00047
00048 private:
00049
00050 void ToF_Process( EmcModule* phit, size_t nhits,
00051 float dist, EmcModule& hmax,
00052 float* ptof, float* petof, float* ptofcorr,
00053 float* pdtof,
00054 float* ptofmin, float* petofmin, float* ptofmincorr,
00055 float* ptofmax, float* petofmax, float* ptofmaxcorr,
00056 float& tofdisp);
00057
00058 void fillHitList(const emcTowerContainer&);
00059
00060 void fillPeakArea(EmcPeakarea&, EmcCluster&, int arm, int sector);
00061
00062 private:
00063
00064 std::vector<EmcSectorRec*> fScSector;
00065 std::vector<EmcSectorRec*> fGlSector;
00066 std::vector<SecGeom*> fSectorGeometries;
00067 float fMinClusterEnergySc;
00068 float fMinClusterEnergyGl;
00069
00070 static const int MAX_SECTORS_PROCESS=8;
00071 static const int MAX_NUMBER_OF_PEAKS=10;
00072 static const int HITS_TO_TABLE=16;
00073
00074 std::vector<EmcModule> HitList[MAX_SECTORS_PROCESS];
00075 static const int HVECTSIZE=4608;
00076
00077 EmcModule* fHVect;
00078 float TowerThresh[MAX_SECTORS_PROCESS];
00079 int Nx[MAX_SECTORS_PROCESS];
00080
00081 emcClusterContainer* fClusters;
00082 std::vector<float> fVertex;
00083 };
00084
00085 #endif