LDMX Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
trigscint::TestBeamHit Class Reference

This class represents the linearised QIE output from the trigger scintillator, in charge (fC). More...

#include <TestBeamHit.h>

Public Member Functions

 TestBeamHit ()=default
 Class constructor.
 
 ~TestBeamHit ()=default
 Class destructor.
 
void Clear (Option_t *option="")
 Clear the data in the object.
 
void Print (Option_t *option="") const
 Print out the object.
 
void setPedestal (const float pedestal)
 Set channel (linearized.
 
float getEarlyPedestal () const
 Get the pedestal calculated only from first N time samples.
 
void setEarlyPedestal (const float earlyPed)
 Set channel (linearized.
 
float getPedestal () const
 Get the pedestal.
 
void setQ (const float q)
 Store total charge.
 
float getQ () const
 Get hit charge.
 
void setStartSample (const int startSample)
 Store total charge.
 
int getStartSample () const
 Get the pulse/hit startSample.
 
void setSampAbovePed (const int sampAbovePed)
 Set number of samples above pedestal in pulse/hit.
 
int getSampAbovePed () const
 Get the pulse/hit sampAbovePed.
 
void setSampAboveThr (const int sampAboveThr)
 Set number of samples above threshold in pulse/hit.
 
int getSampAboveThr () const
 Get the pulse/hit sampAboveThr.
 
void setHitQuality (const int isClean)
 Set whether hit has been checked for and passed quality criteria.
 
int getHitQuality () const
 Get the pulse/hit isClean.
 
void setQualityFlag (const uint flag)
 Set hit data quality flag.
 
float getQualityFlag () const
 Get the hit data quality flag.
 
void setPulseWidth (const int pulseWidth)
 Set width used to integrate pulse/hit (in time samples)
 
int getPulseWidth () const
 Get the pulse/hit pulseWidth.
 
bool operator< (const TestBeamHit &rhs) const
 A dummy operator overloading.
 
- Public Member Functions inherited from ldmx::TrigScintHit
 TrigScintHit ()
 Class constructor.
 
 ~TrigScintHit ()
 Class destructor.
 
void Clear (Option_t *option="")
 Clear the data in the object.
 
void Print (Option_t *option="") const
 Print out the object.
 
void setBarID (const int barID)
 Set hit bar ID.
 
int getBarID () const
 Get the bar ID.
 
void setPE (const float PE)
 Set hit pe.
 
float getPE () const
 Get the hit pe.
 
void setModuleID (const int moduleID)
 Set hit module ID.
 
int getModuleID () const
 Get the module ID.
 
void setBeamEfrac (const float beamEfrac)
 Set beam energy fraction of hit.
 
float getBeamEfrac () const
 Get the beam energy fraction.
 
- Public Member Functions inherited from ldmx::HcalHit
 HcalHit ()=default
 Class constructor.
 
virtual ~HcalHit ()=default
 Class destructor.
 
void Clear ()
 Clear the data in the object.
 
void Print () const
 Print out the object.
 
float getPE () const
 Get the number of photoelectrons estimated for this hit.
 
float getMinPE () const
 Get the minimum number of photoelectrons estimated for this hit if two sided readout.
 
int getSection () const
 Get the section for this hit.
 
int getLayer () const
 Get the layer for this hit.
 
int getStrip () const
 Get the strip for this hit.
 
int getEnd () const
 Get end for this hit.
 
int getIsADC () const
 Get if hit was reconstructed using ADC.
 
int getToaPos () const
 Get the toa of the positive end.
 
int getToaNeg () const
 Get the toa of the negative end.
 
int getAmplitudePos () const
 Get the amplitude of the positive end.
 
int getAmplitudeNeg () const
 Get the amplitude of the negative end.
 
void setPE (float pe)
 Set the number of photoelectrons estimated for this hit.
 
void setMinPE (float minpe)
 Set the minimum number of photoelectrons estimated for this hit.
 
void setSection (int section)
 Set the section for this hit.
 
void setLayer (int layer)
 Set the layer for this hit.
 
void setStrip (int strip)
 Set the strip for this hit.
 
void setEnd (int end)
 Set the end (0 neg, 1 pos side).
 
void setIsADC (int isADC)
 Set if the hit is reconstructed using ADC.
 
void setTimeDiff (double timeDiff)
 Set time difference (uncorrected)
 
void setToaPos (double toaPos)
 Set toa of the positive end.
 
void setToaNeg (double toaNeg)
 Set toa of the negative end.
 
void setAmplitudePos (double amplitudePos)
 Set amplitude of the positive end.
 
void setAmplitudeNeg (double amplitudeNeg)
 Set amplitude of the negative end.
 
void setPositionUnchanged (double position, int isX)
 Set original position.
 
double getPosition () const
 
int getIsX () const
 
double getTimeDiff () const
 
- Public Member Functions inherited from ldmx::CalorimeterHit
 CalorimeterHit ()
 Class constructor.
 
virtual ~CalorimeterHit ()=default
 Class destructor.
 
void Clear ()
 Clear the data in the object.
 
void Print () const
 Print out the object.
 
int getID () const
 Get the detector ID.
 
void setID (int id)
 Set the detector ID.
 
float getAmplitude () const
 Get the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sampling factor corrections.
 
void setAmplitude (float amplitude)
 Set the amplitude of the hit, which is proportional to the signal in the calorimeter cell without sampling factor corrections.
 
float getEnergy () const
 Get the calorimetric energy of the hit, corrected for sampling factors [MeV].
 
void setEnergy (float energy)
 Set the calorimetric energy of the hit, corrected for sampling factors [MeV].
 
float getTime () const
 Get the time of the hit [ns].
 
void setTime (float time)
 Set the time of the hit [ns].
 
float getXPos () const
 Get the X position of the hit [mm].
 
void setXPos (float xpos)
 Set the X position of the hit [mm].
 
float getYPos () const
 Get the Y position of the hit [mm].
 
void setYPos (float ypos)
 Set the Y position of the hit [mm].
 
float getZPos () const
 Get the Z position of the hit [mm].
 
void setZPos (float zpos)
 Set the Z position of the hit [mm].
 
bool isNoise () const
 Is this hit a noise hit?
 
void setNoise (bool yes)
 Set if this hit is a noise hit.
 
bool operator< (const CalorimeterHit &rhs) const
 Sort by time of hit.
 

Private Member Functions

 ClassDef (TestBeamHit, 3)
 

Private Attributes

float pedestal_
 
float earlyPedestal_
 
float pulseQ_ {-999.}
 
int startSample_ {-1}
 
int pulseWidth_ {-1}
 
int sampAbovePed_ {-1}
 
int sampAboveThr_ {-1}
 
int passHitQuality_
 
uint flag_ {0}
 

Detailed Description

This class represents the linearised QIE output from the trigger scintillator, in charge (fC).

Definition at line 24 of file TestBeamHit.h.

Member Function Documentation

◆ getEarlyPedestal()

float trigscint::TestBeamHit::getEarlyPedestal ( ) const
inline

Get the pedestal calculated only from first N time samples.

Definition at line 55 of file TestBeamHit.h.

55{ return earlyPedestal_; }

◆ getHitQuality()

int trigscint::TestBeamHit::getHitQuality ( ) const
inline

Get the pulse/hit isClean.

Definition at line 137 of file TestBeamHit.h.

137{ return passHitQuality_; }

◆ getPedestal()

float trigscint::TestBeamHit::getPedestal ( ) const
inline

Get the pedestal.

Definition at line 67 of file TestBeamHit.h.

67{ return pedestal_; }

◆ getPulseWidth()

int trigscint::TestBeamHit::getPulseWidth ( ) const
inline

Get the pulse/hit pulseWidth.

Definition at line 162 of file TestBeamHit.h.

162{ return pulseWidth_; }

◆ getQ()

float trigscint::TestBeamHit::getQ ( ) const
inline

Get hit charge.

Definition at line 78 of file TestBeamHit.h.

78{ return pulseQ_; }

◆ getQualityFlag()

float trigscint::TestBeamHit::getQualityFlag ( ) const
inline

Get the hit data quality flag.

Definition at line 152 of file TestBeamHit.h.

152{ return flag_; }

◆ getSampAbovePed()

int trigscint::TestBeamHit::getSampAbovePed ( ) const
inline

Get the pulse/hit sampAbovePed.

Definition at line 113 of file TestBeamHit.h.

113{ return sampAbovePed_; }

◆ getSampAboveThr()

int trigscint::TestBeamHit::getSampAboveThr ( ) const
inline

Get the pulse/hit sampAboveThr.

Definition at line 126 of file TestBeamHit.h.

126{ return sampAboveThr_; }

◆ getStartSample()

int trigscint::TestBeamHit::getStartSample ( ) const
inline

Get the pulse/hit startSample.

Definition at line 100 of file TestBeamHit.h.

100{ return startSample_; }

◆ operator<()

bool trigscint::TestBeamHit::operator< ( const TestBeamHit rhs) const
inline

A dummy operator overloading.

Note
required for declaring std::vector<> in EventDef.h

Definition at line 168 of file TestBeamHit.h.

168 {
169 return this->pulseQ_ < rhs.pulseQ_;
170 }

◆ setEarlyPedestal()

void trigscint::TestBeamHit::setEarlyPedestal ( const float  earlyPed)
inline

Set channel (linearized.

charge) pedestal calculated from beginning of readout

Parameters
pedestalThe pedestal of the first N time samples in the channel

Definition at line 63 of file TestBeamHit.h.

63{ earlyPedestal_ = earlyPed; };

Referenced by trigscint::TestBeamHitProducer::produce().

◆ setHitQuality()

void trigscint::TestBeamHit::setHitQuality ( const int  isClean)
inline

Set whether hit has been checked for and passed quality criteria.

Parameters
isCleanThe boolean being TRUE if hit quality criteria are checkad AND passed

Definition at line 134 of file TestBeamHit.h.

134{ passHitQuality_ = isClean; };

Referenced by trigscint::TestBeamHitProducer::produce().

◆ setPedestal()

void trigscint::TestBeamHit::setPedestal ( const float  pedestal)
inline

Set channel (linearized.

charge) pedestal

Parameters
pedestalThe pedestal of the channel

Definition at line 51 of file TestBeamHit.h.

51{ pedestal_ = pedestal; };

Referenced by trigscint::TestBeamHitProducer::produce().

◆ setPulseWidth()

void trigscint::TestBeamHit::setPulseWidth ( const int  pulseWidth)
inline

Set width used to integrate pulse/hit (in time samples)

Parameters
pulseWidthThe number of (time) samples used to make up the pulse

Definition at line 159 of file TestBeamHit.h.

159{ pulseWidth_ = pulseWidth; };

Referenced by trigscint::TestBeamHitProducer::produce().

◆ setQ()

void trigscint::TestBeamHit::setQ ( const float  q)
inline

Store total charge.

Parameters
qtotal charge in pulse making hit

Definition at line 73 of file TestBeamHit.h.

73{ pulseQ_ = q; }

Referenced by trigscint::TestBeamHitProducer::produce().

◆ setQualityFlag()

void trigscint::TestBeamHit::setQualityFlag ( const uint  flag)
inline

Set hit data quality flag.

This is the binary combination of 4 flags from the total channel readout: spike: 1 plateau: 10 long pulse: 100 (implemented as hit quantity) oscillation: 1000

Parameters
flagThe quality flag of the hit

Definition at line 148 of file TestBeamHit.h.

148{ this->flag_ = flag; };

Referenced by trigscint::TestBeamHitProducer::produce().

◆ setSampAbovePed()

void trigscint::TestBeamHit::setSampAbovePed ( const int  sampAbovePed)
inline

Set number of samples above pedestal in pulse/hit.

Parameters
sampAbovePedThe number of (time) samples above pedestal in (or continuing after) the pulse

Definition at line 108 of file TestBeamHit.h.

108 {
109 sampAbovePed_ = sampAbovePed;
110 };

Referenced by trigscint::TestBeamHitProducer::produce().

◆ setSampAboveThr()

void trigscint::TestBeamHit::setSampAboveThr ( const int  sampAboveThr)
inline

Set number of samples above threshold in pulse/hit.

Parameters
sampAboveThrThe number of (time) samples above threshold in (or continuing after) the pulse

Definition at line 121 of file TestBeamHit.h.

121 {
122 sampAboveThr_ = sampAboveThr;
123 };

Referenced by trigscint::TestBeamHitProducer::produce().

◆ setStartSample()

void trigscint::TestBeamHit::setStartSample ( const int  startSample)
inline

Store total charge.

Parameters
petotal charge in pulse making hit Get hit charge Set pulse/hit start sample
startSampleThe start (time) sample in the pulse

Definition at line 96 of file TestBeamHit.h.

96{ startSample_ = startSample; };

Referenced by trigscint::TestBeamHitProducer::produce().

Member Data Documentation

◆ earlyPedestal_

float trigscint::TestBeamHit::earlyPedestal_
private
Initial value:
{
-999.}

Definition at line 175 of file TestBeamHit.h.

175 {
176 -999.}; // early pedestal (average over first 5 time samples) [fC]

◆ flag_

uint trigscint::TestBeamHit::flag_ {0}
private

Definition at line 191 of file TestBeamHit.h.

191{0}; // more elaborate quality flag (binary sum)

◆ passHitQuality_

int trigscint::TestBeamHit::passHitQuality_
private
Initial value:
{
0}

Definition at line 188 of file TestBeamHit.h.

188 {
189 0}; // track if hit has been checked for and passed quality criteria

◆ pedestal_

float trigscint::TestBeamHit::pedestal_
private
Initial value:
{
-999.}

Definition at line 173 of file TestBeamHit.h.

173 {
174 -999.}; // assumed/average channel pedestal used in subtraction [fC]

◆ pulseQ_

float trigscint::TestBeamHit::pulseQ_ {-999.}
private

Definition at line 177 of file TestBeamHit.h.

177{-999.}; // integrated, ped subtracted charge over pulse [fC]

◆ pulseWidth_

int trigscint::TestBeamHit::pulseWidth_ {-1}
private

Definition at line 181 of file TestBeamHit.h.

181{-1}; // specified pulse width (in number of samples)

◆ sampAbovePed_

int trigscint::TestBeamHit::sampAbovePed_ {-1}
private

Definition at line 182 of file TestBeamHit.h.

182{-1}; // actual number of consecutive samples above pedestal

◆ sampAboveThr_

int trigscint::TestBeamHit::sampAboveThr_ {-1}
private

Definition at line 184 of file TestBeamHit.h.

184{-1}; // actual number of consecutive samples above

◆ startSample_

int trigscint::TestBeamHit::startSample_ {-1}
private

Definition at line 180 of file TestBeamHit.h.

180{-1}; // start sample

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