--- calo/ground/LEVEL2/macros/CaloLEVEL2.cra 2005/12/05 16:13:53 1.1 +++ calo/ground/LEVEL2/macros/CaloLEVEL2.cra 2006/01/13 09:50:10 1.2 @@ -1,12 +1,15 @@ // // Given a calibration and a data file this program create an ntuple with LEVEL2 calorimeter variables - Emiliano Mocchiutti // -// CaloLEVEL2.c version 4.00 (2005-11-29) +// CaloLEVEL2.c version 4.01 (2006-01-11) // // The only input needed is the path to the directory created by YODA for the data file you want to analyze. // // Changelog: // +// 4.00 - 4.01 (2006-01-11): Bugs: in Makefile (nothing to worry about) and here clevel1.trkchi2 never filled! fixed. Not really processing self trigger events! fixed. +// Bug: not setting small values to zero after applying the cross-talk correction! fixed. +// // 3.17 - 4.00 (2005-11-29): preparing for the final release, small changes in the makefile. // // 3.16 - 3.17 (2005-10-13): do not exclude all strips marked "bad" but only the ones with RMS>6. @@ -403,7 +406,7 @@ }; chdone[se] = 1; }; - if ( clevel2.crc[se] == 0 && calib.good2 == 1 ){ + if ( clevel2.crc[se] == 0 && (calib.good2 == 1 || clevel2.trigty == 2)){ pre = -1; if ( isRAW ){ for (Int_t nn = 0; nn < 96; nn++){ @@ -508,9 +511,9 @@ // OK, now in estrip we have the energy deposit in MIP of all the strips for this event (at the end of loops of course) // // if ( clevel1.estrip[n][m][l] < evento.emin || calib.calgood[l][m][n] != 0 ) { - if ( clevel1.estrip[n][m][l] < evento.emin || calib.calrms[l][m][n] > 26 ) { - clevel1.estrip[n][m][l] = 0.; - }; + // if ( clevel1.estrip[n][m][l] < evento.emin || calib.calrms[l][m][n] > 26 ) { + // clevel1.estrip[n][m][l] = 0.; + // }; qpre[pre] += clevel1.estrip[n][m][l]; }; calib.sbase[l][m][pre] = evento.base[l][m][pre]; @@ -532,11 +535,13 @@ }; }; // - Int_t jj = -2; + Int_t j4 = -4; Int_t jjj = -3; - for (Int_t j = 0 ; j < 98 ; j++){ + Int_t jj = -2; + for (Int_t j = 0 ; j < 100 ; j++){ jj++; 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] = ene[jj-1] - clevel1.estrip[jj][m][l] * 0.01581; @@ -546,6 +551,11 @@ if ( jjj != 0 && jjj != 32 && jjj != 64 ) clevel1.estrip[jjj-1][m][l] = clevel1.estrip[jjj-1][m][l] - ene[jjj] * 0.01581; if ( jjj != 31 && jjj != 63 && jjj != 95 ) clevel1.estrip[jjj+1][m][l] = clevel1.estrip[jjj+1][m][l] - ene[jjj] * 0.01581; }; + if ( j4 >= 0 && j4 < 96 ){ + if ( clevel1.estrip[j4][m][l]!=0. && ( clevel1.estrip[j4][m][l] < evento.emin || calib.calrms[l][m][j4] > 26 )){ + clevel1.estrip[j4][m][l] = 0.; + }; + }; }; // } else { @@ -566,6 +576,7 @@ // // all we need from the tracker is the state vector al_p and the boolean for good events: // + clevel1.trkchi2 = calib.trkchi2; if ( calib.good2 ){ for (Int_t e = 0; e<5 ; e++){ clevel1.al_p[e][0] = calib.al_p[e][0]; @@ -581,7 +592,7 @@ }; // // for each event generate level2 data (clevel2) calling the fortran routine and passing calibrated data (clevel1): - // + // cfillcalol2(clevel1,clevel2); // // save in the class the level2 calorimeter informations @@ -1392,6 +1403,7 @@ // ====> NOTICE: in the case of no tracks or not good tracker events the program will fill the ntuple with zero values; <==== // ====> in case of multiple tracks the program will calculate variables using the state vector and rigidity of the first track stored <==== // + printf("Event %i \n",i); caloerr = calolevel2core(i,b,otr,tree,clevel2,evento,calib,calcalibfile); // //