Guest User

Untitled

a guest
Jan 23rd, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 4.59 KB | None | 0 0
  1. Index: phys-services/private/phys-services/I3MediumService.cxx
  2. ===================================================================
  3. --- phys-services/private/phys-services/I3MediumService.cxx (revision 80743)
  4. +++ phys-services/private/phys-services/I3MediumService.cxx (working copy)
  5. @@ -48,6 +48,8 @@
  6.  const double I3MediumService::MIN_WAVELENGTH_PRICE = 300.;
  7.  const double I3MediumService::RECO_WAVELENGTH = 380.;
  8.  const double I3MediumService::FP_CMP_TOLERANCE = 1e-6;
  9. +const TString I3MediumService::HISTOPREFIX = "I3Medium";
  10. +unsigned int I3MediumService::instanceNumber_ = 0;
  11.  
  12.  
  13.  I3MediumService::I3MediumService()
  14. @@ -56,6 +58,13 @@
  15.         hIntAbsLen_(0), hIntEffScattLen_(0),
  16.         hIceLayerAbsorptivity_(0), hIceLayerInvEffScattLen_(0),
  17.         isBulkice_(true), meanScatCosine_(MEAN_SCATT_COSINE){
  18. +  TString suffix="";
  19. +  suffix+=instanceNumber_;
  20. +  nameAbsHisto_ = HISTOPREFIX+"_Absorptivity_"+suffix;
  21. +  nameInvScatLenHisto_ = HISTOPREFIX+"_InvScatteringLength_"+suffix;
  22. +  nameIntAbsHisto_ = HISTOPREFIX+"_IntAbsorptivity_"+suffix;
  23. +  nameIntInvScatLenHisto_ = HISTOPREFIX+"_IntInvScatteringLength_"+suffix;
  24. +  ++instanceNumber_;
  25.  }
  26.  
  27.  
  28. @@ -67,6 +76,13 @@
  29.         hIntAbsLen_(0), hIntEffScattLen_(0),
  30.         hIceLayerAbsorptivity_(0), hIceLayerInvEffScattLen_(0),
  31.         isBulkice_(false), meanScatCosine_(MEAN_SCATT_COSINE){
  32. +  TString suffix="";
  33. +  suffix+=instanceNumber_;
  34. +  nameAbsHisto_ = HISTOPREFIX+"_Absorptivity_"+suffix;
  35. +  nameInvScatLenHisto_ = HISTOPREFIX+"_InvScatteringLength_"+suffix;
  36. +  nameIntAbsHisto_ = HISTOPREFIX+"_IntAbsorptivity_"+suffix;
  37. +  nameIntInvScatLenHisto_ = HISTOPREFIX+"_IntInvScatteringLength_"+suffix;
  38. +  ++instanceNumber_;
  39.     try{
  40.         Configure(properties, histoOutFilename);
  41.     }catch(...){
  42. @@ -123,18 +139,17 @@
  43.       || (RECO_WAVELENGTH > maxwl_)
  44.       || (minwl_ == maxwl_))
  45.         log_fatal("wavelength interval to small");
  46. -      
  47.    hIceLayerAbsorptivity_ =
  48. -     new TH2D("hIceLayerAbsorptivity_", "absorptivity",
  49. +      new TH2D(nameAbsHisto_, "absorptivity",
  50.               nlayer_, minz_, maxz_, nwl_, minwl_, maxwl_);
  51.    hIceLayerInvEffScattLen_ =
  52. -     new TH2D("hIceLayerInvEffScattLen_", "inverse eff. scatt. length",
  53. +      new TH2D(nameInvScatLenHisto_, "inverse eff. scatt. length",
  54.               nlayer_, minz_, maxz_, nwl_, minwl_, maxwl_);
  55.    recobinwl_ = hIceLayerAbsorptivity_->GetYaxis()->FindBin(RECO_WAVELENGTH);
  56. -  
  57. +
  58.     //////////////////////////////////////////////////////////////
  59. -  
  60. -  // fill the scatt. and abs. histo, including unfl/ovfl bins
  61. +
  62. +  // fill the scatt. and abs. histo, including unfl/ovfl bins
  63.     for(unsigned int i = 1; i <= nlayer_; ++i){
  64.      CheckProperties(properties.Layers()[i-1]);
  65.         for(unsigned int j = 1; j <= nwl_; ++j){
  66. @@ -143,7 +158,7 @@
  67.             hIceLayerInvEffScattLen_->SetBinContent(i, j,
  68.                 properties.Layers()[i - 1].ScatteringCoefficents().Get()[j - 1]);
  69.         }
  70. -   }  
  71. +   }
  72.    for(unsigned int i = 1; i <= nlayer_; ++i){
  73.      hIceLayerInvEffScattLen_->SetBinContent(i, 0,
  74.         hIceLayerInvEffScattLen_->GetBinContent(i, 1));
  75. @@ -201,10 +216,10 @@
  76.    // with fast computation.
  77.  
  78.    hIntAbsLen_ =
  79. -   new TH2D("hintabslen","integrated abs. length",
  80. +   new TH2D(nameIntAbsHisto_,"integrated abs. length",
  81.         nlayer_, minz_, maxz_, nwl_, minwl_, maxwl_);
  82.    hIntEffScattLen_ =
  83. -   new TH2D("hIntEffScattLen_","integrated eff. scatt. length",
  84. +   new TH2D(nameIntInvScatLenHisto_,"integrated eff. scatt. length",
  85.         nlayer_, minz_, maxz_, nwl_, minwl_, maxwl_);
  86.  
  87.    for(unsigned int j = 1; j <= nwl_; ++j){ // set to 0 integration the depth unfl bin
  88. Index: phys-services/public/phys-services/I3MediumService.h
  89. ===================================================================
  90. --- phys-services/public/phys-services/I3MediumService.h    (revision 80743)
  91. +++ phys-services/public/phys-services/I3MediumService.h    (working copy)
  92. @@ -22,6 +22,7 @@
  93.  #include <string>
  94.  #include <TH1D.h>
  95.  #include <TH2D.h>
  96. +#include <TString.h>
  97.  
  98.  #include <icetray/I3Logging.h>
  99.  #include <icetray/I3FrameObject.h>
  100. @@ -281,6 +282,8 @@
  101.    const static double MEAN_SCATT_COSINE;
  102.    const static double MIN_WAVELENGTH_PRICE;
  103.    const static double FP_CMP_TOLERANCE;
  104. +  const static TString HISTOPREFIX;
  105. +  static unsigned int instanceNumber_;
  106.  
  107.  
  108.    // private copy constructors and assignment
  109. @@ -317,6 +320,10 @@
  110.    double minz_, maxz_, binw_;
  111.    double minwl_, maxwl_, wlstep_;
  112.    int recobinwl_;
  113. +  TString nameAbsHisto_;
  114. +  TString nameInvScatLenHisto_;
  115. +  TString nameIntAbsHisto_;
  116. +  TString nameIntInvScatLenHisto_;
  117.  
  118.    ////////////////////////////////////////////////////////////////
  119.    // That's Amanda framework stuff
Add Comment
Please, Sign In to add comment