-
Notifications
You must be signed in to change notification settings - Fork 18
Pulse shape analysis
The pulse shape analysis (PSA) task is responsible for taking the traces in an AtRawEvent
and producing hits (AtHit
) in 3D space in the detector volume. A hit is defined by its location and charge. These hits are then saved in an AtEvent
. By default the branch used as the input is "AtRawEvent", and the output branch is "AtEventH", but this can be changed at runtime. You may want to do this if you are trying out different filtering methods using the AtFilterTask.
The behavior of the PSA task is defined by an instance of a class that extends the interface AtPSA
. This interface requires the virtual function Analyze(AtRawEvent *input, AtEvent *output)
to be defined.
First a unique pointer of any time inheriting the interface AtPSA
must be created, and any relevant parameters set. Then it has to be passed to the task. Any task-level parameters should be set and the task added to the run.
For example to use a max finding PSA and filtered data:
auto psa = std::make_unique<AtPSAMax>(); //Create an instance of the desired PSA method
psa->SetThreshold(45); //Set any relevant parameters
AtPSAtask *psaTask = new AtPSAtask(std::move(psa)); //Create the PSA task
psaTask->SetPersistence(true); //Set any task-level parameters
psaTask->SetInputBranch("AtRawEventFiltered");
run->AddTask(psaTask); //Add the task to the analysis run