5 #include "multStruct.h"
9 int
multStruct::NewEvent(
float xv,
float yv,
float zv) {
15 for (
int iPt=0;iPt<NPTBINS;iPt++) {
16 for (
int iPhi=0;iPhi<NPHIBINS;iPhi++) {
17 for (
int iEta=0;iEta<NETABINS;iEta++) {
18 mTrackBinPlus[iPt][iPhi][iEta][0] = 0;
19 mTrackBinPlus[iPt][iPhi][iEta][1] = 0;
20 mTrackBinPlus[iPt][iPhi][iEta][2] = 0;
21 mTrackBinMinus[iPt][iPhi][iEta][0] = 0;
22 mTrackBinMinus[iPt][iPhi][iEta][1] = 0;
23 mTrackBinMinus[iPt][iPhi][iEta][2] = 0;
29 int multStruct::GetRefMult() {
32 void multStruct::SetRefMult(
int refMult) {
36 int multStruct::AddTrack(
int phiBin,
int etaBin,
int iPt,
int sign,
double pt) {
43 }
else if (jPt >= mNPtBins) {
44 printf(
"!!!!! in multStruct: Trying to store into Pt bin %i. Larger than number of bins %i\n", iPt, mNPtBins);
48 mTrackBinPlus[iPt][phiBin][etaBin][0] += 1;
49 mTrackBinPlus[iPt][phiBin][etaBin][1] += pt;
50 mTrackBinPlus[iPt][phiBin][etaBin][2] += pt*pt;
51 }
else if (sign < 0) {
52 mTrackBinMinus[iPt][phiBin][etaBin][0] += 1;
53 mTrackBinMinus[iPt][phiBin][etaBin][1] += pt;
54 mTrackBinMinus[iPt][phiBin][etaBin][2] += pt*pt;
58 double multStruct::GetNSum(
int iPhi,
int iEta,
int iPt ) {
61 }
else if (iPhi >= NPHIBINS) {
63 }
else if (iEta < 0) {
65 }
else if (iEta >= NETABINS) {
69 }
else if (iPt > mNPtBins) {
72 return mTrackBinPlus[iPt][iPhi][iEta][0] + mTrackBinMinus[iPt][iPhi][iEta][0];
75 double multStruct::GetNPlus(
int iPhi,
int iEta,
int iPt ) {
78 }
else if (iPhi >= NPHIBINS) {
80 }
else if (iEta < 0) {
82 }
else if (iEta >= NETABINS) {
86 }
else if (iPt > mNPtBins) {
89 return mTrackBinPlus[iPt][iPhi][iEta][0];
92 double multStruct::GetNMinus(
int iPhi,
int iEta,
int iPt ) {
95 }
else if (iPhi >= NPHIBINS) {
97 }
else if (iEta < 0) {
99 }
else if (iEta >= NETABINS) {
101 }
else if (iPt < 0) {
103 }
else if (iPt > mNPtBins) {
106 return mTrackBinMinus[iPt][iPhi][iEta][0];
109 double multStruct::GetNDiff(
int iPhi,
int iEta,
int iPt ) {
112 }
else if (iPhi >= NPHIBINS) {
114 }
else if (iEta < 0) {
116 }
else if (iEta >= NETABINS) {
118 }
else if (iPt < 0) {
120 }
else if (iPt > mNPtBins) {
123 return mTrackBinPlus[iPt][iPhi][iEta][0] - mTrackBinMinus[iPt][iPhi][iEta][0];
126 double multStruct::GetPtSum(
int iPhi,
int iEta,
int iPt ) {
129 }
else if (iPhi >= NPHIBINS) {
131 }
else if (iEta < 0) {
133 }
else if (iEta >= NETABINS) {
135 }
else if (iPt < 0) {
137 }
else if (iPt > mNPtBins) {
140 return mTrackBinPlus[iPt][iPhi][iEta][1] + mTrackBinMinus[iPt][iPhi][iEta][1];
143 double multStruct::GetPtPlus(
int iPhi,
int iEta,
int iPt ) {
146 }
else if (iPhi >= NPHIBINS) {
148 }
else if (iEta < 0) {
150 }
else if (iEta >= NETABINS) {
152 }
else if (iPt < 0) {
154 }
else if (iPt > mNPtBins) {
157 return mTrackBinPlus[iPt][iPhi][iEta][1];
160 double multStruct::GetPtMinus(
int iPhi,
int iEta,
int iPt ) {
163 }
else if (iPhi >= NPHIBINS) {
165 }
else if (iEta < 0) {
167 }
else if (iEta >= NETABINS) {
169 }
else if (iPt < 0) {
171 }
else if (iPt > mNPtBins) {
174 return mTrackBinMinus[iPt][iPhi][iEta][1];
177 double multStruct::GetPtSqSum(
int iPhi,
int iEta,
int iPt ) {
180 }
else if (iPhi >= NPHIBINS) {
182 }
else if (iEta < 0) {
184 }
else if (iEta >= NETABINS) {
186 }
else if (iPt < 0) {
188 }
else if (iPt > mNPtBins) {
191 return mTrackBinPlus[iPt][iPhi][iEta][2] + mTrackBinMinus[iPt][iPhi][iEta][2];
194 double multStruct::GetPtSqPlus(
int iPhi,
int iEta,
int iPt ) {
197 }
else if (iPhi >= NPHIBINS) {
199 }
else if (iEta < 0) {
201 }
else if (iEta >= NETABINS) {
203 }
else if (iPt < 0) {
205 }
else if (iPt > mNPtBins) {
208 return mTrackBinPlus[iPt][iPhi][iEta][2];
211 double multStruct::GetPtSqMinus(
int iPhi,
int iEta,
int iPt ) {
214 }
else if (iPhi >= NPHIBINS) {
216 }
else if (iEta < 0) {
218 }
else if (iEta >= NETABINS) {
220 }
else if (iPt < 0) {
222 }
else if (iPt > mNPtBins) {
225 return mTrackBinMinus[iPt][iPhi][iEta][2];