TAnalysedPulse Class Reference
[rootana]

A TAnalysedPulse (TAP) is the product of the second level of analysis in the framework. More...

#include <TAnalysedPulse.h>

Inheritance diagram for TAnalysedPulse:
TObject TGaussFitAnalysedPulse TIntegralRatioAnalysedPulse TTemplateConvolveAnalysedPulse TTemplateFitAnalysedPulse

List of all members.

Classes

struct  Tag

Public Member Functions

 TAnalysedPulse ()
 This constructor must exist for ROOT I/O, but should not be used as you cannot set the source outside of the constructor.
virtual void Copy (TObject &rhs) const
 TAnalysedPulse (const IDs::source &sourceID, const TPulseIslandID &parentID, const TPulseIsland *parentTPI)
 The constructor one should use if we need use one.
virtual ~TAnalysedPulse ()
void Reset (Option_t *o="")
 Clear the TAP. This will probably not be used.
virtual void Draw (const TH1F *tpi_pulse) const
 Visualize the TAP interpretation of the TPI.
Getters



TPulseIslandID GetParentID () const
int GetTPILength () const
double GetAmplitude () const
double GetTime () const
double GetIntegral () const
double GetEnergy () const
double GetPedestal () const
double GetTriggerTime () const
const IDs::sourceGetSource () const
Setters

The TAP generators will set whatever TAP values it must through these methods. Not all need be set; the default values are obviously unphysical and several Sanity methods are provided to check if a value was set later in the analysis.



void SetParentID (const TPulseIslandID &val)
void SetTPILength (const int &val)
void SetAmplitude (const double &val)
void SetTime (const double &val)
void SetIntegral (const double &val)
void SetEnergy (const double &val)
void SetPedestal (const double &val)
void SetTriggerTime (const double &val)
void SetParentTPIProperties (const TPulseIslandID &id, const TPulseIsland *parent)
Sanity



bool IsParentIDSet () const
bool IsTPILengthSet () const
bool IsAmplitudeSet () const
bool IsTimeSet () const
bool IsIntegralSet () const
bool IsEnergySet () const
bool IsPedestalSet () const
bool IsTriggerTimeSet () const

Private Member Functions

 ClassDef (TAnalysedPulse, 5)

Private Attributes

TPulseIslandID fParentID
int fTPILength
double fAmplitude
double fTime
double fIntegral
double fEnergy
double fPedestal
double fTriggerTime
FlyWeight< IDs::source, TagfSource

Static Private Attributes

static const int fDefaultValue = definitions::DefaultValue
 To enable sanity checks, we have an unphysical value that all fields are set to.

Detailed Description

A TAnalysedPulse (TAP) is the product of the second level of analysis in the framework.

A TAP is generated from a TPulseIsland and represents the next higher level, more intuitive representation of a physical hit in a detector. It has properties more commonly associated with a physics event, such as time and energy, that are derived from the TPI using the methods in generator (derived from TVAnalysedPulseGenerator). Different generators can calculate the same quantitites using different techniques, leading to multiple TAPs coming from a single TPI.

Definition at line 30 of file TAnalysedPulse.h.


Constructor & Destructor Documentation

TAnalysedPulse::TAnalysedPulse (  ) 

This constructor must exist for ROOT I/O, but should not be used as you cannot set the source outside of the constructor.

Definition at line 30 of file TAnalysedPulse.cpp.

TAnalysedPulse::TAnalysedPulse ( const IDs::source sourceID,
const TPulseIslandID parentID,
const TPulseIsland parentTPI 
)

The constructor one should use if we need use one.

This constructor, which is the only constructor the user should use, takes all the information neessary to identify the genesis of this TAP. Generally a user would not use this constructor, but would instead call TVAnalysedPulseGenerator::MakeNewTAP which determines the source and TPI from the TPulseIslandID and where in the code it's being called.

Parameters:
[in] sourceID The source identifying the detector the TPI is from and what generator processed it.
[in] parentID The position in the TGD vector of the TPI used to make this TAP.
[in] parentTPI The pulse that was used to produce this TAP.

Definition at line 16 of file TAnalysedPulse.cpp.

References SetParentTPIProperties().

00017                                                                            :
00018   fParentID(fDefaultValue),
00019   fTPILength(fDefaultValue),
00020   fAmplitude(fDefaultValue),
00021   fTime(fDefaultValue),
00022   fIntegral(fDefaultValue),
00023   fEnergy(fDefaultValue),
00024   fPedestal(fDefaultValue),
00025   fTriggerTime(fDefaultValue),
00026   fSource(sourceID){
00027     SetParentTPIProperties(parentID, parentTPI);
00028 }

virtual TAnalysedPulse::~TAnalysedPulse (  )  [inline, virtual]

Definition at line 73 of file TAnalysedPulse.h.

00073 {};


Member Function Documentation

TAnalysedPulse::ClassDef ( TAnalysedPulse  ,
 
) [private]
virtual void TAnalysedPulse::Copy ( TObject rhs  )  const [inline, virtual]

Reimplemented in TTemplateConvolveAnalysedPulse.

Definition at line 40 of file TAnalysedPulse.h.

References fAmplitude, fEnergy, fIntegral, fParentID, fPedestal, fSource, fTime, fTPILength, and fTriggerTime.

00040                                       {
00041     TObject::Copy(rhs);
00042     if(rhs.InheritsFrom(Class())){
00043       TAnalysedPulse* tap=static_cast<TAnalysedPulse*>(&rhs);
00044       tap->fParentID=fParentID;
00045       tap->fTPILength=fTPILength;
00046       tap->fAmplitude=fAmplitude;
00047       tap->fTime=fTime;
00048       tap->fIntegral=fIntegral;
00049       tap->fEnergy=fEnergy;
00050       tap->fPedestal=fPedestal;
00051       tap->fTriggerTime=fTriggerTime;
00052       tap->fSource=fSource;
00053     }
00054   }

void TAnalysedPulse::Draw ( const TH1F *  tpi_pulse  )  const [virtual]

Visualize the TAP interpretation of the TPI.

Since there are different methods for determining the physical values in the TAP from the TPI, here we can get a visual feel for how right those values might be. If passed a TH1F representation of the TPI, Draw makes a new histogram with the same histogram dimensions and a single bin at the determined time weighted with the determined amplitude.

Todo:
Clean this up
Parameters:
[in] tpi_pulse A histogram representation of the parent pulse

Reimplemented in TGaussFitAnalysedPulse, TIntegralRatioAnalysedPulse, TTemplateConvolveAnalysedPulse, and TTemplateFitAnalysedPulse.

Definition at line 53 of file TAnalysedPulse.cpp.

References fAmplitude, and fTime.

Referenced by ExportPulse::PlotTAP().

00053                                                    {
00054         if(tpi_pulse) {
00055           std::string name=tpi_pulse->GetName();
00056           int n_bins=tpi_pulse->GetXaxis()->GetNbins();
00057           double x_max=tpi_pulse->GetXaxis()->GetXmax();
00058           double x_min=tpi_pulse->GetXaxis()->GetXmin();
00059           TH1F* tap_pulse=new TH1F((name+"_AP").c_str(),("TAP for "+name).c_str(),n_bins,x_min,x_max);
00060           int bin=tap_pulse->FindBin(fTime);
00061           tap_pulse->SetBinContent(bin,fAmplitude);
00062         }
00063 }

double TAnalysedPulse::GetAmplitude (  )  const [inline]
double TAnalysedPulse::GetEnergy (  )  const [inline]

Definition at line 103 of file TAnalysedPulse.h.

References fEnergy.

Referenced by PulseViewer::GetParameterValue(), and TME_Al50_EvdE::ProcessEntry().

00103 {return fEnergy;};

double TAnalysedPulse::GetIntegral (  )  const [inline]

Definition at line 102 of file TAnalysedPulse.h.

References fIntegral.

Referenced by PulseViewer::GetParameterValue(), and PlotIntegralRatios::ProcessEntry().

00102 {return fIntegral;};

TPulseIslandID TAnalysedPulse::GetParentID (  )  const [inline]
double TAnalysedPulse::GetPedestal (  )  const [inline]
const IDs::source& TAnalysedPulse::GetSource (  )  const [inline]
double TAnalysedPulse::GetTime (  )  const [inline]
int TAnalysedPulse::GetTPILength (  )  const [inline]

Definition at line 99 of file TAnalysedPulse.h.

References fTPILength.

Referenced by TTemplateFitAnalysedPulse::GetHisto(), and PulseViewer::GetParameterValue().

00099 {return fTPILength;};

double TAnalysedPulse::GetTriggerTime (  )  const [inline]

Definition at line 105 of file TAnalysedPulse.h.

References fTriggerTime.

Referenced by PulseViewer::GetParameterValue().

00105 {return fTriggerTime;};

bool TAnalysedPulse::IsAmplitudeSet (  )  const [inline]

Definition at line 135 of file TAnalysedPulse.h.

References fAmplitude, and fDefaultValue.

00135 {return fAmplitude!=fDefaultValue;};

bool TAnalysedPulse::IsEnergySet (  )  const [inline]

Definition at line 138 of file TAnalysedPulse.h.

References fDefaultValue, and fEnergy.

00138 {return fEnergy!=fDefaultValue;};

bool TAnalysedPulse::IsIntegralSet (  )  const [inline]

Definition at line 137 of file TAnalysedPulse.h.

References fDefaultValue, and fIntegral.

00137 {return fIntegral!=fDefaultValue;};

bool TAnalysedPulse::IsParentIDSet (  )  const [inline]

Definition at line 133 of file TAnalysedPulse.h.

References fDefaultValue, and fParentID.

00133 {return fParentID!=fDefaultValue;};

bool TAnalysedPulse::IsPedestalSet (  )  const [inline]

Definition at line 139 of file TAnalysedPulse.h.

References fDefaultValue, and fPedestal.

00139 {return fPedestal!=fDefaultValue;};

bool TAnalysedPulse::IsTimeSet (  )  const [inline]

Definition at line 136 of file TAnalysedPulse.h.

References fDefaultValue, and fTime.

00136 {return fTime!=fDefaultValue;};

bool TAnalysedPulse::IsTPILengthSet (  )  const [inline]

Definition at line 134 of file TAnalysedPulse.h.

References fDefaultValue, and fTPILength.

00134 {return fTPILength!=fDefaultValue;};

bool TAnalysedPulse::IsTriggerTimeSet (  )  const [inline]

Definition at line 140 of file TAnalysedPulse.h.

References fDefaultValue, and fTriggerTime.

00140 {return fTriggerTime!=fDefaultValue;};

void TAnalysedPulse::Reset ( Option_t *  o = ""  ) 

Clear the TAP. This will probably not be used.

Definition at line 42 of file TAnalysedPulse.cpp.

References fAmplitude, fDefaultValue, fEnergy, fIntegral, fParentID, fPedestal, fTime, fTPILength, and fTriggerTime.

void TAnalysedPulse::SetAmplitude ( const double &  val  )  [inline]
void TAnalysedPulse::SetEnergy ( const double &  val  )  [inline]

Definition at line 123 of file TAnalysedPulse.h.

References fEnergy.

00123 { fEnergy=val;};

void TAnalysedPulse::SetIntegral ( const double &  val  )  [inline]
void TAnalysedPulse::SetParentID ( const TPulseIslandID val  )  [inline]

Definition at line 118 of file TAnalysedPulse.h.

References fParentID.

Referenced by SetParentTPIProperties().

00118 { fParentID=val;};

void TAnalysedPulse::SetParentTPIProperties ( const TPulseIslandID id,
const TPulseIsland parent 
)

Definition at line 65 of file TAnalysedPulse.cpp.

References TPulseIsland::GetClockTickInNs(), TPulseIsland::GetPulseLength(), TPulseIsland::GetTimeStamp(), SetParentID(), SetTPILength(), and SetTriggerTime().

Referenced by TAnalysedPulse().

00066                                                                       {
00067   SetParentID(id);
00068   if(!pulse) {
00069     std::cerr<<"NULL pointer to TPulseIsland passed as parent for TAnalysedPulse."<<std::endl;
00070     return;
00071   }
00072   SetTPILength(pulse->GetPulseLength());
00073   SetTriggerTime(pulse->GetTimeStamp()*pulse->GetClockTickInNs());
00074 }

void TAnalysedPulse::SetPedestal ( const double &  val  )  [inline]

Definition at line 124 of file TAnalysedPulse.h.

References fPedestal.

Referenced by TemplateConvolveAPGenerator::ProcessPulses().

00124 { fPedestal=val;};

void TAnalysedPulse::SetTime ( const double &  val  )  [inline]
void TAnalysedPulse::SetTPILength ( const int &  val  )  [inline]

Definition at line 119 of file TAnalysedPulse.h.

References fTPILength.

Referenced by SetParentTPIProperties().

00119 { fTPILength=val;};

void TAnalysedPulse::SetTriggerTime ( const double &  val  )  [inline]

Definition at line 125 of file TAnalysedPulse.h.

References fTriggerTime.

Referenced by SetParentTPIProperties().

00125 { fTriggerTime=val;};


Member Data Documentation

double TAnalysedPulse::fAmplitude [private]

Definition at line 149 of file TAnalysedPulse.h.

Referenced by Copy(), Draw(), GetAmplitude(), IsAmplitudeSet(), Reset(), and SetAmplitude().

const int TAnalysedPulse::fDefaultValue = definitions::DefaultValue [static, private]

To enable sanity checks, we have an unphysical value that all fields are set to.

Definition at line 161 of file TAnalysedPulse.h.

Referenced by IsAmplitudeSet(), IsEnergySet(), IsIntegralSet(), IsParentIDSet(), IsPedestalSet(), IsTimeSet(), IsTPILengthSet(), IsTriggerTimeSet(), and Reset().

double TAnalysedPulse::fEnergy [private]

Definition at line 152 of file TAnalysedPulse.h.

Referenced by Copy(), GetEnergy(), IsEnergySet(), Reset(), and SetEnergy().

double TAnalysedPulse::fIntegral [private]

Definition at line 151 of file TAnalysedPulse.h.

Referenced by Copy(), GetIntegral(), IsIntegralSet(), Reset(), and SetIntegral().

Definition at line 140 of file TAnalysedPulse.h.

Referenced by Copy(), GetParentID(), IsParentIDSet(), Reset(), and SetParentID().

double TAnalysedPulse::fPedestal [private]

Definition at line 153 of file TAnalysedPulse.h.

Referenced by Copy(), GetPedestal(), IsPedestalSet(), Reset(), and SetPedestal().

Definition at line 156 of file TAnalysedPulse.h.

Referenced by Copy(), and GetSource().

double TAnalysedPulse::fTime [private]

Definition at line 150 of file TAnalysedPulse.h.

Referenced by Copy(), Draw(), GetTime(), IsTimeSet(), Reset(), and SetTime().

Definition at line 148 of file TAnalysedPulse.h.

Referenced by Copy(), GetTPILength(), IsTPILengthSet(), Reset(), and SetTPILength().

double TAnalysedPulse::fTriggerTime [private]

Definition at line 154 of file TAnalysedPulse.h.

Referenced by Copy(), GetTriggerTime(), IsTriggerTimeSet(), Reset(), and SetTriggerTime().


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

Generated on 15 Jun 2016 for AlcapDAQ by  doxygen 1.6.1