ATTPCROOT
0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
|
Abstract base class for getting current through deconvolution. More...
#include <AtPSADeconv.h>
Classes | |
struct | ZHitData |
Struct for storing Z and Q hit data used by getZandQ function. More... | |
Public Member Functions | |
AtPSADeconv () | |
AtPSADeconv (AtPSADeconv &&obj)=default | |
AtPSADeconv & | operator= (AtPSADeconv &&obj)=default |
AtPSADeconv (const AtPSADeconv &obj) | |
~AtPSADeconv ()=default | |
virtual std::unique_ptr< AtPSA > | Clone () override |
virtual HitVector | AnalyzePad (AtPad *pad) override |
void | SetFilterOrder (int order) |
void | SetCutoffFreq (int freq) |
void | SetUseSimCharge (bool val) |
int | GetFilterOrder () |
int | GetCutoffFreq () |
void | SetResponse (AtRawEvent response) |
void | SetResponse (ResponseFunc response) |
AtPad & | GetResponse (int padNum) |
Get the AtPad describing the response of the electronics. More... | |
const AtPadFFT & | GetResponseFFT (int padNum) |
Get the fourier transform describing the response of the electronics. More... | |
const AtPadFFT & | GetResponseFilter (int padNum) |
Get the filter in fourier space describing the response of the electronics. More... | |
![]() | |
AtPSA ()=default | |
virtual | ~AtPSA ()=default |
virtual void | Init () |
void | SetThreshold (Int_t threshold) |
void | SetThresholdLow (Int_t thresholdlow) |
int | GetThreshold () |
int | GetThresholdLow () |
void | SetSimulatedEvent (TClonesArray *MCSimPointArray) |
AtEvent | Analyze (AtRawEvent &rawEvent) |
virtual void | Analyze (AtRawEvent *rawEvent, AtEvent *event) |
Protected Types | |
using | ResponseFunc = std::function< double(int, double)> |
using | HitData = std::vector< ZHitData > |
Data structure for Z loc (TB), Z variance (TB), Charge (arb), Charge variance (arb) More... | |
![]() | |
using | HitVector = std::vector< std::unique_ptr< AtHit > > |
Protected Member Functions | |
AtPad * | createResponsePad (int padNum) |
virtual HitVector | chargeToHits (AtPad &charge, std::string qName) |
virtual HitData | getZandQ (const AtPad::trace &charge) |
virtual double | getZhitVariance (double zLoc, double zLocVar) const override |
void | initFFTs () |
void | initFilter () |
Update all "filter" augments in fEventResponse with the new parameters. More... | |
void | updateFilter (const AtPadFFT &fft, AtPadFFT *filter) |
double | getFilterKernel (int freq) |
HitVector | AnalyzeFFTpad (AtPad &pad) |
Assumes that the pad has it's fourier transform information filled. More... | |
![]() | |
void | TrackMCPoints (std::multimap< Int_t, std::size_t > &map, AtHit &hit) |
Double_t | CalculateZ (Double_t peakIdx) |
Calculate z position in mm using the peak index. More... | |
Double_t | CalculateZGeo (Double_t peakIdx) |
Double_t | getThreshold (int padSize=-1) |
virtual std::pair< double, double > | getXYhitVariance () const |
Protected Attributes | |
AtRawEvent | fEventResponse |
ResponseFunc | fResponse {nullptr} |
std::unique_ptr< TVirtualFFT > | fFFT {nullptr} |
std::unique_ptr< TVirtualFFT > | fFFTbackward {nullptr} |
int | fFilterOrder {0} |
int | fCutoffFreq {-1} |
bool | fUseSimulatedCharge {false} |
![]() | |
TClonesArray * | fMCSimPointArray {} |
Bool_t | fUsingLowThreshold {false} |
Double_t | fBField {} |
Double_t | fEField {} |
Int_t | fTB0 {} |
Int_t | fNumTbs {512} |
Int_t | fTBTime {} |
Int_t | fEntTB {} |
Double_t | fDriftVelocity {} |
Double_t | fZk {} |
Abstract base class for getting current through deconvolution.
This PSA method calculates the charge collected over a pad. It operates as a base class where specific PSA methods can be implemented on top of this class to convert the current into hits in 3D space.
Mathmatically what this class does is take in an electronic response function r(TB), and stores the FFT of that response function R(k). For the trace recorded in each pad s(TB), we then calculate the FFT of that trace S(k), and divide by R(k). We then apply a low-pass Buttersworth filter of even order n with cuttoff frequency w_c (both specified by the user). This, transformed back into the time domain, should give the input current over the pad.
It saves the reconstruced charge as an augment (AtPadArray with name "Qreco") to the pad in the input event
Definition at line 38 of file AtPSADeconv.h.
|
protected |
Data structure for Z loc (TB), Z variance (TB), Charge (arb), Charge variance (arb)
Definition at line 109 of file AtPSADeconv.h.
|
protected |
Definition at line 41 of file AtPSADeconv.h.
AtPSADeconv::AtPSADeconv | ( | ) |
Definition at line 28 of file AtPSADeconv.cxx.
|
default |
AtPSADeconv::AtPSADeconv | ( | const AtPSADeconv & | obj | ) |
Definition at line 33 of file AtPSADeconv.cxx.
|
default |
|
protected |
Assumes that the pad has it's fourier transform information filled.
Definition at line 176 of file AtPSADeconv.cxx.
|
overridevirtual |
|
protectedvirtual |
Takes a pad with charge information and returns a list of hits to add to the event.
Definition at line 235 of file AtPSADeconv.cxx.
|
inlineoverridevirtual |
|
protected |
Definition at line 135 of file AtPSADeconv.cxx.
|
inline |
Definition at line 81 of file AtPSADeconv.h.
|
protected |
[in] | freq | The frequency compnent |
Definition at line 155 of file AtPSADeconv.cxx.
|
inline |
Definition at line 80 of file AtPSADeconv.h.
AtPad & AtPSADeconv::GetResponse | ( | int | padNum | ) |
Get the AtPad describing the response of the electronics.
If the pad is not in fEventResponse it will be added.
Definition at line 70 of file AtPSADeconv.cxx.
const AtPadFFT & AtPSADeconv::GetResponseFFT | ( | int | padNum | ) |
Get the fourier transform describing the response of the electronics.
If the pad is not in fEventResponse it will be added, and if needed the fft will be calcualted and added as an augment with the name "fft".
Definition at line 86 of file AtPSADeconv.cxx.
const AtPadFFT & AtPSADeconv::GetResponseFilter | ( | int | padNum | ) |
Get the filter in fourier space describing the response of the electronics.
If the pad is not in fEventResponse it will be added, and if needed the fft and filter will be calculated and added as augments with the names "fft" and "filter", respectivley.
Definition at line 109 of file AtPSADeconv.cxx.
|
protectedvirtual |
Returns the salient data from the charge distribution: Hit charge/location in Z and their std. deviation. Called by chargeToHits. By default it returns the weighted average of the charge and it's variance.
Reimplemented in AtPSADeconvFit.
Definition at line 263 of file AtPSADeconv.cxx.
|
overrideprotectedvirtual |
Returns a vector populated with the variance of the hit according the the diffusion coefficients in the parameter file.
[in] | zLoc | Location of hit in TB |
[in] | zLocVar | Variance of hit in TB^2 |
Reimplemented from AtPSA.
Definition at line 285 of file AtPSADeconv.cxx.
|
protected |
Definition at line 54 of file AtPSADeconv.cxx.
|
protected |
Update all "filter" augments in fEventResponse with the new parameters.
Definition at line 165 of file AtPSADeconv.cxx.
|
default |
void AtPSADeconv::SetCutoffFreq | ( | int | freq | ) |
Definition at line 48 of file AtPSADeconv.cxx.
void AtPSADeconv::SetFilterOrder | ( | int | order | ) |
Definition at line 40 of file AtPSADeconv.cxx.
|
inline |
Copy an AtRawEvent to use as the response function. If the pad number requested does not exist in the AtRawEvent it will use the callable object stored in fResponse.
Definition at line 87 of file AtPSADeconv.h.
|
inline |
Response function to use if the AtRawEvent representation of the response function does not contain the pad we are looking for. When this is used to get the response function, it is cached in the internal fEventResponse.
Definition at line 93 of file AtPSADeconv.h.
|
inline |
Definition at line 78 of file AtPSADeconv.h.
Definition at line 122 of file AtPSADeconv.cxx.
|
protected |
Definition at line 63 of file AtPSADeconv.h.
|
protected |
AtRawEvent holding the response function and filter for every pad. If there is only a single response being used for the entire detector, than always use pad 0.
Each pad in this event must have two augments. An AtPadFFT of the name "fft" which holds the FFT of the response, and an AtPadFFT with the name "filter" which holds the FFT of the response multiplied by the low pass filter in use. When a pad is accessed, it will check for the existance of these two augments and add them if necessary.
Definition at line 52 of file AtPSADeconv.h.
|
protected |
Definition at line 59 of file AtPSADeconv.h.
|
protected |
Definition at line 60 of file AtPSADeconv.h.
|
protected |
Definition at line 62 of file AtPSADeconv.h.
|
protected |
Callable object representing the response function of the detecotor. Will be used to fill fEventResponse if the pad does not already exist within that event.
Definition at line 57 of file AtPSADeconv.h.
|
protected |
Definition at line 64 of file AtPSADeconv.h.