45 |
delete clong; |
delete clong; |
46 |
clong = new CaloLong(L2); |
clong = new CaloLong(L2); |
47 |
clong->SplitInto(0,22); |
clong->SplitInto(0,22); |
48 |
|
clong->HeavyTail(true); |
49 |
}; |
}; |
50 |
if ( cp ) delete cp; |
if ( cp ) delete cp; |
51 |
cp = NULL; |
cp = NULL; |
62 |
// cp->ForceCaloFit(); |
// cp->ForceCaloFit(); |
63 |
// cp->SetDebug(true); |
// cp->SetDebug(true); |
64 |
// cp->Process(); |
// cp->Process(); |
65 |
if ( clong ) clong->SetCaloLevel2Pointer(cp->GetLevel2Pointer()); |
if ( clong ) clong->SetCaloLevel2Pointer(cp->GetCaloLevel2Pointer()); |
66 |
} |
} |
67 |
|
|
68 |
|
|
71 |
fLong = true; |
fLong = true; |
72 |
if ( !clong ){ |
if ( !clong ){ |
73 |
clong = new CaloLong(L2); |
clong = new CaloLong(L2); |
74 |
if ( cp ) clong->SetCaloLevel2Pointer(cp->GetLevel2Pointer()); |
if ( cp ) clong->SetCaloLevel2Pointer(cp->GetCaloLevel2Pointer()); |
75 |
clong->SplitInto(0,22); |
clong->SplitInto(0,22); |
76 |
|
clong->HeavyTail(true); |
77 |
}; |
}; |
78 |
// |
// |
79 |
} |
} |
120 |
fYomin = 1000; |
fYomin = 1000; |
121 |
fYemin = 1000; |
fYemin = 1000; |
122 |
// |
// |
123 |
|
this->UseCaloPreSampler(); // use it by default, to go back to "standard" mode use CaloEnergy::UseLevel2(). |
124 |
|
// |
125 |
} |
} |
126 |
void CaloEnergy::DefineGeometry(){ |
void CaloEnergy::DefineGeometry(){ |
127 |
// |
// |
276 |
entot[0] = 0.; |
entot[0] = 0.; |
277 |
entot[1] = 0.; |
entot[1] = 0.; |
278 |
// |
// |
279 |
|
X0pl = 0.76; |
280 |
|
// |
281 |
} |
} |
282 |
|
|
283 |
void CaloEnergy::Print(){ |
void CaloEnergy::Print(){ |
334 |
printf(" fYEen_maxplane:........ %f \n",fYEen_maxplane); |
printf(" fYEen_maxplane:........ %f \n",fYEen_maxplane); |
335 |
printf(" fYOen_maxplane:........ %f \n",fYOen_maxplane); |
printf(" fYOen_maxplane:........ %f \n",fYOen_maxplane); |
336 |
printf(" x0max :.............. %f \n",x0max); |
printf(" x0max :.............. %f \n",x0max); |
337 |
|
printf(" X0pl :.............. %f \n",X0pl); |
338 |
printf(" debug :.............. %i \n",debug); |
printf(" debug :.............. %i \n",debug); |
339 |
|
|
340 |
printf("========================================================================\n"); |
printf("========================================================================\n"); |
533 |
// |
// |
534 |
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)); |
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)); |
535 |
// |
// |
536 |
|
// inclination factor (stolen from Daniele's code) |
537 |
|
// |
538 |
|
Float_t ytgx = 0; |
539 |
|
Float_t ytgy = 0; |
540 |
|
ytgx = 0.76 * cl2->tanx[0]; |
541 |
|
ytgy = 0.76 * cl2->tany[0]; |
542 |
|
X0pl = sqrt( pow(0.76,2.) + pow(ytgx,2.) + pow(ytgy,2.) ); |
543 |
|
// |
544 |
// sum energy plane by plane for each sections |
// sum energy plane by plane for each sections |
545 |
// |
// |
546 |
Float_t fen_xep[11]; |
Float_t fen_xep[11]; |
656 |
// |
// |
657 |
if ( x0max > 0. ){ |
if ( x0max > 0. ){ |
658 |
if ( debug ) printf(" CALCULATE MAX PLANE GIVEN X0 ASSUMING PERPENDICULAR TRACK \n"); |
if ( debug ) printf(" CALCULATE MAX PLANE GIVEN X0 ASSUMING PERPENDICULAR TRACK \n"); |
659 |
Int_t wpl = (Int_t)roundf(x0max/0.76); |
// Int_t wpl = (Int_t)roundf(x0max/0.76); |
660 |
|
Int_t wpl = (Int_t)roundf(x0max/X0pl); |
661 |
Bool_t isY = false; |
Bool_t isY = false; |
662 |
if ( ((x0max/0.76)-(Float_t)wpl) > 0. ) isY = true; |
// if ( ((x0max/0.76)-(Float_t)wpl) > 0. ) isY = true; |
663 |
|
if ( ((x0max/X0pl)-(Float_t)wpl) > 0. ) isY = true; |
664 |
xomax_en = 0.; |
xomax_en = 0.; |
665 |
yemax_en = 0.; |
yemax_en = 0.; |
666 |
xemax_en = 0.; |
xemax_en = 0.; |
701 |
if ( section.Contains("YO") ) yomax_en = 10.; |
if ( section.Contains("YO") ) yomax_en = 10.; |
702 |
}; |
}; |
703 |
}; |
}; |
704 |
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); |
705 |
|
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); |
706 |
}; |
}; |
707 |
// |
// |
708 |
Int_t nPl = fPl; |
Int_t nPl = fPl; |