2 /**************************************************************************
3 * This file is property of and copyright by the Relativistic Heavy Ion *
4 * Group (RHIG), Department of Physics Yale University, US, 2010 *
6 * Author: Per Thomas Hille <perthomas.hille@yale.edu> for the ALICE EMCAL*
7 * project. Contributors are mentioned in the code where appropriate. *
8 * Please report bugs to perthomas.hille@yale.edu *
10 * Permission to use, copy, modify and distribute this software and its *
11 * documentation strictly for non-commercial purposes is hereby granted *
12 * without fee, provided that the above copyright notice appears in all *
13 * copies and that both the copyright notice and this permission notice *
14 * appear in the supporting documentation. The authors make no claims *
15 * about the suitability of this software for any purpose. It is *
16 * provided "as is" without express or implied warranty. *
17 **************************************************************************/
19 //Container class for Peak Finder vectors
21 #include "AliCaloPeakFinderVectors.h"
29 ClassImp( AliCaloPeakFinderVectors)
33 AliCaloPeakFinderVectors::AliCaloPeakFinderVectors()
39 AliCaloPeakFinderVectors::~AliCaloPeakFinderVectors()
46 AliCaloPeakFinderVectors::ResetVectors()
48 // As implied by function name
49 for(int i=0; i < PF::MAXSTART; i++ )
51 for(int j=0; j < PF::SAMPLERANGE; j++)
53 if(i < PF::MAXSTART && j < PF::SAMPLERANGE )
55 for(int k = 0; k < 100; k++)
57 fPFAmpV[i][j][k] = 0 ;
58 fPFTofV[i][j][k] = 0 ;
59 fPFAmpVC[i][j][k] = 0 ;
60 fPFTofVC[i][j][k] = 0 ;
69 AliCaloPeakFinderVectors::SetVector(const int i, const int j, const Double_t *const a, const Double_t *const t,
70 const Double_t *const ac, const Double_t *const tc )
72 // As implied by function name
73 if(i < PF::MAXSTART && j < PF::SAMPLERANGE )
75 for(int k = 0; k < 100; k++)
77 fPFAmpV[i][j][k] = a[k];
78 fPFTofV[i][j][k] = t[k];
79 fPFAmpVC[i][j][k] = ac[k];
80 fPFTofVC[i][j][k] = tc[k];
87 AliCaloPeakFinderVectors::GetVector(const int i, const int j, Double_t *const a, Double_t *const t,
88 Double_t *const ac, Double_t *const tc ) const
90 // As implied by function name
91 if(i < PF::MAXSTART && j < PF::SAMPLERANGE )
93 for( int k = 0; k < 100; k++)
95 a[k] = fPFAmpV[i][j][k];
96 t[k] = fPFTofV[i][j][k];
97 ac[k] = fPFAmpVC[i][j][k];
98 tc[k] = fPFTofVC[i][j][k];
105 AliCaloPeakFinderVectors::PrintVectors() const
107 // As implied by function name
108 cout << __FILE__ << __LINE__ << __FUNCTION__ << endl;
109 for(int i= 0; i < PF::MAXSTART; i++ )
111 for(int j=0; j < PF::SAMPLERANGE; j++ )
113 for(int k=0; k < 10; k++ )
115 cout << fPFAmpV[i][j][k] << "\t";