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