39 |
// |
// |
40 |
// use the presampler setting forcefitmode to 1000 means to force the DV routine to find the track inside the calorimeter using the "shower" approach developed for electrons |
// use the presampler setting forcefitmode to 1000 means to force the DV routine to find the track inside the calorimeter using the "shower" approach developed for electrons |
41 |
// |
// |
42 |
cp = new CaloPreSampler(L2); |
if ( !cp ) cp = new CaloPreSampler(L2); |
43 |
cp->SplitInto(0,22); |
cp->SplitInto(0,22); |
44 |
cp->SetForceFitMode(1000); |
cp->SetForceFitMode(1000); |
45 |
// cp->UseTracker(false); |
// cp->UseTracker(false); |
46 |
// cp->ForceCaloFit(); |
// cp->ForceCaloFit(); |
47 |
// cp->SetDebug(true); |
// cp->SetDebug(true); |
48 |
// cp->Process(); |
// cp->Process(); |
49 |
|
if ( clong ) clong->SetCaloLevel2Pointer(cp->GetLevel2Pointer()); |
50 |
|
} |
51 |
|
|
52 |
|
|
53 |
|
void CaloEnergy::UseLongFit(){ |
54 |
|
fPl = 0; |
55 |
|
fLong = true; |
56 |
|
if ( !clong ){ |
57 |
|
clong = new CaloLong(L2); |
58 |
|
if ( cp ) clong->SetCaloLevel2Pointer(cp->GetLevel2Pointer()); |
59 |
|
clong->SplitInto(0,22); |
60 |
|
}; |
61 |
|
// |
62 |
} |
} |
63 |
|
|
64 |
void CaloEnergy::Set(){ |
void CaloEnergy::Set(){ |
83 |
fPl = 1; |
fPl = 1; |
84 |
fRad = -1; |
fRad = -1; |
85 |
cp = NULL; |
cp = NULL; |
86 |
|
clong = NULL; |
87 |
|
x0max = -1.; |
88 |
// |
// |
89 |
this->DefineGeometry(); |
this->DefineGeometry(); |
90 |
fXosel =true; |
fXosel =true; |
154 |
return(-1); |
return(-1); |
155 |
} |
} |
156 |
|
|
157 |
|
Float_t CaloEnergy::GetEnergyAtMaxplane(TString section){ |
158 |
|
section.ToUpper(); |
159 |
|
if ( section.Contains("XO") ) return xomax_en; |
160 |
|
if ( section.Contains("XE") ) return xemax_en; |
161 |
|
if ( section.Contains("YO") ) return yomax_en; |
162 |
|
if ( section.Contains("YE") ) return yemax_en; |
163 |
|
return(-1); |
164 |
|
} |
165 |
|
|
166 |
Float_t CaloEnergy::GetMaxEnergy(TString section){ |
Float_t CaloEnergy::GetMaxEnergy(TString section){ |
167 |
section.ToUpper(); |
section.ToUpper(); |
168 |
if ( section.Contains("XO") ) return fXOen_maxplane; |
if ( fLong ){ |
169 |
if ( section.Contains("XE") ) return fXEen_maxplane; |
this->Process(section); |
170 |
if ( section.Contains("YO") ) return fYOen_maxplane; |
return fXOen_maxplane; |
171 |
if ( section.Contains("YE") ) return fYEen_maxplane; |
} else { |
172 |
|
if ( section.Contains("XO") ) return fXOen_maxplane; |
173 |
|
if ( section.Contains("XE") ) return fXEen_maxplane; |
174 |
|
if ( section.Contains("YO") ) return fYOen_maxplane; |
175 |
|
if ( section.Contains("YE") ) return fYEen_maxplane; |
176 |
|
}; |
177 |
return(-1); |
return(-1); |
178 |
} |
} |
179 |
|
|
180 |
|
Float_t CaloEnergy::GetMaxEnergy(){ |
181 |
|
if ( fLong ){ |
182 |
|
if ( debug ) printf(" oh! call process! with asntr %s and sntr %s \n",asntr.Data(),sntr.Data()); |
183 |
|
this->Process(asntr); |
184 |
|
}; |
185 |
|
return((fXEen_maxplane+fYOen_maxplane+fYEen_maxplane+fXOen_maxplane)); |
186 |
|
} |
187 |
|
|
188 |
void CaloEnergy::DefineGeometry(){ |
void CaloEnergy::DefineGeometry(){ |
189 |
// |
// |
190 |
// Use CaloStrip to determine once the position of border strips for each section |
// Use CaloStrip to determine once the position of border strips for each section |
309 |
fMax_planexo = 0; |
fMax_planexo = 0; |
310 |
fMax_planexe = 0; |
fMax_planexe = 0; |
311 |
fMax_planeyo = 0; |
fMax_planeyo = 0; |
312 |
fMax_planeye = 0; |
fMax_planeye = 0; |
313 |
memset(enstrip,0,2*22*96*(sizeof(Float_t))); |
xomax_en= 0.; |
314 |
|
xemax_en= 0.; |
315 |
|
yomax_en= 0.; |
316 |
|
yemax_en= 0.; |
317 |
|
// |
318 |
|
memset(enstrip,0,2*22*96*(sizeof(Float_t))); |
319 |
en = 0.; |
en = 0.; |
320 |
view = 0; |
view = 0; |
321 |
plane = 0; |
plane = 0; |
378 |
printf(" energyxo:.............. %f \n",energyxo); |
printf(" energyxo:.............. %f \n",energyxo); |
379 |
printf(" energyye:.............. %f \n",energyye); |
printf(" energyye:.............. %f \n",energyye); |
380 |
printf(" energyyo:.............. %f \n",energyyo); |
printf(" energyyo:.............. %f \n",energyyo); |
381 |
|
printf(" x0max :.............. %f \n",x0max); |
382 |
printf(" debug :.............. %i \n",debug); |
printf(" debug :.............. %i \n",debug); |
383 |
|
|
384 |
printf("========================================================================\n"); |
printf("========================================================================\n"); |
464 |
// |
// |
465 |
en_xep[i] += enstrip[1][2*i][strip]; |
en_xep[i] += enstrip[1][2*i][strip]; |
466 |
en_yop[i] += enstrip[0][2*i][strip]; |
en_yop[i] += enstrip[0][2*i][strip]; |
467 |
en_xop[i] += enstrip[1][2*i+1][strip]; |
en_xop[i] += enstrip[1][(2*i)+1][strip]; |
468 |
en_yep[i] += enstrip[0][2*i+1][strip]; |
en_yep[i] += enstrip[0][(2*i)+1][strip]; |
469 |
} else { |
} else { |
470 |
// |
// |
471 |
// use only the strips inside a cylinder of given radius fRad |
// use only the strips inside a cylinder of given radius fRad |
472 |
// |
// |
473 |
if ( strip >= cl2->cibar[2*i][1]-1-fRad && strip <= cl2->cibar[2*i][1]-1+fRad ) en_xep[i] += enstrip[1][2*i][strip]; |
if ( strip >= cl2->cibar[2*i][1]-1-fRad && strip <= cl2->cibar[2*i][1]-1+fRad ) en_xep[i] += enstrip[1][2*i][strip]; |
474 |
if ( strip >= cl2->cibar[2*i][0]-1-fRad && strip <= cl2->cibar[2*i][0]-1+fRad ) en_yop[i] += enstrip[0][2*i][strip]; |
if ( strip >= cl2->cibar[2*i][0]-1-fRad && strip <= cl2->cibar[2*i][0]-1+fRad ) en_yop[i] += enstrip[0][2*i][strip]; |
475 |
if ( strip >= cl2->cibar[2*i+1][1]-1-fRad && strip <= cl2->cibar[2*i+1][1]-1+fRad ) en_xop[i] += enstrip[1][2*i+1][strip]; |
if ( strip >= cl2->cibar[(2*i)+1][1]-1-fRad && strip <= cl2->cibar[(2*i)+1][1]-1+fRad ) en_xop[i] += enstrip[1][(2*i)+1][strip]; |
476 |
if ( strip >= cl2->cibar[2*i+1][0]-1-fRad && strip <= cl2->cibar[2*i+1][0]-1+fRad ) en_yep[i] += enstrip[0][2*i+1][strip]; |
if ( strip >= cl2->cibar[(2*i)+1][0]-1-fRad && strip <= cl2->cibar[(2*i)+1][0]-1+fRad ) en_yep[i] += enstrip[0][(2*i)+1][strip]; |
477 |
}; |
}; |
478 |
}; |
}; |
479 |
energyxe += en_xep[i]; |
energyxe += en_xep[i]; |
484 |
// |
// |
485 |
// Find the plane of maximum for each section |
// Find the plane of maximum for each section |
486 |
// |
// |
|
Float_t xomax_en= 0.; |
|
|
Float_t xemax_en= 0.; |
|
|
Float_t yomax_en= 0.; |
|
|
Float_t yemax_en= 0.; |
|
|
// |
|
487 |
// |
// |
488 |
Int_t xen = 0; |
Int_t xen = 0; |
489 |
Int_t yon = 0; |
Int_t yon = 0; |
532 |
}; |
}; |
533 |
}; |
}; |
534 |
// |
// |
535 |
|
// the maximum is given externally as X0, convert it to plane and section |
536 |
|
// |
537 |
|
if ( x0max > 0. ){ |
538 |
|
if ( debug ) printf(" CALCULATE MAX PLANE GIVEN X0 ASSUMING PERPENDICULAR TRACK \n"); |
539 |
|
Int_t wpl = (Int_t)roundf(x0max/0.76); |
540 |
|
Bool_t isY = false; |
541 |
|
if ( ((x0max/0.76)-(Float_t)wpl) > 0. ) isY = true; |
542 |
|
xomax_en = 0.; |
543 |
|
yemax_en = 0.; |
544 |
|
xemax_en = 0.; |
545 |
|
yomax_en = 0.; |
546 |
|
// |
547 |
|
if ( !(wpl%2) ){ |
548 |
|
// 0, 2, 4, ... |
549 |
|
if ( isY ){ |
550 |
|
if ( section.Contains("YO") ) yomax_en = 1000.; |
551 |
|
if ( section.Contains("XE") ) xemax_en = 500.; |
552 |
|
fMax_planeyo=wpl/2; |
553 |
|
fMax_planexe=wpl/2; |
554 |
|
if ( section.Contains("XO") ) xomax_en = 10.; |
555 |
|
if ( section.Contains("YE") ) yemax_en = 5.; |
556 |
|
} else { |
557 |
|
if ( section.Contains("YO") ) yomax_en = 500.; |
558 |
|
if ( section.Contains("XE") ) xemax_en = 1000.; |
559 |
|
fMax_planeyo=wpl/2; |
560 |
|
fMax_planexe=wpl/2; |
561 |
|
if ( section.Contains("XO") ) xomax_en = 5.; |
562 |
|
if ( section.Contains("YE") ) yemax_en = 10.; |
563 |
|
}; |
564 |
|
} else { |
565 |
|
// 1, 3, 5, ... |
566 |
|
if ( isY ){ |
567 |
|
if ( section.Contains("YE") ) yemax_en = 1000.; |
568 |
|
if ( section.Contains("XO") ) xomax_en = 500.; |
569 |
|
fMax_planeye=(wpl-1)/2; |
570 |
|
fMax_planexo=(wpl-1)/2; |
571 |
|
if ( section.Contains("XE") ) xemax_en = 10.; |
572 |
|
if ( section.Contains("YO") ) yomax_en = 5.; |
573 |
|
} else { |
574 |
|
if ( section.Contains("YE") ) yemax_en = 500.; |
575 |
|
if ( section.Contains("XO") ) xomax_en = 1000.; |
576 |
|
fMax_planeye=(wpl-1)/2; |
577 |
|
fMax_planexo=(wpl-1)/2; |
578 |
|
if ( section.Contains("XE") ) xemax_en = 5.; |
579 |
|
if ( section.Contains("YO") ) yomax_en = 10.; |
580 |
|
}; |
581 |
|
}; |
582 |
|
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); |
583 |
|
}; |
584 |
|
// |
585 |
Int_t nPl = fPl; |
Int_t nPl = fPl; |
586 |
// |
// |
587 |
// Set the maximum in case of coherent mode was selected |
// Set the maximum in case of coherent mode was selected |
676 |
for (Int_t i=0; i<11; i++) { |
for (Int_t i=0; i<11; i++) { |
677 |
if |
if |
678 |
( |
( |
679 |
(((track_coordx[2*i+1][1]>=(-12.054+fM))&& |
(((track_coordx[(2*i)+1][1]>=(-12.054+fM))&& |
680 |
(track_coordx[2*i+1][1]<=(-4.246-fM)))&& |
(track_coordx[(2*i)+1][1]<=(-4.246-fM)))&& |
681 |
(((cl2->cbar[2*i+1][1]>=xo1 + fM1)&& |
(((cl2->cbar[(2*i)+1][1]>=xo1 + fM1)&& |
682 |
(cl2->cbar[2*i+1][1]<=xo2 - fM1 ))|| |
(cl2->cbar[(2*i)+1][1]<=xo2 - fM1 ))|| |
683 |
((cl2->cbar[2*i+1][1]>=xo3 + fM1)&& |
((cl2->cbar[(2*i)+1][1]>=xo3 + fM1)&& |
684 |
(cl2->cbar[2*i+1][1]<=xo4 - fM1 ))|| |
(cl2->cbar[(2*i)+1][1]<=xo4 - fM1 ))|| |
685 |
((cl2->cbar[2*i+1][1]>=xo5 + fM1)&& |
((cl2->cbar[(2*i)+1][1]>=xo5 + fM1)&& |
686 |
(cl2->cbar[2*i+1][1]<=xo6 - fM1 ))))|| |
(cl2->cbar[(2*i)+1][1]<=xo6 - fM1 ))))|| |
687 |
|
|
688 |
(((track_coordx[2*i+1][1]>=(-4.004+fM))&& |
(((track_coordx[(2*i)+1][1]>=(-4.004+fM))&& |
689 |
(track_coordx[2*i+1][1]<=(3.804-fM)))&& |
(track_coordx[(2*i)+1][1]<=(3.804-fM)))&& |
690 |
(((cl2->cbar[2*i+1][1]>=xo1 + fM1)&& |
(((cl2->cbar[(2*i)+1][1]>=xo1 + fM1)&& |
691 |
(cl2->cbar[2*i+1][1]<=xo2 - fM1 ))|| |
(cl2->cbar[(2*i)+1][1]<=xo2 - fM1 ))|| |
692 |
((cl2->cbar[2*i+1][1]>=xo3 + fM1)&& |
((cl2->cbar[(2*i)+1][1]>=xo3 + fM1)&& |
693 |
(cl2->cbar[2*i+1][1]<=xo4 - fM1))|| |
(cl2->cbar[(2*i)+1][1]<=xo4 - fM1))|| |
694 |
((cl2->cbar[2*i+1][1]>=xo5 + fM1)&& |
((cl2->cbar[(2*i)+1][1]>=xo5 + fM1)&& |
695 |
(cl2->cbar[2*i+1][1]<=xo6 - fM1 ))))|| |
(cl2->cbar[(2*i)+1][1]<=xo6 - fM1 ))))|| |
696 |
|
|
697 |
(((track_coordx[2*i+1][1]>=(4.046+fM))&& |
(((track_coordx[(2*i)+1][1]>=(4.046+fM))&& |
698 |
(track_coordx[2*i+1][1]<=(11.854-fM)))&& |
(track_coordx[(2*i)+1][1]<=(11.854-fM)))&& |
699 |
(((cl2->cbar[2*i+1][1]>=xo1 + fM1)&& |
(((cl2->cbar[(2*i)+1][1]>=xo1 + fM1)&& |
700 |
(cl2->cbar[2*i+1][1]<=xo2 - fM1))|| |
(cl2->cbar[(2*i)+1][1]<=xo2 - fM1))|| |
701 |
((cl2->cbar[2*i+1][1]>=xo3 + fM1)&& |
((cl2->cbar[(2*i)+1][1]>=xo3 + fM1)&& |
702 |
(cl2->cbar[2*i+1][1]<=xo4 - fM1 ))|| |
(cl2->cbar[(2*i)+1][1]<=xo4 - fM1 ))|| |
703 |
((cl2->cbar[2*i+1][1]>=xo5 + fM1)&& |
((cl2->cbar[(2*i)+1][1]>=xo5 + fM1)&& |
704 |
(cl2->cbar[2*i+1][1]<=xo6 - fM1 )))) |
(cl2->cbar[(2*i)+1][1]<=xo6 - fM1 )))) |
705 |
){ |
){ |
706 |
fXosel = true; |
fXosel = true; |
707 |
fXoout = i; |
fXoout = i; |
780 |
for (Int_t i=0; i<11; i++) { |
for (Int_t i=0; i<11; i++) { |
781 |
if |
if |
782 |
( |
( |
783 |
(((track_coordy[2*i+1][0]>=(-12.154+fM))&& |
(((track_coordy[(2*i)+1][0]>=(-12.154+fM))&& |
784 |
(track_coordy[2*i+1][0]<=(-4.346-fM)))&& |
(track_coordy[(2*i)+1][0]<=(-4.346-fM)))&& |
785 |
(((cl2->cbar[2*i+1][0]>=ye1 + fM1)&& |
(((cl2->cbar[(2*i)+1][0]>=ye1 + fM1)&& |
786 |
(cl2->cbar[2*i+1][0]<=ye2 - fM1 ))|| |
(cl2->cbar[(2*i)+1][0]<=ye2 - fM1 ))|| |
787 |
((cl2->cbar[2*i+1][0]>=ye3 + fM1)&& |
((cl2->cbar[(2*i)+1][0]>=ye3 + fM1)&& |
788 |
(cl2->cbar[2*i+1][0]<=ye4 - fM1 ))|| |
(cl2->cbar[(2*i)+1][0]<=ye4 - fM1 ))|| |
789 |
((cl2->cbar[2*i+1][0]>=ye5 + fM1)&& |
((cl2->cbar[(2*i)+1][0]>=ye5 + fM1)&& |
790 |
(cl2->cbar[2*i+1][0]<=ye6 - fM1 ))))|| |
(cl2->cbar[(2*i)+1][0]<=ye6 - fM1 ))))|| |
791 |
|
|
792 |
(((track_coordy[2*i+1][0]>=(-4.104+fM))&& |
(((track_coordy[(2*i)+1][0]>=(-4.104+fM))&& |
793 |
(track_coordy[2*i+1][0]<=(3.704-fM)))&& |
(track_coordy[(2*i)+1][0]<=(3.704-fM)))&& |
794 |
(((cl2->cbar[2*i+1][0]>=ye1 + fM1)&& |
(((cl2->cbar[(2*i)+1][0]>=ye1 + fM1)&& |
795 |
(cl2->cbar[2*i+1][0]<=ye2 - fM1 ))|| |
(cl2->cbar[(2*i)+1][0]<=ye2 - fM1 ))|| |
796 |
((cl2->cbar[2*i+1][0]>=ye3 + fM1)&& |
((cl2->cbar[(2*i)+1][0]>=ye3 + fM1)&& |
797 |
(cl2->cbar[2*i+1][0]<=ye4 - fM1))|| |
(cl2->cbar[(2*i)+1][0]<=ye4 - fM1))|| |
798 |
((cl2->cbar[2*i+1][0]>=ye5 + fM1)&& |
((cl2->cbar[(2*i)+1][0]>=ye5 + fM1)&& |
799 |
(cl2->cbar[2*i+1][0]<=ye6 - fM1 ))))|| |
(cl2->cbar[(2*i)+1][0]<=ye6 - fM1 ))))|| |
800 |
|
|
801 |
(((track_coordy[2*i+1][0]>=(3.946+fM))&& |
(((track_coordy[(2*i)+1][0]>=(3.946+fM))&& |
802 |
(track_coordy[2*i+1][0]<=(11.754-fM)))&& |
(track_coordy[(2*i)+1][0]<=(11.754-fM)))&& |
803 |
(((cl2->cbar[2*i+1][0]>=ye1 + fM1)&& |
(((cl2->cbar[(2*i)+1][0]>=ye1 + fM1)&& |
804 |
(cl2->cbar[2*i+1][0]<=ye2 - fM1))|| |
(cl2->cbar[(2*i)+1][0]<=ye2 - fM1))|| |
805 |
((cl2->cbar[2*i+1][0]>=ye3 + fM1)&& |
((cl2->cbar[(2*i)+1][0]>=ye3 + fM1)&& |
806 |
(cl2->cbar[2*i+1][0]<=ye4 - fM1 ))|| |
(cl2->cbar[(2*i)+1][0]<=ye4 - fM1 ))|| |
807 |
((cl2->cbar[2*i+1][0]>=ye5 + fM1)&& |
((cl2->cbar[(2*i)+1][0]>=ye5 + fM1)&& |
808 |
(cl2->cbar[2*i+1][0]<=ye6 - fM1 )))) |
(cl2->cbar[(2*i)+1][0]<=ye6 - fM1 )))) |
809 |
){ |
){ |
810 |
fYesel = true; |
fYesel = true; |
811 |
fYeout = i; |
fYeout = i; |
879 |
// Count the number of sections in which the event is contained |
// Count the number of sections in which the event is contained |
880 |
// |
// |
881 |
fCount = (Float_t)((Int_t)fXesel+(Int_t)fXosel+(Int_t)fYesel+(Int_t)fYosel); |
fCount = (Float_t)((Int_t)fXesel+(Int_t)fXosel+(Int_t)fYesel+(Int_t)fYosel); |
|
if ( debug ) printf(" IsInside XE %i XO %i YE %i YO %i => SEL %i \n",fXesel,fXosel,fYesel,fYosel,fSel); |
|
882 |
// |
// |
883 |
if ( indep ){ |
if ( indep ){ |
884 |
// |
// |
901 |
}; |
}; |
902 |
// |
// |
903 |
if ( debug ) printf("sel %i indep %i fMax_plane %f conv_r %f en_maxplane %f encalo %f \n",fSel,indep,fMax_plane,fConv_rxo,fXOen_maxplane,fEnergy); |
if ( debug ) printf("sel %i indep %i fMax_plane %f conv_r %f en_maxplane %f encalo %f \n",fSel,indep,fMax_plane,fConv_rxo,fXOen_maxplane,fEnergy); |
904 |
|
if ( debug ) printf(" IsInside XE %i XO %i YE %i YO %i => SEL %i \n",fXesel,fXosel,fYesel,fYosel,fSel); |
905 |
// |
// |
906 |
// finish exit |
// finish exit |
907 |
// |
// |
953 |
if ( (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 ( (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)); |
954 |
// |
// |
955 |
if ( fLong ){ |
if ( fLong ){ |
956 |
|
if ( debug ) printf(" ==================================================================> LONGITUDINAL FIT! \n"); |
957 |
|
// |
958 |
|
// use long fit to measure energy |
959 |
// |
// |
960 |
// use long fit to measure energy NOT IMPLEMENTED YET |
if ( this->IsInsideAcceptance(section) ){ |
961 |
|
// |
962 |
|
if ( debug ) printf(" ==================================================================> LONG INSIDE! \n"); |
963 |
|
// |
964 |
|
Float_t myene[2][22]; |
965 |
|
memset(myene,0,(sizeof(Float_t))*2*22); |
966 |
|
for (Int_t j=0; j<11; j++){ |
967 |
|
if ( section.Contains("XE") ) myene[1][2*j] = en_xep[j]; |
968 |
|
if ( section.Contains("YO") ) myene[0][2*j] = en_yop[j]; |
969 |
|
if ( section.Contains("XO") ) myene[1][(2*j)+1] = en_xop[j]; |
970 |
|
if ( section.Contains("YE") ) myene[0][(2*j)+1] = en_yep[j]; |
971 |
|
}; |
972 |
|
clong->UnMaskSections(); |
973 |
|
if ( !(section.Contains("YE")) ) clong->MaskSection("YE"); |
974 |
|
if ( !(section.Contains("YO")) ) clong->MaskSection("YO"); |
975 |
|
if ( !(section.Contains("XO")) ) clong->MaskSection("XO"); |
976 |
|
if ( !(section.Contains("XE")) ) clong->MaskSection("XE"); |
977 |
|
clong->ForceNextFit(); |
978 |
|
clong->SetEnergies(myene); |
979 |
|
if ( debug ){ |
980 |
|
clong->Fit(true); |
981 |
|
} else { |
982 |
|
clong->Fit(); |
983 |
|
}; |
984 |
|
if ( clong->GetLowerLimit() != 0. || clong->GetUpperLimit() != 0. ){ |
985 |
|
fXOen_maxplane = clong->Get_defE0(); |
986 |
|
} else { |
987 |
|
fXOen_maxplane = clong->Get_E0(); |
988 |
|
}; |
989 |
|
fYOen_maxplane = 0.; |
990 |
|
fYEen_maxplane = 0.; |
991 |
|
fXEen_maxplane = 0.; |
992 |
|
fEnergy=fXOen_maxplane/fConv_rxo; |
993 |
|
if ( fEnergy != fEnergy || clong->Get_fitresult() != 0 ) fEnergy = -1.; |
994 |
|
// if ( fEnergy != fEnergy ) fEnergy = 1.; |
995 |
|
// |
996 |
|
} else { |
997 |
|
// |
998 |
|
// if the event is not in the acceptance, return a negative energy. |
999 |
|
// |
1000 |
|
if ( debug ) printf(" Outside acceptance \n"); |
1001 |
|
fEnergy *= -1.; |
1002 |
|
// |
1003 |
|
}; |
1004 |
// |
// |
1005 |
} else { |
} else { |
1006 |
// |
// |