| 459 |
// |
// |
| 460 |
no18x = true; |
no18x = true; |
| 461 |
debug = false; |
debug = false; |
| 462 |
|
maskXE = false; |
| 463 |
|
maskXO = false; |
| 464 |
|
maskYE = false; |
| 465 |
|
maskYO = false; |
| 466 |
// |
// |
| 467 |
}; |
}; |
| 468 |
|
|
| 469 |
|
void CaloLong::MaskSection(TString sec){ |
| 470 |
|
sec.ToUpper(); |
| 471 |
|
if ( sec.Contains("XO") ) maskXO = true; |
| 472 |
|
if ( sec.Contains("YO") ) maskYO = true; |
| 473 |
|
if ( sec.Contains("XE") ) maskXE = true; |
| 474 |
|
if ( sec.Contains("YE") ) maskYE = true; |
| 475 |
|
} |
| 476 |
|
|
| 477 |
void CaloLong::Clear(){ |
void CaloLong::Clear(){ |
| 478 |
// |
// |
| 479 |
memset(eplane,0, 2*22*sizeof(Float_t)); |
memset(eplane,0, 2*22*sizeof(Float_t)); |
| 496 |
|
|
| 497 |
void CaloLong::Print(){ |
void CaloLong::Print(){ |
| 498 |
// |
// |
| 499 |
Process(); |
Fit(); |
| 500 |
// |
// |
| 501 |
printf("==================== Calorimeter Longitudinal Profile =======================\n"); |
printf("==================== Calorimeter Longitudinal Profile =======================\n"); |
| 502 |
printf(" OBT: %u PKT: %u ATIME: %u \n",OBT,PKT,atime); |
printf(" OBT: %u PKT: %u ATIME: %u \n",OBT,PKT,atime); |
| 609 |
Int_t plane = 0; |
Int_t plane = 0; |
| 610 |
Int_t strip = 0; |
Int_t strip = 0; |
| 611 |
Float_t mip = 0.; |
Float_t mip = 0.; |
| 612 |
|
Bool_t gof = true; |
| 613 |
for (Int_t i=0; i < L2->GetCaloLevel1()->istrip; i++){ |
for (Int_t i=0; i < L2->GetCaloLevel1()->istrip; i++){ |
| 614 |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); |
| 615 |
eplane[view][plane] += mip; |
gof = true; |
| 616 |
|
if ( maskXE && (plane%2)==0 && view==1 ) gof = false; |
| 617 |
|
if ( maskXO && (plane%2)!=0 && view==1 ) gof = false; |
| 618 |
|
if ( maskYE && (plane%2)!=0 && view==0 ) gof = false; |
| 619 |
|
if ( maskYO && (plane%2)==0 && view==0 ) gof = false; |
| 620 |
|
if ( gof ) eplane[view][plane] += mip; |
| 621 |
}; |
}; |
| 622 |
// |
// |
| 623 |
// inclination factor (stolen from Daniele's code) |
// inclination factor (stolen from Daniele's code) |
| 742 |
xpos = (st - mmin) * X0pl; |
xpos = (st - mmin) * X0pl; |
| 743 |
if ( st > mmin && st < mmax ){ |
if ( st > mmin && st < mmax ){ |
| 744 |
if ( no18x && ( st == 18+1 || st == mask18b+1 )){ |
if ( no18x && ( st == 18+1 || st == mask18b+1 )){ |
| 745 |
enemip = 2. * eplane[1][st]; |
if ( !maskYO ){ |
| 746 |
|
enemip = 2. * eplane[1][st]; |
| 747 |
|
} else { |
| 748 |
|
enemip = eplane[1][st]; |
| 749 |
|
}; |
| 750 |
} else { |
} else { |
| 751 |
enemip = eplane[0][st-1] + eplane[1][st]; |
enemip = eplane[0][st-1] + eplane[1][st]; |
| 752 |
}; |
}; |
| 753 |
} else { |
} else { |
| 754 |
if ( st == mmin ) enemip = 2. * eplane[1][st]; |
if ( st == mmin ){ |
| 755 |
if ( st == mmax ) enemip = 2. * eplane[0][st-1]; |
if ( !maskYE ){ |
| 756 |
|
enemip = 2. * eplane[1][st]; |
| 757 |
|
} else { |
| 758 |
|
enemip = eplane[1][st]; |
| 759 |
|
}; |
| 760 |
|
}; |
| 761 |
|
if ( st == mmax ){ |
| 762 |
|
if ( !maskXE ){ |
| 763 |
|
enemip = 2. * eplane[0][st-1]; |
| 764 |
|
} else { |
| 765 |
|
enemip = eplane[0][st-1]; |
| 766 |
|
}; |
| 767 |
|
}; |
| 768 |
}; |
}; |
| 769 |
// |
// |
| 770 |
qtotparz += enemip; |
qtotparz += enemip; |