ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtPSAComposite.cxx
Go to the documentation of this file.
1 #include "AtPSAComposite.h"
2 
3 #include <FairLogger.h>
4 
5 #include <AtPad.h>
6 
7 #include <memory>
8 #include <utility> // for move
9 
10 AtPSAComposite::AtPSAComposite(std::unique_ptr<AtPSA> beamPSA, std::unique_ptr<AtPSA> PSA, double beamRadius)
11  : AtPSA(), fBeamPSA(std::move(beamPSA)), fPSA(std::move(PSA)), fBeamRadius(beamRadius)
12 {
13 }
14 
16  : AtPSA(), fBeamPSA(o.fBeamPSA->Clone()), fPSA(o.fPSA->Clone()), fBeamRadius(o.fBeamRadius)
17 {
18 }
19 
21 {
22  fBeamPSA->Init();
23  fPSA->Init();
24 }
26 {
27  if (pad->GetPadCoord().R() < fBeamRadius) {
28  LOG(debug) << "Using beam PSA: " << pad->GetPadCoord().R() << " " << pad->GetPadNum();
29  return fBeamPSA->AnalyzePad(pad);
30  } else {
31  LOG(debug) << "Using PSA: " << pad->GetPadCoord().R() << " " << pad->GetPadNum();
32  return fPSA->AnalyzePad(pad);
33  }
34 }
AtPad.h
AtPSAComposite::AtPSAComposite
AtPSAComposite(std::unique_ptr< AtPSA > beamPSA, std::unique_ptr< AtPSA > PSA, double beamRadius=40)
Definition: AtPSAComposite.cxx:10
AtPSAComposite::AnalyzePad
virtual HitVector AnalyzePad(AtPad *) override
Definition: AtPSAComposite.cxx:25
AtPSAComposite
Uses different PSA methods in/out of beam region.
Definition: AtPSAComposite.h:13
AtPSA::HitVector
std::vector< std::unique_ptr< AtHit > > HitVector
Definition: AtPSA.h:50
AtPad::GetPadCoord
XYPoint GetPadCoord() const
Definition: AtPad.h:107
AtPSAComposite::Init
void Init() override
Definition: AtPSAComposite.cxx:20
AtPad::GetPadNum
Int_t GetPadNum() const
Definition: AtPad.h:96
AtPSAComposite.h
AtPad
Container class for AtPadBase objects.
Definition: AtPad.h:38
AtPSA
Definition: AtPSA.h:27