Hall C ROOT/C++ Analyzer (hcana)
THcTrigDet Class Reference

A mock detector to hold trigger related data.

This class behaves as a detector, but it does not correspond to any physical detector in the hall. Its purpose is to gather all the trigger related data comming from a specific source, like HMS.

Can hold up to 100 ADC and TDC channels, though the limit can be changed if needed. It just seemed like a reasonable starting value.

Only outputs the first hit for each channel to the Root tree leaf.

Defined variables

For ADC channels it defines:

  • raw pedestal: var_adcPedRaw
  • raw pulse integral: var_adcPulseIntRaw
  • raw pulse amplitude: var_adcPulseAmpRaw
  • raw pulse time: var_adcPulseTimeRaw
  • single sample pedestal value: var_adcPed
  • pedestal subtracted pulse integral: var_adcPulseInt
  • pedestal subtracted pulse amplitude: var_adcPulseAmp
  • multiplicity: var_adcMult

For TDC channels it defines:

  • raw TDC time: var_tdcTimeRaw
  • refence time subtracted TDC time: var_tdcTime
  • multiplicity: var_tdcMult

Parameter file variables

The names and number of channels is defined in a parameter file. The detector looks for next variables:

  • prefix_numAdc = number_of_ADC_channels
  • prefix_numTdc = number_of_TDC_channels
  • prefix_adcNames = "varName1 varName2 ... varNameNumAdc"
  • prefix_tdcNames = "varName1 varName2 ... varNameNumTdc"

Map file information

ADC channels must be assigned plane 1 and signal 0 while TDC channels must be assigned plane 2 and signal 1.

Each channel within a plane must be assigned a consecutive "bar" number, which is then used to get the correct variable name from parameter file.

Use only with THcTrigApp class.

Definition at line 16 of file THcTrigDet.h.

Public Member Functions

virtual void AddEvtType (int evtype)
 
virtual void Clear (Option_t *opt="")
 Clears variables before next event. More...
 
Int_t Decode (const THaEvData &evData)
 Decodes and processes events. More...
 
Int_t End (THaRunBase *run)
 
Double_t Get_CT_Trigtime (Int_t ii)
 
Double_t Get_RF_TrigTime (Int_t ii)
 
virtual Bool_t HaveIgnoreList () const
 
virtual EStatus Init (const TDatime &date)
 Initializes the detector variables. More...
 
virtual Bool_t IsIgnoreType (Int_t evtype) const
 
virtual void SetEvtType (int evtype)
 
virtual void SetSpectName (const char *name)
 
 THcTrigDet (const char *name, const char *description="", THaApparatus *app=NULL)
 A constructor. More...
 
 ~THcTrigDet ()
 A destructor. More...
 
- Public Member Functions inherited from THcHitList
void CreateMissReportParms (const char *prefix)
 
virtual Int_t DecodeToHitList (const THaEvData &evdata, Bool_t suppress=kFALSE)
 Populate the hitlist from the raw event data. More...
 
void DisableSlipCorrection ()
 
TClonesArrayGetHitList () const
 
void InitHitList (THaDetMap *detmap, const char *hitclass, Int_t maxhits, Int_t tdcref_cut=0, Int_t adcref_cut=0)
 Save the electronics module to detector mapping and initialize a hit array of hits of class hitclass. More...
 
void MissReport (const char *name)
 
 THcHitList ()
 
virtual ~THcHitList ()
 

Protected Member Functions

virtual Int_t DefineVariables (EMode mode=kDefine)
 
virtual Int_t ReadDatabase (const TDatime &date)
 
void Setup (const char *name, const char *description)
 
- Protected Member Functions inherited from THcHitList
 ClassDef (THcHitList, 0)
 

Protected Attributes

std::vector< Int_teventtypes
 
Int_t fADC_RefTimeCut
 
Int_t fAdcMultiplicity [fMaxAdcChannels]
 
std::vector< std::string > fAdcNames
 
Double_t fAdcPed [fMaxAdcChannels]
 
Int_t fAdcPedRaw [fMaxAdcChannels]
 
Double_t fAdcPulseAmp [fMaxAdcChannels]
 
Int_t fAdcPulseAmpRaw [fMaxAdcChannels]
 
Double_t fAdcPulseInt [fMaxAdcChannels]
 
Int_t fAdcPulseIntRaw [fMaxAdcChannels]
 
Double_t fAdcPulseTime [fMaxAdcChannels]
 
Int_t fAdcPulseTimeRaw [fMaxAdcChannels]
 
Double_t fAdcTdcOffset
 
Double_tfAdcTimeWindowMax
 
Double_tfAdcTimeWindowMin
 
std::string fKwPrefix
 
Int_t fNumAdc
 
Int_t fNumTdc
 
Bool_tfPresentP
 
Int_t fRFId [2]
 
std::vector< std::string > fRFNames
 
TString fSpectName
 
Int_t fTDC_RefTimeCut
 
Double_t fTdcChanperNS
 
Int_t fTdcMultiplicity [fMaxTdcChannels]
 
std::vector< std::string > fTdcNames
 
Double_t fTdcOffset
 
Double_t fTdcRefTime
 
Double_t fTdcTime [fMaxTdcChannels]
 
Int_t fTdcTimeRaw [fMaxTdcChannels]
 
Double_tfTdcTimeWindowMax
 
Double_tfTdcTimeWindowMin
 
Int_t fTrigId [4]
 
std::vector< std::string > fTrigNames
 
- Protected Attributes inherited from THcHitList
Double_t fDisableSlipCorrection
 
std::map< Int_t, Decoder::Fadc250Module * > fFADCSlotMap
 
Bool_t fHaveFADCInfo
 
Decoder::THaCrateMapfMap
 
Int_t fNADCRef_miss
 
Int_t fNPED
 
Int_t fNRefIndex
 
Int_t fNSA
 
Int_t fNSB
 
UInt_t fNSignals
 
Int_t fNTDCRef_miss
 
THcConfigEvtHandlerfPSE125
 
std::vector< RefIndexMapfRefIndexMaps
 
THcRawHit::ESignalTypefSignalTypes
 
Int_t fTICrate
 
Int_t fTISlot
 
std::map< Int_t, Int_tfTrigTimeShiftMap
 

Static Protected Attributes

static const int fMaxAdcChannels = 200
 
static const int fMaxTdcChannels = 200
 

Private Member Functions

 ClassDef (THcTrigDet, 0)
 
 THcTrigDet ()
 

Additional Inherited Members

- Public Attributes inherited from THcHitList
Bool_t fADC_RefTimeBest
 
Int_t fADC_RefTimeCut
 
THaDetMap * fdMap
 
Int_t fNMaxRawHits
 
UInt_t fNRawHits
 
TClassfRawHitClass
 
TClonesArrayfRawHitList
 
Bool_t fTDC_RefTimeBest
 
Int_t fTDC_RefTimeCut
 

#include <THcTrigDet.h>

Inheritance diagram for THcTrigDet:

Constructor & Destructor Documentation

THcTrigDet::THcTrigDet ( const char *  name,
const char *  description = "",
THaApparatus *  app = NULL 
)

A constructor.

Parameters
[in]nameName of the apparatus. Is typically named after spectrometer whose trigger data is collecting; like "HMS".
[in]descriptionDescription of the apparatus.
[in]appThe parent apparatus pointer.

Definition at line 122 of file THcTrigDet.cxx.

THcTrigDet::~THcTrigDet ( )

A destructor.

Definition at line 139 of file THcTrigDet.cxx.

THcTrigDet::THcTrigDet ( )
private

Definition at line 119 of file THcTrigDet.cxx.

Member Function Documentation

void THcTrigDet::AddEvtType ( int  evtype)
virtual

Definition at line 558 of file THcTrigDet.cxx.

THcTrigDet::ClassDef ( THcTrigDet  ,
 
)
private
void THcTrigDet::Clear ( Option_t opt = "")
virtual

Clears variables before next event.

Parameters
[in]optMaybe used in base clas... Not sure.

Definition at line 210 of file THcTrigDet.cxx.

Int_t THcTrigDet::Decode ( const THaEvData evData)

Decodes and processes events.

Parameters
[in]evDataRaw data to decode.

Definition at line 234 of file THcTrigDet.cxx.

Int_t THcTrigDet::DefineVariables ( EMode  mode = kDefine)
protectedvirtual

Definition at line 404 of file THcTrigDet.cxx.

Int_t THcTrigDet::End ( THaRunBase *  run)

Definition at line 583 of file THcTrigDet.cxx.

Double_t THcTrigDet::Get_CT_Trigtime ( Int_t  ii)
inline

Definition at line 36 of file THcTrigDet.h.

Double_t THcTrigDet::Get_RF_TrigTime ( Int_t  ii)
inline

Definition at line 39 of file THcTrigDet.h.

Bool_t THcTrigDet::HaveIgnoreList ( ) const
virtual

Definition at line 577 of file THcTrigDet.cxx.

THaAnalysisObject::EStatus THcTrigDet::Init ( const TDatime date)
virtual

Initializes the detector variables.

Parameters
[in]dateTime of the current run.

Definition at line 148 of file THcTrigDet.cxx.

Bool_t THcTrigDet::IsIgnoreType ( Int_t  evtype) const
virtual

Definition at line 568 of file THcTrigDet.cxx.

Int_t THcTrigDet::ReadDatabase ( const TDatime date)
protectedvirtual

Definition at line 318 of file THcTrigDet.cxx.

void THcTrigDet::SetEvtType ( int  evtype)
virtual

Definition at line 562 of file THcTrigDet.cxx.

void THcTrigDet::SetSpectName ( const char *  name)
virtual

Definition at line 553 of file THcTrigDet.cxx.

void THcTrigDet::Setup ( const char *  name,
const char *  description 
)
protected

Definition at line 310 of file THcTrigDet.cxx.

Member Data Documentation

std::vector<Int_t> THcTrigDet::eventtypes
protected

Definition at line 90 of file THcTrigDet.h.

Int_t THcTrigDet::fADC_RefTimeCut
protected

Definition at line 68 of file THcTrigDet.h.

Int_t THcTrigDet::fAdcMultiplicity[fMaxAdcChannels]
protected

Definition at line 86 of file THcTrigDet.h.

std::vector<std::string> THcTrigDet::fAdcNames
protected

Definition at line 57 of file THcTrigDet.h.

Double_t THcTrigDet::fAdcPed[fMaxAdcChannels]
protected

Definition at line 80 of file THcTrigDet.h.

Int_t THcTrigDet::fAdcPedRaw[fMaxAdcChannels]
protected

Definition at line 75 of file THcTrigDet.h.

Double_t THcTrigDet::fAdcPulseAmp[fMaxAdcChannels]
protected

Definition at line 82 of file THcTrigDet.h.

Int_t THcTrigDet::fAdcPulseAmpRaw[fMaxAdcChannels]
protected

Definition at line 77 of file THcTrigDet.h.

Double_t THcTrigDet::fAdcPulseInt[fMaxAdcChannels]
protected

Definition at line 81 of file THcTrigDet.h.

Int_t THcTrigDet::fAdcPulseIntRaw[fMaxAdcChannels]
protected

Definition at line 76 of file THcTrigDet.h.

Double_t THcTrigDet::fAdcPulseTime[fMaxAdcChannels]
protected

Definition at line 83 of file THcTrigDet.h.

Int_t THcTrigDet::fAdcPulseTimeRaw[fMaxAdcChannels]
protected

Definition at line 78 of file THcTrigDet.h.

Double_t THcTrigDet::fAdcTdcOffset
protected

Definition at line 53 of file THcTrigDet.h.

Double_t* THcTrigDet::fAdcTimeWindowMax
protected

Definition at line 71 of file THcTrigDet.h.

Double_t* THcTrigDet::fAdcTimeWindowMin
protected

Definition at line 70 of file THcTrigDet.h.

std::string THcTrigDet::fKwPrefix
protected

Definition at line 46 of file THcTrigDet.h.

const int THcTrigDet::fMaxAdcChannels = 200
staticprotected

Definition at line 62 of file THcTrigDet.h.

const int THcTrigDet::fMaxTdcChannels = 200
staticprotected

Definition at line 63 of file THcTrigDet.h.

Int_t THcTrigDet::fNumAdc
protected

Definition at line 48 of file THcTrigDet.h.

Int_t THcTrigDet::fNumTdc
protected

Definition at line 49 of file THcTrigDet.h.

Bool_t* THcTrigDet::fPresentP
protected

Definition at line 91 of file THcTrigDet.h.

Int_t THcTrigDet::fRFId[2]
protected

Definition at line 51 of file THcTrigDet.h.

std::vector<std::string> THcTrigDet::fRFNames
protected

Definition at line 60 of file THcTrigDet.h.

TString THcTrigDet::fSpectName
protected

Definition at line 89 of file THcTrigDet.h.

Int_t THcTrigDet::fTDC_RefTimeCut
protected

Definition at line 67 of file THcTrigDet.h.

Double_t THcTrigDet::fTdcChanperNS
protected

Definition at line 55 of file THcTrigDet.h.

Int_t THcTrigDet::fTdcMultiplicity[fMaxTdcChannels]
protected

Definition at line 85 of file THcTrigDet.h.

std::vector<std::string> THcTrigDet::fTdcNames
protected

Definition at line 58 of file THcTrigDet.h.

Double_t THcTrigDet::fTdcOffset
protected

Definition at line 54 of file THcTrigDet.h.

Double_t THcTrigDet::fTdcRefTime
protected

Definition at line 87 of file THcTrigDet.h.

Double_t THcTrigDet::fTdcTime[fMaxTdcChannels]
protected

Definition at line 66 of file THcTrigDet.h.

Int_t THcTrigDet::fTdcTimeRaw[fMaxTdcChannels]
protected

Definition at line 65 of file THcTrigDet.h.

Double_t* THcTrigDet::fTdcTimeWindowMax
protected

Definition at line 73 of file THcTrigDet.h.

Double_t* THcTrigDet::fTdcTimeWindowMin
protected

Definition at line 72 of file THcTrigDet.h.

Int_t THcTrigDet::fTrigId[4]
protected

Definition at line 50 of file THcTrigDet.h.

std::vector<std::string> THcTrigDet::fTrigNames
protected

Definition at line 59 of file THcTrigDet.h.

Collaboration diagram for THcTrigDet:

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