Public Member Functions | Public Attributes | Private Attributes

WCSimTResidPDF Class Reference

#include "WCSimTResidPDF.hh"

List of all members.

Public Member Functions

 WCSimTResidPDF (WCSimWaterModel *wm)
void SetResolutionParameters (double PMTRes, double smearfactor)
void SetParamPDF (double peakval, double width, double gauswidth)
void SetLandauGaussPDF (double peakval, double width, double gauswidth)
void MakeChromPeakPDF (TH1D *dhist, double defaultN, double pmtres)
void MakeGaussPeakPDF (double pmtres)
void MakeNoisePDF ()
void MakeTotalPDF (double peakfrac, double noisefrac, double scatfrac)
TH1D * GetPDFhist (int which)
Double_t DoSimpleComparison (double tresid)
Double_t DoParamComparison (double tresid)
Double_t DoLandauGaussComparison (double tresid)
Double_t DoFullComparison (double tresid)
Double_t EvalTResidPDF (double tresidval)
 ~WCSimTResidPDF ()

Public Attributes

TH1D * hPeakPDF
TH1D * hNoisePDF
TH1D * hScatPDF
TH1D * hTotalPDF

Private Attributes

WCSimWaterModel_thewm
double _pmtres
double _smearfactor

Detailed Description

Definition at line 10 of file WCSimTResidPDF.hh.


Constructor & Destructor Documentation

WCSimTResidPDF::WCSimTResidPDF ( WCSimWaterModel wm  ) 

Definition at line 22 of file WCSimTResidPDF.cc.

References _thewm.

{
  _thewm=wm;

}

WCSimTResidPDF::~WCSimTResidPDF (  ) 

Member Function Documentation

Double_t WCSimTResidPDF::DoFullComparison ( double  tresid  ) 

Definition at line 194 of file WCSimTResidPDF.cc.

{
  Double_t FOM=0;
  return FOM;
}

Double_t WCSimTResidPDF::DoLandauGaussComparison ( double  tresid  ) 

Definition at line 186 of file WCSimTResidPDF.cc.

{
  Double_t FOM=0;
  return FOM;
}

Double_t WCSimTResidPDF::DoParamComparison ( double  tresid  ) 

Definition at line 178 of file WCSimTResidPDF.cc.

{
  Double_t FOM=0;
  return FOM;
}

Double_t WCSimTResidPDF::DoSimpleComparison ( double  tresid  ) 

Definition at line 170 of file WCSimTResidPDF.cc.

{
  Double_t FOM=0;
  return FOM;
}

Double_t WCSimTResidPDF::EvalTResidPDF ( double  tresidval  ) 

Definition at line 163 of file WCSimTResidPDF.cc.

References hTotalPDF.

{
  return hTotalPDF->Interpolate(tresidval);
}

TH1D * WCSimTResidPDF::GetPDFhist ( int  which  ) 

Definition at line 144 of file WCSimTResidPDF.cc.

References hNoisePDF, hPeakPDF, hScatPDF, and hTotalPDF.

{
  if(which==0) return hPeakPDF;
  if(which==1) return hNoisePDF;
  if(which==2) return hScatPDF;
  return hTotalPDF;
}

void WCSimTResidPDF::MakeChromPeakPDF ( TH1D *  dhist,
double  defaultN,
double  pmtres 
)

Definition at line 46 of file WCSimTResidPDF.cc.

References _thewm, WCSimWaterModel::FinlSpect(), hPeakPDF, WCSimParameters::SpeedOfLight(), and WCSimWaterModel::Vg().

{

  TH1D* hTResidDist = new TH1D("tresdist","Time Residual Distribution",2000,-10.,10.);

  for(int i = 1; i < (dhist->GetNbinsX()); i++){
    
    //    cout<<i<<endl;

    double thedistance = dhist->GetBinCenter(i);

    //calculate the avgtransittime for light traveling thedistance
    double defaulttransittime = thedistance*defaultN/(WCSimParameters::SpeedOfLight());

    //loop over all possible wavelengths
    for (double flmda = 200.; flmda < 700.; flmda = flmda + 10.0) {

      //std::cout << flmda << std::endl;

      // how much light of this particular color will make it accross thedistance, given an initial Cherenkov spectrum
      double chromweight = _thewm->FinlSpect(flmda, thedistance);
      
      //calculate the transit time for this color
      double chromtransittime = thedistance/(_thewm->Vg(flmda));
 
      //calculate the timingresidual between the transit time for that color and the average transit time
      double tresidchrom = chromtransittime-defaulttransittime;

      //loop over possible gaussian smearings from pmt resolution (gaussian convolution)

      double nsigma = 8.;
      double gstepsize = 0.001;
      double nsteps = (nsigma/2.0)/gstepsize;
      double gsmearstep = 0.;

      for(int j = 0; j < nsteps; j++){

        hTResidDist->Fill((tresidchrom+gsmearstep), chromweight*(TMath::Gaus(gsmearstep,0.,pmtres)));
        if(gsmearstep > 0.) hTResidDist->Fill((tresidchrom-gsmearstep), chromweight*(TMath::Gaus(gsmearstep,0.,pmtres)));
        
        gsmearstep += gstepsize;

      }

    }
             
  }
  double norm = hTResidDist->Integral();    //normalisation factor
  if(norm != 0) hTResidDist->Scale(1/norm);

  hPeakPDF = hTResidDist;
}

void WCSimTResidPDF::MakeGaussPeakPDF ( double  pmtres  ) 

Definition at line 101 of file WCSimTResidPDF.cc.

References hPeakPDF.

{
  TH1D* hTResidDist = new TH1D("tresdist","Time Residual Distribution",2000,-10.,10.);

  double nsigma = 8.;
  double gstepsize = 0.001;
  double nsteps = (nsigma/2.0)/gstepsize;
  double gsmearstep = 0.;

  for(int j = 0; j < nsteps; j++){

    hTResidDist->Fill(gsmearstep, (TMath::Gaus(gsmearstep,0.,pmtres)));
    if(gsmearstep > 0.) hTResidDist->Fill(-gsmearstep,(TMath::Gaus(gsmearstep,0.,pmtres)));
    
    gsmearstep += gstepsize;
    
  }

  double norm = hTResidDist->Integral();
  if(norm != 0.) hTResidDist->Scale(1/norm);
  
  hPeakPDF = hTResidDist;
}

void WCSimTResidPDF::MakeNoisePDF (  ) 

Definition at line 127 of file WCSimTResidPDF.cc.

References hNoisePDF.

{
  TH1D* hTResidDist = new TH1D("trd","trd",2000,-10.,10.);

  for(int j = 0; j < ((hTResidDist->GetNbinsX())+1); j++){
  
    hTResidDist->SetBinContent((j+1),1.);
  }

  double norm = hTResidDist->Integral();
  if(norm != 0) hTResidDist->Scale(1/norm);
  
  hNoisePDF = hTResidDist;
}

void WCSimTResidPDF::MakeTotalPDF ( double  peakfrac,
double  noisefrac,
double  scatfrac 
)

Definition at line 154 of file WCSimTResidPDF.cc.

References hPeakPDF, and hTotalPDF.

{

  //  hTotalPDF = peakfrac*hPeakPDF + noisefrac*hNoisePDF + scatfrac*hFracPDF;
  hTotalPDF = hPeakPDF;
}

void WCSimTResidPDF::SetLandauGaussPDF ( double  peakval,
double  width,
double  gauswidth 
)

Definition at line 38 of file WCSimTResidPDF.cc.

{;}

void WCSimTResidPDF::SetParamPDF ( double  peakval,
double  width,
double  gauswidth 
)

Definition at line 42 of file WCSimTResidPDF.cc.

{;}

void WCSimTResidPDF::SetResolutionParameters ( double  PMTRes,
double  smearfactor 
)

Definition at line 30 of file WCSimTResidPDF.cc.

References _pmtres, and _smearfactor.

{
  _pmtres=PMTRes;
  _smearfactor=smearfactor;
}


Member Data Documentation

double WCSimTResidPDF::_pmtres [private]

Definition at line 40 of file WCSimTResidPDF.hh.

Referenced by SetResolutionParameters().

double WCSimTResidPDF::_smearfactor [private]

Definition at line 41 of file WCSimTResidPDF.hh.

Referenced by SetResolutionParameters().

Definition at line 39 of file WCSimTResidPDF.hh.

Referenced by MakeChromPeakPDF(), and WCSimTResidPDF().

Definition at line 32 of file WCSimTResidPDF.hh.

Referenced by GetPDFhist(), and MakeNoisePDF().

Definition at line 31 of file WCSimTResidPDF.hh.

Referenced by GetPDFhist(), MakeChromPeakPDF(), MakeGaussPeakPDF(), and MakeTotalPDF().

Definition at line 33 of file WCSimTResidPDF.hh.

Referenced by GetPDFhist().

Definition at line 34 of file WCSimTResidPDF.hh.

Referenced by EvalTResidPDF(), GetPDFhist(), and MakeTotalPDF().


The documentation for this class was generated from the following files: