--- calo/flight/CaloEnergy/src/CaloEnergy.cpp 2009/08/21 07:06:37 1.14 +++ calo/flight/CaloEnergy/src/CaloEnergy.cpp 2009/11/27 10:31:08 1.17 @@ -45,6 +45,7 @@ delete clong; clong = new CaloLong(L2); clong->SplitInto(0,22); + clong->HeavyTail(true); }; if ( cp ) delete cp; cp = NULL; @@ -61,7 +62,7 @@ // cp->ForceCaloFit(); // cp->SetDebug(true); // cp->Process(); - if ( clong ) clong->SetCaloLevel2Pointer(cp->GetLevel2Pointer()); + if ( clong ) clong->SetCaloLevel2Pointer(cp->GetCaloLevel2Pointer()); } @@ -70,8 +71,9 @@ fLong = true; if ( !clong ){ clong = new CaloLong(L2); - if ( cp ) clong->SetCaloLevel2Pointer(cp->GetLevel2Pointer()); + if ( cp ) clong->SetCaloLevel2Pointer(cp->GetCaloLevel2Pointer()); clong->SplitInto(0,22); + clong->HeavyTail(true); }; // } @@ -274,6 +276,8 @@ entot[0] = 0.; entot[1] = 0.; // + X0pl = 0.76; + // } void CaloEnergy::Print(){ @@ -330,6 +334,7 @@ printf(" fYEen_maxplane:........ %f \n",fYEen_maxplane); printf(" fYOen_maxplane:........ %f \n",fYOen_maxplane); printf(" x0max :.............. %f \n",x0max); + printf(" X0pl :.............. %f \n",X0pl); printf(" debug :.............. %i \n",debug); printf("========================================================================\n"); @@ -528,6 +533,14 @@ // if ( debug && ((fM1+0.122-0.244*(Float_t)fRad) < 0.) ) printf("Error: (fM1+0.122-0.244*(Float_t)fRad) < 0. fM1 %f fRad %i %f \n",fM1,fRad,(fM1+0.122-0.244*(Float_t)fRad)); // + // inclination factor (stolen from Daniele's code) + // + Float_t ytgx = 0; + Float_t ytgy = 0; + ytgx = 0.76 * cl2->tanx[0]; + ytgy = 0.76 * cl2->tany[0]; + X0pl = sqrt( pow(0.76,2.) + pow(ytgx,2.) + pow(ytgy,2.) ); + // // sum energy plane by plane for each sections // Float_t fen_xep[11]; @@ -643,9 +656,11 @@ // if ( x0max > 0. ){ if ( debug ) printf(" CALCULATE MAX PLANE GIVEN X0 ASSUMING PERPENDICULAR TRACK \n"); - Int_t wpl = (Int_t)roundf(x0max/0.76); + // Int_t wpl = (Int_t)roundf(x0max/0.76); + Int_t wpl = (Int_t)roundf(x0max/X0pl); Bool_t isY = false; - if ( ((x0max/0.76)-(Float_t)wpl) > 0. ) isY = true; + // if ( ((x0max/0.76)-(Float_t)wpl) > 0. ) isY = true; + if ( ((x0max/X0pl)-(Float_t)wpl) > 0. ) isY = true; xomax_en = 0.; yemax_en = 0.; xemax_en = 0.; @@ -686,7 +701,8 @@ if ( section.Contains("YO") ) yomax_en = 10.; }; }; - if ( debug ) printf(" x0max %f x0max/0.76 %f wpl %i isY %i yomax_en %f xemax_en %f yemax_en %f xomax_en %f fMaxplane %i %i %i %i\n",x0max,(x0max/0.76),wpl,isY,yomax_en,xemax_en,yemax_en,xomax_en,fMax_planeyo,fMax_planexe,fMax_planeye,fMax_planexo); + // if ( debug ) printf(" x0max %f x0max/0.76 %f wpl %i isY %i yomax_en %f xemax_en %f yemax_en %f xomax_en %f fMaxplane %i %i %i %i\n",x0max,(x0max/0.76),wpl,isY,yomax_en,xemax_en,yemax_en,xomax_en,fMax_planeyo,fMax_planexe,fMax_planeye,fMax_planexo); + if ( debug ) printf(" x0max %f x0max/X0pl %f X0pl %f wpl %i isY %i yomax_en %f xemax_en %f yemax_en %f xomax_en %f fMaxplane %i %i %i %i\n",x0max,(x0max/X0pl),X0pl,wpl,isY,yomax_en,xemax_en,yemax_en,xomax_en,fMax_planeyo,fMax_planexe,fMax_planeye,fMax_planexo); }; // Int_t nPl = fPl;