--- calo/flight/CaloProfile/src/CaloProfile.cpp 2009/06/10 13:00:23 1.4 +++ calo/flight/CaloProfile/src/CaloProfile.cpp 2009/06/24 14:12:55 1.6 @@ -459,9 +459,21 @@ // no18x = true; debug = false; + maskXE = false; + maskXO = false; + maskYE = false; + maskYO = false; // }; +void CaloLong::MaskSection(TString sec){ + sec.ToUpper(); + if ( sec.Contains("XO") ) maskXO = true; + if ( sec.Contains("YO") ) maskYO = true; + if ( sec.Contains("XE") ) maskXE = true; + if ( sec.Contains("YE") ) maskYE = true; +} + void CaloLong::Clear(){ // memset(eplane,0, 2*22*sizeof(Float_t)); @@ -484,7 +496,7 @@ void CaloLong::Print(){ // - Process(); + Fit(); // printf("==================== Calorimeter Longitudinal Profile =======================\n"); printf(" OBT: %u PKT: %u ATIME: %u \n",OBT,PKT,atime); @@ -597,9 +609,15 @@ Int_t plane = 0; Int_t strip = 0; Float_t mip = 0.; + Bool_t gof = true; for (Int_t i=0; i < L2->GetCaloLevel1()->istrip; i++){ mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); - eplane[view][plane] += mip; + gof = true; + if ( maskXE && (plane%2)==0 && view==1 ) gof = false; + if ( maskXO && (plane%2)!=0 && view==1 ) gof = false; + if ( maskYE && (plane%2)!=0 && view==0 ) gof = false; + if ( maskYO && (plane%2)==0 && view==0 ) gof = false; + if ( gof ) eplane[view][plane] += mip; }; // // inclination factor (stolen from Daniele's code)