--- DarthVader/CalorimeterLevel2/src/CaloProcessing.cpp 2007/01/23 11:52:25 1.12 +++ DarthVader/CalorimeterLevel2/src/CaloProcessing.cpp 2007/02/13 16:55:08 1.13 @@ -67,6 +67,7 @@ calopar1 = true; calopar2 = true; calopar3 = true; + crosst = true; ftcalopar1 = 0; ttcalopar1 = 0; ftcalopar2 = 0; @@ -75,6 +76,10 @@ ttcalopar3 = 0; } +void CaloProcessing::SetCrossTalk(Bool_t ct){ + crosst = ct; +}; + /** * Initialize CaloProcessing object **/ @@ -575,20 +580,22 @@ }; }; }; - if (ck == 1){ - if (ip[i]%2 == 0) { - ipre = ip[i] + 1; - } else { - ipre = ip[i] - 1; - }; - for (Int_t j = ipre*16 ; j < (ipre+1)*16 ; j++){ - clevel1->estrip[j][m][l] += (qpre[ipre] - qpre[ip[i]]) * 0.00478; + if ( crosst ){ + if (ck == 1){ + if (ip[i]%2 == 0) { + ipre = ip[i] + 1; + } else { + ipre = ip[i] - 1; + }; + for (Int_t j = ipre*16 ; j < (ipre+1)*16 ; j++){ + clevel1->estrip[j][m][l] += (qpre[ipre] - qpre[ip[i]]) * 0.00478; + }; }; - }; - if (ck == 2){ - for (Int_t j = i*32 ; j < (i+1)*32 ; j++){ - ipre = j/16 + 1; - clevel1->estrip[j][m][l] += qpre[ipre] * 0.00478; + if (ck == 2){ + for (Int_t j = i*32 ; j < (i+1)*32 ; j++){ + ipre = j/16 + 1; + clevel1->estrip[j][m][l] += qpre[ipre] * 0.00478; + }; }; }; }; @@ -607,13 +614,15 @@ jjj++; j4++; if ( j < 96 ) ene[j] = clevel1->estrip[j][m][l]; - if ( jj >= 0 && jj < 96 ){ - if ( jj != 0 && jj != 32 && jj != 64 ) ene[jj-1] += -clevel1->estrip[jj][m][l] * 0.01581; - if ( jj != 31 && jj != 63 && jj != 95 ) ene[jj+1] += -clevel1->estrip[jj][m][l] * 0.01581; - }; - if ( jjj >= 0 && jjj < 96 ){ - if ( jjj != 0 && jjj != 32 && jjj != 64 ) clevel1->estrip[jjj-1][m][l] += -ene[jjj] * 0.01581; - if ( jjj != 31 && jjj != 63 && jjj != 95 ) clevel1->estrip[jjj+1][m][l] += -ene[jjj] * 0.01581; + if ( crosst ){ + if ( jj >= 0 && jj < 96 ){ + if ( jj != 0 && jj != 32 && jj != 64 ) ene[jj-1] += -clevel1->estrip[jj][m][l] * 0.01581; + if ( jj != 31 && jj != 63 && jj != 95 ) ene[jj+1] += -clevel1->estrip[jj][m][l] * 0.01581; + }; + if ( jjj >= 0 && jjj < 96 ){ + if ( jjj != 0 && jjj != 32 && jjj != 64 ) clevel1->estrip[jjj-1][m][l] += -ene[jjj] * 0.01581; + if ( jjj != 31 && jjj != 63 && jjj != 95 ) clevel1->estrip[jjj+1][m][l] += -ene[jjj] * 0.01581; + }; }; if ( j4 >= 0 && j4 < 96 ){ //