82 |
|
|
83 |
void CaloLevel0::SetCrossTalk(Bool_t ct){ |
void CaloLevel0::SetCrossTalk(Bool_t ct){ |
84 |
crosst = ct; |
crosst = ct; |
85 |
}; |
} |
86 |
|
|
87 |
void CaloLevel0::SetCrossTalkType(Bool_t ct){ |
void CaloLevel0::SetCrossTalkType(Bool_t ct){ |
88 |
ctground = ct; |
ctground = ct; |
89 |
}; |
} |
90 |
|
|
91 |
void CaloLevel0::SetVerbose(Bool_t ct){ |
void CaloLevel0::SetVerbose(Bool_t ct){ |
92 |
verbose = ct; |
verbose = ct; |
93 |
}; |
} |
94 |
|
|
95 |
/** |
/** |
96 |
* Initialize CaloLevel0 object |
* Initialize CaloLevel0 object |
307 |
fread(&tmp,sizeof(clevel1->xalig),1,f); |
fread(&tmp,sizeof(clevel1->xalig),1,f); |
308 |
fread(&tmp,sizeof(clevel1->yalig),1,f); |
fread(&tmp,sizeof(clevel1->yalig),1,f); |
309 |
fread(&tmp,sizeof(clevel1->zalig),1,f); |
fread(&tmp,sizeof(clevel1->zalig),1,f); |
310 |
|
// clevel1->zalig = -265.82; |
311 |
// |
// |
312 |
}; |
}; |
313 |
fread(&clevel1->emin,sizeof(clevel1->emin),1,f); |
fread(&clevel1->emin,sizeof(clevel1->emin),1,f); |
726 |
}; |
}; |
727 |
// |
// |
728 |
return(0); |
return(0); |
729 |
}; |
} |
730 |
|
|
731 |
void CaloLevel0::FindBaseRaw(Int_t l, Int_t m, Int_t pre){ |
void CaloLevel0::FindBaseRaw(Int_t l, Int_t m, Int_t pre){ |
732 |
Float_t minstrip = 100000.; |
Float_t minstrip = 100000.; |
782 |
// |
// |
783 |
// if it was not a selftrigger event, could it ever been a selftrigger event? if so trigty = 3. |
// if it was not a selftrigger event, could it ever been a selftrigger event? if so trigty = 3. |
784 |
// |
// |
785 |
|
clevel2->nsatstrip = 0.; |
786 |
Int_t val = 0; |
Int_t val = 0; |
787 |
Int_t del = 1100; |
Int_t del = 1100; |
788 |
for (Int_t sec = 0; sec < 4; sec++){ |
for (Int_t sec = 0; sec < 4; sec++){ |
1089 |
if ( obadmask[l][m][j4] == 1 || clevel1->estrip[j4][m][l] <= clevel1->emin || calrms[l][m][j4] > 26 ){ |
if ( obadmask[l][m][j4] == 1 || clevel1->estrip[j4][m][l] <= clevel1->emin || calrms[l][m][j4] > 26 ){ |
1090 |
clevel1->estrip[j4][m][l] = 0.; |
clevel1->estrip[j4][m][l] = 0.; |
1091 |
}; |
}; |
1092 |
// |
// |
1093 |
// code and save the energy for each strip in svstrip |
// code and save the energy for each strip in svstrip |
1094 |
// |
// |
1095 |
if ( clevel1->estrip[j4][m][l] > clevel1->emin ){ |
if ( clevel1->estrip[j4][m][l] > clevel1->emin ){ |
1096 |
// |
// |
1097 |
|
Float_t savel1 = clevel1->estrip[j4][m][l]; |
1098 |
|
if ( dexyc[l][m][j4] == 32767. ){ |
1099 |
|
savel1 += 5000.; |
1100 |
|
clevel2->nsatstrip += 1.; |
1101 |
|
}; |
1102 |
|
// |
1103 |
tim = 100000.; |
tim = 100000.; |
1104 |
plo = m; |
plo = m; |
1105 |
fbi = 0; |
fbi = 0; |
1106 |
if ( clevel1->estrip[j4][m][l] > 0.99995 ){ |
if ( savel1 > 0.99995 ){ |
1107 |
tim = 10000.; |
tim = 10000.; |
1108 |
plo = m; |
plo = m; |
1109 |
fbi = 1; |
fbi = 1; |
1110 |
}; |
}; |
1111 |
if ( clevel1->estrip[j4][m][l] > 9.9995 ){ |
if ( savel1 > 9.9995 ){ |
1112 |
tim = 1000.; |
tim = 1000.; |
1113 |
plo = 22 + m; |
plo = 22 + m; |
1114 |
fbi = 1; |
fbi = 1; |
1115 |
}; |
}; |
1116 |
if ( clevel1->estrip[j4][m][l] > 99.995 ){ |
if ( savel1 > 99.995 ){ |
1117 |
tim = 100.; |
tim = 100.; |
1118 |
plo = 22 + m; |
plo = 22 + m; |
1119 |
fbi = 0; |
fbi = 0; |
1120 |
}; |
}; |
1121 |
if ( clevel1->estrip[j4][m][l] > 999.95 ){ |
if ( savel1 > 999.95 ){ |
1122 |
tim = 10.; |
tim = 10.; |
1123 |
plo = 44 + m; |
plo = 44 + m; |
1124 |
fbi = 0; |
fbi = 0; |
1125 |
}; |
}; |
1126 |
if ( clevel1->estrip[j4][m][l] > 9999.5 ){ |
if ( savel1 > 9999.5 ){ |
1127 |
tim = 1.; |
tim = 1.; |
1128 |
plo = 66 + m; |
plo = 66 + m; |
1129 |
fbi = 0; |
fbi = 0; |
1130 |
}; |
}; |
1131 |
// |
// |
1132 |
cle = (Int_t)lroundf(tim*clevel1->estrip[j4][m][l]); |
cle = (Int_t)lroundf(tim*savel1); |
1133 |
// |
// |
1134 |
if ( l == 0 ){ |
if ( l == 0 ){ |
1135 |
// |
// |
1250 |
memcpy(ca->swerr,clevel2->swerr,sizeof(clevel2->swerr)); |
memcpy(ca->swerr,clevel2->swerr,sizeof(clevel2->swerr)); |
1251 |
memcpy(ca->crc,clevel2->crc,sizeof(clevel2->crc)); |
memcpy(ca->crc,clevel2->crc,sizeof(clevel2->crc)); |
1252 |
ca->nstrip = (Int_t)clevel2->nstrip; |
ca->nstrip = (Int_t)clevel2->nstrip; |
1253 |
|
ca->nsatstrip = (Int_t)clevel2->nsatstrip; |
1254 |
ca->qtot = clevel2->qtot; |
ca->qtot = clevel2->qtot; |
1255 |
// ca->impx = clevel2->impx; |
// ca->impx = clevel2->impx; |
1256 |
// ca->impy = clevel2->impy; |
// ca->impy = clevel2->impy; |
1341 |
clevel2->wartrig = 0.; |
clevel2->wartrig = 0.; |
1342 |
clevel2->good = 0; |
clevel2->good = 0; |
1343 |
clevel2->nstrip = 0.; |
clevel2->nstrip = 0.; |
1344 |
|
clevel2->nsatstrip = 0.; |
1345 |
clevel2->qtot = 0.; |
clevel2->qtot = 0.; |
1346 |
// clevel2->impx = 0.; |
// clevel2->impx = 0.; |
1347 |
// clevel2->impy = 0.; |
// clevel2->impy = 0.; |