| 70 |
/** |
/** |
| 71 |
* Clear variables |
* Clear variables |
| 72 |
**/ |
**/ |
| 73 |
void CaloStrip::Clear() { |
void CaloStrip::Clear(Option_t *t) { |
| 74 |
fE = 0.; |
fE = 0.; |
| 75 |
fX = 0.; |
fX = 0.; |
| 76 |
fY = 0.; |
fY = 0.; |
| 143 |
// |
// |
| 144 |
}; |
}; |
| 145 |
dbc->Close(); |
dbc->Close(); |
| 146 |
|
delete dbc; |
| 147 |
|
dbc = 0; |
| 148 |
}; |
}; |
| 149 |
if ( !UXal ){ |
if ( !UXal ){ |
| 150 |
// |
// |
| 315 |
}; |
}; |
| 316 |
|
|
| 317 |
/** |
/** |
| 318 |
|
* Given a point in the space or a strip it returns the Silicon sensor number. Numbering goes like this: |
| 319 |
|
* |
| 320 |
|
* y ^ |
| 321 |
|
* | |
| 322 |
|
* | 6 7 8 |
| 323 |
|
* | 3 4 5 |
| 324 |
|
* | 0 1 2 |
| 325 |
|
* | -----------> x |
| 326 |
|
* |
| 327 |
|
**/ |
| 328 |
|
Int_t CaloStrip::GetSiSensor() { |
| 329 |
|
// |
| 330 |
|
// fX fY fZ // fView fPlane |
| 331 |
|
// |
| 332 |
|
Float_t deadsi = 0.096; |
| 333 |
|
Float_t dead = 0.05; |
| 334 |
|
Float_t sidim = 8.00; |
| 335 |
|
// Float_t stripdim = 0.244; |
| 336 |
|
Float_t sensitarea = 7.808; |
| 337 |
|
// |
| 338 |
|
Float_t xoffset = 0.; |
| 339 |
|
Float_t yoffset = 0.; |
| 340 |
|
// |
| 341 |
|
if ( (fView-1) == 0 && !((fPlane-1)%2) ){ |
| 342 |
|
xoffset = +0.05; |
| 343 |
|
yoffset = 0.0; |
| 344 |
|
}; |
| 345 |
|
if ( (fView-1) == 0 && ((fPlane-1)%2) ){ |
| 346 |
|
xoffset = -0.05; |
| 347 |
|
yoffset = -0.20; |
| 348 |
|
}; |
| 349 |
|
if ( (fView-1) == 1 && !((fPlane-1)%2) ){ |
| 350 |
|
xoffset = +0.10; |
| 351 |
|
yoffset = -0.05; |
| 352 |
|
}; |
| 353 |
|
if ( (fView-1) == 1 && ((fPlane-1)%2) ){ |
| 354 |
|
xoffset = -0.10; |
| 355 |
|
yoffset = -0.15; |
| 356 |
|
}; |
| 357 |
|
// |
| 358 |
|
Int_t iind = -1; |
| 359 |
|
Int_t jind = -1; |
| 360 |
|
// |
| 361 |
|
for (Int_t i = 0; i < 3; i++){ |
| 362 |
|
if ( (fX+xoffset+12.1) >= (deadsi+(sidim+dead)*i) && (fX+xoffset+12.1) <= (sensitarea+deadsi+(sidim+dead)*i) ){ |
| 363 |
|
iind = i; |
| 364 |
|
break; |
| 365 |
|
}; |
| 366 |
|
}; |
| 367 |
|
// |
| 368 |
|
for (Int_t j = 0; j < 3; j++){ |
| 369 |
|
if ( (fY+yoffset+12.1) >= (deadsi+(sidim+dead)*j) && (fY+yoffset+12.1) <= (sensitarea+deadsi+(sidim+dead)*j) ){ |
| 370 |
|
jind = j; |
| 371 |
|
break; |
| 372 |
|
}; |
| 373 |
|
}; |
| 374 |
|
// |
| 375 |
|
Int_t sensor = -1; |
| 376 |
|
if ( iind != -1 && jind != -1 ){ |
| 377 |
|
sensor = iind + jind * 3; |
| 378 |
|
}; |
| 379 |
|
// |
| 380 |
|
// printf(" View %i Plane %i x %f y %f z %f xoffset %f yoffset %f iind %i jind %i \n",fView,fPlane,fX,fY,fZ,xoffset,yoffset,iind,jind); |
| 381 |
|
// |
| 382 |
|
return(sensor); |
| 383 |
|
// |
| 384 |
|
}; |
| 385 |
|
|
| 386 |
|
/** |
| 387 |
* CaloLevel1 constructor |
* CaloLevel1 constructor |
| 388 |
**/ |
**/ |
| 389 |
CaloLevel1::CaloLevel1() { |
CaloLevel1::CaloLevel1() { |
| 397 |
/** |
/** |
| 398 |
* Clear the CaloLevel1 object |
* Clear the CaloLevel1 object |
| 399 |
**/ |
**/ |
| 400 |
void CaloLevel1::Clear() { |
void CaloLevel1::Clear(Option_t *t) { |
| 401 |
// |
// |
| 402 |
istrip = 0; |
istrip = 0; |
| 403 |
estrip.Reset(); |
estrip.Reset(); |
| 492 |
// |
// |
| 493 |
strip = (Int_t)truncf((Float_t)((eval - fbi*1000000000 -plom*10000000)/100000)); |
strip = (Int_t)truncf((Float_t)((eval - fbi*1000000000 -plom*10000000)/100000)); |
| 494 |
// |
// |
| 495 |
Float_t mip = ((Float_t)(eval - fbi*1000000000 -plom*10000000 -strip*100000))/tim; |
Double_t mip = (Double_t)(((Float_t)(eval - fbi*1000000000 -plom*10000000 -strip*100000))/tim); |
| 496 |
// |
// |
| 497 |
saturated = false; |
saturated = false; |
| 498 |
if ( mip > 5000. ){ |
if ( mip > 5000. ){ |
| 499 |
mip -= 5000.; |
mip -= 5000.; |
| 500 |
saturated = true; |
saturated = true; |
| 501 |
}; |
}; |
| 502 |
if ( mip > 0. && mip < 99999. ) return(mip); |
if ( mip > 0. && mip < 99999. ) return((Float_t)mip); |
| 503 |
// |
// |
| 504 |
printf(" ERROR: problems decoding value %i at entry %i \n",estrip.At(entry),entry); |
printf(" ERROR: problems decoding value %i at entry %i \n",estrip.At(entry),entry); |
| 505 |
// |
// |
| 527 |
Int_t sview = 1; |
Int_t sview = 1; |
| 528 |
if ( nplane%2 ) sview = 0; |
if ( nplane%2 ) sview = 0; |
| 529 |
// |
// |
| 530 |
Int_t splane = nplane-(sview+1)/2; |
// Int_t splane = nplane-(sview+1)/2; |
| 531 |
|
Int_t splane = (nplane+sview-1)/2; |
| 532 |
// |
// |
| 533 |
Float_t totmip = qtotpl(sview,splane,sat); |
Float_t totmip = qtotpl(sview,splane,sat); |
| 534 |
// |
// |
| 568 |
if ( view == sview && splane == plane ){ |
if ( view == sview && splane == plane ){ |
| 569 |
if ( lsat ) sat = true; |
if ( lsat ) sat = true; |
| 570 |
totmip += mip; |
totmip += mip; |
| 571 |
|
//printf(" totmip %f mip %f \n",totmip,mip); |
| 572 |
}; |
}; |
| 573 |
// |
// |
| 574 |
// entry are ordered by strip, plane and view number. Go out if you pass the input strip |
// entry are ordered by strip, plane and view number. Go out if you pass the input strip |