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

Public Member Functions | |
| PhotonNdAfterpulseModel () | |
| virtual void | Configure (const Registry &r) |
| virtual void | MakeAfterpulses (const std::vector< DigiPE * > &inPeList, std::vector< DigiPE * > &outPeList) |
| virtual void | Print (Option_t *option="") const |
Protected Member Functions | |
| virtual void | Reset (const VldContext &cx) |
Private Member Functions | |
| ClassDef (PhotonNdAfterpulseModel, 0) | |
Private Attributes | |
| double | fAfterpulseFraction |
| double | fAfterpulseStart |
| double | fAfterpulseEnd |
|
|
Definition at line 18 of file PhotonNdAfterpulseModel.cxx. References PhotonConfiguration(). 00019 {
00020 Configure(PhotonConfiguration()); // Set up default values.
00021 }
|
|
||||||||||||
|
|
|
|
Reimplemented from PhotonTransportModule. Definition at line 36 of file PhotonNdAfterpulseModel.cxx. References ScintPhoton::Configure(), fAfterpulseEnd, fAfterpulseFraction, fAfterpulseStart, Registry::GetDouble(), and MSG. 00037 {
00038 // The other classses in the model need configuring:
00039 ScintPhoton::Configure(r);
00040
00041 MSG("Photon",Msg::kDebug) << "Configuring NdAfterpulseModel." << std::endl;
00042
00043 // Load any configuration options from the provided registry.
00044 // Called only when configuration changes.
00045 // Put default values into the file PhotonConfiguration.cxx
00046
00047 fAfterpulseFraction = r.GetDouble("AfterpulseFraction");
00048 fAfterpulseStart = r.GetDouble("AfterpulseStart");
00049 fAfterpulseEnd = r.GetDouble("AfterpulseEnd");
00050 }
|
|
||||||||||||
|
The "Afterpulser" must impliment this: Create PE for each afterpulse. Reimplemented from PhotonTransportModule. Definition at line 53 of file PhotonNdAfterpulseModel.cxx. References fAfterpulseEnd, fAfterpulseStart, PlexMuxBoxId::GetElecType(), DigiPE::GetPixelSpotId(), DigiPE::GetTime(), PlexPixelSpotId::SetPixel(), and PlexPixelSpotId::SetSpot(). 00055 {
00060
00061 // Simple model: generate a pe at random on the same tube,
00062 // randomly on pixels 1-8 or 57-64, between 1 and 4us after the
00063 // intial pulse, 4% of the time.
00064
00065 for(UInt_t i=0;i<inPeList.size(); i++) {
00066 const DigiPE* inPE = inPeList[i];
00067 PlexPixelSpotId inPix = inPE->GetPixelSpotId();
00068 if(inPix.GetElecType()==ElecType::kQIE) {
00069 // This is an M64.
00070
00071 // Roll to see if an afterpulse is made:
00072 if(fRandom->Rndm() < fAfterpulseFraction) {
00073
00074 // Make the new one.
00075
00076 // Chose the pixel:
00077 int pixel = fRandom->Integer(8)+1; // 1-8
00078 if(fRandom->Rndm()>0.5) pixel+= 56; // 57-64
00079
00080 // Set the PixelSpotId:
00081 PlexPixelSpotId outPix = inPix;
00082 outPix.SetSpot(1);
00083 outPix.SetPixel(pixel);
00084
00085 // Chose the time of the PE:
00086 double time = inPE->GetTime();
00087 time += fRandom->Uniform(fAfterpulseStart,fAfterpulseEnd);
00088
00089 // Create it and put it into the output list.
00090 DigiPE* outPE = new DigiPE(time, outPix, DigiSignal::kAfterpulse );
00091 outPeList.push_back(outPE);
00092 }
00093
00094 }
00095 }
00096
00097 return;
00098 }
|
|
|
Print config or diagnostic info. Reimplemented from PhotonTransportModule. Definition at line 103 of file PhotonNdAfterpulseModel.cxx. 00104 {
00106 }
|
|
|
Reimplemented from PhotonTransportModule. Definition at line 26 of file PhotonNdAfterpulseModel.cxx. 00027 {
00028 // Called once per event. Use this to get or update
00029 // any database tables used by the model.
00030 }
|
|
|
Definition at line 40 of file PhotonNdAfterpulseModel.h. Referenced by Configure(), and MakeAfterpulses(). |
|
|
Definition at line 38 of file PhotonNdAfterpulseModel.h. Referenced by Configure(). |
|
|
Definition at line 39 of file PhotonNdAfterpulseModel.h. Referenced by Configure(), and MakeAfterpulses(). |
1.3.9.1