/[PAMELA software]/calo/flight/CaloEnergy/src/CaloEnergy.cpp
ViewVC logotype

Diff of /calo/flight/CaloEnergy/src/CaloEnergy.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.13 by mocchiut, Thu Aug 20 09:02:13 2009 UTC revision 1.15 by mocchiut, Thu Sep 10 12:53:30 2009 UTC
# Line 118  void CaloEnergy::Set(){ Line 118  void CaloEnergy::Set(){
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    //    //
# Line 272  void CaloEnergy::Clear(){ Line 274  void CaloEnergy::Clear(){
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(){
# Line 328  void CaloEnergy::Print(){ Line 332  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");
# Line 526  Bool_t CaloEnergy::IsInsideAcceptance(TS Line 531  Bool_t CaloEnergy::IsInsideAcceptance(TS
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];
# Line 641  Bool_t CaloEnergy::IsInsideAcceptance(TS Line 654  Bool_t CaloEnergy::IsInsideAcceptance(TS
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.;
# Line 684  Bool_t CaloEnergy::IsInsideAcceptance(TS Line 699  Bool_t CaloEnergy::IsInsideAcceptance(TS
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;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.23