Public Member Functions | Private Attributes | List of all members
ana::LeptonAngleSyst Class Reference

#include "/cvmfs/"

Inheritance diagram for ana::LeptonAngleSyst:

Public Member Functions

 LeptonAngleSyst (const std::string &shortName, const std::string &latexName, const caf::Det_t det, const AngleShiftPlane shiftPlane, const double angUnc)
void Shift (double sigma, caf::SRProxy *sr, double &weight) const override
 Perform the systematic shift. More...
virtual const std::stringShortName () const final
 The name printed out to the screen. More...
virtual const std::stringLatexName () const final
 The name used on plots (ROOT's TLatex syntax) More...
virtual void TruthShift (double sigma, caf::SRNeutrinoProxy *nu, double &weight) const
virtual bool IsGenieReweight () const
 GENIE reweights can only provide +/-1,2sigma. More...

Private Attributes

const caf::Det_t fDet
const AngleShiftPlane fShiftPlane
const double fAngUnc

Detailed Description

Definition at line 15 of file AngleSysts.h.

Constructor & Destructor Documentation

ana::LeptonAngleSyst::LeptonAngleSyst ( const std::string shortName,
const std::string latexName,
const caf::Det_t  det,
const AngleShiftPlane  shiftPlane,
const double  angUnc 

Definition at line 18 of file AngleSysts.h.

References Shift(), sigma(), sr, and ana::weight.

23  : ISyst( shortName, latexName ), fDet( det ),
24  fShiftPlane( shiftPlane ), fAngUnc( angUnc ) {}
const caf::Det_t fDet
Definition: AngleSysts.h:29
const double fAngUnc
Definition: AngleSysts.h:31
string shortName
THUMBNAIL BLOCK: We need to make a thumbnail for each.
ISyst(const std::string &shortName, const std::string &latexName)
Definition: ISyst.cxx:10
const AngleShiftPlane fShiftPlane
Definition: AngleSysts.h:30

Member Function Documentation

virtual bool ana::ISyst::IsGenieReweight ( ) const

GENIE reweights can only provide +/-1,2sigma.

Reimplemented in ana::SummedSyst.

Definition at line 56 of file ISyst.h.

56 {return false;}
virtual const std::string& ana::ISyst::LatexName ( ) const

The name used on plots (ROOT's TLatex syntax)

Definition at line 30 of file ISyst.h.

References ana::ISyst::fLatexName, ana::ISyst::Shift(), sigma(), sr, and ana::weight.

Referenced by ana::PredictionInterp::DebugPlotColz(), GetGENIEShiftLabels(), ana::NuISyst::SaveTo(), SystsGENIEAna(), and WriteSystName().

30 {return fLatexName;}
std::string fLatexName
Definition: ISyst.h:60
void ana::LeptonAngleSyst::Shift ( double  sigma,
caf::SRProxy sr,
double &  weight 
) const

Perform the systematic shift.

Override this function if your systematic depends on non-SRNeutrino quantities. If it is SRNeutrino-only, implement the other function, and let this default forward to you when necessary.

sigmaNumber of sigma to shift record by
srThe record to inspect and alter
weightScale this weight for reweighting systematics

Reimplemented from ana::ISyst.

Definition at line 16 of file AngleSysts.cxx.

References caf::Proxy< caf::SRHeader >::det, caf::Proxy< caf::SRVertexBranch >::elastic, fAngUnc, fDet, fShiftPlane, caf::Proxy< caf::SRElastic >::fuzzyk, caf::Proxy< caf::StandardRecord >::hdr, caf::Proxy< caf::SRKalman >::idxremid, caf::Proxy< caf::SRElastic >::IsValid, caf::Proxy< caf::SRTrackBranch >::kalman, ana::kAngleShiftXZ, ana::kAngleShiftYZ, caf::Proxy< caf::SRFuzzyK >::npng, caf::Proxy< caf::SRKalman >::ntracks, caf::Proxy< caf::SRFuzzyK >::png, caf::Proxy< caf::SRKalman >::tracks, caf::Proxy< caf::StandardRecord >::trk, and caf::Proxy< caf::StandardRecord >::vtx.

Referenced by LeptonAngleSyst().

17  {
18  // Shift muon and electron reco direction vectors in the XZ or YZ plane to account for plane mis-aignment
19  // These shifts will affect muon and electron reco quantities such as Theta, Pt, Q2, q3
20  // The shifts are correlated between muons and electrons and uncorrelated between the ND and FD
22  if ( sr->hdr.det != fDet ) return;
24  if ( sr->trk.kalman.ntracks > 0 && sr->trk.kalman.idxremid != 999 )
25  {
26  TVector3 muonDir = sr->trk.kalman.tracks[0].dir;
28  if ( fShiftPlane == kAngleShiftXZ ) muonDir.RotateY( fAngUnc * sigma );
29  else if ( fShiftPlane == kAngleShiftYZ ) muonDir.RotateX( fAngUnc * sigma );
31  sr->trk.kalman.tracks[0].dir.x = muonDir.X();
32  sr->trk.kalman.tracks[0].dir.y = muonDir.Y();
33  sr->trk.kalman.tracks[0].dir.z = muonDir.Z();
34  }
36  if ( sr->vtx.elastic.IsValid && sr->vtx.elastic.fuzzyk.npng >= 1 )
37  {
38  TVector3 elecDir = sr->vtx.elastic.fuzzyk.png[0].dir;
40  if ( fShiftPlane == kAngleShiftXZ ) elecDir.RotateY( fAngUnc * sigma );
41  else if ( fShiftPlane == kAngleShiftYZ ) elecDir.RotateX( fAngUnc * sigma );
43  sr->vtx.elastic.fuzzyk.png[0].dir.x = elecDir.X();
44  sr->vtx.elastic.fuzzyk.png[0].dir.y = elecDir.Y();
45  sr->vtx.elastic.fuzzyk.png[0].dir.z = elecDir.Z();
46  }
47  }
caf::Proxy< size_t > npng
Definition: SRProxy.h:2038
caf::Proxy< caf::SRFuzzyK > fuzzyk
Definition: SRProxy.h:2059
caf::Proxy< unsigned int > idxremid
Definition: SRProxy.h:1777
const caf::Det_t fDet
Definition: AngleSysts.h:29
caf::Proxy< size_t > ntracks
Definition: SRProxy.h:1778
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
caf::Proxy< caf::SRElastic > elastic
Definition: SRProxy.h:2118
caf::Proxy< std::vector< caf::SRFuzzyKProng > > png
Definition: SRProxy.h:2043
caf::Proxy< caf::SRTrackBranch > trk
Definition: SRProxy.h:2145
double sigma(TH1F *hist, double percentile)
const double fAngUnc
Definition: AngleSysts.h:31
caf::Proxy< caf::SRKalman > kalman
Definition: SRProxy.h:1797
caf::Proxy< bool > IsValid
Definition: SRProxy.h:2058
caf::Proxy< std::vector< caf::SRKalmanTrack > > tracks
Definition: SRProxy.h:1780
caf::Proxy< caf::SRVertexBranch > vtx
Definition: SRProxy.h:2146
const AngleShiftPlane fShiftPlane
Definition: AngleSysts.h:30
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232
virtual const std::string& ana::ISyst::ShortName ( ) const
virtual void ana::ISyst::TruthShift ( double  sigma,
caf::SRNeutrinoProxy nu,
double &  weight 
) const

For systematics that deal only with the neutrino truth and not any reconstruction/PID details. Systematics defined this way will work on nuTree-derived spectra too (e.g. denominators of efficiencies).

Reimplemented in ana::BeamSyst, demo::DemoSyst1, ana::GenericSystComponentScale< T >, ana::GenericSystComponentScale< T >, ana::GenericSystComponentScale< T >, ana::ReinteractionSyst, and ana::NOvARwgtSyst.

Definition at line 46 of file ISyst.h.

Referenced by ana::ISyst::Shift().

49  {
50  // Implement this function if your systematic depends only
51  // SRNeutrino. Left blank by default, since systematics using other
52  // information can do nothing sensible to the nuTree.
53  }

Member Data Documentation

const double ana::LeptonAngleSyst::fAngUnc

Definition at line 31 of file AngleSysts.h.

Referenced by Shift().

const caf::Det_t ana::LeptonAngleSyst::fDet

Definition at line 29 of file AngleSysts.h.

Referenced by Shift().

const AngleShiftPlane ana::LeptonAngleSyst::fShiftPlane

Definition at line 30 of file AngleSysts.h.

Referenced by Shift().

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