00001 /* 00002 * TSTSHit.cxx 00003 * 00004 * Created on: Jan 9, 2012 00005 * Author: isorokin 00006 */ 00007 00008 #include "TSTSHit.h" 00009 #include "TMath.h" 00010 00011 TSTSHit::TSTSHit( const TSTSCluster & clustP, const TSTSCluster & clustN ) : 00012 fClustP( clustP ), 00013 fClustN( clustN ) 00014 { 00015 } 00016 00017 00018 00019 Long64_t TSTSHit::GetTimeLength() const 00020 { 00021 Long64_t diff = fClustP.GetTime() - fClustN.GetTime(); 00022 return TMath::Abs(diff); 00023 } 00024 00025 00026 void TSTSHit::Reset() 00027 { 00028 fClustN.Reset(); 00029 fClustP.Reset(); 00030 } 00031 void TSTSHit::Print() const 00032 { 00033 printf( "===== HIT ======"); 00034 printf( "p-side cluster: \n"); 00035 fClustP.Print(); 00036 printf( "n-side cluster: \n"); 00037 fClustN.Print(); 00038 } 00039