Public Member Functions | Private Attributes

SandBoxFlatPhotoTube Class Reference

#include "SandBoxFlatPhotoTube.hh"

Inheritance diagram for SandBoxFlatPhotoTube:
SandBoxPhotoTubeModel

List of all members.

Public Member Functions

 SandBoxFlatPhotoTube ()
 SandBoxFlatPhotoTube (Int_t dtype, Double_t constQE)
 ~SandBoxFlatPhotoTube ()
WCSimRecoClusterGetSmeared (WCSimRecoCluster *theHits, vector< double > pmtcenter)
WCSimRecoClusterGetSmeared (WCSimTrueLightCluster *theHits, vector< double > pmtcenter)
WCSimRecoClusterMCPSmear (WCSimRecoCluster *theHits, vector< double > pmtcenter)
WCSimRecoClusterPMTSmear (WCSimRecoCluster *theHits, vector< double > pmtcenter)
WCSimRecoDigitSmearSpace (WCSimRecoDigit *aHit)
WCSimRecoDigitSmearTime (WCSimRecoDigit *aHit)
WCSimRecoDigitSmearSpaceTime (WCSimRecoDigit *aHit)
WCSimRecoDigitSmearCharge (WCSimRecoDigit *aHit)

Private Attributes

TRandom3 * spaceRand
TRandom3 * timeRand
TRandom3 * chargeRand
TRandom3 * efficRand
Int_t _detectortype
Bool_t _combinehitsintime
Double_t _constQE
Double_t _QEcurve
Double_t _spacesmear
Double_t _timesmear
Double_t _chargesmear
Double_t _timewindow

Detailed Description

Definition at line 11 of file SandBoxFlatPhotoTube.hh.


Constructor & Destructor Documentation

SandBoxFlatPhotoTube::SandBoxFlatPhotoTube (  ) 
SandBoxFlatPhotoTube::SandBoxFlatPhotoTube ( Int_t  dtype,
Double_t  constQE 
)

Definition at line 22 of file SandBoxFlatPhotoTube.cc.

References _constQE, _detectortype, chargeRand, efficRand, spaceRand, and timeRand.

{
  _detectortype=dtype;
  _constQE=constQE;

  spaceRand = new TRandom3(2342343);
  timeRand = new TRandom3(2311343);
  chargeRand = new TRandom3(9011343);
  efficRand = new TRandom3(8733243);
}

SandBoxFlatPhotoTube::~SandBoxFlatPhotoTube (  ) 

Definition at line 33 of file SandBoxFlatPhotoTube.cc.

References chargeRand, efficRand, spaceRand, and timeRand.

{
  delete spaceRand;
  delete timeRand;
  delete chargeRand;
  delete efficRand;
}


Member Function Documentation

WCSimRecoCluster * SandBoxFlatPhotoTube::GetSmeared ( WCSimRecoCluster theHits,
vector< double >  pmtcenter 
)

Reimplemented from SandBoxPhotoTubeModel.

Definition at line 90 of file SandBoxFlatPhotoTube.cc.

References _detectortype, MCPSmear(), and PMTSmear().

{
  WCSimRecoCluster* newrecocluster; 
  if(_detectortype==0) newrecocluster = PMTSmear(theHits, pmtcenter);
  if(_detectortype==1) newrecocluster = MCPSmear(theHits, pmtcenter);
 
  return newrecocluster;
}

WCSimRecoCluster * SandBoxFlatPhotoTube::GetSmeared ( WCSimTrueLightCluster theHits,
vector< double >  pmtcenter 
)

Reimplemented from SandBoxPhotoTubeModel.

Definition at line 99 of file SandBoxFlatPhotoTube.cc.

References _detectortype, WCSimTrueLightCluster::Convert2RecoCluster(), MCPSmear(), and PMTSmear().

{
  WCSimRecoCluster* newrecocluster; 

  WCSimRecoCluster* rctheHits = theHits->Convert2RecoCluster();

  if(_detectortype==0) newrecocluster = PMTSmear(rctheHits, pmtcenter);
  if(_detectortype==1) newrecocluster = MCPSmear(rctheHits, pmtcenter);
 
  return newrecocluster;
}

WCSimRecoCluster * SandBoxFlatPhotoTube::MCPSmear ( WCSimRecoCluster theHits,
vector< double >  pmtcenter 
)

Reimplemented from SandBoxPhotoTubeModel.

Definition at line 111 of file SandBoxFlatPhotoTube.cc.

References WCSimRecoCluster::AddDigit(), WCSimRecoCluster::GetDigit(), WCSimRecoCluster::GetNDigits(), and SmearSpaceTime().

Referenced by GetSmeared().

{
  WCSimRecoCluster *rclust = new WCSimRecoCluster();

  for(int i=0; i<(theHits->GetNDigits()); i++){

    WCSimRecoDigit* rdig = SmearSpaceTime(theHits->GetDigit(i));
    rclust->AddDigit(rdig);
  }


  return rclust;
}

WCSimRecoCluster * SandBoxFlatPhotoTube::PMTSmear ( WCSimRecoCluster theHits,
vector< double >  pmtcenter 
)

Reimplemented from SandBoxPhotoTubeModel.

Definition at line 125 of file SandBoxFlatPhotoTube.cc.

References WCSimRecoCluster::AddDigit(), WCSimRecoCluster::GetDigit(), WCSimRecoCluster::GetNDigits(), and SmearSpaceTime().

Referenced by GetSmeared().

{
  WCSimRecoCluster *rclust = new WCSimRecoCluster();
  
  for(int i=0; i<(theHits->GetNDigits()); i++){

    WCSimRecoDigit* rdig = SmearSpaceTime(theHits->GetDigit(i));
    rclust->AddDigit(rdig);

  }

  return rclust;
}

WCSimRecoDigit * SandBoxFlatPhotoTube::SmearCharge ( WCSimRecoDigit aHit  ) 

Reimplemented from SandBoxPhotoTubeModel.

Definition at line 80 of file SandBoxFlatPhotoTube.cc.

References chargeRand, WCSimRecoDigit::GetQPEs(), WCSimRecoDigit::GetRawQPEs(), WCSimRecoDigit::GetRegion(), WCSimRecoDigit::GetTime(), WCSimRecoDigit::GetX(), WCSimRecoDigit::GetY(), and WCSimRecoDigit::GetZ().

{
  double smQ = chargeRand->Gaus(0.,1.);
  double nQ = (aHit->GetRawQPEs()) + smQ;

  WCSimRecoDigit* newHit = new WCSimRecoDigit((aHit->GetRegion()),(aHit->GetX()),(aHit->GetY()),(aHit->GetZ()),(aHit->GetTime()),nQ,(aHit->GetTime()),(aHit->GetQPEs()));
  return newHit;
}

WCSimRecoDigit * SandBoxFlatPhotoTube::SmearSpace ( WCSimRecoDigit aHit  ) 

Reimplemented from SandBoxPhotoTubeModel.

Definition at line 41 of file SandBoxFlatPhotoTube.cc.

References WCSimRecoDigit::GetQPEs(), WCSimRecoDigit::GetRawQPEs(), WCSimRecoDigit::GetRawTime(), WCSimRecoDigit::GetRegion(), WCSimRecoDigit::GetTime(), WCSimRecoDigit::GetX(), WCSimRecoDigit::GetY(), WCSimRecoDigit::GetZ(), and spaceRand.

{
  double smx = spaceRand->Gaus(0.,1.);
  double smy = spaceRand->Gaus(0.,1.);
  double smz = spaceRand->Gaus(0.,1.);
 
  double nx = (aHit->GetX()) + smx;
  double ny = (aHit->GetY()) + smy;
  double nz = (aHit->GetZ()) + smz;
 
  WCSimRecoDigit* newHit = new WCSimRecoDigit((aHit->GetRegion()),nx,ny,nz,(aHit->GetRawTime()),(aHit->GetRawQPEs()),(aHit->GetTime()),(aHit->GetQPEs()));
  return newHit;
}

WCSimRecoDigit * SandBoxFlatPhotoTube::SmearSpaceTime ( WCSimRecoDigit aHit  ) 

Reimplemented from SandBoxPhotoTubeModel.

Definition at line 64 of file SandBoxFlatPhotoTube.cc.

References WCSimRecoDigit::GetQPEs(), WCSimRecoDigit::GetRawQPEs(), WCSimRecoDigit::GetRegion(), WCSimRecoDigit::GetTime(), WCSimRecoDigit::GetX(), WCSimRecoDigit::GetY(), WCSimRecoDigit::GetZ(), spaceRand, and timeRand.

Referenced by MCPSmear(), and PMTSmear().

{
  double smx = spaceRand->Gaus(0.,1.);
  double smy = spaceRand->Gaus(0.,1.);
  double smz = spaceRand->Gaus(0.,1.);
  double smt = timeRand->Gaus(0.,1.);

  double nx = (aHit->GetX()) + smx;
  double ny = (aHit->GetY()) + smy;
  double nz = (aHit->GetZ()) + smz;
  double nt = (aHit->GetTime()) + smt;

  WCSimRecoDigit* newHit = new WCSimRecoDigit((aHit->GetRegion()),nx,ny,nz,nt,(aHit->GetRawQPEs()),(aHit->GetTime()),(aHit->GetQPEs()));
  return newHit;
}

WCSimRecoDigit * SandBoxFlatPhotoTube::SmearTime ( WCSimRecoDigit aHit  ) 

Reimplemented from SandBoxPhotoTubeModel.

Definition at line 55 of file SandBoxFlatPhotoTube.cc.

References WCSimRecoDigit::GetQPEs(), WCSimRecoDigit::GetRawQPEs(), WCSimRecoDigit::GetRegion(), WCSimRecoDigit::GetTime(), WCSimRecoDigit::GetX(), WCSimRecoDigit::GetY(), WCSimRecoDigit::GetZ(), and timeRand.

{
  double smt = timeRand->Gaus(0.,1.);
  double nt = (aHit->GetTime()) + smt;

  WCSimRecoDigit* newHit = new WCSimRecoDigit((aHit->GetRegion()),(aHit->GetX()),(aHit->GetY()),(aHit->GetZ()),nt,(aHit->GetRawQPEs()),(aHit->GetTime()),(aHit->GetQPEs()));
  return newHit;
}


Member Data Documentation

Definition at line 42 of file SandBoxFlatPhotoTube.hh.

Definition at line 36 of file SandBoxFlatPhotoTube.hh.

Double_t SandBoxFlatPhotoTube::_constQE [private]

Definition at line 38 of file SandBoxFlatPhotoTube.hh.

Referenced by SandBoxFlatPhotoTube().

Definition at line 35 of file SandBoxFlatPhotoTube.hh.

Referenced by GetSmeared(), and SandBoxFlatPhotoTube().

Double_t SandBoxFlatPhotoTube::_QEcurve [private]

Definition at line 39 of file SandBoxFlatPhotoTube.hh.

Definition at line 40 of file SandBoxFlatPhotoTube.hh.

Definition at line 41 of file SandBoxFlatPhotoTube.hh.

Definition at line 44 of file SandBoxFlatPhotoTube.hh.

TRandom3 * SandBoxFlatPhotoTube::chargeRand [private]
TRandom3 * SandBoxFlatPhotoTube::efficRand [private]

Definition at line 33 of file SandBoxFlatPhotoTube.hh.

Referenced by SandBoxFlatPhotoTube(), and ~SandBoxFlatPhotoTube().


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