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

This is a normalization systematic. It takes into account the uncertainty on the FGD mass introduced in the MC. More...

#include <FGDMassSystematics.hxx>

Inheritance diagram for FGDMassSystematics:
EventWeightBase SystematicBase

Public Member Functions

Weight_h ComputeWeight (const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &box)
 
- Public Member Functions inherited from EventWeightBase
 EventWeightBase ()
 Create the systematic, with one parameter.
 
 EventWeightBase (UInt_t npar)
 Create the systematic, specifying the number of systematic parameters.
 
virtual ~EventWeightBase ()
 Everyone should have a destructor.
 
virtual void InitializeEvent (const AnaEventC &event, const SelectionBase &sel, Int_t ibranch)
 Initialize the SystBox for this event.
 
virtual Weight_h ComputeWeight (const ToyExperiment &toy, const AnaEventC &event, const ToyBoxB &box, const SelectionBase &sel)
 This is now the actual method called by SystematicManager, which allows further selection tunning of relevant objects once the ToyBox is filled.
 
- 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)
 

Protected Attributes

Float_t _scintmass_corr
 FGD mass correction and error.
 
Float_t _scintmass_err
 
Float_t _watermass_corr
 
Float_t _watermass_err
 
BinnedParams_scintmass
 
BinnedParams_watermass
 
- 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]
 

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.
 
- Protected Member Functions inherited from EventWeightBase
virtual Int_t GetRelevantRecObjectGroups (const SelectionBase &, Int_t ibranch, Int_t *IDs) const
 Get the IDs of the RecObject groups that are relevant for this systematic in a given selection.
 
virtual Int_t GetRelevantTrueObjectGroups (const SelectionBase &, Int_t ibranch, Int_t *IDs) const
 Get the IDs of the TrueObject groups that are relevant for this systematic in a given selection.
 
virtual bool IsRelevantRecObject (const AnaEventC &, const AnaRecObjectC &) const
 Check whether a AnaRecObject is relevant for this systematic or not.
 
virtual bool IsRelevantTrueObject (const AnaEventC &, const AnaTrueObjectC &) const
 Check whether a AnaTrueObject is relevant for this systematic or not.
 
virtual void FillSystBox (const AnaEventC &event, const SelectionBase &sel, Int_t ibranch)
 Fills the SystBox.
 
virtual bool CheckTrueRecoAssociation (const AnaTrueObjectC &trueRecObject, const AnaRecObjectC &track) const
 Criteria for true-reco association for this systematic.
 
void FillTrueRecoAssociation (SystBoxB &box)
 Fll the true-reco association array.
 

Detailed Description

This is a normalization systematic. It takes into account the uncertainty on the FGD mass introduced in the MC.

Definition at line 9 of file FGDMassSystematics.hxx.

Member Function Documentation

§ ComputeWeight()

Weight_h FGDMassSystematics::ComputeWeight ( const ToyExperiment toy,
const AnaEventC event,
const ToyBoxB box 
)
virtual

This is now the actual method called by SystematicManager, which allows further selection tunning of relevant objects once the ToyBox is filled This MUST be overridden in the derived class.

Implements EventWeightBase.

Definition at line 23 of file FGDMassSystematics.cxx.

23  {
24 //********************************************************************
25 
26  const AnaEventB& event = *static_cast<const AnaEventB*>(&eventBB);
27 
28  // Cast the ToyBox to the appropriate type
29  const ToyBoxTracker& box = *static_cast<const ToyBoxTracker*>(&boxB);
30 
31  Weight_h eventWeight=1;
32 
33  // True vertex associated to the recon vertex should exist
34  if (!box.Vertex->TrueVertex) return eventWeight;
35 
36  // Apply FGD mass systematic when the true vertex is in FGD
37 
38  // Depending on FGD1 or FGD2
39  if( box.DetectorFV==SubDetId::kFGD1){ // Event selected in FGD1 FV
40  if (anaUtils::InDetVolume(SubDetId::kFGD1, box.Vertex->TrueVertex->Position)){ // TrueVertex in FGD1 FV
41  eventWeight.Systematic = 1 + _scintmass_corr + _scintmass_err * toy.GetToyVariations(_index)->Variations[0];
42  eventWeight.Correction = 1 + _scintmass_corr;
43  }
44  }
45  else if( box.DetectorFV==SubDetId::kFGD2){ // Event selected in FGD2 FV
46  if (anaUtils::InDetVolume(SubDetId::kFGD2, box.Vertex->TrueVertex->Position)){ // TrueVertex in FGD2 FV
47  // Check water of scintilator
48  if (anaUtils::GetFgdModuleTypeNoFV(event.GetIsMC(), box.Vertex->TrueVertex->Position,true) == 2){
49  eventWeight.Systematic = 1 + _watermass_corr + _watermass_err * toy.GetToyVariations(_index)->Variations[1];
50  eventWeight.Correction = 1 + _watermass_corr;
51  }
52  else{
53  eventWeight.Systematic = 1 + _scintmass_corr + _scintmass_err * toy.GetToyVariations(_index)->Variations[0];
54  eventWeight.Correction = 1 + _scintmass_corr;
55  }
56  }
57  }
58  return eventWeight;
59 }
Int_t _index
The index of this systematic (needed by SystematicsManager);.
AnaTrueVertexB * TrueVertex
Float_t * Variations
the vector of Variations, one for each of the systematic parameters
Float_t _scintmass_corr
FGD mass correction and error.
SubDetId_h DetectorFV
Indicate the FV we are interested in.
Definition: ToyBoxB.hxx:52
AnaVertexB * Vertex
For storing the reconstructed vertex.
Float_t Position[4]
The position the true interaction happened at.
ToyVariations * GetToyVariations(UInt_t index) const
returns the variations for a given systematic (index)
bool InDetVolume(SubDetId::SubDetEnum det, const Float_t *pos)
virtual bool GetIsMC() const =0
Return whether this event is from Monte Carlo or not.

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