#include "LArUtil-TypeDef.hh"
#include <iostream>
#include <TTree.h>
#include <TFile.h>
#include <TSystem.h>
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
< kV/cm
< kelvin
< microseconds
< g/cm^2
< decays per cm^3 per second
< Ar atomic number
< Ar atomic mass (g/mol)
< Ar mean excitation energy (eV)
< Sternheimer parameter a
< Sternheimer parameter k
< Sternheimer parameter x0
< Sternheimer parameter x1
< Sternheimer parameter Cbar
Definition at line 11 of file gen_tree_LArProperties.cc.
00011 { 00012 00013 gSystem->Load("libBase"); 00014 TFile* fout = TFile::Open("tree_LArProperties.root","RECREATE"); 00015 00016 TTree* data_tree = new TTree("LArProperties",""); 00017 00018 std::vector< Double_t > fEfield; 00019 Double_t fTemperature; 00020 Double_t fElectronlifetime; 00021 Double_t fRadiationLength; 00022 data_tree->Branch("fEfield","std::vector<Double_t>", &fEfield); 00023 data_tree->Branch("fTemperature",&fTemperature,"fTemperature/D"); 00024 data_tree->Branch("fElectronlifetime",&fElectronlifetime,"fElectronlifetime/D"); 00025 data_tree->Branch("fRadiationLength",&fRadiationLength,"fRadiationLength/D"); 00026 00027 Double_t fArgon39DecayRate; 00028 data_tree->Branch("fArgon39DecayRate",&fArgon39DecayRate,"fArgon39DecayRate/D"); 00029 00030 // Following parameters are for use in Bethe-Bloch formula for dE/dx. 00031 Double_t fZ; 00032 Double_t fA; 00033 Double_t fI; 00034 Double_t fSa; 00035 Double_t fSk; 00036 Double_t fSx0; 00037 Double_t fSx1; 00038 Double_t fScbar; 00039 data_tree->Branch("fZ",&fZ,"fZ/D"); 00040 data_tree->Branch("fA",&fA,"fA/D"); 00041 data_tree->Branch("fI",&fI,"fI/D"); 00042 data_tree->Branch("fSa",&fSa,"fSa/D"); 00043 data_tree->Branch("fSk",&fSk,"fSk/D"); 00044 data_tree->Branch("fSx0",&fSx0,"fSx0/D"); 00045 data_tree->Branch("fSx1",&fSx1,"fSx1/D"); 00046 data_tree->Branch("fScbar",&fScbar,"fScbar/D"); 00047 00048 // Optical parameters for LAr 00049 std::vector<Double_t> fFastScintSpectrum; 00050 std::vector<Double_t> fFastScintEnergies; 00051 std::vector<Double_t> fSlowScintSpectrum; 00052 std::vector<Double_t> fSlowScintEnergies; 00053 std::vector<Double_t> fRIndexSpectrum; 00054 std::vector<Double_t> fRIndexEnergies; 00055 std::vector<Double_t> fAbsLengthSpectrum; 00056 std::vector<Double_t> fAbsLengthEnergies; 00057 std::vector<Double_t> fRayleighSpectrum; 00058 std::vector<Double_t> fRayleighEnergies; 00059 data_tree->Branch("fFastScintSpectrum","std::vector<Double_t>",&fFastScintSpectrum); 00060 data_tree->Branch("fFastScintEnergies","std::vector<Double_t>",&fFastScintEnergies); 00061 data_tree->Branch("fSlowScintSpectrum","std::vector<Double_t>",&fSlowScintSpectrum); 00062 data_tree->Branch("fSlowScintEnergies","std::vector<Double_t>",&fSlowScintEnergies); 00063 data_tree->Branch("fRIndexSpectrum","std::vector<Double_t>",&fRIndexSpectrum); 00064 data_tree->Branch("fRIndexEnergies","std::vector<Double_t>",&fRIndexEnergies); 00065 data_tree->Branch("fAbsLengthSpectrum","std::vector<Double_t>",&fAbsLengthSpectrum); 00066 data_tree->Branch("fAbsLengthEnergies","std::vector<Double_t>",&fAbsLengthEnergies); 00067 data_tree->Branch("fRayleighSpectrum","std::vector<Double_t>",&fRayleighSpectrum); 00068 data_tree->Branch("fRayleighEnergies","std::vector<Double_t>",&fRayleighEnergies); 00069 00070 bool fScintByParticleType; 00071 data_tree->Branch("fScintByParticleType",&fScintByParticleType,"fScintByParticleType/B"); 00072 00073 Double_t fProtonScintYield; 00074 Double_t fProtonScintYieldRatio; 00075 Double_t fMuonScintYield; 00076 Double_t fMuonScintYieldRatio; 00077 Double_t fPionScintYield; 00078 Double_t fPionScintYieldRatio; 00079 Double_t fKaonScintYield; 00080 Double_t fKaonScintYieldRatio; 00081 Double_t fElectronScintYield; 00082 Double_t fElectronScintYieldRatio; 00083 Double_t fAlphaScintYield; 00084 Double_t fAlphaScintYieldRatio; 00085 data_tree->Branch("fProtonScintYield",&fProtonScintYield,"fProtonScintYield/D"); 00086 data_tree->Branch("fProtonScintYieldRatio",&fProtonScintYieldRatio,"fProtonScintYieldRatio/D"); 00087 data_tree->Branch("fMuonScintYield",&fMuonScintYield,"fMuonScintYield/D"); 00088 data_tree->Branch("fMuonScintYieldRatio",&fMuonScintYieldRatio,"fMuonScintYieldRatio/D"); 00089 data_tree->Branch("fPionScintYield",&fPionScintYield,"fPionScintYield/D"); 00090 data_tree->Branch("fPionScintYieldRatio",&fPionScintYieldRatio,"fPionScintYieldRatio/D"); 00091 data_tree->Branch("fKaonScintYield",&fKaonScintYield,"fKaonScintYield/D"); 00092 data_tree->Branch("fKaonScintYieldRatio",&fKaonScintYieldRatio,"fKaonScintYieldRatio/D"); 00093 data_tree->Branch("fElectronScintYield",&fElectronScintYield,"fElectronScintYield/D"); 00094 data_tree->Branch("fElectronScintYieldRatio",&fElectronScintYieldRatio,"fElectronScintYieldRatio/D"); 00095 data_tree->Branch("fAlphaScintYield",&fAlphaScintYield,"fAlphaScintYield/D"); 00096 data_tree->Branch("fAlphaScintYieldRatio",&fAlphaScintYieldRatio,"fAlphaScintYieldRatio/D"); 00097 00098 Double_t fScintYield; 00099 Double_t fScintResolutionScale; 00100 Double_t fScintFastTimeConst; 00101 Double_t fScintSlowTimeConst; 00102 Double_t fScintYieldRatio; 00103 Double_t fScintBirksConstant; 00104 data_tree->Branch("fScintYield",&fScintYield,"fScintYield/D"); 00105 data_tree->Branch("fScintResolutionScale",&fScintResolutionScale,"fScintResolutionScale/D"); 00106 data_tree->Branch("fScintFastTimeConst",&fScintFastTimeConst,"fScintFastTimeConst/D"); 00107 data_tree->Branch("fScintSlowTimeConst",&fScintSlowTimeConst,"fScintSlowTimeConst/D"); 00108 data_tree->Branch("fScintYieldRatio",&fScintYieldRatio,"fScintYieldRatio/D"); 00109 data_tree->Branch("fScintBirksConstant",&fScintBirksConstant,"fScintBirksConstant/D"); 00110 00111 bool fEnableCerenkovLight; 00112 data_tree->Branch("fEnableCerenkovLight",&fEnableCerenkovLight,"fEnableCerenkovLight/B"); 00113 00114 std::vector<std::string> fReflectiveSurfaceNames; 00115 std::vector<Double_t> fReflectiveSurfaceEnergies; 00116 std::vector<std::vector<Double_t> > fReflectiveSurfaceReflectances; 00117 std::vector<std::vector<Double_t> > fReflectiveSurfaceDiffuseFractions; 00118 data_tree->Branch("fReflectiveSurfaceNames","std::vector<std::string>",&fReflectiveSurfaceNames); 00119 data_tree->Branch("fReflectiveSurfaceEnergies","std::vector<Double_t>",&fReflectiveSurfaceEnergies); 00120 data_tree->Branch("fReflectiveSurfaceReflectances","std::vector<std::vector<Double_t> >",&fReflectiveSurfaceReflectances); 00121 data_tree->Branch("fReflectiveSurfaceDiffuseFractions","std::vector<std::vector<Double_t> >",&fReflectiveSurfaceDiffuseFractions); 00122 00123 data_tree->Fill(); 00124 data_tree->Write(); 00125 fout->Close(); 00126 00127 return 0; 00128 }