WCSim
Public Member Functions | Private Member Functions | List of all members
WCSimWCTriggerNDigits2 Class Reference

An (incomplete) example of running two trigger algorithms, one after the other. More...

#include <WCSimWCTrigger.hh>

Inheritance diagram for WCSimWCTriggerNDigits2:
Inheritance graph
Collaboration diagram for WCSimWCTriggerNDigits2:
Collaboration graph

Public Member Functions

 WCSimWCTriggerNDigits2 (G4String name, WCSimDetectorConstruction *, WCSimWCDAQMessenger *, G4String detectorElement)
 
 ~WCSimWCTriggerNDigits2 ()
 
- Public Member Functions inherited from WCSimWCTriggerBase
 WCSimWCTriggerBase (G4String name, WCSimDetectorConstruction *, WCSimWCDAQMessenger *, G4String)
 Create WCSimWCTriggerBase instance with knowledge of the detector and DAQ options. More...
 
virtual ~WCSimWCTriggerBase ()
 
void Digitize ()
 The main user-callable routine of the class. Gets the input & creates the output WCSimWCTriggeredDigitsCollection's, then calls DoTheWork() More...
 
int NumberOfGatesInThisEvent ()
 Returns the number of trigger gates in the event (i.e. the number of triggers passed) More...
 
Double_t GetTriggerTime (int i)
 Get the time of the ith trigger. More...
 
TriggerType_t GetTriggerType (int i)
 Get the trigger type of the ith trigger. More...
 
std::vector< Double_t > GetTriggerInfo (int i)
 Get the additional trigger information associated with the ith trigger. More...
 
G4String GetTriggerClassName ()
 Get the trigger class name. More...
 
void SetMultiDigitsPerTrigger (G4bool allow_multi)
 Set whether to allow the number of digits per PMT per trigger to go > 1. More...
 
G4bool GetMultiDigitsPerTrigger ()
 
void SetNDigitsThreshold (G4int threshold)
 Set the threshold for the NDigits trigger. More...
 
void SetNDigitsWindow (G4int window)
 Set the time window for the NDigits trigger. More...
 
void SetNDigitsAdjustForNoise (G4bool adjust)
 Automatically adjust the NDigits threshold based on the average noise occupancy? More...
 
void SetNDigitsPreTriggerWindow (G4int window)
 Set the pretrigger window for the NDigits trigger (value will be forced negative) More...
 
void SetNDigitsPostTriggerWindow (G4int window)
 Set the posttrigger window for the NDigits trigger (value will be forced positive) More...
 
void SetTriggerOffset (G4double value)
 Set the timing offset. More...
 
void SetSaveFailuresMode (G4int mode)
 Set the mode for saving failed triggers (0:save only triggered events, 1:save both triggered events & failed events, 2:save only failed events) More...
 
void SetSaveFailuresTime (G4double time)
 Set the dummy trigger time for the failed triggers. More...
 
void SetSaveFailuresPreTriggerWindow (G4int window)
 Set the pretrigger window for the SaveFailures trigger (value will be forced negative) More...
 
void SetSaveFailuresPostTriggerWindow (G4int window)
 Set the posttrigger window for the SaveFailures trigger (value will be forced positive) More...
 
void SetDarkRate (double idarkrate)
 Knowledge of the dark rate (use for automatically adjusting for noise) More...
 
void SaveOptionsToOutput (WCSimRootOptions *wcopt)
 Save current values of options. More...
 

Private Member Functions

void DoTheWork (WCSimWCDigitsCollection *WCDCPMT)
 This should call the trigger algorithms, and handle any temporary DigitsCollection's. More...
 
bool GetDefaultMultiDigitsPerTrigger ()
 SKI saves only earliest digit on a PMT in the trigger window. More...
 
int GetDefaultNDigitsWindow ()
 SK max light travel time ~200 ns. More...
 
int GetDefaultNDigitsThreshold ()
 2 * SK NDigits threshold ~25 B.Q More...
 
int GetDefaultNDigitsPreTriggerWindow ()
 SK SLE trigger window ~-400. More...
 
int GetDefaultNDigitsPostTriggerWindow ()
 SK SLE trigger window ~+950. More...
 
int GetDefaultTriggerOffset ()
 Set the default trigger class specific NDigits posttrigger window (in ns) (overridden by .mac) More...
 

Additional Inherited Members

- Protected Member Functions inherited from WCSimWCTriggerBase
void GetVariables ()
 Get the default threshold, etc. from the derived class, and override with read from the .mac file. More...
 
double GetPreTriggerWindow (TriggerType_t t)
 Get the pretrigger window for a given trigger algorithm. More...
 
double GetPostTriggerWindow (TriggerType_t t)
 Get the posttrigger window for a given trigger algorithm. More...
 
void AlgNDigits (WCSimWCDigitsCollection *WCDCPMT, bool remove_hits, bool test=false)
 An NDigits trigger algorithm. More...
 
void AlgNoTrigger (WCSimWCDigitsCollection *WCDCPMT, bool remove_hits)
 
void ReInitialize ()
 Clear the Trigger* vectors and DigiHitMap. More...
 
- Protected Attributes inherited from WCSimWCTriggerBase
WCSimWCTriggeredDigitsCollectionDigitsCollection
 The main output of the class - collection of digits in the trigger window. More...
 
std::map< int, int > DigiHitMap
 Keeps track of the PMTs that have been added to the output WCSimWCTriggeredDigitsCollection. More...
 
std::vector< Double_t > TriggerTimes
 The times of the triggers. More...
 
std::vector< TriggerType_tTriggerTypes
 The type of the triggers. More...
 
std::vector< std::vector< Double_t > > TriggerInfos
 Additional information associated with each trigger. More...
 
WCSimWCDAQMessengerDAQMessenger
 Get the options from the .mac file. More...
 
WCSimDetectorConstructionmyDetector
 Know about the detector, so can add appropriate PMT time smearing. More...
 
G4String detectorElement
 
double PMTDarkRate
 Dark noise rate of the PMTs. More...
 
G4bool multiDigitsPerTrigger
 Allow the number of digits per PMT saved in each trigger window to go > 1? More...
 
G4int ndigitsThreshold
 The threshold for the NDigits trigger. More...
 
G4int ndigitsWindow
 The time window for the NDigits trigger. More...
 
G4bool ndigitsAdjustForNoise
 Automatically adjust the NDigits trigger threshold based on the average dark noise rate? More...
 
G4int ndigitsPreTriggerWindow
 The pretrigger window to save before an NDigits trigger. More...
 
G4int ndigitsPostTriggerWindow
 The posttrigger window to save after an NDigits trigger. More...
 
G4int saveFailuresMode
 The mode for saving events which don't pass triggers. More...
 
G4double saveFailuresTime
 The dummy trigger time for failed events. More...
 
G4int saveFailuresPreTriggerWindow
 The pretrigger window to save before an SaveFailures trigger. More...
 
G4int saveFailuresPostTriggerWindow
 The posttrigger window to save after an SaveFailures trigger. More...
 
G4double offset
 
G4String triggerClassName
 Save the name of the trigger class. More...
 

Detailed Description

An (incomplete) example of running two trigger algorithms, one after the other.

Definition at line 368 of file WCSimWCTrigger.hh.

Constructor & Destructor Documentation

◆ WCSimWCTriggerNDigits2()

WCSimWCTriggerNDigits2::WCSimWCTriggerNDigits2 ( G4String  name,
WCSimDetectorConstruction inDetector,
WCSimWCDAQMessenger myMessenger,
G4String  detectorElement 
)

Definition at line 658 of file WCSimWCTrigger.cc.

◆ ~WCSimWCTriggerNDigits2()

WCSimWCTriggerNDigits2::~WCSimWCTriggerNDigits2 ( )

Definition at line 668 of file WCSimWCTrigger.cc.

Member Function Documentation

◆ DoTheWork()

void WCSimWCTriggerNDigits2::DoTheWork ( WCSimWCDigitsCollection WCDCPMT)
privatevirtual

This should call the trigger algorithms, and handle any temporary DigitsCollection's.

Implements WCSimWCTriggerBase.

Definition at line 672 of file WCSimWCTrigger.cc.

◆ GetDefaultMultiDigitsPerTrigger()

bool WCSimWCTriggerNDigits2::GetDefaultMultiDigitsPerTrigger ( )
inlineprivatevirtual

SKI saves only earliest digit on a PMT in the trigger window.

Reimplemented from WCSimWCTriggerBase.

Definition at line 379 of file WCSimWCTrigger.hh.

◆ GetDefaultNDigitsPostTriggerWindow()

int WCSimWCTriggerNDigits2::GetDefaultNDigitsPostTriggerWindow ( )
inlineprivatevirtual

SK SLE trigger window ~+950.

Reimplemented from WCSimWCTriggerBase.

Definition at line 384 of file WCSimWCTrigger.hh.

◆ GetDefaultNDigitsPreTriggerWindow()

int WCSimWCTriggerNDigits2::GetDefaultNDigitsPreTriggerWindow ( )
inlineprivatevirtual

SK SLE trigger window ~-400.

Reimplemented from WCSimWCTriggerBase.

Definition at line 383 of file WCSimWCTrigger.hh.

◆ GetDefaultNDigitsThreshold()

int WCSimWCTriggerNDigits2::GetDefaultNDigitsThreshold ( )
inlineprivatevirtual

2 * SK NDigits threshold ~25 B.Q

Reimplemented from WCSimWCTriggerBase.

Definition at line 382 of file WCSimWCTrigger.hh.

◆ GetDefaultNDigitsWindow()

int WCSimWCTriggerNDigits2::GetDefaultNDigitsWindow ( )
inlineprivatevirtual

SK max light travel time ~200 ns.

Reimplemented from WCSimWCTriggerBase.

Definition at line 380 of file WCSimWCTrigger.hh.

◆ GetDefaultTriggerOffset()

int WCSimWCTriggerNDigits2::GetDefaultTriggerOffset ( )
inlineprivatevirtual

Set the default trigger class specific NDigits posttrigger window (in ns) (overridden by .mac)

Reimplemented from WCSimWCTriggerBase.

Definition at line 385 of file WCSimWCTrigger.hh.


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