#include <PhotonFastBlueModel.h>
Inheritance diagram for PhotonFastBlueModel:

Public Member Functions | |
| PhotonFastBlueModel () | |
| 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 | |
| Double_t | GenTime (void) |
| Double_t | GenDx (void) |
| ClassDef (PhotonFastBlueModel, 1) | |
Private Attributes | |
| Double_t | fScintDecayTime |
| Double_t | fFibreRadius |
| Double_t | fReflectorScintReflec |
| PhotonLookupTable | fFastBlueSpectrumTable |
|
|
Definition at line 16 of file PhotonFastBlueModel.cxx. References MSG, and PhotonConfiguration(). 00016 : 00017 fFastBlueSpectrumTable("PHOTONFASTBLUESPECTRUM") 00018 { 00019 Configure(PhotonConfiguration()); // Set up default values. 00020 00021 if (fFastBlueSpectrumTable.GetNumRows()<1) { 00022 MSG("Photon",Msg::kError) << "Can't find data for table PHOTONFASTBLUESPECTRUM Aborting!\n"; 00023 assert(0); 00024 } 00025 SetBluePrescaleFactor(0.20676); // Lots of prescaling! This model is very efficient. 00026 }
|
|
||||||||||||
|
|
|
|
Reimplemented from PhotonTransportModule. Definition at line 31 of file PhotonFastBlueModel.cxx. References fFibreRadius, fReflectorScintReflec, fScintDecayTime, Registry::Get(), MSG, and PhotonTransportModule::SetBluePrescaleFactor(). 00032 {
00033 MSG("Photon",Msg::kDebug) << "Configuring FastBlueModelModel." << std::endl;
00034 double tmpd;
00035 if (r.Get("ScintDecayTime",tmpd)) fScintDecayTime = tmpd;
00036 if (r.Get("FibreRadius",tmpd)) fFibreRadius = tmpd;
00037 if (r.Get("ReflectorScintReflec",tmpd)) fReflectorScintReflec = tmpd;
00038 SetBluePrescaleFactor(0.20676); // Lots of prescaling! This model is very efficient.
00039 }
|
|
|
Definition at line 73 of file PhotonFastBlueModel.cxx. Referenced by ScintPhotonToFibreHit(). 00074 {
00075 /* OLD.
00076 const double kLorentzWidth1 = 0.020726;
00077 const double kArea1 = 5.726562;
00078 const double kLorentzWidth2 = 0.000385;
00079 const double kArea2 = 2.729155;
00080 const double kLambda3 = 0.051335;
00081 const double kArea3 = 0.836376;
00082 */
00083
00084 const double kLorentzWidth1 = 0.017853;
00085 const double kArea1 = 8.178052;
00086 const double kLorentzWidth2 = 0.001309;
00087 const double kArea2 = 0.864215;
00088 const double kLambda3 = 1.000000;
00089 const double kArea3 = 0.000000;
00090
00091 const double kArea = kArea1+kArea2+kArea3;
00092
00093 double choose = fRandom->Rndm() * kArea;
00094
00095 if( choose < kArea1 ) {
00096 return tan(fRandom->Rndm() * TMath::Pi()) * kLorentzWidth1;
00097
00098 } else if ( choose < (kArea2+kArea1) ) {
00099 return tan(fRandom->Rndm() * TMath::Pi()) * kLorentzWidth2;
00100
00101 } else {
00102 double absdx = fRandom->Exp(kLambda3);
00103 if(fRandom->Rndm()>0.5) return -absdx;
00104 return absdx;
00105 }
00106 return 0; // for compiler happiness
00107 }
|
|
|
Definition at line 49 of file PhotonFastBlueModel.cxx. Referenced by ScintPhotonToFibreHit(). 00050 {
00051 // choose a number from a double-exponential.
00052 /* Old.
00053 const double kLambda1 = 0.909973;
00054 const double kLambda2 = 0.012212;
00055 const double kArea1 = 377.615909;
00056 const double kArea2 = 124.790295;
00057 */
00058
00059 const double kLambda1 = 0.846807;
00060 const double kLambda2 = 0.067829;
00061 const double kArea1 = 410.350066;
00062 const double kArea2 = 28.261422;
00063
00064 float tt;
00065 if( fRandom->Rndm()*(kArea1+kArea2) < kArea1 )
00066 tt = fRandom->Exp(kLambda1);
00067 else
00068 tt = fRandom->Exp(kLambda2);
00069
00070 return tt * Munits::ns;
00071 }
|
|
|
Reimplemented from PhotonTransportModule. Definition at line 42 of file PhotonFastBlueModel.cxx. References fFastBlueSpectrumTable, and PhotonLookupTable::Reset(). 00043 {
00044 // Ensure tables are up-to-date.
00045 fFastBlueSpectrumTable.Reset(cx);
00046 }
|
|
||||||||||||||||
|
Reimplemented from PhotonTransportModule. Definition at line 110 of file PhotonFastBlueModel.cxx. References fFastBlueSpectrumTable, fFibreRadius, fScintDecayTime, GenDx(), GenTime(), UgliStripHandle::GetHalfLength(), UgliStripHandle::GetHalfThickness(), UgliStripHandle::IsMirrored(), UgliStripHandle::PartialLength(), PhotonLookupTable::Pick(), DigiScintHit::T1(), DigiScintHit::T2(), UgliStripHandle::WlsBypass(), DigiScintHit::X1(), and DigiScintHit::X2(). 00113 {
00114 outPhoton = NULL;
00115
00116 // Find the location/time for the start of the blue photon.
00117 double along = fRandom->Rndm();
00118 double tstart = hit->T1() + along*(hit->T2() - hit->T1()) + fRandom->Exp(fScintDecayTime);
00119 double xstart = hit->X1() + along*(hit->X2() - hit->X1());
00120
00121 double dt, dx;
00122 do {
00123 dt = GenTime();
00124 dx = GenDx();
00125 } while (dt*Munits::c_light/1.6 < fabs(dx)); // Throw out unphysical solutions.
00126 double t = tstart + dt;
00127 double x = xstart + dx;
00128
00129 double wavelength = fFastBlueSpectrumTable.Pick(fRandom->Rndm()) * Munits::nm;
00130
00131 // So, we have our chosen x, t, lambda.
00132 // Make an arbitrary direction and position relative to the fibre.
00133
00134 // Deal with the ends of the strip.
00135 if ( fabs(x) > inStrip.GetHalfLength() ) {
00136
00137 // Which end did it disappare through?
00138 StripEnd::StripEnd_t end = (x>0)?StripEnd::kPositive:StripEnd::kNegative;
00139 if(inStrip.IsMirrored(end)) {
00140 if(fRandom->Rndm()>fReflectorScintReflec) {
00141 return false; // Photon didn't get reflected
00142 } else {
00143 // Photon bounced off of reflector.
00144 if(x>0)
00145 x = inStrip.GetHalfLength() - x;
00146 else
00147 x = -inStrip.GetHalfLength() -x;
00148 }
00149
00150 } else {
00151 // end wasn't mirrored.
00152 return false; // Photon escapes.
00153 }
00154 }
00155
00156 if(inStrip.WlsBypass() > 0.) {
00157 // Deal with the case where the hit was near the edge of a two-part strip.
00158 // See if the hit is contained or not.
00159 if( ( (x + inStrip.GetHalfLength()) > inStrip.PartialLength(StripEnd::kNegative) )
00160 && ( (inStrip.GetHalfLength() - x) > inStrip.PartialLength(StripEnd::kPositive) )
00161 ) {
00162 // The photon got leaked out into the coil hole bypass
00163 return false;
00164 }
00165
00166 }
00167
00168 outPhoton = new DigiPhoton(hit,
00169 wavelength, t,
00170 x, 0, inStrip.GetHalfThickness()-fFibreRadius*2.0,
00171 0, 0, 1.0);
00172
00173
00174 return true;
00175 }
|
|
|
Definition at line 33 of file PhotonFastBlueModel.h. Referenced by Reset(), and ScintPhotonToFibreHit(). |
|
|
Definition at line 30 of file PhotonFastBlueModel.h. Referenced by Configure(), and ScintPhotonToFibreHit(). |
|
|
Definition at line 31 of file PhotonFastBlueModel.h. Referenced by Configure(). |
|
|
Definition at line 29 of file PhotonFastBlueModel.h. Referenced by Configure(), and ScintPhotonToFibreHit(). |
1.3.9.1