#include <ScintPhoton.h>
Inheritance diagram for ScintPhoton:
Public Member Functions | |
ScintPhoton () | |
ScintPhoton (TRandom *random, const DigiScintHit *hit, const UgliStripHandle &ush, const TVector3 &startPos, Double_t t, const TVector3 &startDir) | |
ScintPhoton (TRandom *random, const DigiScintHit *hit, const UgliStripHandle &ush, const TVector3 &startPos, Double_t t) | |
ScintPhoton (TRandom *random, const DigiScintHit *hit, const UgliStripHandle &ush, Double_t x, Double_t y, Double_t z, Double_t t, Double_t u=0, Double_t v=0, Double_t w=0) | |
void | Reset (TRandom *random, const DigiScintHit *hit, const UgliStripHandle &ush, const TVector3 &startPos, Double_t t, const TVector3 &startDir) |
virtual | ~ScintPhoton () |
void | SetScintAtten (double scintatten) |
void | SetTiO2Reflec (double reflec) |
Bool_t | Propagate () |
Bool_t | PropagateOneLeg () |
virtual void | Print (Option_t *option="") const |
const TVector3 & | GetStart () |
Double_t | GetStartX () const |
Double_t | GetStartY () const |
Double_t | GetStartZ () const |
Double_t | GetStartT () const |
Int_t | GetHitSurface () const |
Float_t | GetTrackLength () const |
Bool_t | InFibre () const |
Bool_t | Reflected () const |
Bool_t | SpecularReflected () const |
Bool_t | DiffuseReflected () const |
Bool_t | Attenuated () const |
Bool_t | Absorbed () const |
Bool_t | GeomError () const |
Int_t | Bounces () const |
Bool_t | FindNextSurface () |
Bool_t | Attenuate () |
Bool_t | Move () |
Double_t | TimeOfFlight (Double_t distance) |
Bool_t | InteractAtSurface () |
void | FindReflectedDirection () |
Double_t | DistanceToSurfaceI () |
Double_t | DistanceToSurfaceII () |
Double_t | DistanceToSurfaceIII () |
Double_t | DistanceToSurfaceIV () |
Double_t | DistanceToSurfaceV () |
Double_t | DistanceToSurfaceVI () |
Double_t | DistanceToFibre () |
ClassDef (ScintPhoton, 1) | |
Static Public Member Functions | |
void | Configure (const Registry &r) |
Public Attributes | |
TRandom * | fRandom |
UgliStripHandle | fUgliStrip |
TVector3 | fStart |
Double_t | fStartT |
TVector3 | fStartV |
Double_t | fHalfHeight |
Double_t | fHalfLength |
Double_t | fHalfWidth |
int | fHitSurface |
Bool_t | fInFibre |
Bool_t | fSpecularReflected |
Bool_t | fDiffuseReflected |
Bool_t | fAttenuated |
Bool_t | fAbsorbed |
Bool_t | fGeomError |
Int_t | fBounces |
Double_t | fTrackLength |
TVector3 | fNormal |
Double_t | fScintAttenLength |
Double_t | fTiO2ReflecDiffuse |
Static Public Attributes | |
Double_t | fsOuterCladdingIndex = 1.42 |
Double_t | fsInnerCladdingIndex = 1.49 |
Double_t | fsFibreIndex = 1.59 |
Double_t | fsFibreRadius = 0.6 * Munits::mm |
Double_t | fsScintIndex = 1.6 |
Double_t | fsScintAttenLength = 0.33 |
Double_t | fsTiO2ReflecDiffuse = 0.93 |
Double_t | fsGrooveReflecCoeff = 0.5 |
Double_t | fsGrooveHalfWidth = 0.7 * Munits::mm |
Double_t | fsReflectorScintReflec = 0.0 |
Int_t | fsLambertianReflection = 1 |
|
Definition at line 57 of file ScintPhoton.cxx.
00057 : 00058 DigiPhoton(), 00059 fRandom(gRandom), 00060 fStart(0.,0.,0.), 00061 fStartT(0.), 00062 fStartV(0.,0.,1.), 00063 fHalfHeight(0.005), 00064 fHalfLength(4.00), 00065 fHalfWidth(0.02083), 00066 fHitSurface(0), 00067 fInFibre(false), 00068 fSpecularReflected(false), 00069 fDiffuseReflected(false), 00070 fAttenuated(false), 00071 fAbsorbed(false), 00072 fGeomError(false), 00073 fBounces(0), 00074 fTrackLength(0.), 00075 fNormal(0,0,0), 00076 fScintAttenLength(fsScintAttenLength), 00077 fTiO2ReflecDiffuse(fsTiO2ReflecDiffuse) 00078 { 00079 } |
|
Definition at line 83 of file ScintPhoton.cxx. References Reset().
00088 : DigiPhoton() 00089 { 00090 Reset( random, hit, ush, startPos, t, startDir ); 00091 } |
|
Definition at line 96 of file ScintPhoton.cxx. References Reset().
00099 : DigiPhoton() 00100 { 00101 TVector3 startDir(0,0,0); 00102 Reset( random, hit, ush, startPos, t, startDir ); 00103 } |
|
Definition at line 108 of file ScintPhoton.cxx. References Reset().
00112 : DigiPhoton() 00113 { 00114 TVector3 startPos(x,y,z); 00115 TVector3 startDir(u,v,w); 00116 Reset( random, hit, ush, startPos, t, startDir ); 00117 } |
|
Definition at line 185 of file ScintPhoton.cxx.
00186 { 00187 } |
|
Definition at line 76 of file ScintPhoton.h. References fAbsorbed.
00076 { return fAbsorbed; }; |
|
Definition at line 355 of file ScintPhoton.cxx. References fAttenuated, fRandom, fScintAttenLength, and fTrackLength. Referenced by PropagateOneLeg().
00356 { 00357 // Compute if photon was absorbed on this leg. 00358 00359 // Figure out how far we go before being absorbed. 00360 // Doing it this way has the nice property that we 00361 // actually know where it stopped. 00362 double distance = fRandom->Exp(fScintAttenLength); 00363 00364 if(distance < fTrackLength) { 00365 // Photon didn't make it. 00366 fAttenuated = true; 00367 // compute how far the photon DID make it. 00368 fTrackLength = distance; 00369 } 00370 00371 return fAttenuated; 00372 } |
|
Definition at line 75 of file ScintPhoton.h. References fAttenuated.
00075 { return fAttenuated; }; |
|
Definition at line 79 of file ScintPhoton.h. References fBounces.
00079 { return fBounces; }; |
|
|
|
Definition at line 189 of file ScintPhoton.cxx. References fsFibreIndex, fsFibreRadius, fsGrooveHalfWidth, fsGrooveReflecCoeff, fsInnerCladdingIndex, fsLambertianReflection, fsOuterCladdingIndex, fsReflectorScintReflec, fsScintAttenLength, fsScintIndex, fsTiO2ReflecDiffuse, and Registry::Get(). Referenced by PhotonNdAfterpulseModel::Configure(), PhotonFullBlueTracker::Configure(), PhotonDefaultModel::Configure(), and PhotonCaldetNoise::Configure().
00190 { 00191 // 00192 // Override any defaults with external configuration parameters. 00193 // 00194 Double_t tmpd; 00195 if (r.Get("ScintIndex",tmpd)) fsScintIndex = tmpd; 00196 if (r.Get("FibreIndex",tmpd)) fsFibreIndex = tmpd; 00197 if (r.Get("OuterCladdingIndex",tmpd)) fsOuterCladdingIndex = tmpd; 00198 if (r.Get("InnerCladdingIndex",tmpd)) fsInnerCladdingIndex = tmpd; 00199 00200 if (r.Get("FibreRadius",tmpd)) fsFibreRadius = tmpd; 00201 if (r.Get("ScintAttenLength",tmpd)) fsScintAttenLength = tmpd; 00202 if (r.Get("TiO2ReflecDiffuse",tmpd)) fsTiO2ReflecDiffuse = tmpd; 00203 if (r.Get("GrooveReflecCoeff",tmpd)) fsGrooveReflecCoeff = tmpd; 00204 if (r.Get("GrooveHalfWidth",tmpd)) fsGrooveHalfWidth = tmpd; 00205 if (r.Get("ReflectorScintReflec",tmpd)) fsReflectorScintReflec = tmpd; 00206 00207 Int_t tmpi; 00208 if (r.Get("LambertianReflection",tmpi)) fsLambertianReflection = tmpi; 00209 } |
|
Definition at line 74 of file ScintPhoton.h. References fDiffuseReflected.
00074 { return fDiffuseReflected; }; |
|
Definition at line 614 of file ScintPhoton.cxx. References fHalfHeight, fsFibreRadius, and kTooLong. Referenced by FindNextSurface().
00615 { 00616 // Find if the photon will intersect with the fibre, 00617 // and if so, where. Return kTooLong if it doesn't intersect. 00618 00619 // the fibre position is (y=0, z=fHalfHeight-fsFibreRadius) 00620 double dy = fPos.Y(); 00621 double dz = fPos.Z() - (fHalfHeight-fsFibreRadius); 00622 00623 // Solve for : | (y,z) + lambda (vy,vz) - (0,h-r) |= r 00624 // where h is the height, and r is the radius. 00625 00626 double v2 = (fDir.Y()*fDir.Y() + fDir.Z()*fDir.Z()); 00627 if(v2==0) return kTooLong; // Going exactly in x-direction. 00628 00629 double vdotdx = (fDir.Y() * dy) + (fDir.Z() * dz); 00630 double insqrt = (vdotdx*vdotdx) - 00631 (v2)*((dy*dy) + (dz*dz) - (fsFibreRadius*fsFibreRadius)); 00632 00633 // The track does not intersect the fibre ever. 00634 if(insqrt<0) return kTooLong; 00635 00636 // the first solution is in the forward direction: take it. 00637 double soln1 = (-vdotdx - TMath::Sqrt(insqrt))/v2; 00638 if(soln1>=0) return soln1; 00639 00640 // only the first solution can be valid; the second solution 00641 // must apply only if we're already in the fibre. 00642 00643 return kTooLong; 00644 } |
|
Definition at line 551 of file ScintPhoton.cxx. References fHalfHeight, and kTooLong. Referenced by FindNextSurface().
00552 { 00553 // Find the distance from pos to surface I. 00554 // Return kTooLong if no interesection. 00555 if(fDir.Z()<=0) return kTooLong; 00556 double lambda = ( fHalfHeight - fPos.Z() )/fDir.Z(); 00557 return lambda; 00558 } |
|
Definition at line 561 of file ScintPhoton.cxx. References fHalfWidth, and kTooLong. Referenced by FindNextSurface().
00562 { 00563 // Find the distance from pos to surface II. 00564 // Return kTooLong if no interesection. 00565 if(fDir.Y()<=0) return kTooLong; 00566 double lambda = ( fHalfWidth - fPos.Y() )/fDir.Y(); 00567 return lambda; 00568 } |
|
Definition at line 571 of file ScintPhoton.cxx. References fHalfHeight, and kTooLong. Referenced by FindNextSurface().
00572 { 00573 // Find the distance from pos to surface III. 00574 // Return kTooLong if no interesection. 00575 if(fDir.Z()>=0) return kTooLong; 00576 double lambda = ( -fHalfHeight - fPos.Z() )/fDir.Z(); 00577 return lambda; 00578 } |
|
Definition at line 582 of file ScintPhoton.cxx. References fHalfWidth, and kTooLong. Referenced by FindNextSurface().
00583 { 00584 // Find the distance from pos to surface IV. 00585 // Return kTooLong if no interesection. 00586 if(fDir.Y()>=0) return kTooLong; 00587 double lambda = ( -fHalfWidth - fPos.Y() )/fDir.Y(); 00588 return lambda; 00589 } |
|
Definition at line 593 of file ScintPhoton.cxx. References fHalfLength, and kTooLong. Referenced by FindNextSurface().
00594 { 00595 // Find the distance from pos to surface V. 00596 // Return kTooLong if no interesection. 00597 if(fDir.X() <= 0.) return kTooLong; 00598 double lambda = ( fHalfLength - fPos.X() )/fDir.X(); 00599 return lambda; 00600 } |
|
Definition at line 603 of file ScintPhoton.cxx. References fHalfLength, and kTooLong. Referenced by FindNextSurface().
00604 { 00605 // Find the distance from fPos to surface VI. 00606 // Return kTooLong if no interesection. 00607 if(fDir.X() >= 0.) return kTooLong; 00608 double lambda = ( -fHalfLength - fPos.X() )/fDir.X(); 00609 return lambda; 00610 } |
|
Definition at line 303 of file ScintPhoton.cxx. References DistanceToFibre(), DistanceToSurfaceI(), DistanceToSurfaceII(), DistanceToSurfaceIII(), DistanceToSurfaceIV(), DistanceToSurfaceV(), DistanceToSurfaceVI(), fGeomError, fHitSurface, fTrackLength, kTooLong, and MSG. Referenced by PropagateOneLeg().
00304 { 00305 //the photon cannot start off in the fiber or the groove as they dont 00306 //scintillate - for now let the groove be the same as the fiber - it 00307 //basically is anyway. 00308 /* 00309 // let's ignore this. 00310 // it's a small correction... 00311 // instead, we'll simply only allow incoming fibre hits, not outgoing 00312 // fibre hits. 00313 if((TMath::Power(fStartY,2.) 00314 +TMath::Power((fStartZ-(fHalfHeight-fsFibreRadius)),2.))<=TMath::Power(fsFibreRadius,2.) 00315 ){ 00316 fInFibre = false; 00317 return false; 00318 } 00319 else if(TMath::Abs(fStartY)<=fsFibreRadius && fStartZ>=fHalfHeight-2.*fsFibreRadius){ 00320 fInFibre = false; 00321 return false; 00322 } 00323 */ 00324 00325 //find which surface the photon would hit 00326 fTrackLength = kTooLong; // The distance to the nearest surface. 00327 fHitSurface = 0; 00328 double lengths[8]; 00329 lengths[1] = DistanceToSurfaceI(); 00330 lengths[2] = DistanceToSurfaceII(); 00331 lengths[3] = DistanceToSurfaceIII(); 00332 lengths[4] = DistanceToSurfaceIV(); 00333 lengths[5] = DistanceToSurfaceV(); 00334 lengths[6] = DistanceToSurfaceVI(); 00335 lengths[7] = DistanceToFibre(); 00336 00337 for(int isurface = 1; isurface<=7; isurface++) { 00338 if( ( lengths[isurface] < fTrackLength ) && (lengths[isurface]>=0) ){ 00339 fHitSurface = isurface; 00340 fTrackLength = lengths[isurface]; 00341 } 00342 } 00343 00344 if(fHitSurface == 0) { 00345 MSG("Photon",Msg::kWarning) << "Photon hit no surface!" << endl; 00346 fGeomError = true; 00347 return false; 00348 } 00349 00350 return true; 00351 } |
|
Definition at line 507 of file ScintPhoton.cxx. References fDiffuseReflected, fNormal, fRandom, fsLambertianReflection, and fSpecularReflected. Referenced by PropagateOneLeg().
00508 { 00509 // New direction after a bounce. 00510 00511 // FIXME: specular reflection only. 00512 double n_dot_v = fNormal.Dot(fDir); 00513 00514 if(fSpecularReflected) { 00515 fDir = fDir - 2.0*n_dot_v*fNormal; 00516 return; 00517 } 00518 00519 if(fDiffuseReflected) { 00520 // Find a second vector, b, at right angles to the normal. 00521 // Cheat here: we know all normals are either along X or perp to X 00522 00523 TVector3 a = fNormal.Orthogonal(); 00524 TVector3 b = fNormal.Cross(a); 00525 00526 double cosTheta; 00527 if(fsLambertianReflection==0) { 00528 cosTheta = fRandom->Rndm(); // 0 to 1 00529 } else { 00530 cosTheta = sqrt(fRandom->Rndm()); 00531 } 00532 double phi = 2.*TMath::Pi()*fRandom->Rndm(); // 0 to 2pi 00533 double sinTheta = TMath::Sqrt(1.0-cosTheta*cosTheta); 00534 double sinPhi = TMath::Sin(phi); 00535 double cosPhi = TMath::Cos(phi); 00536 00537 fDir = fNormal*cosTheta 00538 + a*sinTheta*cosPhi 00539 + b*sinTheta*sinPhi; 00540 if(fDir.Mag2()==0) { 00541 cout << "mag0: " << fNormal.X() << "\t" << fNormal.Y() << "\t" << fNormal.Z() << endl; 00542 cout << "mag0: " << a.x() << "\t" << a.y() << "\t" << a.z() << endl; 00543 cout << "mag0: " << b.x() << "\t" << b.y() << "\t" << b.z() << endl; 00544 } 00545 } 00546 } |
|
Definition at line 77 of file ScintPhoton.h. References fGeomError. Referenced by PhotonFullBlueTracker::ScintPhotonToFibreHit(), and PhotonDefaultModel::ScintPhotonToFibreHit().
00077 { return fGeomError; }; |
|
Definition at line 67 of file ScintPhoton.h. References fHitSurface.
00067 { return fHitSurface; }; |
|
Definition at line 61 of file ScintPhoton.h. References fStart.
00061 { return fStart; }; |
|
Definition at line 65 of file ScintPhoton.h. References fStartT.
00065 { return fStartT; }; |
|
Definition at line 62 of file ScintPhoton.h. References fStart.
00062 { return fStart.X(); }; |
|
Definition at line 63 of file ScintPhoton.h. References fStart.
00063 { return fStart.Y(); }; |
|
Definition at line 64 of file ScintPhoton.h. References fStart.
00064 { return fStart.Z(); }; |
|
Definition at line 68 of file ScintPhoton.h. References fTrackLength.
00068 { return fTrackLength; }; |
|
Definition at line 71 of file ScintPhoton.h. References fInFibre. Referenced by PhotonFullBlueTracker::ScintPhotonToFibreHit(), and PhotonDefaultModel::ScintPhotonToFibreHit().
00071 { return fInFibre; }; |
|
Definition at line 392 of file ScintPhoton.cxx. References fAbsorbed, fDiffuseReflected, fHalfHeight, fHitSurface, fInFibre, fNormal, fRandom, fsFibreRadius, fsGrooveHalfWidth, fsGrooveReflecCoeff, fsOuterCladdingIndex, fSpecularReflected, fsReflectorScintReflec, fsScintIndex, fTiO2ReflecDiffuse, fUgliStrip, UgliStripHandle::IsMirrored(), MSG, StripEnd::StripEnd_t, DigiPhoton::Y(), and DigiPhoton::Z(). Referenced by PropagateOneLeg().
00393 { 00394 // 00395 // Deals with whatever process happens at the surface. 00396 // 00397 // Sets the interaction flags and the surface normal. 00398 // Returns false if tracking error. 00399 00400 fNormal.SetXYZ(0,0,0); 00401 00402 // Fibre interaction: 00403 00404 if(fHitSurface == 7) { 00405 // If the photon hit the fibre cladding, find out if it reflected or got absorbed. 00406 00407 // The normal to the fibre surface is the norm of (y,z)-(fy,fz) 00408 // Surface normals at interaction point. 00409 fNormal.SetXYZ(0, 00410 Y(), 00411 Z()- (fHalfHeight-fsFibreRadius)); 00412 fNormal.SetMag(1.0); 00413 00414 // Dot product of direction vector and surface normal: 00415 double n_dot_v = fNormal.Dot(fDir); 00416 00417 //the condition for reflection back into the scintillator is 00418 //if incident angle is > sin(n_2/n_1) where n_1 is the index of 00419 //refraction of the scintillator and n_2 is that for the fiber outer cladding 00420 //because the index for the inner cladding is greater than that for the outer 00421 //cladding, there can be no total reflection between outer and inner. 00422 00423 // -ve sign because n points outwards. 00424 00425 double incidentAngle = TMath::ACos(- n_dot_v); 00426 if(incidentAngle<TMath::ASin(fsOuterCladdingIndex/fsScintIndex)){ 00427 00428 //the photon made it into the fiber and that should be enough 00429 //for it to wavelength shift to a green photon - the mean free 00430 //path of a photon in the fiber is of order microns and the 00431 //WLS core of the fiber is 1.128 mm in diameter, or about 3 orders 00432 //of magnitude greater than the mean free path 00433 fInFibre = true; 00434 00435 } else { 00436 fSpecularReflected = true; 00437 } 00438 00439 return true; 00440 } // end surface == 7; 00441 00442 00443 // Was it a wall? 00444 if( ( fHitSurface >=1 ) && (fHitSurface <=4) ) { 00445 if( fHitSurface == 1 ) { 00446 // hit the top 00447 fNormal.SetXYZ(0,0,-1); 00448 00449 // Check to see if it hit the groove. 00450 if( (TMath::Abs(Y()) < fsGrooveHalfWidth) ) { // In the groove. 00451 if(fRandom->Rndm()>fsGrooveReflecCoeff) 00452 fSpecularReflected = true; 00453 else 00454 fAbsorbed = true; 00455 return true; 00456 } 00457 } else if ( fHitSurface == 2 ) { 00458 fNormal.SetXYZ(0,-1,0); 00459 } else if ( fHitSurface == 3 ) { 00460 fNormal.SetXYZ(0,0,1); 00461 } else if ( fHitSurface == 4 ) { 00462 fNormal.SetXYZ(0,1,0); 00463 } 00464 00465 // It hit TiO2 wall. 00466 double rand = fRandom->Rndm(); 00467 if(rand < fTiO2ReflecDiffuse) { 00468 fDiffuseReflected = true; 00469 } else { 00470 fAbsorbed = true; 00471 } 00472 00473 return true; 00474 } 00475 00476 00477 // Check to see if it hit an end. 00478 if( (fHitSurface == 5) || (fHitSurface == 6)) { 00479 00480 // It hit the end. Was the end mirrored? 00481 //if( fHitSurface == 5 ): 00482 StripEnd::StripEnd_t end = StripEnd::kPositive; 00483 fNormal.SetXYZ(-1,0,0); 00484 00485 if( fHitSurface == 6 ) { 00486 fNormal.SetXYZ(1,0,0); 00487 end = StripEnd::kNegative; 00488 } 00489 00490 if( fUgliStrip.IsMirrored(end) ) { 00491 if(fRandom->Rndm()<=fsReflectorScintReflec) 00492 fSpecularReflected = true; 00493 else 00494 fAbsorbed = true; 00495 } else { 00496 fAbsorbed = true; // Flies off into the darkness of the pigtail. 00497 } 00498 00499 return true; 00500 } 00501 00502 MSG("Photon",Msg::kError) << "Error in InteractAtSurface: surface unrecognized." << endl; 00503 return false; 00504 } |
|
Definition at line 376 of file ScintPhoton.cxx. References fTrackLength, and TimeOfFlight(). Referenced by PropagateOneLeg().
00377 { 00378 fPos += fDir*fTrackLength; 00379 fT += TimeOfFlight(fTrackLength); 00380 return true; 00381 } |
|
Reimplemented from DigiPhoton. Definition at line 283 of file ScintPhoton.cxx. References fAbsorbed, fAttenuated, fDiffuseReflected, fGeomError, fHitSurface, fInFibre, fSpecularReflected, fStart, fStartV, fTrackLength, DigiPhoton::X(), DigiPhoton::Y(), and DigiPhoton::Z().
00284 { 00285 cout << "ScintPhoton: (Units in cm)" << endl; 00286 cout << " Started: " << fStart.X() << "\t" << fStart.Y() << "\t" << fStart.Z() << endl; 00287 cout << " StartDir: " << fStartV.X() << "\t" << fStartV.Y() << "\t" << fStartV.Z() << endl; 00288 00289 cout << " Pos: " << X() << "\t" << Y() << "\t" << Z() << endl; 00290 cout << " Dir After: " << fDir.X() << "\t" << fDir.Y() << "\t" << fDir.Z() << endl; 00291 cout << " Hit surface: " << fHitSurface << "\t Track length: " << fTrackLength << endl; 00292 if(fInFibre) cout << " In fibre. "; 00293 if(fSpecularReflected) cout << " SpecReflec. "; 00294 if(fDiffuseReflected) cout << " DiffuseReflec. "; 00295 if(fAttenuated) cout << " Attenuated. "; 00296 if(fAbsorbed) cout << " Absorbed. "; 00297 if(fGeomError) cout << " GeomError. "; 00298 cout << endl; 00299 } |
|
Definition at line 258 of file ScintPhoton.cxx. References fAbsorbed, fAttenuated, fBounces, fGeomError, fInFibre, and PropagateOneLeg(). Referenced by PhotonFullBlueTracker::ScintPhotonToFibreHit(), and PhotonDefaultModel::ScintPhotonToFibreHit().
00259 { 00260 // Propagate a ScintPhoton through the scintillator 00261 // until it is absorbed, attenuated, or hits the fibre. 00262 // Return false if the photon fails for some reason: indication 00263 // that the caller should not count this trial. 00264 00265 fBounces = 0; 00266 while(true) { 00267 00268 PropagateOneLeg(); 00269 if(fGeomError) return false; 00270 if(fAttenuated) return true; 00271 if(fAbsorbed) return true; 00272 if(fInFibre) return true; 00273 00274 // We got bounced. 00275 00276 fBounces++; 00277 } 00278 00279 return false; 00280 } |
|
Definition at line 213 of file ScintPhoton.cxx. References Attenuate(), fAbsorbed, fAttenuated, fDiffuseReflected, fGeomError, FindNextSurface(), FindReflectedDirection(), fInFibre, fSpecularReflected, InteractAtSurface(), Move(), and MSG. Referenced by Propagate().
00214 { 00215 // Propagate a ScintPhoton through the scintillator 00216 // to the next surface and evaluate if it survives. 00217 00218 // Return true if everything is OK. 00219 00220 fAttenuated = false; 00221 fSpecularReflected = false; 00222 fDiffuseReflected = false; 00223 fAttenuated = false; // Caught in scintillator. 00224 fAbsorbed = false; // Caught on wall. 00225 fGeomError = false; // Too tricky for our stupid little code 00226 00227 00228 bool bounceOk = FindNextSurface(); // Propagate to next boundary. 00229 if(!bounceOk) { 00230 MSG("Photon",Msg::kWarning) << "Bounce failed." << endl; 00231 fGeomError = true; 00232 return false; 00233 } 00234 00235 // See if the photon survived this leg. 00236 Attenuate(); 00237 Move(); 00238 00239 if(fAttenuated) return true; 00240 00241 // Interact with the surface. 00242 InteractAtSurface(); 00243 00244 // See if the photon made it to the scintillator 00245 if(fInFibre) return true; 00246 if(fAbsorbed) return true; 00247 00248 // It got reflected, so compute the next bounce direction. 00249 if(fSpecularReflected || fDiffuseReflected) { 00250 FindReflectedDirection(); 00251 return true; 00252 } 00253 00254 return false; 00255 } |
|
Definition at line 72 of file ScintPhoton.h. References fDiffuseReflected, and fSpecularReflected.
00072 { return fSpecularReflected || fDiffuseReflected; }; |
|
Definition at line 124 of file ScintPhoton.cxx. References fAbsorbed, fAttenuated, fBounces, fDiffuseReflected, fGeomError, fHalfHeight, fHalfLength, fHalfWidth, fHitSurface, fInFibre, fRandom, fScintAttenLength, fSpecularReflected, fsScintAttenLength, fStart, fStartT, fStartV, fsTiO2ReflecDiffuse, fTiO2ReflecDiffuse, fTrackLength, fUgliStrip, UgliStripHandle::GetHalfLength(), UgliStripHandle::GetHalfThickness(), UgliStripHandle::GetHalfWidth(), UgliStripHandle::IsValid(), and DigiPhoton::SetParentHit(). Referenced by ScintPhoton(), PhotonFullBlueTracker::ScintPhotonToFibreHit(), and PhotonDefaultModel::ScintPhotonToFibreHit().
00129 { 00130 00131 if(random) fRandom = random; 00132 else fRandom = gRandom; 00133 00134 SetParentHit(hit); 00135 00136 fUgliStrip = ush; 00137 if(fUgliStrip.IsValid()) { 00138 fHalfHeight = fUgliStrip.GetHalfThickness(); 00139 fHalfLength = fUgliStrip.GetHalfLength(); 00140 fHalfWidth = fUgliStrip.GetHalfWidth(); 00141 } else { 00142 // Hardwired defaults, just in case. 00143 fHalfHeight=(0.005); 00144 fHalfLength=(4.00); 00145 fHalfWidth=(0.02083); 00146 } 00147 00148 fHitSurface = 0; 00149 fInFibre = false; 00150 fSpecularReflected = false; 00151 fDiffuseReflected = false; 00152 fAttenuated = false; 00153 fAbsorbed = false; 00154 fGeomError = false; 00155 fBounces = 0; // 00156 fTrackLength = 0; 00157 00158 fStart = startPos; 00159 fStartT = t; 00160 00161 if(startDir.Mag2()==0) { 00162 // Roll a starting direction. 00163 double cosTheta = 1. - 2.*fRandom->Rndm(); 00164 double sinTheta = TMath::Sin(TMath::ACos(cosTheta)); 00165 double phi = 2.*TMath::Pi()*fRandom->Rndm(); 00166 00167 fStartV.SetXYZ( sinTheta*TMath::Cos(phi), 00168 sinTheta*TMath::Sin(phi), 00169 cosTheta ); 00170 } 00171 00172 // Set up the DigiPhoton. 00173 fPos = fStart ; 00174 fDir = fStartV; 00175 fT = fStartT; 00176 00177 // Configuration. 00178 fScintAttenLength =fsScintAttenLength; 00179 fTiO2ReflecDiffuse =fsTiO2ReflecDiffuse; 00180 } |
|
Definition at line 53 of file ScintPhoton.h. References fScintAttenLength. Referenced by PhotonFullBlueTracker::ScintPhotonToFibreHit().
00053 { fScintAttenLength = scintatten; }; |
|
Definition at line 54 of file ScintPhoton.h. References fTiO2ReflecDiffuse. Referenced by PhotonFullBlueTracker::ScintPhotonToFibreHit().
00054 { fTiO2ReflecDiffuse = reflec; }; |
|
Definition at line 73 of file ScintPhoton.h. References fSpecularReflected.
00073 { return fSpecularReflected; }; |
|
Definition at line 384 of file ScintPhoton.cxx. References fsScintIndex. Referenced by Move().
00385 { 00386 // Time for a photon to travel a distance in scintillator. 00387 return distance * fsScintIndex / Munits::c_light; 00388 } |
|
Definition at line 121 of file ScintPhoton.h. Referenced by Absorbed(), InteractAtSurface(), Print(), Propagate(), PropagateOneLeg(), and Reset(). |
|
Definition at line 120 of file ScintPhoton.h. Referenced by Attenuate(), Attenuated(), Print(), Propagate(), PropagateOneLeg(), and Reset(). |
|
Definition at line 123 of file ScintPhoton.h. Referenced by Bounces(), Propagate(), and Reset(). |
|
Definition at line 119 of file ScintPhoton.h. Referenced by DiffuseReflected(), FindReflectedDirection(), InteractAtSurface(), Print(), PropagateOneLeg(), Reflected(), and Reset(). |
|
Definition at line 122 of file ScintPhoton.h. Referenced by FindNextSurface(), GeomError(), Print(), Propagate(), PropagateOneLeg(), and Reset(). |
|
Definition at line 111 of file ScintPhoton.h. Referenced by DistanceToFibre(), DistanceToSurfaceI(), DistanceToSurfaceIII(), InteractAtSurface(), and Reset(). |
|
Definition at line 112 of file ScintPhoton.h. Referenced by DistanceToSurfaceV(), DistanceToSurfaceVI(), and Reset(). |
|
Definition at line 113 of file ScintPhoton.h. Referenced by DistanceToSurfaceII(), DistanceToSurfaceIV(), and Reset(). |
|
Definition at line 116 of file ScintPhoton.h. Referenced by FindNextSurface(), GetHitSurface(), InteractAtSurface(), Print(), and Reset(). |
|
Definition at line 117 of file ScintPhoton.h. Referenced by InFibre(), InteractAtSurface(), Print(), Propagate(), PropagateOneLeg(), and Reset(). |
|
Definition at line 126 of file ScintPhoton.h. Referenced by FindReflectedDirection(), and InteractAtSurface(). |
|
Definition at line 101 of file ScintPhoton.h. Referenced by Attenuate(), FindReflectedDirection(), InteractAtSurface(), and Reset(). |
|
Definition at line 130 of file ScintPhoton.h. Referenced by Attenuate(), Reset(), and SetScintAtten(). |
|
Definition at line 42 of file ScintPhoton.cxx. Referenced by Configure(). |
|
Definition at line 43 of file ScintPhoton.cxx. Referenced by Configure(), DistanceToFibre(), and InteractAtSurface(). |
|
Definition at line 48 of file ScintPhoton.cxx. Referenced by Configure(), and InteractAtSurface(). |
|
Definition at line 47 of file ScintPhoton.cxx. Referenced by Configure(), and InteractAtSurface(). |
|
Definition at line 41 of file ScintPhoton.cxx. Referenced by Configure(). |
|
Definition at line 50 of file ScintPhoton.cxx. Referenced by Configure(), and FindReflectedDirection(). |
|
Definition at line 40 of file ScintPhoton.cxx. Referenced by Configure(), and InteractAtSurface(). |
|
Definition at line 118 of file ScintPhoton.h. Referenced by FindReflectedDirection(), InteractAtSurface(), Print(), PropagateOneLeg(), Reflected(), Reset(), and SpecularReflected(). |
|
Definition at line 49 of file ScintPhoton.cxx. Referenced by Configure(), and InteractAtSurface(). |
|
Definition at line 45 of file ScintPhoton.cxx. Referenced by Configure(), and Reset(). |
|
Definition at line 44 of file ScintPhoton.cxx. Referenced by Configure(), InteractAtSurface(), and TimeOfFlight(). |
|
Definition at line 106 of file ScintPhoton.h. Referenced by GetStart(), GetStartX(), GetStartY(), GetStartZ(), Print(), and Reset(). |
|
Definition at line 107 of file ScintPhoton.h. Referenced by GetStartT(), and Reset(). |
|
Definition at line 108 of file ScintPhoton.h. |
|
Definition at line 46 of file ScintPhoton.cxx. Referenced by Configure(), and Reset(). |
|
Definition at line 131 of file ScintPhoton.h. Referenced by InteractAtSurface(), Reset(), and SetTiO2Reflec(). |
|
Definition at line 125 of file ScintPhoton.h. Referenced by Attenuate(), FindNextSurface(), GetTrackLength(), Move(), Print(), and Reset(). |
|
Definition at line 103 of file ScintPhoton.h. Referenced by InteractAtSurface(), and Reset(). |