#include <PhotonFullBlueTracker.h>
Inheritance diagram for PhotonFullBlueTracker:
Public Member Functions | |
| PhotonFullBlueTracker () | |
| virtual void | Configure (const Registry &r) |
| virtual Bool_t | ScintPhotonToFibreHit (const DigiScintHit *hit, const UgliStripHandle &inStrip, DigiPhoton *&outPhoton) |
Protected Member Functions | |
| virtual void | Reset (const VldContext &cx) |
Private Member Functions | |
| ClassDef (PhotonFullBlueTracker, 1) | |
Private Attributes | |
| PhotonLookupTable | fBlueSpectrumTable |
| PhotonLookupTable | fScintAttenTable |
| PhotonLookupTable | fTiO2ReflecTable |
| PhotonLookupTable | fFibreAbsorbTable |
| Double_t | fScintDecayTime |
| Double_t | fScintAttenTuneFactor |
| Double_t | fTiO2ReflecTuneFactor |
|
|
Definition at line 17 of file PhotonFullBlueTracker.cxx. References MSG, and PhotonConfiguration(). 00017 : 00018 fBlueSpectrumTable("PHOTONBLUESPECTRUM"), 00019 fScintAttenTable("PHOTONSCINTATTEN"), 00020 fTiO2ReflecTable("PHOTONTIO2PAINTREFLEC"), 00021 fFibreAbsorbTable("PHOTONFIBREABSORB"), 00022 fScintAttenTuneFactor(1.0), 00023 fTiO2ReflecTuneFactor(1.0) 00024 { 00025 Configure(PhotonConfiguration()); 00026 00027 if ( (fBlueSpectrumTable.GetNumRows()<1) || 00028 (fScintAttenTable.GetNumRows()<1) || 00029 (fTiO2ReflecTable.GetNumRows()<1) || 00030 (fFibreAbsorbTable.GetNumRows()<1) ) { 00031 MSG("Photon",Msg::kError) << "Can't find data for one of tables! Aborting!\n"; 00032 assert(0); 00033 } 00034 }
|
|
||||||||||||
|
|
|
|
Reimplemented from PhotonTransportModule. Definition at line 39 of file PhotonFullBlueTracker.cxx. References ScintPhoton::Configure(), fScintAttenTuneFactor, fScintDecayTime, fTiO2ReflecTuneFactor, Registry::Get(), MSG, and PhotonTransportModule::SetBluePrescaleFactor(). 00040 {
00041 MSG("Photon",Msg::kDebug) << "Configuring FullBlueTrackerModel." << std::endl;
00042
00043 double tmpd;
00044 if(r.Get("ScintDecayTime",tmpd)) fScintDecayTime = tmpd;
00045 if(r.Get("ScintAttenTuneFactor",tmpd)) {
00046 fScintAttenTuneFactor = tmpd;
00047 MSG("Photon",Msg::kDebug) << "Setting fScintAttenTuneFactor to " << fScintAttenTuneFactor << endl;
00048 }
00049 if(r.Get("TiO2ReflecTuneFactor",tmpd))
00050 fTiO2ReflecTuneFactor = tmpd;
00051
00052 // The other classses in the model need configuring:
00053 ScintPhoton::Configure(r);
00054
00055 SetBluePrescaleFactor(1.0); // No prescaling.
00056 }
|
|
|
Reimplemented from PhotonTransportModule. Definition at line 59 of file PhotonFullBlueTracker.cxx. References fBlueSpectrumTable, fFibreAbsorbTable, fScintAttenTable, fTiO2ReflecTable, and PhotonLookupTable::Reset(). 00060 {
00061 // Ensure tables are up-to-date.
00062 fBlueSpectrumTable.Reset(cx);
00063 fScintAttenTable.Reset(cx);
00064 fTiO2ReflecTable.Reset(cx);
00065 fFibreAbsorbTable.Reset(cx);
00066 }
|
|
||||||||||||||||
|
Reimplemented from PhotonTransportModule. Definition at line 72 of file PhotonFullBlueTracker.cxx. References fBlueSpectrumTable, fScintAttenTable, fScintDecayTime, fTiO2ReflecTable, ScintPhoton::GeomError(), UgliStripHandle::GetHalfLength(), ScintPhoton::InFibre(), PhotonLookupTable::Interpolate(), UgliStripHandle::PartialLength(), PhotonLookupTable::Pick(), ScintPhoton::Propagate(), ScintPhoton::Reset(), ScintPhoton::SetScintAtten(), ScintPhoton::SetTiO2Reflec(), DigiPhoton::SetWavelength(), DigiScintHit::T1(), DigiScintHit::T2(), UgliStripHandle::WlsBypass(), DigiPhoton::X(), DigiScintHit::X1(), DigiScintHit::X2(), DigiScintHit::Y1(), DigiScintHit::Y2(), DigiScintHit::Z1(), and DigiScintHit::Z2(). 00075 {
00076 outPhoton = NULL;
00077 // This default method uses the ScintPhoton class to do the dirty work.
00078
00079
00080 if(!hit) return false;
00081
00082 // Make the photon.
00083 ScintPhoton* photon = new ScintPhoton();
00084
00085 // Find the location/time for the blue photon.
00086
00087 Double_t delta = fRandom->Rndm();
00088 TVector3 x1(hit->X1(),hit->Y1(),hit->Z1());
00089 TVector3 x2(hit->X2(),hit->Y2(),hit->Z2());
00090
00091 TVector3 p = x1 + delta*(x2-x1);
00092 Double_t t = hit->T1() + delta * (hit->T2() - hit->T1()) +
00093 fRandom->Exp(fScintDecayTime);
00094
00095
00096
00097 // The point of this loop is to ensure that we actually manage to
00098 // simulate a photon successfully.. it doesn't just disappear, but
00099 // is successfully tracked to SOMEWHERE.
00100 bool ok;
00101 do {
00102 TVector3 dir(0,0,0); // let the scint photon do it.
00103 photon->Reset(fRandom,
00104 hit,
00105 inStrip,
00106 p, t,
00107 dir);
00108
00109 // Find a wavelength for the photon.
00110 double wavelength_nm = fBlueSpectrumTable.Pick(fRandom->Rndm());
00111 photon->SetWavelength( wavelength_nm * Munits::nm );
00112
00113 // Find the relevant constants.
00114 // Must set these AFTER the Reset() command, which re-initialized the
00115 // defaults.
00116 photon->SetScintAtten( fScintAttenTable.Interpolate(wavelength_nm) *
00117 fScintAttenTuneFactor );
00118 photon->SetTiO2Reflec( fTiO2ReflecTable.Interpolate(wavelength_nm) *
00119 fTiO2ReflecTuneFactor );
00120
00121 photon->Propagate();
00122 ok = ! photon->GeomError(); // Geometry errors are bad.
00123 } while(!ok);
00124
00125 // Successful photon.. may or may not have hit green.
00126 outPhoton = (DigiPhoton*) photon;
00127
00128
00129 // Simple check for intra-strip light leakage. Not completely correct; this SHOULD
00130 // be part of the photon tracking code.. but simple and straightforward.
00131 if(inStrip.WlsBypass() > 0.) {
00132 float x = outPhoton->X();
00133 // Deal with the case where the hit was near the edge of a two-part strip.
00134 // See if the hit is contained or not.
00135 if( ( (x + inStrip.GetHalfLength()) > inStrip.PartialLength(StripEnd::kNegative) )
00136 && ( (inStrip.GetHalfLength() - x) > inStrip.PartialLength(StripEnd::kPositive) )
00137 ) {
00138
00139 // The photon got leaked out into the coil hole bypass
00140 return false;
00141 }
00142 }
00143
00144 return (photon->InFibre());
00145 }
|
|
|
Definition at line 34 of file PhotonFullBlueTracker.h. Referenced by Reset(), and ScintPhotonToFibreHit(). |
|
|
Definition at line 37 of file PhotonFullBlueTracker.h. Referenced by Reset(). |
|
|
Definition at line 35 of file PhotonFullBlueTracker.h. Referenced by Reset(), and ScintPhotonToFibreHit(). |
|
|
Definition at line 40 of file PhotonFullBlueTracker.h. Referenced by Configure(). |
|
|
Definition at line 39 of file PhotonFullBlueTracker.h. Referenced by Configure(), and ScintPhotonToFibreHit(). |
|
|
Definition at line 36 of file PhotonFullBlueTracker.h. Referenced by Reset(), and ScintPhotonToFibreHit(). |
|
|
Definition at line 41 of file PhotonFullBlueTracker.h. Referenced by Configure(). |
1.3.9.1