| 7 |
/** |
/** |
| 8 |
* Default constructor |
* Default constructor |
| 9 |
*/ |
*/ |
| 10 |
CaloNuclei::CaloNuclei(){ |
// CaloNuclei::CaloNuclei(){ |
| 11 |
Clear(); |
// Clear(); |
| 12 |
}; |
// }; |
| 13 |
|
|
| 14 |
CaloNuclei::CaloNuclei(PamLevel2 *l2p){ |
CaloNuclei::CaloNuclei(PamLevel2 *l2p,const char* alg){ |
| 15 |
// |
// |
| 16 |
Clear(); |
Clear(); |
| 17 |
// |
// |
| 28 |
debug = false; |
debug = false; |
| 29 |
// debug = true; |
// debug = true; |
| 30 |
usetrack = true; |
usetrack = true; |
| 31 |
|
usepl18x = false; |
| 32 |
|
trkAlg = alg; |
| 33 |
// |
// |
| 34 |
}; |
}; |
| 35 |
|
|
| 148 |
// |
// |
| 149 |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
| 150 |
// |
// |
| 151 |
|
if ( !usepl18x && view==0 && plane==18 ) mip = 0.; |
| 152 |
|
// |
| 153 |
|
// |
| 154 |
// put in vfpl vector the energy release on the first plane |
// put in vfpl vector the energy release on the first plane |
| 155 |
// |
// |
| 156 |
if ( strip != -1 && view == 1 && plane == 0 ) { |
if ( strip != -1 && view == 1 && plane == 0 ) { |
| 191 |
// |
// |
| 192 |
if ( usetrack ){ |
if ( usetrack ){ |
| 193 |
if ( ntr >= 0 ){ |
if ( ntr >= 0 ){ |
| 194 |
ptrack = L2->GetTrack(ntr); |
ptrack = L2->GetTrack(ntr,trkAlg); |
| 195 |
if ( ptrack ) track = ptrack->GetCaloTrack(); |
if ( ptrack ) track = ptrack->GetCaloTrack(); |
| 196 |
} else { |
} else { |
| 197 |
track = L2->GetCaloStoredTrack(ntr); |
track = L2->GetCaloStoredTrack(ntr); |
| 198 |
}; |
}; |
| 199 |
// |
// |
| 200 |
if ( !track && ntr >= 0 ){ |
if ( !track && ntr >= 0 ){ |
| 201 |
printf(" ERROR: cannot find any track!\n"); |
printf(" ERROR: cannot find any track! \n"); |
| 202 |
|
cout << "ERROR: trk.algorythm --> "<<trkAlg<<endl; |
| 203 |
printf(" ERROR: CaloNuclei variables not completely filled \n"); |
printf(" ERROR: CaloNuclei variables not completely filled \n"); |
| 204 |
return; |
return; |
| 205 |
}; |
}; |
| 220 |
// |
// |
| 221 |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
| 222 |
// |
// |
| 223 |
|
if ( !usepl18x && view==0 && plane==18 ) mip = 0.; |
| 224 |
|
// |
| 225 |
if ( ntr >= 0 ){ |
if ( ntr >= 0 ){ |
| 226 |
// |
// |
| 227 |
if ( strip != -1 && |
if ( strip != -1 && |
| 291 |
// |
// |
| 292 |
mip = L2->GetCaloLevel1()->DecodeEstrip(ii,view,plane,strip); |
mip = L2->GetCaloLevel1()->DecodeEstrip(ii,view,plane,strip); |
| 293 |
// |
// |
| 294 |
|
if ( !usepl18x && view==0 && plane==18 ) mip = 0.; |
| 295 |
|
// |
| 296 |
|
// |
| 297 |
if ( ntr >= 0 ){ |
if ( ntr >= 0 ){ |
| 298 |
if ( strip != -1 && mip > ethr && !wmulthit[view] && !wgap[view] && |
if ( strip != -1 && mip > ethr && !wmulthit[view] && !wgap[view] && |
| 299 |
( strip == (track->tibar[plane][view]-1) || strip == (track->tibar[plane][view]-2) || strip == (track->tibar[plane][view]) ) |
( strip == (track->tibar[plane][view]-1) || strip == (track->tibar[plane][view]-2) || strip == (track->tibar[plane][view]) ) |
| 422 |
// |
// |
| 423 |
mip = L2->GetCaloLevel1()->DecodeEstrip(ii,view,plane,strip); |
mip = L2->GetCaloLevel1()->DecodeEstrip(ii,view,plane,strip); |
| 424 |
// |
// |
| 425 |
|
if ( !usepl18x && view==0 && plane==18 ) mip = 0.; |
| 426 |
|
// |
| 427 |
|
// |
| 428 |
if ( strip != -1 ){ |
if ( strip != -1 ){ |
| 429 |
if ( view == 0 ){ |
if ( view == 0 ){ |
| 430 |
ipl = (1 + plane) * 2; |
ipl = (1 + plane) * 2; |
| 634 |
Float_t beta = 100.; |
Float_t beta = 100.; |
| 635 |
|
|
| 636 |
//------- First try track dependent beta |
//------- First try track dependent beta |
| 637 |
if( L2->GetTrkLevel2()->GetNTracks()>=1 ){ |
if( L2->GetNTracks(trkAlg)>=1 ){ |
| 638 |
PamTrack *TRKtrack = L2->GetTrack(0); |
PamTrack *TRKtrack = L2->GetTrack(0,trkAlg); |
| 639 |
if (fabs(TRKtrack->GetToFTrack()->beta[12]) < 100.) beta = fabs(TRKtrack->GetToFTrack()->beta[12]); |
if (fabs(TRKtrack->GetToFTrack()->beta[12]) < 100.) beta = fabs(TRKtrack->GetToFTrack()->beta[12]); |
| 640 |
} |
} |
| 641 |
//------- If no beta found, try standalone beta |
//------- If no beta found, try standalone beta |
| 743 |
if (beta<2.) { // it makes no sense to allow beta=5 or so... |
if (beta<2.) { // it makes no sense to allow beta=5 or so... |
| 744 |
|
|
| 745 |
|
|
| 746 |
if( L2->GetTrkLevel2()->GetNTracks()>=1 ){ |
if( L2->GetNTracks(trkAlg)>=1 ){ |
| 747 |
mip=dedx1; |
mip=dedx1; |
| 748 |
} |
} |
| 749 |
if (mip==0) mip=stdedx1; |
if (mip==0) mip=stdedx1; |
| 792 |
|
|
| 793 |
if (beta<2.) { // it makes no sense to allow beta=5 or so... |
if (beta<2.) { // it makes no sense to allow beta=5 or so... |
| 794 |
|
|
| 795 |
if( L2->GetTrkLevel2()->GetNTracks()>=1 ){ |
if( L2->GetNTracks(trkAlg)>=1 ){ |
| 796 |
PamTrack *TRKtrack = L2->GetTrack(0); |
PamTrack *TRKtrack = L2->GetTrack(0,trkAlg); |
| 797 |
mip=dedx1; |
mip=dedx1; |
| 798 |
if (mip==0) mip=stdedx1; |
if (mip==0) mip=stdedx1; |
| 799 |
defl=TRKtrack->GetTrkTrack()->al[4]; |
defl=TRKtrack->GetTrkTrack()->al[4]; |
| 841 |
|
|
| 842 |
if (beta<2.) { // it makes no sense to allow beta=5 or so... |
if (beta<2.) { // it makes no sense to allow beta=5 or so... |
| 843 |
|
|
| 844 |
if( L2->GetTrkLevel2()->GetNTracks()>=1 ){ |
if( L2->GetNTracks(trkAlg)>=1 ){ |
| 845 |
mip=qNmin1; |
mip=qNmin1; |
| 846 |
|
|
| 847 |
if (mip>0 && defl<0.7 && defl>0) { |
if (mip>0 && defl<0.7 && defl>0) { |