HighLAND
Public Member Functions | Protected Attributes | List of all members
PileUpCorrection Class Reference
Inheritance diagram for PileUpCorrection:
CorrectionBase BinnedParams p0dPileUpCorrection

Public Member Functions

void Apply (AnaSpillC &spill)
 
- Public Member Functions inherited from CorrectionBase
 CorrectionBase (const CorrectionBase &corr)
 Copy constructor.
 
virtual ~CorrectionBase ()
 Everyone should have a destructor.
 
virtual const char * GetName () const
 Return the name of this correction. This overrides the TObject::GetName() interface.
 
const std::string & Name () const
 Return the name of this correction.
 
void SetName (const std::string &name)
 Set the name of this correction.
 
void Enable ()
 Enable the correction.
 
void Disable ()
 Disable the correction.
 
bool IsEnabled () const
 Is the correction enabled.
 
void SetAppliedInInput (bool ap)
 Set the correction as applied in the input file.
 
bool IsAppliedInInput () const
 Is the correction already applied in the input file ?
 
Int_t GetIndex () const
 Return the index of this correction.
 
void SetIndex (Int_t index)
 Set the index of this correction.
 
 ClassDef (CorrectionBase, 2)
 
- Public Member Functions inherited from BinnedParams
 BinnedParams (const std::string &folder_name, const std::string &name, TypeEnum type, const std::string &extension="", bool useInterpolation=false)
 Constructor provided the folder name, name and the type.
 
 BinnedParams (const std::string &name, TypeEnum type, const std::string &extension="", bool useInterpolation=false)
 Constructor provided the name and the type, this is to make current psycheSystematics work, may remove it.
 
void AddBin (Float_t min, Float_t max, Float_t meanREAL, Float_t meanMC, Float_t sigmaMCl, Float_t sigmaMCh, Float_t meanDATA, Float_t sigmaDATAl, Float_t sigmaDATAh)
 Add a new bin for a 1D source.
 
void AddBin (Float_t min, Float_t max, Float_t mean, Float_t sigma)
 
void AddBin (Float_t min, Float_t max, Float_t min2, Float_t max2, Float_t meanREAL, Float_t meanMC, Float_t sigmaMCl, Float_t sigmaMCh, Float_t meanDATA, Float_t sigmaDATAl, Float_t sigmaDATAh)
 Add a new bin for a 2D source.
 
void AddBin (Float_t min, Float_t max, Float_t min2, Float_t max2, Float_t mean, Float_t sigma)
 
void AddBin (Float_t min, Float_t max, Float_t min2, Float_t max2, Float_t min3, Float_t max3, Float_t meanREAL, Float_t meanMC, Float_t sigmaMCl, Float_t sigmaMCh, Float_t meanDATA, Float_t sigmaDATAl, Float_t sigmaDATAh)
 Add a new bin for a 3D source.
 
void AddBin (Float_t min, Float_t max, Float_t min2, Float_t max2, Float_t min3, Float_t max3, Float_t mean, Float_t sigma)
 
void AddGraphBin (Float_t min, Float_t max, Float_t meanREAL, Float_t meanMC, Float_t sigmaMCl, Float_t sigmaMCh, Float_t meanDATA, Float_t sigmaDATAl, Float_t sigmaDATAh)
 Add a new bin graph for a 1D source.
 
void AddGraphBin (Float_t min, Float_t max, Float_t mean, Float_t sigma)
 
void AddGraphBin (Float_t min, Float_t max, Float_t min2, Float_t max2, Float_t meanREAL, Float_t meanMC, Float_t sigmaMCl, Float_t sigmaMCh, Float_t meanDATA, Float_t sigmaDATAl, Float_t sigmaDATAh)
 Add a new bin graph for a 2D source.
 
void AddGraphBin (Float_t min, Float_t max, Float_t min2, Float_t max2, Float_t mean, Float_t sigma)
 
void AddGraphBin (Float_t min, Float_t max, Float_t min2, Float_t max2, Float_t min3, Float_t max3, Float_t meanREAL, Float_t meanMC, Float_t sigmaMCl, Float_t sigmaMCh, Float_t meanDATA, Float_t sigmaDATAl, Float_t sigmaDATAh)
 Add a new bin graph for a 3D source.
 
void AddGraphBin (Float_t min, Float_t max, Float_t min2, Float_t max2, Float_t min3, Float_t max3, Float_t mean, Float_t sigma)
 
bool GetGraphBin (Float_t value, BinnedParamsGraphBin *&bin)
 Gets the bin for a 2D source.
 
bool GetGraphBin (Float_t value1, Float_t value2, BinnedParamsGraphBin *&bin)
 Gets the bin for a 3D source.
 
bool GetBin (Float_t value, BinnedParamsBin *&bin)
 Gets the bin for a 1D source.
 
bool GetBin (Float_t value1, Float_t value2, BinnedParamsBin *&bin)
 Gets the bin for a 2D source.
 
bool GetBin (Float_t value1, Float_t value2, Float_t value3, BinnedParamsBin *&bin)
 Gets the bin for a 3D source.
 
bool GetBinIndex (Float_t value, Int_t &index)
 Gets the bin index for a 1D source.
 
bool GetParametersForBin (Int_t index, Float_t &mean, Float_t &sigma)
 Gets the bin values for a source provided the bin index.
 
bool GetParametersForBin (Int_t index, BinnedParamsParams &params)
 
bool GetSigmaValueForBin (Int_t index, Float_t &sigma)
 Get only mean or sigma.
 
bool GetMeanValueForBin (Int_t index, Float_t &mean)
 
bool GetBinValues (Float_t value, Float_t &mean, Float_t &sigma)
 Gets the bin values for a 1D source.
 
bool GetBinValues (Float_t value, Float_t &mean, Float_t &sigma, Int_t &index)
 
bool GetBinSigmaValue (Float_t value, Float_t &sigma)
 Get only sigma.
 
bool GetBinSigmaValue (Float_t value, Float_t &sigma, Int_t &index)
 
bool GetBinMeanValue (Float_t value, Float_t &mean)
 
bool GetBinMeanValue (Float_t value, Float_t &mean, Int_t &index)
 
bool GetBinValues (Float_t value, BinnedParamsParams &params)
 
bool GetBinValues (Float_t value, BinnedParamsParams &params, Int_t &index)
 
bool GetBinValues (Float_t value1, Float_t value2, Float_t &mean, Float_t &sigma)
 Gets the bin values for a 2D source.
 
bool GetBinValues (Float_t value1, Float_t value2, Float_t &mean, Float_t &sigma, Int_t &index)
 
bool GetBinSigmaValue (Float_t value1, Float_t value2, Float_t &sigma)
 Get only sigma.
 
bool GetBinSigmaValue (Float_t value1, Float_t value2, Float_t &sigma, Int_t &index)
 
bool GetBinMeanValue (Float_t value1, Float_t value2, Float_t &mean)
 
bool GetBinMeanValue (Float_t value1, Float_t value2, Float_t &mean, Int_t &index)
 
bool GetBinValues (Float_t value1, Float_t value2, BinnedParamsParams &params)
 
bool GetBinValues (Float_t value1, Float_t value2, BinnedParamsParams &params, Int_t &index)
 
bool GetBinValues (Float_t value1, Float_t value2, Float_t value3, Float_t &mean, Float_t &sigma)
 Gets the bin values for a 3D source.
 
bool GetBinValues (Float_t value1, Float_t value2, Float_t value3, Float_t &mean, Float_t &sigma, Int_t &index)
 
bool GetBinSigmaValue (Float_t value1, Float_t value2, Float_t value3, Float_t &sigma)
 Get only sigma.
 
bool GetBinSigmaValue (Float_t value1, Float_t value2, Float_t value3, Float_t &sigma, Int_t &index)
 
bool GetBinMeanValue (Float_t value1, Float_t value2, Float_t value3, Float_t &mean)
 
bool GetBinMeanValue (Float_t value1, Float_t value2, Float_t value3, Float_t &mean, Int_t &index)
 
bool GetBinValues (Float_t value1, Float_t value2, Float_t value3, BinnedParamsParams &params)
 
bool GetBinValues (Float_t value1, Float_t value2, Float_t value3, BinnedParamsParams &params, Int_t &index)
 
bool GetInterBinValues (Float_t value1, BinnedParamsParams &params)
 Get values using interpolation.
 
bool GetInterBinValues (Float_t value1, Float_t value2, BinnedParamsParams &params)
 Gets the bin values for a 2D source.
 
bool GetInterBinValues (Float_t value1, Float_t value2, Float_t value3, BinnedParamsParams &params)
 Gets the bin values for a 3D source.
 
void SetType (TypeEnum type)
 Set the type.
 
void SetName (const std::string &name)
 Set the name.
 
void SetInterpolationUsage (bool use)
 Set the name.
 
const std::string & GetDataName ()
 Get the name of the source.
 
TypeEnum GetDataType ()
 Returns the type of the data.
 
bool GetInterpolationStatus ()
 Returns the type of the data.
 
void Print ()
 Dump into the screen the systematic source values.
 
void Read (const std::string &inputDirName, const std::string &extension="")
 Read from a file the systematic source values.
 
Int_t GetNBins ()
 Get the number of bins.
 
bool UpdateEfficiencyCounter (Int_t index, bool correct)
 Update the efficiency variables _ncorrect and _nwrong.
 
void InitializeEfficiencyCounter ()
 Initialize counters.
 
Int_t GetNCorrectAssoc (Int_t index)
 
Int_t GetNWrongAssoc (Int_t index)
 

Protected Attributes

UInt_t _nRunPeriods
 
Float_t _correction [NMAXRUNPERIODS]
 
- Protected Attributes inherited from CorrectionBase
std::string _name
 The name of this correction.
 
bool _enabled
 Is the correction enabled?
 
bool _appliedInInput
 Is the correction already applied in the input file ?
 
Int_t _index
 The index of the correction.
 

Additional Inherited Members

- Public Types inherited from BinnedParams
enum  TypeEnum {
  k1D_SYMMETRIC = 0, k2D_SYMMETRIC, k3D_SYMMETRIC, k1D_SYMMETRIC_NOMEAN,
  k2D_SYMMETRIC_NOMEAN, k3D_SYMMETRIC_NOMEAN, k1D_EFF_SYMMETRIC, k2D_EFF_SYMMETRIC,
  k3D_EFF_SYMMETRIC, k1D_EFF_ASSYMMETRIC, k2D_EFF_ASSYMMETRIC, k3D_EFF_ASSYMMETRIC,
  k1D_DATA, k2D_DATA, k3D_DATA, kUnknown
}
 Enumerator describing the values that _type member can take.
 
enum  TypeShortEnum { k1D = 0, k2D, k3D, kUnknownShort }
 

Detailed Description

Definition at line 9 of file PileUpCorrection.hxx.

Member Function Documentation

§ Apply()

void PileUpCorrection::Apply ( AnaSpillC spill)
virtual

This is the function that applies the correction to the input data. This MUST be overridden in the derived class.

Reimplemented from CorrectionBase.

Definition at line 38 of file PileUpCorrection.cxx.

38  {
39 //********************************************************************
40 
41  AnaSpill& spill = *static_cast<AnaSpill*>(&spillBB);
42 
43  // No correction for data
44  if (!spill.GetIsMC()) return;
45 
46  // Get the run period (from 0 to 6)
47  Int_t runPeriod = anaUtils::GetRunPeriod(spill.EventInfo->Run);
48 
49  // Need a valid runPeriod
50  if (runPeriod<0 && runPeriod>=(Int_t)_nRunPeriods) return;
51 
52  // Apply the corection
53  for (UInt_t i = 0; i < spill.Bunches.size(); i++)
54  spill.Bunches[i]->Weight *= 1-_correction[runPeriod];
55 }
std::vector< AnaBunchC * > Bunches
The reconstructed objects, split into timing bunches.
AnaEventInfoB * EventInfo
Run, sunrun, event, time stamp, etc.
int GetRunPeriod(int run, int subrun=-1)
Returns the run period (sequentially: 0,1,2,3,4,5 ...)
bool GetIsMC() const
Return whether this spill is from Monte Carlo or not.
Int_t Run
The ND280 run number.

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