--- calo/flight/CaloProfile/src/CaloProfile.cpp 2009/09/14 13:56:50 1.15 +++ calo/flight/CaloProfile/src/CaloProfile.cpp 2010/05/13 13:55:37 1.18 @@ -283,6 +283,7 @@ // suf = ""; debug = false; + usepl18x = false; // }; @@ -300,6 +301,7 @@ // suf = ""; debug = false; + usepl18x = false; // }; @@ -527,6 +529,9 @@ // for (Int_t i=0; iGetCaloLevel1()->istrip ; i++){ mip1 = L2->GetCaloLevel1()->DecodeEstrip(i,view1,plane1,strip1); + // + if ( !usepl18x && view1==0 && plane1==18 ) mip1 = 0.; + // estrip[view1][plane1][strip1] = mip1; }; // @@ -574,6 +579,9 @@ // for (Int_t i=0; iGetCaloLevel1()->istrip ; i++){ mip1 = L2->GetCaloLevel1()->DecodeEstrip(i,view1,plane1,strip1); + // + if ( !usepl18x && view1==0 && plane1==18 ) mip1 = 0.; + // es[view1][plane1][strip1] = mip1; }; // @@ -663,6 +671,7 @@ mask18b = -1; // no18x = true; + usepl18x = !no18x; debug = false; maskXE = false; maskXO = false; @@ -678,10 +687,18 @@ // letmax = -1; heavytail = false; - lmipth = 100.; + // lmipth = 100.; + lmipth = 0.; // }; +TF1 *CaloLong::GetFit(){ + TString fnam=Form("lfit%s",suf.Data()); + TF1 *lfit = dynamic_cast(gDirectory->FindObject(fnam)); + if ( lfit ) return lfit; + return NULL; +} + void CaloLong::MaskSection(TString sec){ sec.ToUpper(); if ( sec.Contains("XO") ) maskXO = true; @@ -848,6 +865,9 @@ Bool_t gof = true; for (Int_t i=0; i < L2->GetCaloLevel1()->istrip; i++){ mip = L2->GetCaloLevel1()->DecodeEstrip(i,view,plane,strip); + // + if ( !usepl18x && view==0 && plane==18 ) mip = 0.; + // gof = true; if ( maskXE && (plane%2)==0 && view==1 ) gof = false; if ( maskXO && (plane%2)!=0 && view==1 ) gof = false; @@ -1165,7 +1185,11 @@ exx[numpo] = 0.1; yyy[numpo] = enemip; eyy[numpo] = sqrt(enemip*3.)+sqrt(5.); - if ( xpos > letmax && enemip > lmipth && heavytail) eyy[numpo] = (sqrt(enemip*3.)+sqrt(5.))/numpo; + //if ( xpos > letmax && enemip > lmipth && heavytail) eyy[numpo] = (sqrt(enemip*3.)+sqrt(5.))/numpo; + if ( xpos > letmax && enemip > lmipth && heavytail) eyy[numpo] = sqrt(enemip)/5.; + if ( xpos > letmax-1 && xpos < letmax+1 && heavytail ) eyy[numpo] /= 5.; + //if ( xpos > letmax-2 && xpos < letmax+1 && heavytail ) eyy[numpo] /= 7.; + if ( xpos < 3. && heavytail ) eyy[numpo] /= 5.; numpo++; // th->Fill(xpos,enemip); if ( debug ) printf(" AVE Filling: st %i xpos %f energy %f error %f letmax %f lmpith %f \n",st,xpos,enemip,eyy[numpo-1],letmax,lmipth); @@ -1198,7 +1222,12 @@ exx[numpo] = 0.1; yyy[numpo] = enemip; eyy[numpo] = sqrt(enemip*3.)+sqrt(5.); - if ( xpos > letmax && enemip > lmipth && heavytail ) eyy[numpo] = (sqrt(enemip*3.)+sqrt(5.))/numpo; + //if ( xpos > letmax && enemip > lmipth && heavytail) eyy[numpo] = (sqrt(enemip*3.)+sqrt(5.))/numpo; + //if ( xpos > letmax && enemip > lmipth && heavytail ) eyy[numpo] = (sqrt(enemip*3.)+sqrt(5.))/numpo; + if ( xpos > letmax && enemip > lmipth && heavytail) eyy[numpo] = sqrt(enemip)/5.; + if ( xpos > letmax-1 && xpos < letmax+1 && heavytail ) eyy[numpo] /= 5.; + //if ( xpos > letmax-2 && xpos < letmax+1 && heavytail ) eyy[numpo] /= 7.; + if ( xpos < 3. && heavytail ) eyy[numpo] /= 5.; // eyy[numpo] = sqrt(enemip)/(st*0.95); numpo++; // th->Fill(xpos,enemip);