00001 /* 00002 * TSTSCluster.h 00003 * 00004 * Created on: Jan 7, 2012 00005 * Author: isorokin 00006 */ 00007 00008 #ifndef TSTSCLUSTER_H 00009 #define TSTSCLUSTER_H 00010 00011 #include "TSTSDigi.h" 00012 00013 class TSTSCluster { 00014 private: 00015 std::vector<TSTSDigi> fDigis; 00016 mutable Long64_t fCachedTime; 00017 00018 public: 00019 TSTSCluster(); 00020 ~TSTSCluster(); 00021 void AddDigi( const TSTSDigi& digi ) { fCachedTime = 0; fDigis.push_back( digi ); } 00022 // void RemoveDigi( Int_t iDigi ); 00023 Int_t GetNDigis() const { return fDigis.size(); } 00024 TSTSDigi GetDigi(Int_t iDigi ) const { return fDigis.at( iDigi ); } 00025 TSTSDigi GetMainDigi() const; 00026 Double_t GetAmplitude() const; 00027 Int_t GetMainStrip() const; 00028 // Double_t GetCogStrip() const; 00029 Long64_t GetTime() const; 00030 Long64_t GetTimeLength() const; 00031 void Print() const; 00032 }; 00033 00034 #endif /* TSTSCLUSTER_H */