41 |
rigdefault = 50.; |
rigdefault = 50.; |
42 |
nox = false; |
nox = false; |
43 |
noy = false; |
noy = false; |
44 |
|
forcecalo = false; |
45 |
|
memset(mask,0,2*22*sizeof(Int_t)); |
46 |
// |
// |
47 |
Clear(); |
Clear(); |
48 |
// |
// |
95 |
}; |
}; |
96 |
} |
} |
97 |
|
|
98 |
|
void CaloPreSampler::SplitInto(Int_t NoWpreSampler, Int_t NoWcalo){ |
99 |
|
this->SetNoWcalo(0); |
100 |
|
this->SetNoWpreSampler(0); |
101 |
|
if ( NoWpreSampler < NoWcalo ){ |
102 |
|
this->SetNoWpreSampler(NoWpreSampler); |
103 |
|
this->SetNoWcalo(NoWcalo); |
104 |
|
} else { |
105 |
|
this->SetNoWcalo(NoWcalo); |
106 |
|
this->SetNoWpreSampler(NoWpreSampler); |
107 |
|
}; |
108 |
|
} |
109 |
|
|
110 |
void CaloPreSampler::Clear(){ |
void CaloPreSampler::Clear(){ |
111 |
// |
// |
112 |
pcalo->Clear(); |
pcalo->Clear(); |
213 |
// |
// |
214 |
// Mask x or y view if nox and/or noy are true (default false) |
// Mask x or y view if nox and/or noy are true (default false) |
215 |
// |
// |
216 |
|
if ( mask[view][plane] ) mip = 0.; |
217 |
if ( nox && view == 0 ) mip = 0.; |
if ( nox && view == 0 ) mip = 0.; |
218 |
if ( noy && view == 1 ) mip = 0.; |
if ( noy && view == 1 ) mip = 0.; |
219 |
// |
// |
220 |
|
if ( emulate18 && view == 0 && plane == 18 ) mip = 0.; |
221 |
|
// |
222 |
// Selection mode: fill the matrix only for plane < (22 - N) REMEMBER N = number of W planes to be used as presampler, ie if N = 2 then we want to use planes from 0 to 19 |
// Selection mode: fill the matrix only for plane < (22 - N) REMEMBER N = number of W planes to be used as presampler, ie if N = 2 then we want to use planes from 0 to 19 |
223 |
// included so plane < (22 - 2) |
// included so plane < (22 - 2) |
224 |
// |
// |
225 |
if ( sel ){ |
if ( sel ){ |
226 |
if ( plane < (22 - N) ){ |
if ( plane < (22 - N) ){ |
227 |
// |
// |
228 |
if ( emulate18 && plane == (18 - N) ) mip = 0.; |
if ( emulate18 && plane == (18 - N) && view == 0 ) mip = 0.; |
229 |
if ( plane >= NC ) mip = 0.; |
if ( plane >= NC ) mip = 0.; |
230 |
event->clevel1->estrip[strip][plane][view] = mip; |
event->clevel1->estrip[strip][plane][view] = mip; |
231 |
// |
// |
237 |
if ( cont ){ |
if ( cont ){ |
238 |
if ( plane >= N ){ |
if ( plane >= N ){ |
239 |
// |
// |
240 |
if ( emulate18 && plane == (18 + N) ) mip = 0.; |
if ( emulate18 && plane == (18 + N) && view == 0 ) mip = 0.; |
241 |
if ( (plane-N) >= NC ) mip = 0.; |
if ( (plane-N) >= NC ) mip = 0.; |
242 |
event->clevel1->estrip[strip][(plane-N)][view] = mip; |
event->clevel1->estrip[strip][(plane-N)][view] = mip; |
243 |
// |
// |
374 |
// conditions are: 0) no track from the tracker 1) we have a track fit both in x and y 2) no problems with calo for this event 3) no selftrigger event |
// conditions are: 0) no track from the tracker 1) we have a track fit both in x and y 2) no problems with calo for this event 3) no selftrigger event |
375 |
// |
// |
376 |
// if ( trackanyway && !filled && event->clevel2->npcfit[0] >= 2 && event->clevel2->npcfit[1] >= 2 && event->clevel2->good != 0 && event->clevel2->trigty < 2. ){ |
// if ( trackanyway && !filled && event->clevel2->npcfit[0] >= 2 && event->clevel2->npcfit[1] >= 2 && event->clevel2->good != 0 && event->clevel2->trigty < 2. ){ |
377 |
if ( trackanyway && m3 ){ |
if ( (trackanyway && m3) || forcecalo ){ |
378 |
if ( debug ) printf(" Event with a track not fitted by the tracker \n"); |
if ( debug ) printf(" Event with a track not fitted by the tracker \n"); |
379 |
// |
// |
380 |
// Disable "track mode" in the fortran routine |
// Disable "track mode" in the fortran routine |