larutil::LArProperties Class Reference

#include <LArProperties.hh>

Inheritance diagram for larutil::LArProperties:
larutil::LArUtilBase larlight::larlight_base

List of all members.

Public Member Functions

Double_t Density (Double_t temperature=0.) const
 g/cm^3
Double_t DriftVelocity (Double_t efield=0., Double_t temperature=0.) const
 cm/us
Double_t BirksCorrection (Double_t dQdX) const
 dQ/dX in electrons/cm, returns dE/dX in MeV/cm.
Double_t ModBoxCorrection (Double_t dQdX) const
Double_t Efield (UInt_t planegap=0) const
 kV/cm
Double_t Temperature () const
 < kelvin
Double_t ElectronLifetime () const
 < microseconds
Double_t RadiationLength () const
 < g/cm^2
Double_t Argon39DecayRate () const
 < decays per cm^3 per second
Double_t Eloss (Double_t mom, Double_t mass, Double_t tcut) const
 Restricted mean dE/dx energy loss (MeV/cm).
Double_t ElossVar (Double_t mom, Double_t mass) const
 Energy loss fluctuation (sigma_E^2 / length in MeV^2/cm).
Double_t ScintResolutionScale () const
Double_t ScintFastTimeConst () const
Double_t ScintSlowTimeConst () const
Double_t ScintBirksConstant () const
bool ScintByParticleType () const
Double_t ScintYield () const
Double_t ScintYieldRatio () const
Double_t ProtonScintYield () const
Double_t ProtonScintYieldRatio () const
Double_t MuonScintYield () const
Double_t MuonScintYieldRatio () const
Double_t KaonScintYield () const
Double_t KaonScintYieldRatio () const
Double_t PionScintYield () const
Double_t PionScintYieldRatio () const
Double_t ElectronScintYield () const
Double_t ElectronScintYieldRatio () const
Double_t AlphaScintYield () const
Double_t AlphaScintYieldRatio () const
bool CerenkovLightEnabled () const
std::map< Double_t, Double_t > SlowScintSpectrum () const
std::map< Double_t, Double_t > FastScintSpectrum () const
std::map< Double_t, Double_t > RIndexSpectrum () const
std::map< Double_t, Double_t > AbsLengthSpectrum () const
std::map< Double_t, Double_t > RayleighSpectrum () const
std::map< std::string,
std::map< Double_t, Double_t > > 
SurfaceReflectances () const
std::map< std::string,
std::map< Double_t, Double_t > > 
SurfaceReflectanceDiffuseFractions () const
void SetFileName (const std::string filename)
 Method to set data file name.
void SetTreeName (const std::string treename)
 Method to set data TTree name.
virtual bool LoadData (bool force_reload=false)
 Method to load data TTree.
virtual void set_verbosity (MSG::Level level)
 Setter for the verbosity level.
MSG::Level get_verbosity () const
 Getter for the verbosity level.
const std::string class_name () const
 Getter for the class name.
void print (MSG::Level level, std::string where, std::string msg) const
 message print out method
void print (MSG::Level level, std::string msg) const
 message print out method

Static Public Member Functions

static const LArPropertiesGetME (bool default_load=true)
 Singleton getter.

Protected Member Functions

virtual void ClearData ()
virtual bool ReadTree ()

Protected Attributes

std::string _file_name
std::string _tree_name
bool _loaded
char _buf [200]
 char buffer for message manipulation
std::vector< bool > _verbosity
 holder for enabled message levels
MSG::Level _verbosity_level
 holder for specified verbosity level
std::string _name
 class name holder

Private Member Functions

 LArProperties (bool default_load=true)
 Singleton constructor.
virtual ~LArProperties ()
 Default destructor.

Private Attributes

std::vector< Double_t > fEfield
 kV/cm
Double_t fTemperature
 kelvin
Double_t fElectronlifetime
 microseconds
Double_t fRadiationLength
 g/cm^2
Double_t fArgon39DecayRate
 decays per cm^3 per second
Double_t fZ
 Ar atomic number.
Double_t fA
 Ar atomic mass (g/mol).
Double_t fI
 Ar mean excitation energy (eV).
Double_t fSa
 Sternheimer parameter a.
Double_t fSk
 Sternheimer parameter k.
Double_t fSx0
 Sternheimer parameter x0.
Double_t fSx1
 Sternheimer parameter x1.
Double_t fScbar
 Sternheimer parameter Cbar.
std::vector< Double_t > fFastScintSpectrum
std::vector< Double_t > fFastScintEnergies
std::vector< Double_t > fSlowScintSpectrum
std::vector< Double_t > fSlowScintEnergies
std::vector< Double_t > fRIndexSpectrum
std::vector< Double_t > fRIndexEnergies
std::vector< Double_t > fAbsLengthSpectrum
std::vector< Double_t > fAbsLengthEnergies
std::vector< Double_t > fRayleighSpectrum
std::vector< Double_t > fRayleighEnergies
bool fScintByParticleType
Double_t fProtonScintYield
Double_t fProtonScintYieldRatio
Double_t fMuonScintYield
Double_t fMuonScintYieldRatio
Double_t fPionScintYield
Double_t fPionScintYieldRatio
Double_t fKaonScintYield
Double_t fKaonScintYieldRatio
Double_t fElectronScintYield
Double_t fElectronScintYieldRatio
Double_t fAlphaScintYield
Double_t fAlphaScintYieldRatio
Double_t fScintYield
Double_t fScintResolutionScale
Double_t fScintFastTimeConst
Double_t fScintSlowTimeConst
Double_t fScintYieldRatio
Double_t fScintBirksConstant
bool fEnableCerenkovLight
std::vector< std::string > fReflectiveSurfaceNames
std::vector< Double_t > fReflectiveSurfaceEnergies
std::vector< std::vector
< Double_t > > 
fReflectiveSurfaceReflectances
std::vector< std::vector
< Double_t > > 
fReflectiveSurfaceDiffuseFractions

Static Private Attributes

static LArProperties_me = 0

Detailed Description

Definition at line 29 of file LArProperties.hh.


Constructor & Destructor Documentation

larutil::LArProperties::LArProperties ( bool  default_load = true  )  [private]

Singleton constructor.

Definition at line 10 of file LArProperties.cc.

References larutil::LArUtilBase::_file_name, larlight::larlight_base::_name, larutil::LArUtilBase::_tree_name, larutil::LArUtilConfig::Detector(), larutil::kTREENAME_LARPROPERTIES, larutil::kUTIL_DATA_FILENAME, and larutil::LArUtilBase::LoadData().

Referenced by GetME().

00010                                                 : LArUtilBase()
00011   {
00012     _name = "LArProperties";
00013     if(default_load){
00014       _file_name = Form("%s/LArUtil/dat/%s",
00015             getenv("LARLIGHT_CORE_DIR"),
00016             kUTIL_DATA_FILENAME[LArUtilConfig::Detector()].c_str());
00017       _tree_name = kTREENAME_LARPROPERTIES;
00018       LoadData();
00019     }
00020   }

virtual larutil::LArProperties::~LArProperties (  )  [inline, private, virtual]

Default destructor.

Definition at line 37 of file LArProperties.hh.

00037 {};


Member Function Documentation

std::map< Double_t, Double_t > larutil::LArProperties::AbsLengthSpectrum (  )  const

Definition at line 578 of file LArProperties.cc.

References fAbsLengthEnergies, and fAbsLengthSpectrum.

00579   {
00580     if(fAbsLengthSpectrum.size()!=fAbsLengthEnergies.size()){
00581       std::ostringstream msg;
00582       msg << "The vectors specifying the Abs Length spectrum are "
00583       << " different sizes - " << fAbsLengthSpectrum.size()
00584       << " " << fAbsLengthEnergies.size();
00585       throw LArUtilException(msg.str());
00586     }
00587     
00588     std::map<Double_t, Double_t> ToReturn;
00589     for(size_t i=0; i!=fAbsLengthSpectrum.size(); ++i)
00590       ToReturn[fAbsLengthEnergies.at(i)]=fAbsLengthSpectrum.at(i);
00591     
00592     return ToReturn;
00593   }

Double_t larutil::LArProperties::AlphaScintYield (  )  const [inline]

Definition at line 104 of file LArProperties.hh.

References fAlphaScintYield.

00104 { return fAlphaScintYield;          }

Double_t larutil::LArProperties::AlphaScintYieldRatio (  )  const [inline]

Definition at line 105 of file LArProperties.hh.

References fAlphaScintYieldRatio.

00105 { return fAlphaScintYieldRatio;     }

Double_t larutil::LArProperties::Argon39DecayRate (  )  const [inline]

< decays per cm^3 per second

Definition at line 75 of file LArProperties.hh.

References fArgon39DecayRate.

00076     { return fArgon39DecayRate; }

Double_t larutil::LArProperties::BirksCorrection ( Double_t  dQdX  )  const

dQ/dX in electrons/cm, returns dE/dX in MeV/cm.

Definition at line 396 of file LArProperties.cc.

References Density(), Efield(), larutil::kGeVToElectrons, larutil::kRecombA, and larutil::kRecombk.

00397   {
00398     // Correction for charge quenching using parameterization from
00399     // S.Amoruso et al., NIM A 523 (2004) 275
00400     
00401     Double_t  A3t    = kRecombA;
00402     Double_t  K3t    = kRecombk;                     // in KV/cm*(g/cm^2)/MeV
00403     Double_t  rho    = this->Density();                    // LAr density in g/cm^3
00404     Double_t Wion    = 1000./kGeVToElectrons;        // 23.6 eV = 1e, Wion in MeV/e
00405     Double_t Efield  = this->Efield();                     // Electric Field in the drift region in KV/cm
00406     K3t           /= rho;                                // KV/MeV
00407     Double_t dEdx    = dQdx/(A3t/Wion-K3t/Efield*dQdx);    //MeV/cm
00408     
00409     return dEdx;
00410   }

bool larutil::LArProperties::CerenkovLightEnabled (  )  const [inline]

Definition at line 107 of file LArProperties.hh.

References fEnableCerenkovLight.

00107 { return fEnableCerenkovLight;      }

const std::string larlight::larlight_base::class_name (  )  const [inline, inherited]

Getter for the class name.

Definition at line 49 of file larlight_base.hh.

References larlight::larlight_base::_name.

00049 {return _name;};

void larutil::LArProperties::ClearData (  )  [protected, virtual]

Implements larutil::LArUtilBase.

Definition at line 22 of file LArProperties.cc.

References fA, fAbsLengthEnergies, fAbsLengthSpectrum, fAlphaScintYield, fAlphaScintYieldRatio, fArgon39DecayRate, fEfield, fElectronlifetime, fElectronScintYield, fElectronScintYieldRatio, fEnableCerenkovLight, fFastScintEnergies, fFastScintSpectrum, fI, fKaonScintYield, fKaonScintYieldRatio, fMuonScintYield, fMuonScintYieldRatio, fPionScintYield, fPionScintYieldRatio, fProtonScintYield, fProtonScintYieldRatio, fRadiationLength, fRayleighEnergies, fRayleighSpectrum, fReflectiveSurfaceDiffuseFractions, fReflectiveSurfaceEnergies, fReflectiveSurfaceNames, fReflectiveSurfaceReflectances, fRIndexEnergies, fRIndexSpectrum, fSa, fScbar, fScintBirksConstant, fScintByParticleType, fScintFastTimeConst, fScintResolutionScale, fScintSlowTimeConst, fScintYield, fScintYieldRatio, fSlowScintEnergies, fSlowScintSpectrum, fSx0, fSx1, fTemperature, fZ, and larlight::DATA::INVALID_DOUBLE.

Referenced by ReadTree().

00023   {
00024     fEfield.clear();
00025     fTemperature = larlight::DATA::INVALID_DOUBLE;
00026     fElectronlifetime = larlight::DATA::INVALID_DOUBLE;
00027     fRadiationLength = larlight::DATA::INVALID_DOUBLE;
00028     fArgon39DecayRate = larlight::DATA::INVALID_DOUBLE;
00029     fZ = larlight::DATA::INVALID_DOUBLE;
00030     fA = larlight::DATA::INVALID_DOUBLE;
00031     fI = larlight::DATA::INVALID_DOUBLE;
00032     fSa = larlight::DATA::INVALID_DOUBLE;
00033     fSx0 = larlight::DATA::INVALID_DOUBLE;
00034     fSx1 = larlight::DATA::INVALID_DOUBLE;
00035     fScbar = larlight::DATA::INVALID_DOUBLE;
00036     fFastScintSpectrum.clear();
00037     fFastScintEnergies.clear();
00038     fSlowScintSpectrum.clear();
00039     fSlowScintEnergies.clear();
00040     fRIndexSpectrum.clear();
00041     fRIndexEnergies.clear();
00042     fAbsLengthSpectrum.clear();
00043     fAbsLengthEnergies.clear();
00044     fRayleighSpectrum.clear();
00045     fRayleighEnergies.clear();
00046     fScintByParticleType=false;
00047     fProtonScintYield=larlight::DATA::INVALID_DOUBLE;
00048     fProtonScintYieldRatio=larlight::DATA::INVALID_DOUBLE;
00049     fPionScintYield=larlight::DATA::INVALID_DOUBLE;
00050     fPionScintYieldRatio=larlight::DATA::INVALID_DOUBLE;
00051     fMuonScintYield=larlight::DATA::INVALID_DOUBLE;
00052     fMuonScintYieldRatio=larlight::DATA::INVALID_DOUBLE;
00053     fKaonScintYield=larlight::DATA::INVALID_DOUBLE;
00054     fKaonScintYieldRatio=larlight::DATA::INVALID_DOUBLE;
00055     fElectronScintYield=larlight::DATA::INVALID_DOUBLE;
00056     fElectronScintYieldRatio=larlight::DATA::INVALID_DOUBLE;
00057     fAlphaScintYield=larlight::DATA::INVALID_DOUBLE;
00058     fAlphaScintYieldRatio=larlight::DATA::INVALID_DOUBLE;
00059     fScintYield = larlight::DATA::INVALID_DOUBLE;
00060     fScintResolutionScale = larlight::DATA::INVALID_DOUBLE;
00061     fScintFastTimeConst = larlight::DATA::INVALID_DOUBLE;
00062     fScintSlowTimeConst = larlight::DATA::INVALID_DOUBLE;
00063     fScintYieldRatio = larlight::DATA::INVALID_DOUBLE;
00064     fScintBirksConstant = larlight::DATA::INVALID_DOUBLE;
00065     fEnableCerenkovLight = false;
00066     fReflectiveSurfaceNames.clear();
00067     fReflectiveSurfaceEnergies.clear();
00068     fReflectiveSurfaceReflectances.clear();    
00069     fReflectiveSurfaceDiffuseFractions.clear();
00070   }

Double_t larutil::LArProperties::Density ( Double_t  temperature = 0.  )  const

g/cm^3

Definition at line 281 of file LArProperties.cc.

References Temperature().

Referenced by BirksCorrection(), Eloss(), ElossVar(), and ModBoxCorrection().

00282   {
00283     // Default temperature use internal value.
00284     if(temperature == 0.)
00285       temperature = Temperature();
00286     
00287     Double_t density = -0.00615*temperature + 1.928;
00288     
00289     return density;
00290   }

Double_t larutil::LArProperties::DriftVelocity ( Double_t  efield = 0.,
Double_t  temperature = 0. 
) const

cm/us

Definition at line 301 of file LArProperties.cc.

References Efield(), larlight::larlight_base::print(), Temperature(), and larlight::MSG::WARNING.

Referenced by larutil::GeometryUtilities::Reconfigure().

00301                                                                                    {
00302     
00303     // Drift Velocity as a function of Electric Field and LAr Temperature
00304     // from : W. Walkowiak, NIM A 449 (2000) 288-294
00305     //
00306     // Efield should have units of kV/cm
00307     // Temperature should have units of Kelvin
00308     
00309     // Default Efield, use internal value.
00310     if(efield == 0.)
00311       efield = Efield();
00312     //
00313     if(efield > 4.0) {
00314 
00315       std::ostringstream msg;
00316       msg <<"DriftVelocity Warning! : E-field value of "
00317       << efield
00318       << " kV/cm is outside of range covered by drift"
00319       << " velocity parameterization. Returned value"
00320       << " may not be correct";
00321       print(larlight::MSG::WARNING,__FUNCTION__,msg.str());
00322     }    
00323     
00324     // Default temperature use internal value.
00325     if(temperature == 0.)
00326       temperature = Temperature();
00327     
00328     if(temperature < 87.0 || temperature > 94.0) {
00329       std::ostringstream msg;
00330       msg << "DriftVelocity Warning! : Temperature value of "
00331       << temperature
00332       << " K is outside of range covered by drift velocity"
00333       << " parameterization. Returned value may not be"
00334       << " correct";
00335       print(larlight::MSG::WARNING,__FUNCTION__,msg.str());
00336     }    
00337     
00338     Double_t tshift = -87.203+temperature;
00339     Double_t xFit = 0.0938163-0.0052563*tshift-0.0001470*tshift*tshift;
00340     Double_t uFit = 5.18406+0.01448*tshift-0.003497*tshift*tshift-0.000516*tshift*tshift*tshift;
00341     Double_t vd;
00342     
00343     
00344     // Icarus Parameter Set, use as default
00345     Double_t  P1 = -0.04640; // K^-1
00346     Double_t  P2 = 0.01712;  // K^-1
00347     Double_t  P3 = 1.88125;   // (kV/cm)^-1
00348     Double_t  P4 =  0.99408;    // kV/cm
00349     Double_t  P5 =  0.01172;   // (kV/cm)^-P6
00350     Double_t  P6 =  4.20214;
00351     Double_t  T0 =  105.749;  // K
00352     // Walkowiak Parameter Set
00353     Double_t    P1W = -0.01481; // K^-1
00354     Double_t  P2W = -0.0075;  // K^-1
00355     Double_t   P3W =  0.141;   // (kV/cm)^-1
00356     Double_t   P4W =  12.4;    // kV/cm
00357     Double_t   P5W =  1.627;   // (kV/cm)^-P6
00358     Double_t   P6W =  0.317;
00359     Double_t   T0W =  90.371;  // K
00360     
00361     // From Craig Thorne . . . currently not documented
00362     // smooth transition from linear at small fields to 
00363     //     icarus fit at most fields to Walkowiak at very high fields
00364     if (efield < xFit) vd=efield*uFit;
00365     else if (efield<0.619) { 
00366       vd = ((P1*(temperature-T0)+1)
00367         *(P3*efield*std::log(1+P4/efield) + P5*std::pow(efield,P6))
00368         +P2*(temperature-T0));
00369     }
00370     else if (efield<0.699) {
00371       vd = 12.5*(efield-0.619)*((P1W*(temperature-T0W)+1)
00372                 *(P3W*efield*std::log(1+P4W/efield) + P5W*std::pow(efield,P6W))
00373                 +P2W*(temperature-T0W))+
00374     12.5*(0.699-efield)*((P1*(temperature-T0)+1)
00375                  *(P3*efield*std::log(1+P4/efield) + P5*std::pow(efield,P6))
00376                  +P2*(temperature-T0));
00377     }
00378     else {
00379       vd = ((P1W*(temperature-T0W)+1)
00380         *(P3W*efield*std::log(1+P4W/efield) + P5W*std::pow(efield,P6W))
00381         +P2W*(temperature-T0W));     
00382     }
00383     
00384     vd /= 10.;
00385 
00386     return vd; // in cm/us
00387   }

Double_t larutil::LArProperties::Efield ( UInt_t  planegap = 0  )  const

kV/cm

Definition at line 292 of file LArProperties.cc.

References fEfield.

Referenced by BirksCorrection(), DriftVelocity(), ModBoxCorrection(), and larutil::GeometryUtilities::Reconfigure().

00293   {
00294     if(planegap >= fEfield.size())
00295       throw LArUtilException("requesting Electric field in a plane gap that is not defined");
00296     
00297     return fEfield.at(planegap);
00298   }

Double_t larutil::LArProperties::ElectronLifetime (  )  const [inline]

< microseconds

Definition at line 69 of file LArProperties.hh.

References fElectronlifetime.

00070     {return fElectronlifetime;}

Double_t larutil::LArProperties::ElectronScintYield (  )  const [inline]

Definition at line 102 of file LArProperties.hh.

References fElectronScintYield.

00102 { return fElectronScintYield;       }

Double_t larutil::LArProperties::ElectronScintYieldRatio (  )  const [inline]

Definition at line 103 of file LArProperties.hh.

References fElectronScintYieldRatio.

00103 { return fElectronScintYieldRatio;  }

Double_t larutil::LArProperties::Eloss ( Double_t  mom,
Double_t  mass,
Double_t  tcut 
) const

Restricted mean dE/dx energy loss (MeV/cm).

Definition at line 445 of file LArProperties.cc.

References Density(), fA, fI, fSa, fScbar, fSk, fSx0, fSx1, and fZ.

00446   {
00447     // Some constants.
00448     
00449     Double_t K = 0.307075;     // 4 pi N_A r_e^2 m_e c^2 (MeV cm^2/mol).
00450     Double_t me = 0.510998918; // Electron mass (MeV/c^2).
00451     
00452     // Calculate kinematic quantities.
00453     
00454     Double_t bg = mom / mass;           // beta*gamma.
00455     Double_t gamma = sqrt(1. + bg*bg);  // gamma.
00456     Double_t beta = bg / gamma;         // beta (velocity).
00457     Double_t mer = 0.001 * me / mass;   // electron mass / mass of incident particle.
00458     Double_t tmax = 2.*me* bg*bg / (1. + 2.*gamma*mer + mer*mer);  // Maximum delta ray energy (MeV).
00459     
00460     // Make sure tcut does not exceed tmax.
00461     
00462     if(tcut == 0. || tcut > tmax)
00463       tcut = tmax;
00464     
00465     // Calculate density effect correction (delta).
00466     
00467     Double_t x = std::log10(bg);
00468     Double_t delta = 0.;
00469     if(x >= fSx0) {
00470       delta = 2. * std::log(10.) * x - fScbar;
00471       if(x < fSx1)
00472     delta += fSa * std::pow(fSx1 - x, fSk);
00473     }
00474     
00475     // Calculate stopping number.
00476     
00477     Double_t B = 0.5 * std::log(2.*me*bg*bg*tcut / (1.e-12 * fI*fI))
00478       - 0.5 * beta*beta * (1. + tcut / tmax) - 0.5 * delta;
00479     
00480     // Don't let the stopping number become negative.
00481     
00482     if(B < 1.)
00483       B = 1.;
00484     
00485     // Calculate dE/dx.
00486     
00487     Double_t dedx = Density() * K*fZ*B / (fA * beta*beta);
00488     
00489     // Done.
00490     
00491     return dedx;
00492   }

Double_t larutil::LArProperties::ElossVar ( Double_t  mom,
Double_t  mass 
) const

Energy loss fluctuation (sigma_E^2 / length in MeV^2/cm).

Definition at line 503 of file LArProperties.cc.

References Density(), fA, and fZ.

00504   {
00505     // Some constants.
00506     
00507     Double_t K = 0.307075;     // 4 pi N_A r_e^2 m_e c^2 (MeV cm^2/mol).
00508     Double_t me = 0.510998918; // Electron mass (MeV/c^2).
00509     
00510     // Calculate kinematic quantities.
00511     
00512     Double_t bg = mom / mass;          // beta*gamma.
00513     Double_t gamma2 = 1. + bg*bg;      // gamma^2.
00514     Double_t beta2 = bg*bg / gamma2;   // beta^2.
00515     
00516     // Calculate final result.
00517     
00518     Double_t result = gamma2 * (1. - 0.5 * beta2) * me * (fZ / fA) * K * Density();
00519     return result;
00520   }

std::map< Double_t, Double_t > larutil::LArProperties::FastScintSpectrum (  )  const

Definition at line 523 of file LArProperties.cc.

References fFastScintEnergies, and fFastScintSpectrum.

00524   {
00525     if(fFastScintSpectrum.size()!=fFastScintEnergies.size()){
00526       std::ostringstream msg;
00527       msg << "The vectors specifying the fast scintillation spectrum are "
00528       << " different sizes - " << fFastScintSpectrum.size()
00529       << " " << fFastScintEnergies.size();
00530       throw LArUtilException(msg.str());
00531     }
00532     
00533     std::map<Double_t, Double_t> ToReturn;
00534     for(size_t i=0; i!=fFastScintSpectrum.size(); ++i)
00535       ToReturn[fFastScintEnergies.at(i)]=fFastScintSpectrum.at(i);
00536     
00537     return ToReturn;
00538   }

MSG::Level larlight::larlight_base::get_verbosity (  )  const [inline, inherited]

Getter for the verbosity level.

Definition at line 46 of file larlight_base.hh.

References larlight::larlight_base::_verbosity_level.

00046 {return _verbosity_level;};

static const LArProperties* larutil::LArProperties::GetME ( bool  default_load = true  )  [inline, static]

Singleton getter.

Definition at line 49 of file LArProperties.hh.

References _me, and LArProperties().

Referenced by main(), larutil::GeometryUtilities::Reconfigure(), and larutil::LArUtilManager::ReconfigureUtilities().

00050     {
00051       if(!_me) _me = new LArProperties(default_load);
00052       return _me;
00053     }

Double_t larutil::LArProperties::KaonScintYield (  )  const [inline]

Definition at line 98 of file LArProperties.hh.

References fKaonScintYield.

00098 { return fKaonScintYield;           }

Double_t larutil::LArProperties::KaonScintYieldRatio (  )  const [inline]

Definition at line 99 of file LArProperties.hh.

References fKaonScintYieldRatio.

00099 { return fKaonScintYieldRatio;      }

bool larutil::LArUtilBase::LoadData ( bool  force_reload = false  )  [virtual, inherited]

Method to load data TTree.

Reimplemented in larutil::Geometry.

Definition at line 20 of file LArUtilBase.cc.

References larutil::LArUtilBase::_file_name, larutil::LArUtilBase::_loaded, larlight::larlight_base::_name, larutil::LArUtilBase::_tree_name, larutil::LArUtilBase::ClearData(), larlight::MSG::ERROR, larlight::MSG::INFO, larlight::MSG::NORMAL, larlight::larlight_base::print(), larutil::LArUtilBase::ReadTree(), and larutil::LArUtilException::what().

Referenced by larutil::DetectorProperties::DetectorProperties(), LArProperties(), and larutil::LArUtilManager::ReconfigureUtilities().

00022   {
00023     if(!force_reload && _loaded) return true;
00024 
00025     print(larlight::MSG::INFO,__FUNCTION__,
00026       Form("Reading-in data for %s",_name.c_str()));
00027 
00028     if(_file_name.empty() || _tree_name.empty()) {
00029 
00030       throw LArUtilException(Form("Either file or tree name not specified to load data for %s",_name.c_str()));
00031       
00032       return false;
00033     }
00034 
00035     bool status=false;
00036     try {
00037 
00038       print(larlight::MSG::NORMAL, __FUNCTION__,
00039         Form("Loading data for %s...\n     file=%s ", _name.c_str(), _file_name.c_str()));
00040       ClearData();
00041       status = ReadTree();
00042       if(!status)
00043     throw LArUtilException("Failed to load !");
00044     }
00045     catch (LArUtilException &e) {
00046 
00047       print(larlight::MSG::ERROR, __FUNCTION__,
00048         Form("Failed loading data for %s...",_name.c_str()));
00049 
00050       print(larlight::MSG::ERROR, __FUNCTION__,
00051         e.what());
00052       
00053       throw e;
00054       status = false;
00055     }
00056 
00057     return status;
00058   }

Double_t larutil::LArProperties::ModBoxCorrection ( Double_t  dQdX  )  const

Definition at line 413 of file LArProperties.cc.

References Density(), Efield(), larutil::kGeVToElectrons, larutil::kModBoxA, and larutil::kModBoxB.

00414   {
00415     // Modified Box model correction has better behavior than the Birks
00416     // correction at high values of dQ/dx.
00417     Double_t  rho    = this->Density();                    // LAr density in g/cm^3
00418     Double_t Wion    = 1000./kGeVToElectrons;        // 23.6 eV = 1e, Wion in MeV/e
00419     Double_t Efield  = this->Efield();                     // Electric Field in the drift region in KV/cm
00420     Double_t Beta    = kModBoxB / (rho * Efield);
00421     Double_t Alpha   = kModBoxA;
00422     Double_t dEdx = (exp(Beta * Wion * dQdx ) - Alpha) / Beta;
00423     
00424     return dEdx;
00425     
00426   }

Double_t larutil::LArProperties::MuonScintYield (  )  const [inline]

Definition at line 96 of file LArProperties.hh.

References fMuonScintYield.

00096 { return fMuonScintYield;           }

Double_t larutil::LArProperties::MuonScintYieldRatio (  )  const [inline]

Definition at line 97 of file LArProperties.hh.

References fMuonScintYieldRatio.

00097 { return fMuonScintYieldRatio;      }

Double_t larutil::LArProperties::PionScintYield (  )  const [inline]

Definition at line 100 of file LArProperties.hh.

References fPionScintYield.

00100 { return fPionScintYield;           }

Double_t larutil::LArProperties::PionScintYieldRatio (  )  const [inline]

Definition at line 101 of file LArProperties.hh.

References fPionScintYieldRatio.

00101 { return fPionScintYieldRatio;      }

void larlight::larlight_base::print ( MSG::Level  level,
std::string  msg 
) const [inline, inherited]

message print out method

Definition at line 56 of file larlight_base.hh.

00057     {if(_verbosity.at(level)) Message::send(level,msg);};

void larlight::larlight_base::print ( MSG::Level  level,
std::string  where,
std::string  msg 
) const [inline, inherited]
Double_t larutil::LArProperties::ProtonScintYield (  )  const [inline]

Definition at line 94 of file LArProperties.hh.

References fProtonScintYield.

00094 { return fProtonScintYield;         }

Double_t larutil::LArProperties::ProtonScintYieldRatio (  )  const [inline]

Definition at line 95 of file LArProperties.hh.

References fProtonScintYieldRatio.

00095 { return fProtonScintYieldRatio;    }

Double_t larutil::LArProperties::RadiationLength (  )  const [inline]

< g/cm^2

Definition at line 72 of file LArProperties.hh.

References fRadiationLength.

00073     { return fRadiationLength; }

std::map< Double_t, Double_t > larutil::LArProperties::RayleighSpectrum (  )  const

Definition at line 596 of file LArProperties.cc.

References fRayleighEnergies, and fRayleighSpectrum.

00597   {
00598     if(fRayleighSpectrum.size()!=fRayleighEnergies.size()){
00599       std::ostringstream msg;
00600       msg << "The vectors specifying the rayleigh spectrum are "
00601       << " different sizes - " << fRayleighSpectrum.size()
00602       << " " << fRayleighEnergies.size();
00603       throw LArUtilException(msg.str());
00604     }
00605     
00606     std::map<Double_t, Double_t> ToReturn;
00607     for(size_t i=0; i!=fRayleighSpectrum.size(); ++i)
00608       ToReturn[fRayleighEnergies.at(i)]=fRayleighSpectrum.at(i);
00609     
00610     return ToReturn;
00611   }

bool larutil::LArProperties::ReadTree (  )  [protected, virtual]

Implements larutil::LArUtilBase.

Definition at line 72 of file LArProperties.cc.

References larutil::LArUtilBase::_file_name, larutil::LArUtilBase::_tree_name, ClearData(), fA, fAbsLengthEnergies, fAbsLengthSpectrum, fAlphaScintYield, fAlphaScintYieldRatio, fArgon39DecayRate, fEfield, fElectronlifetime, fElectronScintYield, fElectronScintYieldRatio, fEnableCerenkovLight, fFastScintEnergies, fFastScintSpectrum, fI, fKaonScintYield, fKaonScintYieldRatio, fMuonScintYield, fMuonScintYieldRatio, fPionScintYield, fPionScintYieldRatio, fProtonScintYield, fProtonScintYieldRatio, fRadiationLength, fRayleighEnergies, fRayleighSpectrum, fReflectiveSurfaceDiffuseFractions, fReflectiveSurfaceEnergies, fReflectiveSurfaceNames, fReflectiveSurfaceReflectances, fRIndexEnergies, fRIndexSpectrum, fSa, fScbar, fScintBirksConstant, fScintByParticleType, fScintFastTimeConst, fScintResolutionScale, fScintSlowTimeConst, fScintYield, fScintYieldRatio, fSk, fSlowScintEnergies, fSlowScintSpectrum, fSx0, fSx1, fTemperature, and fZ.

00073   {
00074     ClearData();
00075 
00076     TChain* ch = new TChain(_tree_name.c_str());
00077     ch->AddFile(_file_name.c_str());
00078 
00079     std::string error_msg("");
00080     if(!(ch->GetBranch("fEfield")))           error_msg += "      fEfield\n";
00081     if(!(ch->GetBranch("fTemperature")))      error_msg += "      fTemperature\n";
00082     if(!(ch->GetBranch("fElectronlifetime"))) error_msg += "      fElectronlifetime\n";
00083     if(!(ch->GetBranch("fRadiationLength")))  error_msg += "      fRadiationLength\n";
00084     if(!(ch->GetBranch("fArgon39DecayRate"))) error_msg += "      fArgon39DecayRate\n";
00085 
00086     if(!(ch->GetBranch("fZ")))     error_msg += "      fZ\n";
00087     if(!(ch->GetBranch("fA")))     error_msg += "      fA\n";
00088     if(!(ch->GetBranch("fI")))     error_msg += "      fI\n";
00089     if(!(ch->GetBranch("fSa")))    error_msg += "      fSa\n";
00090     if(!(ch->GetBranch("fSx0")))   error_msg += "      fSx0\n";
00091     if(!(ch->GetBranch("fSx1")))   error_msg += "      fSx1\n";
00092     if(!(ch->GetBranch("fScbar"))) error_msg += "      fScbar\n";
00093 
00094     if(!(ch->GetBranch("fFastScintSpectrum"))) error_msg += "      fFastScintSpectrum\n";
00095     if(!(ch->GetBranch("fFastScintEnergies"))) error_msg += "      fFastScintEnergies\n";
00096     if(!(ch->GetBranch("fSlowScintSpectrum"))) error_msg += "      fSlowScintSpectrum\n";
00097     if(!(ch->GetBranch("fSlowScintEnergies"))) error_msg += "      fSlowScintEnergies\n";
00098     if(!(ch->GetBranch("fRIndexSpectrum")))    error_msg += "      fRIndexSpectrum\n";
00099     if(!(ch->GetBranch("fRIndexEnergies")))    error_msg += "      fRIndexEnergies\n";
00100     if(!(ch->GetBranch("fAbsLengthSpectrum"))) error_msg += "      fAbsLengthSpectrum\n";
00101     if(!(ch->GetBranch("fAbsLengthEnergies"))) error_msg += "      fAbsLengthEnergies\n";
00102     if(!(ch->GetBranch("fRayleighSpectrum")))  error_msg += "      fRayleighSpectrum\n";
00103     if(!(ch->GetBranch("fRayleighEnergies")))  error_msg += "      fRayleighEnergies\n";
00104 
00105     if(!(ch->GetBranch("fScintByParticleType"))) error_msg += "      fScintByParticleType\n";
00106 
00107     if(!(ch->GetBranch("fProtonScintYield")))        error_msg += "      fProtonScintYield\n";
00108     if(!(ch->GetBranch("fProtonScintYieldRatio")))   error_msg += "      fProtonScintYieldRatio\n";
00109     if(!(ch->GetBranch("fMuonScintYield")))          error_msg += "      fMuonScintYield\n";
00110     if(!(ch->GetBranch("fMuonScintYieldRatio")))     error_msg += "      fMuonScintYieldRatio\n";
00111     if(!(ch->GetBranch("fPionScintYield")))          error_msg += "      fPionScintYield\n";
00112     if(!(ch->GetBranch("fPionScintYieldRatio")))     error_msg += "      fPionScintYieldRatio\n";
00113     if(!(ch->GetBranch("fKaonScintYield")))          error_msg += "      fKaonScintYield\n";
00114     if(!(ch->GetBranch("fKaonScintYieldRatio")))     error_msg += "      fKaonScintYieldRatio\n";
00115     if(!(ch->GetBranch("fElectronScintYield")))      error_msg += "      fElectronScintYield\n";
00116     if(!(ch->GetBranch("fElectronScintYieldRatio"))) error_msg += "      fElectronScintYieldRatio\n";
00117     if(!(ch->GetBranch("fAlphaScintYield")))         error_msg += "      fAlphaScintYield\n";
00118     if(!(ch->GetBranch("fAlphaScintYieldRatio")))    error_msg += "      fAlphaScintYieldRatio\n";
00119 
00120     if(!(ch->GetBranch("fScintYield")))           error_msg += "      fScintYield\n";
00121     if(!(ch->GetBranch("fScintResolutionScale"))) error_msg += "      fScintResolutionScale\n";
00122     if(!(ch->GetBranch("fScintFastTimeConst")))   error_msg += "      fScintFastTimeConst\n";
00123     if(!(ch->GetBranch("fScintSlowTimeConst")))   error_msg += "      fScintSlowTimeConst\n";
00124     if(!(ch->GetBranch("fScintYieldRatio")))      error_msg += "      fScintYieldRatio\n";
00125     if(!(ch->GetBranch("fScintBirksConstant")))   error_msg += "      fScintBirksConstant\n";
00126 
00127     if(!(ch->GetBranch("fEnableCerenkovLight")))  error_msg += "      fEnableCerenkovLight\n";
00128 
00129     if(!(ch->GetBranch("fReflectiveSurfaceNames")))
00130       error_msg += "      fReflectiveSurfaceNames\n";
00131     if(!(ch->GetBranch("fReflectiveSurfaceEnergies")))
00132       error_msg += "      fReflectiveSurfaceEnergies\n";
00133     if(!(ch->GetBranch("fReflectiveSurfaceReflectances")))
00134       error_msg += "      fReflectiveSurfaceReflectances\n";
00135     if(!(ch->GetBranch("fReflectiveSurfaceDiffuseFractions")))
00136       error_msg += "      fReflectiveSurfaceDiffuseFractions\n";
00137 
00138     if(!error_msg.empty()) {
00139 
00140       throw LArUtilException(Form("Missing following TBranches...\n%s",error_msg.c_str()));
00141 
00142       return false;
00143     }
00144 
00145     std::vector<Double_t> *pEfield=nullptr;
00146     ch->SetBranchAddress("fEfield",&pEfield);
00147 
00148     ch->SetBranchAddress("fTemperature",&fTemperature);
00149     ch->SetBranchAddress("fElectronlifetime",&fElectronlifetime);
00150     ch->SetBranchAddress("fRadiationLength",&fRadiationLength);
00151     ch->SetBranchAddress("fArgon39DecayRate",&fArgon39DecayRate);
00152 
00153     ch->SetBranchAddress("fZ",&fZ);
00154     ch->SetBranchAddress("fA",&fA);
00155     ch->SetBranchAddress("fI",&fI);
00156     ch->SetBranchAddress("fSa",&fSa);
00157     ch->SetBranchAddress("fSk",&fSk);
00158     ch->SetBranchAddress("fSx0",&fSx0);
00159     ch->SetBranchAddress("fSx1",&fSx1);
00160     ch->SetBranchAddress("fScbar",&fScbar);
00161 
00162     // Optical parameters for LAr 
00163     std::vector<Double_t> *pFastScintSpectrum=nullptr;
00164     std::vector<Double_t> *pFastScintEnergies=nullptr;
00165     std::vector<Double_t> *pSlowScintSpectrum=nullptr;
00166     std::vector<Double_t> *pSlowScintEnergies=nullptr;
00167     std::vector<Double_t> *pRIndexSpectrum=nullptr;
00168     std::vector<Double_t> *pRIndexEnergies=nullptr;
00169     std::vector<Double_t> *pAbsLengthSpectrum=nullptr;
00170     std::vector<Double_t> *pAbsLengthEnergies=nullptr;
00171     std::vector<Double_t> *pRayleighSpectrum=nullptr;
00172     std::vector<Double_t> *pRayleighEnergies=nullptr;
00173 
00174     ch->SetBranchAddress("fFastScintSpectrum",&pFastScintSpectrum);
00175     ch->SetBranchAddress("fFastScintEnergies",&pFastScintEnergies);
00176     ch->SetBranchAddress("fSlowScintSpectrum",&pSlowScintSpectrum);
00177     ch->SetBranchAddress("fSlowScintEnergies",&pSlowScintEnergies);
00178     ch->SetBranchAddress("fRIndexSpectrum",&pRIndexSpectrum);
00179     ch->SetBranchAddress("fRIndexEnergies",&pRIndexEnergies);
00180     ch->SetBranchAddress("fAbsLengthSpectrum",&pAbsLengthSpectrum);
00181     ch->SetBranchAddress("fAbsLengthEnergies",&pAbsLengthEnergies);
00182     ch->SetBranchAddress("fRayleighSpectrum",&pRayleighSpectrum);
00183     ch->SetBranchAddress("fRayleighEnergies",&pRayleighEnergies);
00184 
00185     ch->SetBranchAddress("fScintByParticleType",&fScintByParticleType);
00186 
00187     ch->SetBranchAddress("fProtonScintYield", &fProtonScintYield);
00188     ch->SetBranchAddress("fProtonScintYieldRatio", &fProtonScintYieldRatio);
00189     ch->SetBranchAddress("fMuonScintYield", &fMuonScintYield);
00190     ch->SetBranchAddress("fMuonScintYieldRatio", &fMuonScintYieldRatio);
00191     ch->SetBranchAddress("fPionScintYield", &fPionScintYield);
00192     ch->SetBranchAddress("fPionScintYieldRatio", &fPionScintYieldRatio);
00193     ch->SetBranchAddress("fKaonScintYield", &fKaonScintYield);
00194     ch->SetBranchAddress("fKaonScintYieldRatio", &fKaonScintYieldRatio);
00195     ch->SetBranchAddress("fElectronScintYield", &fElectronScintYield);
00196     ch->SetBranchAddress("fElectronScintYieldRatio", &fElectronScintYieldRatio);
00197     ch->SetBranchAddress("fAlphaScintYield", &fAlphaScintYield);
00198     ch->SetBranchAddress("fAlphaScintYieldRatio", &fAlphaScintYieldRatio);
00199     
00200     ch->SetBranchAddress("fScintYield", &fScintYield);
00201     ch->SetBranchAddress("fScintResolutionScale", &fScintResolutionScale);
00202     ch->SetBranchAddress("fScintFastTimeConst", &fScintFastTimeConst);
00203     ch->SetBranchAddress("fScintSlowTimeConst", &fScintSlowTimeConst);
00204     ch->SetBranchAddress("fScintYieldRatio", &fScintYieldRatio);
00205     ch->SetBranchAddress("fScintBirksConstant", &fScintBirksConstant);
00206     
00207     ch->SetBranchAddress("fEnableCerenkovLight", &fEnableCerenkovLight);
00208 
00209     std::vector<std::string>            *pReflectiveSurfaceNames=nullptr;
00210     std::vector<Double_t>               *pReflectiveSurfaceEnergies=nullptr;
00211     std::vector<std::vector<Double_t> > *pReflectiveSurfaceReflectances=nullptr;
00212     std::vector<std::vector<Double_t> > *pReflectiveSurfaceDiffuseFractions=nullptr;
00213 
00214     ch->SetBranchAddress("fReflectiveSurfaceNames", &pReflectiveSurfaceNames);
00215     ch->SetBranchAddress("fReflectiveSurfaceEnergies", &pReflectiveSurfaceEnergies);
00216     ch->SetBranchAddress("fReflectiveSurfaceReflectances", &pReflectiveSurfaceReflectances);
00217     ch->SetBranchAddress("fReflectiveSurfaceDiffuseFractions", &pReflectiveSurfaceDiffuseFractions);
00218 
00219     ch->GetEntry(0);
00220     
00221     // Copy vector contents
00222 
00223     for(size_t i=0; i<pEfield->size(); ++i)
00224       fEfield.push_back(pEfield->at(i));
00225 
00226     size_t n_entries = pFastScintSpectrum->size();
00227     fFastScintSpectrum.reserve(n_entries);
00228     fFastScintEnergies.reserve(n_entries);
00229     for(size_t i=0; i<n_entries; ++i) {
00230       fFastScintSpectrum.push_back(pFastScintSpectrum->at(i));
00231       fFastScintEnergies.push_back(pFastScintEnergies->at(i));
00232     }
00233     n_entries = pSlowScintSpectrum->size();
00234     fSlowScintSpectrum.reserve(n_entries);
00235     fSlowScintEnergies.reserve(n_entries);
00236     for(size_t i=0; i<n_entries; ++i) {
00237       fSlowScintSpectrum.push_back(pSlowScintSpectrum->at(i));
00238       fSlowScintEnergies.push_back(pSlowScintEnergies->at(i));
00239     }
00240     n_entries = pRIndexSpectrum->size();
00241     fRIndexSpectrum.reserve(n_entries);
00242     fRIndexEnergies.reserve(n_entries);
00243     for(size_t i=0; i<n_entries; ++i) {
00244       fRIndexSpectrum.push_back(pRIndexSpectrum->at(i));
00245       fRIndexEnergies.push_back(pRIndexEnergies->at(i));
00246     }
00247     n_entries = pAbsLengthSpectrum->size();
00248     fAbsLengthSpectrum.reserve(n_entries);
00249     fAbsLengthEnergies.reserve(n_entries);
00250     for(size_t i=0; i<n_entries; ++i) {
00251       fAbsLengthSpectrum.push_back(pAbsLengthSpectrum->at(i));
00252       fAbsLengthEnergies.push_back(pAbsLengthEnergies->at(i));
00253     }
00254     n_entries = pRayleighSpectrum->size();
00255     fRayleighSpectrum.reserve(n_entries);
00256     fRayleighEnergies.reserve(n_entries);
00257     for(size_t i=0; i<n_entries; ++i) {
00258       fRayleighSpectrum.push_back(pRayleighSpectrum->at(i));
00259       fRayleighEnergies.push_back(pRayleighEnergies->at(i));
00260     }
00261 
00262 
00263     size_t n_surface = pReflectiveSurfaceNames->size();
00264     fReflectiveSurfaceNames.reserve(n_surface);
00265     fReflectiveSurfaceEnergies.reserve(n_surface);
00266     fReflectiveSurfaceReflectances.reserve(n_surface);
00267     fReflectiveSurfaceDiffuseFractions.reserve(n_surface);
00268     for(size_t i=0; i<n_surface; ++i) {
00269 
00270       fReflectiveSurfaceNames.push_back(pReflectiveSurfaceNames->at(i));
00271       fReflectiveSurfaceEnergies.push_back(pReflectiveSurfaceEnergies->at(i));
00272       fReflectiveSurfaceReflectances.push_back(pReflectiveSurfaceReflectances->at(i));
00273       fReflectiveSurfaceDiffuseFractions.push_back(pReflectiveSurfaceDiffuseFractions->at(i));
00274 
00275     }
00276     
00277     delete ch;
00278     return true;
00279   }

std::map< Double_t, Double_t > larutil::LArProperties::RIndexSpectrum (  )  const

Definition at line 559 of file LArProperties.cc.

References fRIndexEnergies, and fRIndexSpectrum.

00560   {
00561     if(fRIndexSpectrum.size()!=fRIndexEnergies.size()){
00562       std::ostringstream msg;
00563       msg << "The vectors specifying the RIndex spectrum are "
00564       << " different sizes - " << fRIndexSpectrum.size()
00565       << " " << fRIndexEnergies.size();
00566       throw LArUtilException(msg.str());
00567     }
00568     
00569     std::map<Double_t, Double_t> ToReturn;
00570     for(size_t i=0; i!=fRIndexSpectrum.size(); ++i)
00571       ToReturn[fRIndexEnergies.at(i)]=fRIndexSpectrum.at(i);
00572     
00573     return ToReturn;
00574   }

Double_t larutil::LArProperties::ScintBirksConstant (  )  const [inline]

Definition at line 87 of file LArProperties.hh.

References fScintBirksConstant.

00087 { return fScintBirksConstant;   }

bool larutil::LArProperties::ScintByParticleType (  )  const [inline]

Definition at line 89 of file LArProperties.hh.

References fScintByParticleType.

00089 { return fScintByParticleType;  }

Double_t larutil::LArProperties::ScintFastTimeConst (  )  const [inline]

Definition at line 85 of file LArProperties.hh.

References fScintFastTimeConst.

00085 { return fScintFastTimeConst;   }

Double_t larutil::LArProperties::ScintResolutionScale (  )  const [inline]

Definition at line 84 of file LArProperties.hh.

References fScintResolutionScale.

00084 { return fScintResolutionScale; }

Double_t larutil::LArProperties::ScintSlowTimeConst (  )  const [inline]

Definition at line 86 of file LArProperties.hh.

References fScintSlowTimeConst.

00086 { return fScintSlowTimeConst;   }

Double_t larutil::LArProperties::ScintYield (  )  const [inline]

Definition at line 91 of file LArProperties.hh.

References fScintYield.

00091 { return fScintYield;           }

Double_t larutil::LArProperties::ScintYieldRatio (  )  const [inline]

Definition at line 92 of file LArProperties.hh.

References fScintYieldRatio.

00092 { return fScintYieldRatio;      }

void larlight::larlight_base::set_verbosity ( MSG::Level  level  )  [virtual, inherited]

Setter for the verbosity level.

Reimplemented in larlight::ana_processor.

Definition at line 8 of file larlight_base.cc.

References larlight::larlight_base::_verbosity, larlight::larlight_base::_verbosity_level, larlight::MSG::DEBUG, larlight::MSG::ERROR, larlight::MSG::INFO, larlight::MSG::MSG_TYPE_MAX, larlight::MSG::NORMAL, and larlight::MSG::WARNING.

Referenced by larlight::larlight_base::larlight_base(), main(), and larlight::ana_processor::set_verbosity().

00010   {
00011     
00012     _verbosity_level=level;
00013     
00014     for(size_t i=(size_t)(MSG::DEBUG); i<(size_t)(MSG::MSG_TYPE_MAX); ++i)
00015       _verbosity[i]=false;
00016     
00017     switch(level){
00018     case MSG::DEBUG:
00019       _verbosity[MSG::DEBUG]=true;
00020     case MSG::INFO:
00021       _verbosity[MSG::INFO]=true;
00022     case MSG::NORMAL:
00023       _verbosity[MSG::NORMAL]=true;
00024     case MSG::WARNING:
00025       _verbosity[MSG::WARNING]=true;
00026     case MSG::ERROR:
00027       _verbosity[MSG::ERROR]=true;
00028     case MSG::MSG_TYPE_MAX:
00029       break;
00030     }
00031     
00032   }

void larutil::LArUtilBase::SetFileName ( const std::string  filename  )  [inline, inherited]

Method to set data file name.

Definition at line 44 of file LArUtilBase.hh.

References larutil::LArUtilBase::_file_name.

Referenced by larutil::LArUtilManager::ReconfigureUtilities().

00045     { _file_name = filename; }

void larutil::LArUtilBase::SetTreeName ( const std::string  treename  )  [inline, inherited]

Method to set data TTree name.

Definition at line 48 of file LArUtilBase.hh.

References larutil::LArUtilBase::_tree_name.

Referenced by larutil::LArUtilManager::ReconfigureUtilities().

00049     { _tree_name = treename; }

std::map< Double_t, Double_t > larutil::LArProperties::SlowScintSpectrum (  )  const

Definition at line 541 of file LArProperties.cc.

References fFastScintEnergies, fFastScintSpectrum, fSlowScintEnergies, and fSlowScintSpectrum.

00542   {
00543     if(fSlowScintSpectrum.size()!=fSlowScintEnergies.size()){
00544       std::ostringstream msg;
00545       msg << "The vectors specifying the slow scintillation spectrum are "
00546       << " different sizes - " << fFastScintSpectrum.size()
00547       << " " << fFastScintEnergies.size();
00548       throw LArUtilException(msg.str());
00549     }
00550     
00551     std::map<Double_t, Double_t> ToReturn;
00552     for(size_t i=0; i!=fSlowScintSpectrum.size(); ++i)
00553       ToReturn[fSlowScintEnergies.at(i)]=fSlowScintSpectrum.at(i);
00554     
00555     return ToReturn;
00556   }

std::map< std::string, std::map< Double_t, Double_t > > larutil::LArProperties::SurfaceReflectanceDiffuseFractions (  )  const

Definition at line 640 of file LArProperties.cc.

References fReflectiveSurfaceDiffuseFractions, fReflectiveSurfaceEnergies, and fReflectiveSurfaceNames.

00641   {
00642     std::map<std::string, std::map<Double_t, Double_t> > ToReturn;
00643     
00644     if(fReflectiveSurfaceNames.size()!=fReflectiveSurfaceDiffuseFractions.size()){
00645       std::ostringstream msg;
00646       msg << "The vectors specifying the surface reflectivities do not have consistent sizes";
00647       LArUtilException(msg.str());
00648     }
00649     for(size_t i=0; i!=fReflectiveSurfaceNames.size(); ++i){
00650       if(fReflectiveSurfaceEnergies.size()!=fReflectiveSurfaceDiffuseFractions.at(i).size()){
00651     std::ostringstream msg;
00652     msg << "The vectors specifying the surface reflectivities do not have consistent sizes";
00653     throw LArUtilException(msg.str());
00654       }
00655     }
00656     for(size_t iName=0; iName!=fReflectiveSurfaceNames.size(); ++iName)
00657       for(size_t iEnergy=0; iEnergy!=fReflectiveSurfaceEnergies.size(); ++iEnergy)
00658     ToReturn[fReflectiveSurfaceNames.at(iName)][fReflectiveSurfaceEnergies.at(iEnergy)]=fReflectiveSurfaceDiffuseFractions.at(iName)[iEnergy];
00659     
00660     return ToReturn;
00661   }

std::map< std::string, std::map< Double_t, Double_t > > larutil::LArProperties::SurfaceReflectances (  )  const

Definition at line 614 of file LArProperties.cc.

References fReflectiveSurfaceEnergies, fReflectiveSurfaceNames, and fReflectiveSurfaceReflectances.

00615   {
00616     std::map<std::string, std::map<Double_t, Double_t> > ToReturn;
00617     
00618     if(fReflectiveSurfaceNames.size()!=fReflectiveSurfaceReflectances.size()){
00619       std::ostringstream msg;
00620     msg << "The vectors specifying the surface reflectivities "
00621         << "do not have consistent sizes";
00622     throw LArUtilException(msg.str());
00623     }
00624     for(size_t i=0; i!=fReflectiveSurfaceNames.size(); ++i){
00625       if(fReflectiveSurfaceEnergies.size()!=fReflectiveSurfaceReflectances.at(i).size()){
00626     std::ostringstream msg;
00627     msg << "The vectors specifying the surface reflectivities do not have consistent sizes";
00628     throw LArUtilException(msg.str());
00629       }
00630     }
00631     for(size_t iName=0; iName!=fReflectiveSurfaceNames.size(); ++iName)
00632       for(size_t iEnergy=0; iEnergy!=fReflectiveSurfaceEnergies.size(); ++iEnergy)
00633     ToReturn[fReflectiveSurfaceNames.at(iName)][fReflectiveSurfaceEnergies.at(iEnergy)]=fReflectiveSurfaceReflectances.at(iName)[iEnergy];
00634     
00635     return ToReturn;
00636     
00637   }

Double_t larutil::LArProperties::Temperature (  )  const [inline]

< kelvin

Definition at line 66 of file LArProperties.hh.

References fTemperature.

Referenced by Density(), DriftVelocity(), and larutil::GeometryUtilities::Reconfigure().

00067     {return fTemperature;}


Member Data Documentation

char larlight::larlight_base::_buf[200] [protected, inherited]

char buffer for message manipulation

Definition at line 57 of file larlight_base.hh.

Referenced by larlight::storage_manager::open(), larlight::storage_manager::prepare_tree(), and larlight::ana_processor::run().

std::string larutil::LArUtilBase::_file_name [protected, inherited]
bool larutil::LArUtilBase::_loaded [protected, inherited]
LArProperties * larutil::LArProperties::_me = 0 [static, private]

Definition at line 37 of file LArProperties.hh.

Referenced by GetME().

std::string larlight::larlight_base::_name [protected, inherited]
std::string larutil::LArUtilBase::_tree_name [protected, inherited]
std::vector<bool> larlight::larlight_base::_verbosity [protected, inherited]
MSG::Level larlight::larlight_base::_verbosity_level [protected, inherited]

holder for specified verbosity level

Definition at line 63 of file larlight_base.hh.

Referenced by larlight::larlight_base::get_verbosity(), larlight::ana_processor::initialize(), and larlight::larlight_base::set_verbosity().

Double_t larutil::LArProperties::fA [private]

Ar atomic mass (g/mol).

Definition at line 129 of file LArProperties.hh.

Referenced by ClearData(), Eloss(), ElossVar(), and ReadTree().

std::vector<Double_t> larutil::LArProperties::fAbsLengthEnergies [private]

Definition at line 146 of file LArProperties.hh.

Referenced by AbsLengthSpectrum(), ClearData(), and ReadTree().

std::vector<Double_t> larutil::LArProperties::fAbsLengthSpectrum [private]

Definition at line 145 of file LArProperties.hh.

Referenced by AbsLengthSpectrum(), ClearData(), and ReadTree().

Definition at line 162 of file LArProperties.hh.

Referenced by AlphaScintYield(), ClearData(), and ReadTree().

Definition at line 163 of file LArProperties.hh.

Referenced by AlphaScintYieldRatio(), ClearData(), and ReadTree().

decays per cm^3 per second

Definition at line 125 of file LArProperties.hh.

Referenced by Argon39DecayRate(), ClearData(), and ReadTree().

std::vector< Double_t > larutil::LArProperties::fEfield [private]

kV/cm

Definition at line 120 of file LArProperties.hh.

Referenced by ClearData(), Efield(), and ReadTree().

microseconds

Definition at line 122 of file LArProperties.hh.

Referenced by ClearData(), ElectronLifetime(), and ReadTree().

Definition at line 160 of file LArProperties.hh.

Referenced by ClearData(), ElectronScintYield(), and ReadTree().

Definition at line 161 of file LArProperties.hh.

Referenced by ClearData(), ElectronScintYieldRatio(), and ReadTree().

Definition at line 172 of file LArProperties.hh.

Referenced by CerenkovLightEnabled(), ClearData(), and ReadTree().

std::vector<Double_t> larutil::LArProperties::fFastScintEnergies [private]

Definition at line 140 of file LArProperties.hh.

Referenced by ClearData(), FastScintSpectrum(), ReadTree(), and SlowScintSpectrum().

std::vector<Double_t> larutil::LArProperties::fFastScintSpectrum [private]

Definition at line 139 of file LArProperties.hh.

Referenced by ClearData(), FastScintSpectrum(), ReadTree(), and SlowScintSpectrum().

Double_t larutil::LArProperties::fI [private]

Ar mean excitation energy (eV).

Definition at line 130 of file LArProperties.hh.

Referenced by ClearData(), Eloss(), and ReadTree().

Definition at line 158 of file LArProperties.hh.

Referenced by ClearData(), KaonScintYield(), and ReadTree().

Definition at line 159 of file LArProperties.hh.

Referenced by ClearData(), KaonScintYieldRatio(), and ReadTree().

Definition at line 154 of file LArProperties.hh.

Referenced by ClearData(), MuonScintYield(), and ReadTree().

Definition at line 155 of file LArProperties.hh.

Referenced by ClearData(), MuonScintYieldRatio(), and ReadTree().

Definition at line 156 of file LArProperties.hh.

Referenced by ClearData(), PionScintYield(), and ReadTree().

Definition at line 157 of file LArProperties.hh.

Referenced by ClearData(), PionScintYieldRatio(), and ReadTree().

Definition at line 152 of file LArProperties.hh.

Referenced by ClearData(), ProtonScintYield(), and ReadTree().

Definition at line 153 of file LArProperties.hh.

Referenced by ClearData(), ProtonScintYieldRatio(), and ReadTree().

g/cm^2

Definition at line 123 of file LArProperties.hh.

Referenced by ClearData(), RadiationLength(), and ReadTree().

std::vector<Double_t> larutil::LArProperties::fRayleighEnergies [private]

Definition at line 148 of file LArProperties.hh.

Referenced by ClearData(), RayleighSpectrum(), and ReadTree().

std::vector<Double_t> larutil::LArProperties::fRayleighSpectrum [private]

Definition at line 147 of file LArProperties.hh.

Referenced by ClearData(), RayleighSpectrum(), and ReadTree().

std::vector<std::vector<Double_t> > larutil::LArProperties::fReflectiveSurfaceDiffuseFractions [private]

Definition at line 177 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and SurfaceReflectanceDiffuseFractions().

std::vector<Double_t> larutil::LArProperties::fReflectiveSurfaceEnergies [private]
std::vector<std::string> larutil::LArProperties::fReflectiveSurfaceNames [private]
std::vector<std::vector<Double_t> > larutil::LArProperties::fReflectiveSurfaceReflectances [private]

Definition at line 176 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and SurfaceReflectances().

std::vector<Double_t> larutil::LArProperties::fRIndexEnergies [private]

Definition at line 144 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and RIndexSpectrum().

std::vector<Double_t> larutil::LArProperties::fRIndexSpectrum [private]

Definition at line 143 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and RIndexSpectrum().

Double_t larutil::LArProperties::fSa [private]

Sternheimer parameter a.

Definition at line 131 of file LArProperties.hh.

Referenced by ClearData(), Eloss(), and ReadTree().

Double_t larutil::LArProperties::fScbar [private]

Sternheimer parameter Cbar.

Definition at line 135 of file LArProperties.hh.

Referenced by ClearData(), Eloss(), and ReadTree().

Definition at line 170 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and ScintBirksConstant().

Definition at line 150 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and ScintByParticleType().

Definition at line 167 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and ScintFastTimeConst().

Definition at line 166 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and ScintResolutionScale().

Definition at line 168 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and ScintSlowTimeConst().

Definition at line 165 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and ScintYield().

Definition at line 169 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and ScintYieldRatio().

Double_t larutil::LArProperties::fSk [private]

Sternheimer parameter k.

Definition at line 132 of file LArProperties.hh.

Referenced by Eloss(), and ReadTree().

std::vector<Double_t> larutil::LArProperties::fSlowScintEnergies [private]

Definition at line 142 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and SlowScintSpectrum().

std::vector<Double_t> larutil::LArProperties::fSlowScintSpectrum [private]

Definition at line 141 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and SlowScintSpectrum().

Double_t larutil::LArProperties::fSx0 [private]

Sternheimer parameter x0.

Definition at line 133 of file LArProperties.hh.

Referenced by ClearData(), Eloss(), and ReadTree().

Double_t larutil::LArProperties::fSx1 [private]

Sternheimer parameter x1.

Definition at line 134 of file LArProperties.hh.

Referenced by ClearData(), Eloss(), and ReadTree().

kelvin

Definition at line 121 of file LArProperties.hh.

Referenced by ClearData(), ReadTree(), and Temperature().

Double_t larutil::LArProperties::fZ [private]

Ar atomic number.

Definition at line 128 of file LArProperties.hh.

Referenced by ClearData(), Eloss(), ElossVar(), and ReadTree().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator

Generated on 3 Jun 2014 for MyProject by  doxygen 1.6.1