ant
A2 ant: class-based analysis framework
ant::expconfig::detector::TAPS Struct Reference

#include <TAPS.h>

+ Inheritance diagram for ant::expconfig::detector::TAPS:
+ Collaboration diagram for ant::expconfig::detector::TAPS:

Classes

struct  BaF2_Element_t
 
struct  PbWO4_Element_t
 
struct  TAPS_Element_t
 

Public Member Functions

virtual vec3 GetPosition (unsigned channel) const override
 
virtual unsigned GetNChannels () const override
 
virtual void SetElementFlags (unsigned channel, const ElementFlags_t &flags) override
 
virtual const ElementFlags_tGetElementFlags (unsigned channel) const override
 
void SetToFOffset (unsigned channel, double value)
 
virtual double GetTimeOfFlight (double clustertime, unsigned channel, double trigger_reftime) const
 GetTimeOfFlight returns the time of flight in nanoseconds, is 0 ns for photons (if correctly calibrated!) More...
 
virtual double GetBeta (const TCandidate &cand_taps, double trigger_reftime) const
 GetBeta uses GetTimeOfFlight() to calculate the beta=v/c of the particle. More...
 
virtual double GetZPosition () const
 GetZPosition distance of front face from center of target. More...
 
virtual double GetRadius () const
 GetRadius radius of front face disk covering all elements. More...
 
virtual void BuildMappings (std::vector< hit_mapping_t > &, std::vector< scaler_mapping_t > &) const override
 
virtual const ClusterDetector_t::Element_tGetClusterElement (unsigned channel) const override
 
unsigned GetRing (const unsigned channel) const
 GetRing returns the ring number inside the hexagonal structure. More...
 
unsigned GetHexChannel (const unsigned channel) const
 GetHexChannel returns the "usual" hexagonal channel as if four PbWO4s were one BaF2 hexagon. More...
 
bool IsPbWO4 (const unsigned channel) const
 IsPbWO4 returns true if given logical channel is PbWO4 element. More...
 
bool IsBaF2 (const unsigned channel) const
 IsBaF2 returns true if given logical channel is BaF2 element. More...
 
std::vector< unsigned > GetBaF2Channels () const
 GetBaF2Channels returns a vector containing the channel numbers with the BaF2 channels of the used TAPS detector. More...
 
std::vector< unsigned > GetPbWO4Channels () const
 GetPbWO4Channels returns a vector containing the channel numbers with the PbWO4 channels of the used TAPS detector. More...
 
- Public Member Functions inherited from ant::Detector_t
virtual void SetElementFlag (ElementFlag_t flag, const std::vector< unsigned > &channels)
 
virtual bool HasElementFlags (unsigned channel, const ElementFlags_t &flags) const
 
virtual bool IsIgnored (unsigned channel) const
 
virtual ~Detector_t ()=default
 

Protected Member Functions

 TAPS (bool cherenkovInstalled, bool pizzaInstalled, bool useSensitiveChannels, const std::vector< BaF2_Element_t > &BaF2s, const std::vector< PbWO4_Element_t > &PbWO4s)
 
- Protected Member Functions inherited from ant::ClusterDetector_t
 ClusterDetector_t (const Type_t &type)
 
- Protected Member Functions inherited from ant::Detector_t
 Detector_t (const Type_t &type)
 
 Detector_t (const Detector_t &)=delete
 
- Protected Member Functions inherited from ant::UnpackerAcquConfig
 ~UnpackerAcquConfig ()=default
 

Static Protected Attributes

static constexpr unsigned NHexElements = 384
 
static constexpr unsigned NSectors = 6
 
static constexpr unsigned PbWO4PerHex = 4
 

Additional Inherited Members

- Public Types inherited from ant::Detector_t
enum  Type_t : std::uint8_t {
  Type_t::Trigger, Type_t::Tagger, Type_t::TaggerMicro, Type_t::EPT,
  Type_t::Moeller, Type_t::PairSpec, Type_t::CB, Type_t::PID,
  Type_t::MWPC0, Type_t::MWPC1, Type_t::TAPS, Type_t::TAPSVeto,
  Type_t::Cherenkov, Type_t::Raw
}
 
enum  ElementFlag_t {
  ElementFlag_t::Missing, ElementFlag_t::Broken, ElementFlag_t::BadTDC, ElementFlag_t::NoCalibFill,
  ElementFlag_t::NoCalibUseDefault
}
 
using ElementFlags_t = bitflag< ElementFlag_t, 16 >
 
- Static Public Member Functions inherited from ant::Detector_t
static const char * ToString (const Type_t &type)
 
static Type_t FromString (const std::string &str)
 
- Public Attributes inherited from ant::Detector_t
const Type_t Type
 

Constructor & Destructor Documentation

◆ TAPS()

ant::expconfig::detector::TAPS::TAPS ( bool  cherenkovInstalled,
bool  pizzaInstalled,
bool  useSensitiveChannels,
const std::vector< BaF2_Element_t > &  BaF2s,
const std::vector< PbWO4_Element_t > &  PbWO4s 
)
inlineprotected

Member Function Documentation

◆ BuildMappings()

void TAPS::BuildMappings ( std::vector< hit_mapping_t > &  hit_mappings,
std::vector< scaler_mapping_t > &   
) const
overridevirtual
Todo:
maybe use different switch for BaF2 and PbWO4 sensitive?!

Implements ant::UnpackerAcquConfig.

◆ GetBaF2Channels()

std::vector< unsigned > TAPS::GetBaF2Channels ( ) const

GetBaF2Channels returns a vector containing the channel numbers with the BaF2 channels of the used TAPS detector.

Returns
vector<unsigned> of BaF2 channel numbers

◆ GetBeta()

double TAPS::GetBeta ( const TCandidate cand_taps,
double  trigger_reftime 
) const
virtual

GetBeta uses GetTimeOfFlight() to calculate the beta=v/c of the particle.

Parameters
cand_tapsthe candidate from the event
trigger_reftimethe reference time, needs to match the calibration
Returns
the beta=v/c of the candidate
Note
relies on proper calibration such that ToF is zero for phtotons w.r.t. given trigger_reftime

◆ GetClusterElement()

virtual const ClusterDetector_t::Element_t* ant::expconfig::detector::TAPS::GetClusterElement ( unsigned  channel) const
inlineoverridevirtual

◆ GetElementFlags()

virtual const ElementFlags_t& ant::expconfig::detector::TAPS::GetElementFlags ( unsigned  channel) const
inlineoverridevirtual

Implements ant::Detector_t.

◆ GetHexChannel()

unsigned TAPS::GetHexChannel ( const unsigned  channel) const

GetHexChannel returns the "usual" hexagonal channel as if four PbWO4s were one BaF2 hexagon.

Parameters
channellogical channel

◆ GetNChannels()

virtual unsigned ant::expconfig::detector::TAPS::GetNChannels ( ) const
inlineoverridevirtual

Implements ant::Detector_t.

◆ GetPbWO4Channels()

std::vector< unsigned > TAPS::GetPbWO4Channels ( ) const

GetPbWO4Channels returns a vector containing the channel numbers with the PbWO4 channels of the used TAPS detector.

Returns
vector<unsigned> of PbWO4 channel numbers

◆ GetPosition()

virtual vec3 ant::expconfig::detector::TAPS::GetPosition ( unsigned  channel) const
inlineoverridevirtual

Implements ant::Detector_t.

◆ GetRadius()

double TAPS::GetRadius ( ) const
virtual

GetRadius radius of front face disk covering all elements.

Returns
radius of wall in centimeters
Todo:
check value?

◆ GetRing()

unsigned TAPS::GetRing ( const unsigned  channel) const

GetRing returns the ring number inside the hexagonal structure.

Parameters
channellogical channel

◆ GetTimeOfFlight()

double TAPS::GetTimeOfFlight ( double  clustertime,
unsigned  channel,
double  trigger_reftime 
) const
virtual

GetTimeOfFlight returns the time of flight in nanoseconds, is 0 ns for photons (if correctly calibrated!)

Parameters
clustertimetime of cluster in detector
channelcentral element
trigger_reftimeusually given by trigger, e.g. energy-averaged CB timing
Returns
time in nanoseconds

◆ GetZPosition()

double TAPS::GetZPosition ( ) const
virtual

GetZPosition distance of front face from center of target.

Returns
distance in centimeters

◆ IsBaF2()

bool ant::expconfig::detector::TAPS::IsBaF2 ( const unsigned  channel) const
inline

IsBaF2 returns true if given logical channel is BaF2 element.

Parameters
channellogical channel
Returns
true if given logical channel is BaF2 element
Note
no boundary checks on channel performed

◆ IsPbWO4()

bool TAPS::IsPbWO4 ( const unsigned  channel) const

IsPbWO4 returns true if given logical channel is PbWO4 element.

Parameters
channellogical channel
Returns
true if given logical channel is PbWO4 element
Note
no boundary checks on channel performed

◆ SetElementFlags()

void TAPS::SetElementFlags ( unsigned  channel,
const ElementFlags_t flags 
)
overridevirtual

Implements ant::Detector_t.

◆ SetToFOffset()

void ant::expconfig::detector::TAPS::SetToFOffset ( unsigned  channel,
double  value 
)
inline

Member Data Documentation

◆ NHexElements

constexpr unsigned ant::expconfig::detector::TAPS::NHexElements = 384
staticprotected

◆ NSectors

constexpr unsigned ant::expconfig::detector::TAPS::NSectors = 6
staticprotected

◆ PbWO4PerHex

constexpr unsigned ant::expconfig::detector::TAPS::PbWO4PerHex = 4
staticprotected

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