ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
AtSampleFromReference.h
Go to the documentation of this file.
1 #ifndef ATSAMPLEFROMREFERENCE_H
2 #define ATSAMPLEFROMREFERENCE_H
3 
4 #include "AtHit.h"
5 #include "AtSample.h"
6 
7 #include <vector>
8 namespace RandomSample {
9 
19 protected:
20  AtHit fReferenceHit; //< Hit to use to construct the CDF/PDF
21 
22 public:
23  virtual ~AtSampleFromReference() = default;
24  virtual std::vector<AtHit> SampleHits(int N) override;
25  virtual void SetHitsToSample(const std::vector<const AtHit *> &hits) override { fHits = &hits; }
26  void SetReferenceHit(AtHit hit);
27  const AtHit &GetReferenceHit() const { return fReferenceHit; }
28 
29 protected:
30  virtual void SampleReferenceHit();
31 };
32 } // namespace RandomSample
33 #endif //#ifndef ATSAMPLEFROMREFERENCE_H
RandomSample::AtSampleFromReference::GetReferenceHit
const AtHit & GetReferenceHit() const
Definition: AtSampleFromReference.h:27
RandomSample
Definition: AtSampleConsensus.h:26
RandomSample::AtSampleFromReference::SetReferenceHit
void SetReferenceHit(AtHit hit)
Definition: AtSampleFromReference.cxx:29
RandomSample::AtSample::fHits
const std::vector< const AtHit * > * fHits
Definition: AtSample.h:38
RandomSample::AtSampleFromReference::~AtSampleFromReference
virtual ~AtSampleFromReference()=default
RandomSample::AtSampleFromReference::SampleHits
virtual std::vector< AtHit > SampleHits(int N) override
Sample hits (AtHit) from fHits.
Definition: AtSampleFromReference.cxx:11
AtHit.h
RandomSample::AtSampleFromReference
Sample when PDF depends on reference.
Definition: AtSampleFromReference.h:18
RandomSample::AtSampleFromReference::fReferenceHit
AtHit fReferenceHit
Definition: AtSampleFromReference.h:20
RandomSample::AtSample
Interface for randomly sampling AtHits.
Definition: AtSample.h:35
RandomSample::AtSampleFromReference::SetHitsToSample
virtual void SetHitsToSample(const std::vector< const AtHit * > &hits) override
Definition: AtSampleFromReference.h:25
AtSample.h
AtHit
Point in space with charge.
Definition: AtHit.h:27
RandomSample::AtSampleFromReference::SampleReferenceHit
virtual void SampleReferenceHit()
Get reference hit from fHits.
Definition: AtSampleFromReference.cxx:23