PhotonCompositeGreenTracker Class Reference

#include <PhotonCompositeGreenTracker.h>

Inheritance diagram for PhotonCompositeGreenTracker:
PhotonTransportModule

List of all members.

Public Member Functions

 PhotonCompositeGreenTracker ()
virtual void Configure (const Registry &r)
virtual Bool_t GreenPhotonToPe (const UgliStripHandle &inStrip, DigiPhoton *inGreenPhoton, DigiPE *&outPe, StripEnd::StripEnd_t &outEnd)

Private Member Functions

 ClassDef (PhotonCompositeGreenTracker, 0)

Private Attributes

Double_t fFibreIndex
Double_t fClearFibreIndex
Double_t fReflectorFibreReflec
Double_t fQuantumEfficiency
Double_t fFibreAttenN1
Double_t fFibreAttenN2
Double_t fFibreAttenLength1
Double_t fFibreAttenLength2
Double_t fClearFibreAttenN1
Double_t fClearFibreAttenN2
Double_t fClearFibreAttenLength1
Double_t fClearFibreAttenLength2
Double_t fDarkNoiseRate
Double_t fGreenNoiseRate
Double_t fNoiseWindow

Detailed Description

Definition at line 17 of file PhotonCompositeGreenTracker.h.


Constructor & Destructor Documentation

PhotonCompositeGreenTracker::PhotonCompositeGreenTracker (  ) 

Definition at line 18 of file PhotonCompositeGreenTracker.cxx.

References PhotonConfiguration().

00019 {
00020   Configure(PhotonConfiguration()); // Set up default values.
00021 }


Member Function Documentation

PhotonCompositeGreenTracker::ClassDef ( PhotonCompositeGreenTracker  ,
 
) [private]
void PhotonCompositeGreenTracker::Configure ( const Registry r  )  [virtual]

Reimplemented from PhotonTransportModule.

Definition at line 26 of file PhotonCompositeGreenTracker.cxx.

References fClearFibreAttenLength1, fClearFibreAttenLength2, fClearFibreAttenN1, fClearFibreAttenN2, fClearFibreIndex, fFibreAttenLength1, fFibreAttenLength2, fFibreAttenN1, fFibreAttenN2, fFibreIndex, fQuantumEfficiency, fReflectorFibreReflec, Registry::Get(), Msg::kDebug, MSG, and PhotonTransportModule::SetGreenPrescaleFactor().

00027 {
00028   // The other classses in the model need configuring:
00029   MSG("Photon",Msg::kDebug) << "Configuring CompositeGreenTracker." << std::endl;
00030 
00031   double tmpd;
00032   if (r.Get("FibreIndex",tmpd))           fFibreIndex  = tmpd;
00033   if (r.Get("ClearFibreIndex",tmpd))      fClearFibreIndex  = tmpd;
00034 
00035   if (r.Get("ReflectorFibreReflec",tmpd)) fReflectorFibreReflec  = tmpd;
00036   if (r.Get("QuantumEfficiency",tmpd))    fQuantumEfficiency = tmpd;
00037   if (r.Get("FibreAttenN1",tmpd))        fFibreAttenN1 = tmpd;
00038   if (r.Get("FibreAttenN2",tmpd))        fFibreAttenN2 = tmpd;
00039   if (r.Get("FibreAttenLength1",tmpd))   fFibreAttenLength1 = tmpd;
00040   if (r.Get("FibreAttenLength2",tmpd))   fFibreAttenLength2 = tmpd;
00041   if (r.Get("ClearFibreAttenN1",tmpd))   fClearFibreAttenN1 = tmpd;
00042   if (r.Get("ClearFibreAttenN2",tmpd))   fClearFibreAttenN2 = tmpd;
00043   if (r.Get("ClearFibreAttenLength1",tmpd)) fClearFibreAttenLength1 = tmpd;
00044   if (r.Get("ClearFibreAttenLength2",tmpd)) fClearFibreAttenLength2 = tmpd ;
00045   // Set the prescale factors.
00046   SetGreenPrescaleFactor(fQuantumEfficiency); // Phototube photocathode acceptance.
00047 }

Bool_t PhotonCompositeGreenTracker::GreenPhotonToPe ( const UgliStripHandle inStrip,
DigiPhoton inGreenPhoton,
DigiPE *&  outPe,
StripEnd::StripEnd_t outEnd 
) [virtual]

Reimplemented from PhotonTransportModule.

Definition at line 57 of file PhotonCompositeGreenTracker.cxx.

References Munits::c_light, UgliStripHandle::ClearFiber(), Calibrator::DecalAttenCorrected(), PhotonUtil::DoubleExp(), fClearFibreAttenLength1, fClearFibreAttenLength2, fClearFibreAttenN1, fClearFibreAttenN2, fClearFibreIndex, PhotonTransportModule::fContext, fFibreIndex, PhotonTransportModule::fRandom, fReflectorFibreReflec, DigiPhoton::GetCosX(), UgliStripHandle::GetHalfLength(), PlexHandle::GetPixelSpotId(), UgliStripHandle::GetSEId(), Calibrator::Instance(), UgliStripHandle::IsMirrored(), StripEnd::kNegative, StripEnd::kPositive, DigiPhoton::ParentHit(), UgliStripHandle::PartialLength(), PlexStripEndId::SetEnd(), DigiPhoton::T(), UgliStripHandle::WlsBypass(), UgliStripHandle::WlsPigtail(), and DigiPhoton::X().

00061 {
00062   outPe = NULL;
00063   if(!inGreenPhoton) return false;
00064 
00065   // First, figure out which way we're going.
00066   StripEnd::StripEnd_t dir = 
00067     (inGreenPhoton->GetCosX()>0) ? StripEnd::kPositive : StripEnd::kNegative;
00068 
00069   StripEnd::StripEnd_t readout = dir; // Assume we're reading out the end it's going.
00070 
00071   // Is the end we've gotten to mirrored? 
00072   if(inStrip.IsMirrored(dir)) {
00073     // Ok, then we're going to need to flip it.
00074     // Does this photon survive the flip?
00075     if(fRandom->Rndm() > fReflectorFibreReflec) {
00076       return false;
00077     }
00078 
00079     // We survived the reflection.
00080     readout = (dir==StripEnd::kPositive) ? StripEnd::kNegative : StripEnd::kPositive;
00081   }
00082 
00083   // Find the distance down the clear strip.
00084   // Note that this distance is used only for attenuation, not for propagation time.
00085   Double_t clearDist = inStrip.ClearFiber(readout);
00086 
00087   // See if it survives the readout cable. 
00088   Double_t clearProb = PhotonUtil::DoubleExp(clearDist, 
00089                                              fClearFibreAttenN1,      fClearFibreAttenN2,
00090                                              fClearFibreAttenLength1, fClearFibreAttenLength2,
00091                                              true);
00092   if(fRandom->Rndm() > clearProb) return false;
00093    
00094   
00095   // The photon is reflecting it's way down the strip.
00096   // Figure out how far it has to go in each medium.
00097 
00098   double distToCenter = (inGreenPhoton->GetCosX()>0) ? (-inGreenPhoton->X())
00099     : (inGreenPhoton->X());
00100 
00101   Double_t halfgreen = inStrip.GetHalfLength()         // Distance to end of strip;
00102                       +inStrip.WlsPigtail(readout); // Pigtail on readout end.
00103 
00104 
00105   Double_t greenDist = distToCenter // Distance to center of strip.
00106                      + halfgreen;
00107 
00108 
00109   // Deal with WLS bypass, if any
00110   double bypassExtra = 0;
00111   if(inStrip.WlsBypass() >0) {    
00112     bypassExtra = ( inStrip.PartialLength(StripEnd::kNegative) + 
00113                     inStrip.PartialLength(StripEnd::kPositive) +
00114                     inStrip.WlsBypass() - 
00115                     inStrip.GetHalfLength()*2.0 );
00116 
00117     // place in the middle of the break;
00118     float x_break =0.5* (inStrip.PartialLength(StripEnd::kNegative) 
00119                          - inStrip.PartialLength(StripEnd::kPositive) );
00120 
00121     if(inGreenPhoton->X() < x_break) {
00122       // If the photon is at -ve end and going +ve, it goes through the bypass
00123       if(dir==StripEnd::kPositive)  greenDist+= bypassExtra;
00124     } else {
00125       // If the photon is at +ve end and going -ve, it goes through the bypass
00126       if(dir==StripEnd::kNegative)  greenDist+= bypassExtra;
00127     }
00128   }
00129 
00130   if(readout!=dir) {
00131     // i.e. we're going towards the mirror end but being read out on the non-mirror end
00132     greenDist+= inStrip.GetHalfLength()*2.0; // Gotta double back...
00133     greenDist+= bypassExtra;                 // ... through the ENTIRE green fibre
00134     greenDist+= inStrip.WlsPigtail(dir)*2.0; // And we have to go through the pigtail, if any
00135                                              // (N.B. This is for caldet, which has pigtails before the reflector)
00136   }
00137 
00138 
00139   // See if it survives the green fibre:
00140   double gdir = 1.0;
00141   if(readout == StripEnd::kNegative) gdir = -1.0;
00142   Calibrator& Cal = Calibrator::Instance();
00143   PlexStripEndId seid = inStrip.GetSEId();
00144   seid.SetEnd(readout);
00145 
00146   double greenProb =1.0-
00147     (  Cal.DecalAttenCorrected(1.0, inGreenPhoton->X(), seid) 
00148      / Cal.DecalAttenCorrected(1.0, gdir*halfgreen,     seid) );
00149 
00150   //MSG("mydebug",Msg::kInfo) << "Green survival prob: " << greenProb << endl;
00151 
00152   if(fRandom->Rndm() < greenProb) return false;
00153 
00154   // But... we don't travel in a straight line!
00155   // We bounce around the fibre a lot. This makes the path length longer.
00156   double greenBouncedDist = greenDist/ fabs(inGreenPhoton->GetCosX());
00157   double clearBouncedDist = clearDist/ fabs(inGreenPhoton->GetCosX());
00158   
00159   // ASSUME: no loss at connector interfaces
00160 
00161   // PMT: ASSUME:
00162   // FIXME: Assume 100% quantum efficiency, or efficiency dealt with
00163   // in photon computation.
00164 
00165   // Build the resultant digipe.
00166   // Find the time of arrival.
00167   double time = inGreenPhoton->T()
00168     + greenBouncedDist * fFibreIndex / Munits::c_light
00169     + clearBouncedDist * fClearFibreIndex / Munits::c_light;
00170 
00171   PlexHandle plex(fContext);
00172   PlexPixelSpotId psid = plex.GetPixelSpotId(seid);
00173 
00174   outPe = new DigiPE( time, psid, inGreenPhoton->ParentHit() );
00175   outEnd = readout;
00176 
00177   return true;  
00178 }


Member Data Documentation

Definition at line 41 of file PhotonCompositeGreenTracker.h.

Referenced by Configure(), and GreenPhotonToPe().

Definition at line 42 of file PhotonCompositeGreenTracker.h.

Referenced by Configure(), and GreenPhotonToPe().

Definition at line 39 of file PhotonCompositeGreenTracker.h.

Referenced by Configure(), and GreenPhotonToPe().

Definition at line 40 of file PhotonCompositeGreenTracker.h.

Referenced by Configure(), and GreenPhotonToPe().

Definition at line 31 of file PhotonCompositeGreenTracker.h.

Referenced by Configure(), and GreenPhotonToPe().

Definition at line 44 of file PhotonCompositeGreenTracker.h.

Definition at line 37 of file PhotonCompositeGreenTracker.h.

Referenced by Configure().

Definition at line 38 of file PhotonCompositeGreenTracker.h.

Referenced by Configure().

Definition at line 35 of file PhotonCompositeGreenTracker.h.

Referenced by Configure().

Definition at line 36 of file PhotonCompositeGreenTracker.h.

Referenced by Configure().

Definition at line 30 of file PhotonCompositeGreenTracker.h.

Referenced by Configure(), and GreenPhotonToPe().

Definition at line 45 of file PhotonCompositeGreenTracker.h.

Definition at line 46 of file PhotonCompositeGreenTracker.h.

Definition at line 33 of file PhotonCompositeGreenTracker.h.

Referenced by Configure().

Definition at line 32 of file PhotonCompositeGreenTracker.h.

Referenced by Configure(), and GreenPhotonToPe().


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

Generated on 20 Jul 2017 for loon by  doxygen 1.6.1