12 |
* CaloTrkVar constructor |
* CaloTrkVar constructor |
13 |
**/ |
**/ |
14 |
CaloTrkVar::CaloTrkVar() { |
CaloTrkVar::CaloTrkVar() { |
15 |
|
this->Clear(); |
16 |
|
}; |
17 |
|
|
18 |
|
/** |
19 |
|
* Clear variables |
20 |
|
**/ |
21 |
|
void CaloTrkVar::Clear() { |
22 |
trkseqno = 0; |
trkseqno = 0; |
23 |
noint = 0; |
noint = 0; |
24 |
ncore = 0; |
ncore = 0; |
43 |
qlow = 0.; |
qlow = 0.; |
44 |
nlow = 0; |
nlow = 0; |
45 |
dX0l = 0.; |
dX0l = 0.; |
46 |
for (Int_t i = 0; i<2 ; i++){ |
memset(tbar, 0, 2*22*sizeof(Float_t)); |
47 |
for ( Int_t j = 0; j<22; j++){ |
memset(tibar, 0, 2*22*sizeof(Int_t)); |
|
tibar[j][i] = 0; |
|
|
tbar[j][i] = 0.; |
|
|
}; |
|
|
}; |
|
48 |
} |
} |
49 |
|
|
50 |
/** |
/** |
85 |
CaloLevel2::CaloLevel2() { |
CaloLevel2::CaloLevel2() { |
86 |
// |
// |
87 |
CaloTrk = new TClonesArray("CaloTrkVar",1); |
CaloTrk = new TClonesArray("CaloTrkVar",1); |
88 |
|
estrip = TArrayF(0,NULL); |
89 |
|
// |
90 |
|
this->Clear(); |
91 |
|
// |
92 |
|
}; |
93 |
|
|
94 |
|
void CaloLevel2::Clear() { |
95 |
|
// |
96 |
|
CaloTrk->Clear(); |
97 |
// |
// |
98 |
nstrip = 0; |
nstrip = 0; |
99 |
qtot = 0.; |
qtot = 0.; |
106 |
qx22 = 0.; |
qx22 = 0.; |
107 |
elen = 0.; |
elen = 0.; |
108 |
selen = 0.; |
selen = 0.; |
109 |
for (Int_t i = 0; i<4 ; i++){ |
memset(perr, 0, 4*sizeof(Int_t)); |
110 |
qq[i] = 0.; |
memset(swerr, 0, 4*sizeof(Int_t)); |
111 |
perr[i] = 0; |
memset(crc, 0, 4*sizeof(Int_t)); |
112 |
swerr[i] = 0; |
memset(qq, 0, 4*sizeof(Int_t)); |
113 |
crc[i] = 0; |
memset(varcfit, 0, 2*sizeof(Float_t)); |
114 |
if ( i < 2 ){ |
memset(npcfit, 0, 2*sizeof(Int_t)); |
115 |
planemax[i] = 0; |
memset(planemax, 0, 2*sizeof(Int_t)); |
116 |
varcfit[i] = 0.; |
memset(cibar, 0, 2*22*sizeof(Int_t)); |
117 |
npcfit[i] = 0; |
memset(cbar, 0, 2*22*sizeof(Float_t)); |
|
for ( Int_t j = 0; j<22; j++){ |
|
|
cibar[j][i] = 0; |
|
|
cbar[j][i] = 0.; |
|
|
}; |
|
|
}; |
|
|
}; |
|
118 |
good = 0; |
good = 0; |
119 |
selftrigger = 0; |
selftrigger = 0; |
120 |
estrip = TArrayF(0,NULL); |
estrip.Reset(); |
121 |
}; |
}; |
122 |
|
|
123 |
|
|
124 |
|
/** |
125 |
|
* Fills a struct cCaloLevel2 with values from a CaloLevel2 object (to put data into a F77 common). |
126 |
|
*/ |
127 |
|
void CaloLevel2::GetLevel2Struct(cCaloLevel2 *l2) const { |
128 |
|
|
129 |
|
l2->good = good; |
130 |
|
l2->selftrigger = selftrigger; |
131 |
|
l2->nstrip = nstrip; |
132 |
|
l2->nx22 = nx22; |
133 |
|
l2->qtot = qtot; |
134 |
|
l2->qx22 = qx22; |
135 |
|
l2->qmax = qmax; |
136 |
|
l2->impx = impx; |
137 |
|
l2->impy = impy; |
138 |
|
l2->tanx = tanx; |
139 |
|
l2->tany = tany; |
140 |
|
l2->elen = elen; |
141 |
|
l2->selen = selen; |
142 |
|
|
143 |
|
for(Int_t i=0;i<2;i++){ |
144 |
|
l2->planemax[i] = planemax[i]; |
145 |
|
l2->varcfit[i] = varcfit[i]; |
146 |
|
l2->npcfit[i] = npcfit[i]; |
147 |
|
} |
148 |
|
for(Int_t i=0;i<4;i++){ |
149 |
|
l2->perr[i] = perr[i]; |
150 |
|
l2->swerr[i] = swerr[i]; |
151 |
|
l2->calcrc[i] = crc[i]; |
152 |
|
l2->qq[i] = qq[i]; |
153 |
|
} |
154 |
|
|
155 |
|
l2->calntrk = CaloTrk->GetEntries(); |
156 |
|
|
157 |
|
for(Int_t i=0;i<l2->calntrk;i++){ |
158 |
|
l2->caltrkseqno[i] = ((CaloTrkVar *)CaloTrk->At(i))->trkseqno; |
159 |
|
l2->ncore[i] = ((CaloTrkVar *)CaloTrk->At(i))->ncore; |
160 |
|
l2->noint[i] = ((CaloTrkVar *)CaloTrk->At(i))->noint; |
161 |
|
l2->ncyl[i] = ((CaloTrkVar *)CaloTrk->At(i))->ncyl; |
162 |
|
l2->nlast[i] = ((CaloTrkVar *)CaloTrk->At(i))->nlast; |
163 |
|
l2->npre[i] = ((CaloTrkVar *)CaloTrk->At(i))->npre; |
164 |
|
l2->npresh[i] = ((CaloTrkVar *)CaloTrk->At(i))->npresh; |
165 |
|
l2->ntr[i] = ((CaloTrkVar *)CaloTrk->At(i))->ntr; |
166 |
|
l2->planetot[i] = ((CaloTrkVar *)CaloTrk->At(i))->planetot; |
167 |
|
l2->nlow[i] = ((CaloTrkVar *)CaloTrk->At(i))->nlow; |
168 |
|
l2->qcore[i] =((CaloTrkVar *)CaloTrk->At(i))->qcore ; |
169 |
|
l2->qcyl[i] = ((CaloTrkVar *)CaloTrk->At(i))->qcyl; |
170 |
|
l2->qlast[i] = ((CaloTrkVar *)CaloTrk->At(i))->qlast; |
171 |
|
l2->qpre[i] = ((CaloTrkVar *)CaloTrk->At(i))->qpre; |
172 |
|
l2->qpresh[i] = ((CaloTrkVar *)CaloTrk->At(i))->qpresh; |
173 |
|
l2->qtr[i] = ((CaloTrkVar *)CaloTrk->At(i))->qtr; |
174 |
|
l2->qtrack[i] = ((CaloTrkVar *)CaloTrk->At(i))->qtrack; |
175 |
|
l2->qtrackx[i] = ((CaloTrkVar *)CaloTrk->At(i))->qtrackx; |
176 |
|
l2->qtracky[i] = ((CaloTrkVar *)CaloTrk->At(i))->qtracky; |
177 |
|
l2->dxtrack[i] = ((CaloTrkVar *)CaloTrk->At(i))->dxtrack; |
178 |
|
l2->dytrack[i] = ((CaloTrkVar *)CaloTrk->At(i))->dytrack; |
179 |
|
l2->qmean[i] = ((CaloTrkVar *)CaloTrk->At(i))->qmean; |
180 |
|
l2->qlow[i] = ((CaloTrkVar *)CaloTrk->At(i))->qlow; |
181 |
|
l2->dX0l[i] = ((CaloTrkVar *)CaloTrk->At(i))->dX0l; |
182 |
|
for (Int_t j=0; j<2; j++){ |
183 |
|
for (Int_t k=0; k<22; k++){ |
184 |
|
l2->tbar[i][k][j] = ((CaloTrkVar *)CaloTrk->At(i))->tbar[k][j]; |
185 |
|
}; |
186 |
|
}; |
187 |
|
} |
188 |
|
|
189 |
|
} |
190 |
|
|
191 |
/** |
/** |
192 |
* Gives the detected energy for the given strip once loaded the event |
* Gives the detected energy for the given strip once loaded the event |
193 |
**/ |
**/ |