HighLAND
psyche
psycheSystematics
v3r12
src
MomentumResolSystematics.hxx
1
#ifndef MomentumResolSystematics_h
2
#define MomentumResolSystematics_h
3
4
#include "EventVariationBase.hxx"
5
#include "MomentumResolVariation.hxx"
6
7
/// This systematic smears the momentum of tracks with TPC information, by a
8
/// random amount from a Gaussian distribution.
9
///
10
/// The amount each track is changed by uses two Gaussian distributions.
11
/// The first distribution uses the input parameters to select a resolution.
12
/// This is called once for each virtual analysis. The second distribution
13
/// then uses the chosen resolution as its width, and the amount to vary each
14
/// track's momentum is chosen from this distribution. This is called for each
15
/// track individually.
16
class
MomentumResolSystematics
:
public
EventVariationBase
,
public
MomentumResolVariation
{
17
public
:
18
19
/// Instantiate the momentum resolution systematic. nbins is the number of
20
/// bins in the PDF. addResol and addResolError describe
21
/// the Gaussian distribution from which the resolution of each virtual
22
/// analysis is selected from.
23
MomentumResolSystematics
();
24
25
virtual
~
MomentumResolSystematics
() {}
26
27
/// Apply the systematic
28
virtual
void
Apply
(
const
ToyExperiment
& toy,
AnaEventC
& event);
29
30
/// Get the variation given a track
31
bool
GetVariation
(
AnaTrackB
* track, Float_t& variation,
const
ToyExperiment
& exp);
32
33
/// Get the variation given a track
34
bool
GetVariationTPC
(
AnaTPCParticleB
* track, Float_t& variation,
const
ToyExperiment
& exp);
35
36
37
/// Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill
38
virtual
bool
UndoSystematic
(
AnaEventC
& event);
39
40
41
protected
:
42
43
/// Get the TrackGroup IDs array for this systematic
44
Int_t
GetRelevantRecObjectGroups
(
const
SelectionBase
& sel, Int_t* IDs)
const
;
45
46
/// Value of psycheSystematics.Tracker.FullCorrelations parameter
47
bool
_full_correlations
;
48
49
/// Whether to do the smearing based on the local TPC mom
50
bool
_tpc_based_var
;
51
52
bool
_useP0DFV;
53
54
};
55
56
#endif
MomentumResolSystematics::UndoSystematic
virtual bool UndoSystematic(AnaEventC &event)
Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill...
Definition:
MomentumResolSystematics.cxx:76
MomentumResolSystematics
Definition:
MomentumResolSystematics.hxx:16
EventVariationBase
Definition:
EventVariationBase.hxx:11
AnaEventC
Definition:
CoreDataClasses.hxx:226
MomentumResolVariation
Definition:
MomentumResolVariation.hxx:11
MomentumResolSystematics::_tpc_based_var
bool _tpc_based_var
Whether to do the smearing based on the local TPC mom.
Definition:
MomentumResolSystematics.hxx:50
MomentumResolSystematics::Apply
virtual void Apply(const ToyExperiment &toy, AnaEventC &event)
Apply the systematic.
Definition:
MomentumResolSystematics.cxx:51
MomentumResolSystematics::_full_correlations
bool _full_correlations
Value of psycheSystematics.Tracker.FullCorrelations parameter.
Definition:
MomentumResolSystematics.hxx:47
MomentumResolSystematics::GetVariationTPC
bool GetVariationTPC(AnaTPCParticleB *track, Float_t &variation, const ToyExperiment &exp)
Get the variation given a track.
Definition:
MomentumResolSystematics.cxx:150
AnaTrackB
Representation of a global track.
Definition:
BaseDataClasses.hxx:603
AnaTPCParticleB
Representation of a TPC segment of a global track.
Definition:
BaseDataClasses.hxx:360
MomentumResolSystematics::GetRelevantRecObjectGroups
Int_t GetRelevantRecObjectGroups(const SelectionBase &sel, Int_t *IDs) const
Get the TrackGroup IDs array for this systematic.
Definition:
MomentumResolSystematics.cxx:192
ToyExperiment
Definition:
ToyExperiment.hxx:14
MomentumResolSystematics::GetVariation
bool GetVariation(AnaTrackB *track, Float_t &variation, const ToyExperiment &exp)
Get the variation given a track.
Definition:
MomentumResolSystematics.cxx:112
MomentumResolSystematics::MomentumResolSystematics
MomentumResolSystematics()
Definition:
MomentumResolSystematics.cxx:33
SelectionBase
Definition:
SelectionBase.hxx:86
Generated by
1.8.13