14 |
Clear(); |
Clear(); |
15 |
} |
} |
16 |
|
|
17 |
|
void CaloPreSampler::SetCaloLevel2Pointer(CaloLevel2 *cl2p){ |
18 |
|
if ( pcalo ) delete pcalo; |
19 |
|
pcalo = cl2p; |
20 |
|
} |
21 |
|
|
22 |
CaloPreSampler::CaloPreSampler(PamLevel2 *l2p){ |
CaloPreSampler::CaloPreSampler(PamLevel2 *l2p){ |
23 |
// |
// |
24 |
L2 = l2p; |
L2 = l2p; |
41 |
sel = true; |
sel = true; |
42 |
cont = false; |
cont = false; |
43 |
emulate18 = true; |
emulate18 = true; |
44 |
|
usepl18x = false; |
45 |
simulation = false; |
simulation = false; |
46 |
withtrk = true; |
withtrk = true; |
47 |
rigdefault = 50.; |
rigdefault = 50.; |
48 |
nox = false; |
nox = false; |
49 |
noy = false; |
noy = false; |
50 |
forcecalo = false; |
forcecalo = false; |
51 |
|
forcefitmode = -1; |
52 |
memset(mask,0,2*22*sizeof(Int_t)); |
memset(mask,0,2*22*sizeof(Int_t)); |
53 |
// |
// |
54 |
Clear(); |
Clear(); |
78 |
// |
// |
79 |
} |
} |
80 |
|
|
81 |
|
CaloTrkVar* CaloPreSampler::GetCaloTrack(Int_t t){ |
82 |
|
this->Process(); |
83 |
|
if ( t < 0 ) return pcalo->GetCaloStoredTrack(t); |
84 |
|
if ( L2->GetTrack(t) ){ |
85 |
|
return pcalo->GetCaloStoredTrack(L2->GetTrack(t)->GetTrkTrack()->GetSeqNo()); |
86 |
|
}; |
87 |
|
return NULL; |
88 |
|
} |
89 |
|
|
90 |
void CaloPreSampler::SetNoWpreSampler(Int_t n){ |
void CaloPreSampler::SetNoWpreSampler(Int_t n){ |
91 |
if ( NC+n < 23 ){ |
if ( NC+n < 23 ){ |
92 |
N = n; |
N = n; |
169 |
// Clear structures used to communicate with fortran |
// Clear structures used to communicate with fortran |
170 |
// |
// |
171 |
event->ClearStructs();//ELENA |
event->ClearStructs();//ELENA |
172 |
|
if ( forcefitmode > 0 ){ |
173 |
|
if ( forcefitmode != 1000 && forcefitmode != 1001 && forcefitmode != 1002 ){ |
174 |
|
printf(" ERROR! forcefitmode=%i \n Use forcefitmode = 1000 for fit mode 0, 1001 fit mode 1, 1002 fit mode 3\n",forcefitmode); |
175 |
|
forcefitmode = -1; |
176 |
|
} else { |
177 |
|
event->clevel2->fmode[0] = forcefitmode; |
178 |
|
event->clevel2->fmode[1] = forcefitmode; |
179 |
|
}; |
180 |
|
}; |
181 |
// |
// |
182 |
Bool_t newentry = false; |
Bool_t newentry = false; |
183 |
// |
// |
184 |
if ( L2->IsORB() ){ |
if ( L2->IsORB() ){ |
185 |
|
if ( debug ) printf(" I am here, we have orbital infos \n"); |
186 |
if ( L2->GetOrbitalInfo()->pkt_num != PKT || L2->GetOrbitalInfo()->OBT != OBT || L2->GetOrbitalInfo()->absTime != atime || sel != ssel ){ |
if ( L2->GetOrbitalInfo()->pkt_num != PKT || L2->GetOrbitalInfo()->OBT != OBT || L2->GetOrbitalInfo()->absTime != atime || sel != ssel ){ |
187 |
newentry = true; |
newentry = true; |
188 |
OBT = L2->GetOrbitalInfo()->OBT; |
OBT = L2->GetOrbitalInfo()->OBT; |
241 |
// |
// |
242 |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
243 |
// |
// |
244 |
|
if ( !usepl18x && view==0 && plane==18 ) mip = 0.; |
245 |
|
// |
246 |
// 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) |
247 |
// |
// |
248 |
if ( mask[view][plane] ) mip = 0.; |
if ( mask[view][plane] ) mip = 0.; |