ATTPCROOT  0.3.0-alpha
A ROOT-based framework for analyzing data from active target detectors
Classes | Enumerations | Functions
Random Sampling

Classes for sampling AtHits. More...

Classes

class  RandomSample::AtChargeWeighted
 Sample AtHits according to charge. More...
 
class  RandomSample::AtGaussian
 Sample AtHits in gaussian from reference. More...
 
class  RandomSample::AtIndependentSample
 Interface for independent samples. More...
 
class  RandomSample::AtSample
 Interface for randomly sampling AtHits. More...
 
class  RandomSample::AtSampleFromReference
 Sample when PDF depends on reference. More...
 
class  RandomSample::AtUniform
 Uniformly sample a collection of AtHits. More...
 
class  RandomSample::AtWeightedGaussian
 Sample with a charge-weighted gaussian. More...
 
class  RandomSample::AtWeightedGaussianTrunc
 Uniformly sample a collection of AtHits. More...
 
class  RandomSample::AtWeightedY
 Sample AtHits according to charge for Y shaped tracks. More...
 
class  RandomSample::AtY
 Sample AtHits according to charge for Y shaped tracks. More...
 

Enumerations

enum  RandomSample::SampleMethod {
  RandomSample::SampleMethod::kUniform = 0, RandomSample::SampleMethod::kChargeWeighted = 1, RandomSample::SampleMethod::kGaussian = 2, RandomSample::SampleMethod::kWeightedGaussian = 3,
  RandomSample::SampleMethod::kWeightedY = 4, RandomSample::SampleMethod::kWeightedGaussianTrunc = 5, RandomSample::SampleMethod::kY = 6
}
 . Methods of random sampling. More...
 

Functions

template<typename... Ts>
std::unique_ptr< AtSampleRandomSample::CreateSampler (SampleMethod method, Ts &&...params)
 . Create a hit sampler More...
 

Detailed Description

Classes for sampling AtHits.

Group of classes for randomly sampling AtHits according to some probability density function (PDF).

Provides subclassed interfaces for the case where the hits sampled are independent (AtIndependentSample) and when the the PDF depends on some reference hit (AtSampleFromReference).

To add an additional sampling method, at minimum it must inherit AtSample. It should also be added to the SampleMethod enum, and the static factory method AtSample::CreateSampler.

Enumeration Type Documentation

◆ SampleMethod

. Methods of random sampling.

All methods implemented that can be constructed by the factory method CreateSampler(SampleMethod).

Enumerator
kUniform 
kChargeWeighted 
kGaussian 
kWeightedGaussian 
kWeightedY 
kWeightedGaussianTrunc 
kY 

Definition at line 22 of file AtSampleMethods.h.

Function Documentation

◆ CreateSampler()

template<typename... Ts>
std::unique_ptr<AtSample> RandomSample::CreateSampler ( SampleMethod  method,
Ts &&...  params 
)

. Create a hit sampler

Create a sampler using the method, and any parameters required by the type's constructor.

Parameters
[in]methodSampleMethod to create
[in]paramsArguments to forward to the constructor of method

Definition at line 41 of file AtSampleMethods.h.