hpstr
The Heavy Photon Search Toolkit for Reconstruction (hpstr) provides an interface to physics data from the HPS experiment saved in the LCIO format and converts it into an ROOT based format.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
TrackSmearingTool.h
Go to the documentation of this file.
1#pragma once
2
3//------------------//
4// C++ //
5//------------------//
6#include <iostream>
7#include <random>
8#include <memory>
9
10//------------------//
11// hpstr //
12//------------------//
13
14#include "Track.h"
15
16class TFile;
17class TH1D;
18
20
21 public :
22
23 // The seed needs to be set accordingly for each instance / job of the smearing tool
24 TrackSmearingTool(const std::string& smearingfile,
25 const bool relSmearing = true,
26 const int seed = 42,
27 const std::string& tracks = "KalmanFullTracks");
28
29 double smearTrackP(const Track& trk);
30 void updateWithSmearP(Track& trk);
31
32 private:
33
34 //Random engine
35 std::shared_ptr<std::default_random_engine> generator_;
36
37 // General Normal distributions
38
39 std::shared_ptr<std::normal_distribution<double>> normal_;
40
41 std::shared_ptr<TFile> smearingfile_;
42
43 //Smearing terms
46
47 // debug
48 bool debug_{false};
49 bool relSmearing_{false};
50
51};
Class used to encapsulate track information.
double smearTrackP(const Track &trk)
std::shared_ptr< std::default_random_engine > generator_
std::shared_ptr< TFile > smearingfile_
std::shared_ptr< std::normal_distribution< double > > normal_
void updateWithSmearP(Track &trk)
Definition Track.h:32