add external setter for MC parents list
[u/mrichter/AliRoot.git] / EMCAL / AliCaloPeakFinderVectors.cxx
CommitLineData
168c7b3c 1// -*- mode: c++ -*-
bab48e74 2/**************************************************************************
3 * This file is property of and copyright by the Relativistic Heavy Ion *
4 * Group (RHIG), Department of Physics Yale University, US, 2010 *
5 * *
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 *
9 * *
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 **************************************************************************/
18
19//Container class for Peak Finder vectors
20
21#include "AliCaloPeakFinderVectors.h"
22#include <iostream>
23
24
25using namespace std;
26
27
28
29ClassImp( AliCaloPeakFinderVectors)
30
31
32
33AliCaloPeakFinderVectors::AliCaloPeakFinderVectors()
34{
35 ResetVectors();
36}
37
38
39AliCaloPeakFinderVectors::~AliCaloPeakFinderVectors()
40{
41
42}
43
44
45void
46AliCaloPeakFinderVectors::ResetVectors()
47{
48 // As implied by function name
168c7b3c 49 for(int i=0; i < PF::MAXSTART; i++ )
bab48e74 50 {
168c7b3c 51 for(int j=0; j < PF::SAMPLERANGE; j++)
bab48e74 52 {
168c7b3c 53 if(i < PF::MAXSTART && j < PF::SAMPLERANGE )
bab48e74 54 {
55 for(int k = 0; k < 100; k++)
56 {
57 fPFAmpV[i][j][k] = 0 ;
58 fPFTofV[i][j][k] = 0 ;
59 fPFAmpVC[i][j][k] = 0 ;
60 fPFTofVC[i][j][k] = 0 ;
61 }
62 }
63 }
64 }
65}
66
67
68void
69AliCaloPeakFinderVectors::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 )
71{
72 // As implied by function name
168c7b3c 73 if(i < PF::MAXSTART && j < PF::SAMPLERANGE )
bab48e74 74 {
75 for(int k = 0; k < 100; k++)
76 {
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];
81 }
82 }
83}
84
85
86void
87AliCaloPeakFinderVectors::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
89{
90 // As implied by function name
168c7b3c 91 if(i < PF::MAXSTART && j < PF::SAMPLERANGE )
bab48e74 92 {
93 for( int k = 0; k < 100; k++)
94 {
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];
99 }
100 }
101}
102
103
104void
105AliCaloPeakFinderVectors::PrintVectors() const
106{
107 // As implied by function name
108 cout << __FILE__ << __LINE__ << __FUNCTION__ << endl;
168c7b3c 109 for(int i= 0; i < PF::MAXSTART; i++ )
bab48e74 110 {
168c7b3c 111 for(int j=0; j < PF::SAMPLERANGE; j++ )
bab48e74 112 {
113 for(int k=0; k < 10; k++ )
114 {
115 cout << fPFAmpV[i][j][k] << "\t";
116 }
117 cout << endl;
118 }
119 cout << endl;
120 }
121}
122