HighLAND
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MomentumResolSystematics Class Reference

#include <MomentumResolSystematics.hxx>

Inheritance diagram for MomentumResolSystematics:
EventVariationBase MomentumResolVariation SystematicBase

Public Member Functions

 MomentumResolSystematics ()
 
virtual void Apply (const ToyExperiment &toy, AnaEventC &event)
 Apply the systematic.
 
bool GetVariation (AnaTrackB *track, Float_t &variation, const ToyExperiment &exp)
 Get the variation given a track.
 
bool GetVariationTPC (AnaTPCParticleB *track, Float_t &variation, const ToyExperiment &exp)
 Get the variation given a track.
 
virtual bool UndoSystematic (AnaEventC &event)
 Undo the systematic variations done by ApplyVariation. This is faster tha reseting the full Spill.
 
- Public Member Functions inherited from EventVariationBase
 EventVariationBase ()
 Create the systematic, with one parameter.
 
 EventVariationBase (UInt_t npar)
 Create the systematic, specifying the number of systematic parameters.
 
virtual ~EventVariationBase ()
 Everyone should have a destructor.
 
virtual void InitializeEvent (const AnaEventC &event, const SelectionBase &sel)
 Initialize the SystBox for this event.
 
virtual void InitializeEvent (const AnaEventC &event)
 
- Public Member Functions inherited from SystematicBase
 SystematicBase ()
 Create the systematic, with one parameter.
 
 SystematicBase (UInt_t npar)
 Create the systematic, specifying the number of systematic parameters.
 
virtual ~SystematicBase ()
 Everyone should have a destructor.
 
UInt_t GetNParameters () const
 Returns the number of systematic parameters associated to this systematic.
 
void SetNParameters (int N)
 Set the number of systematic parameters associated to this systematic.
 
virtual const char * GetName () const
 Return the name of this systematic. This overrides the TObject::GetName() interface.
 
const std::string & Name () const
 Return the name of this systematic.
 
void SetName (const std::string &name)
 Set the name of this systematic.
 
Int_t GetIndex () const
 Return the index of this systematic.
 
void SetIndex (Int_t index)
 Set the index of this systematic.
 
TypeEnum Type () const
 Return the type of this systematic.
 
std::string ConvertType ()
 Return the type of this systematic.
 
void SetType (TypeEnum type)
 Set the type of this systematic.
 
PDFEnum PDF () const
 Return the PDF of this systematic.
 
std::string ConvertPDF ()
 Return the PDF of this systematic.
 
void SetPDF (PDFEnum PDF)
 Set the PDF of this systematic.
 
void SetEnabled (bool ena)
 Set the enable bit.
 
bool IsEnabled () const
 Returns the enable bit.
 
virtual void FinalizeEvent (const AnaEventC &event)
 Delete the SystBox for this event.
 
SystBoxBGetSystBox (const AnaEventC &event, Int_t isel=0, Int_t ibranch=0) const
 Get the SystBox corresponding to a selection, branch and event.
 
virtual void Initialize (Int_t nsel, Int_t isel, Int_t nbranch, Int_t nevents)
 Create the array of SystBox.
 
 ClassDef (SystematicBase, 2)
 
- Public Member Functions inherited from MomentumResolVariation
virtual void ApplyVariation (AnaTrackB *track, const ToyExperiment &exp)
 
virtual void ApplyVariationTPCBased (AnaTrackB *track, const ToyExperiment &exp)
 
virtual void ApplyVariationTPC (AnaTPCParticleB *track, const ToyExperiment &exp)
 Smear TPC track based on the corresponding true track.
 

Protected Member Functions

Int_t GetRelevantRecObjectGroups (const SelectionBase &sel, Int_t *IDs) const
 Get the TrackGroup IDs array for this systematic.
 
- Protected Member Functions inherited from EventVariationBase
virtual bool IsRelevantRecObject (const AnaEventC &, const AnaRecObjectC &) const
 Check whether a AnaRecObject is relevant for this systematic or not.
 
void FillSystBox (const AnaEventC &event, const SelectionBase &sel, SystBoxB &box)
 Fills the SystBox.
 
- Protected Member Functions inherited from MomentumResolVariation
bool GetXBinnedValues (AnaTrackB *track, Float_t &value1, Float_t &value2, Int_t &index1, Int_t &index2, ModeEnum mode)
 Get parameters for this global track assumed one uses X bins.
 
bool GetXBinnedValues (AnaTPCParticleB *tpcTrack, Float_t &value1, Float_t &value2, Int_t &index1, Int_t &index2, ModeEnum mode)
 Get parameters for this tpc track assumed one uses X bins.
 
bool GetXBinnedValues (Float_t xmin, Float_t xmax, Float_t &value1, Float_t &value2, Int_t &index1, Int_t &index2, ModeEnum mode)
 

Protected Attributes

bool _full_correlations
 Value of psycheSystematics.Tracker.FullCorrelations parameter.
 
bool _tpc_based_var
 Whether to do the smearing based on the local TPC mom.
 
bool _useP0DFV
 
- Protected Attributes inherited from SystematicBase
std::string _name
 The name of this systematic.
 
Int_t _index
 The index of this systematic (needed by SystematicsManager);.
 
TypeEnum _type
 The type of this systematic (variation, weight or flux)
 
bool _enabled
 Is this systematic enabled ?
 
PDFEnum _PDF
 The PDF use for the systematic parameter scan.
 
UInt_t _nParameters
 the number of systematic parameters
 
SystBoxB **** _systBoxes
 ----—— Relevant objects for this systematic ------------—— More...
 
Int_t _systBoxesNSel
 
Int_t _systBoxesNBranches [NMAXSELECTIONS]
 
Int_t _systBoxesNEvents [NMAXSELECTIONS][NMAXBRANCHES]
 
- Protected Attributes inherited from MomentumResolVariation
BinnedParams_params
 Binned data to read the parameters.
 

Additional Inherited Members

- Public Types inherited from SystematicBase
enum  TypeEnum { kVariation = 0, kWeight, kFlux, kUnknown }
 Enumerator describing the values that _type member can take.
 
enum  PDFEnum {
  kGaussian = 0, kUniform, kBinomial, kMultinomial,
  kUnknownPDF
}
 Enumerator describing the values that _PDF member can take.
 
- Public Types inherited from MomentumResolVariation
enum  ModeEnum { kCorr, kSyst }
 
- Static Public Member Functions inherited from MomentumResolVariation
static AnaParticleBGetClosestTPCSegmentWithGoodDQ (const AnaTrackB &track, const Float_t *pos)
 Get TPC segment that satisfies DQ and is closest.
 

Detailed Description

This systematic smears the momentum of tracks with TPC information, by a random amount from a Gaussian distribution.

The amount each track is changed by uses two Gaussian distributions. The first distribution uses the input parameters to select a resolution. This is called once for each virtual analysis. The second distribution then uses the chosen resolution as its width, and the amount to vary each track's momentum is chosen from this distribution. This is called for each track individually.

Definition at line 16 of file MomentumResolSystematics.hxx.

Constructor & Destructor Documentation

§ MomentumResolSystematics()

MomentumResolSystematics::MomentumResolSystematics ( )

Instantiate the momentum resolution systematic. nbins is the number of bins in the PDF. addResol and addResolError describe the Gaussian distribution from which the resolution of each virtual analysis is selected from.

Definition at line 33 of file MomentumResolSystematics.cxx.

34  //********************************************************************
35 
36  _params = new BinnedParams("MomentumResol",
37  BinnedParams::k1D_SYMMETRIC,
38  versionUtils::Extension());
39 
40  // Whether to use local TPC based smearing
41  _tpc_based_var = (bool)ND::params().GetParameterI("psycheSystematics.MomResol.UseTPCBased");
42  _useP0DFV = (bool) ND::params().GetParameterI("psycheSystematics.Tracker.UseP0DFV");
43 
45 
46  // Wether assume full correlation between syst bins
47  _full_correlations = ND::params().GetParameterI("psycheSystematics.Tracker.FullCorrelations");
48 }
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
Definition: Parameters.cxx:217
void SetNParameters(int N)
Set the number of systematic parameters associated to this systematic.
EventVariationBase()
Create the systematic, with one parameter.
bool _tpc_based_var
Whether to do the smearing based on the local TPC mom.
bool _full_correlations
Value of psycheSystematics.Tracker.FullCorrelations parameter.
Int_t GetNBins()
Get the number of bins.
BinnedParams * _params
Binned data to read the parameters.

The documentation for this class was generated from the following files: