EnergySysts2020.cxx
Go to the documentation of this file.
2 
4 
5 namespace ana
6 {
7  // Error fully correlated between FD, main (non-MuCat) ND, MuCat
8  // These numbers, and the rest, are from doc-20816-v22. They are
9  // slightly updated compared to the (unused) systematics in
10  // EnergySysts2019.cxx.
11  const CorrMuEScaleSyst2020 kCorrMuEScaleSyst2020(0.0074, 0.0074, 0.0013);
12 
13  // Error for FD uncorrelated with main ND or muon catcher
14  const UnCorrFDMuEScaleSyst2020 kUnCorrFDMuEScaleSyst2020(0.0015);
15 
16  // Error for main ND uncorrelated with FD or muon catcher
17  const UnCorrNDMuEScaleSyst2020 kUnCorrNDMuEScaleSyst2020(0.0013);
18 
19  // Error for muon catcher uncorrelated with FD or main ND
20  const UnCorrMuCatMuESyst2020 kUnCorrMuCatMuESyst2020(0.0048);
21 
22  // One-sided error for neutron pile-up in the main ND and the muon catcher.
23  // These numbers are derived from a study done with the old slicer.
24  // We expect the pile-up to be reduced with the new slicer. Since this
25  // systematic has a small impact compared to the others, we have opted
26  // to retain these numbers as conservative rather than re-run the study.
27  const PileupMuESyst2020 kPileupMuESyst2020(0.46, 1.3); // in cm
28 
29  //----------------------------------------------------------------------
31  Shift(double sigma, caf::SRProxy* sr, double& weight) const
32  {
33  if(sr->trk.kalman.tracks.empty()) return;
34 
35  if(sr->hdr.det == caf::kNEARDET){
38  }
39  else if(sr->hdr.det == caf::kFARDET){
40  sr->trk.kalman.tracks[0].len *= 1+fScaleFD*sigma;
41  }
42  }
43 
44  //----------------------------------------------------------------------
46  Shift(double sigma, caf::SRProxy* sr, double& weight) const
47  {
48  if(sr->trk.kalman.tracks.empty()) return;
49 
50  if(sr->hdr.det == caf::kFARDET)
51  sr->trk.kalman.tracks[0].len *= 1+fScale*sigma;
52  }
53 
54  //----------------------------------------------------------------------
56  Shift(double sigma, caf::SRProxy* sr, double& weight) const
57  {
58  if(sr->trk.kalman.tracks.empty()) return;
59 
60  if(sr->hdr.det == caf::kNEARDET)
61  // act, not cat!
62  sr->energy.numu.ndtrklenact *= 1+fScale*sigma;
63  }
64 
65  //----------------------------------------------------------------------
67  Shift(double sigma, caf::SRProxy* sr, double& weight) const
68  {
69  if(sr->trk.kalman.tracks.empty()) return;
70 
71  if(sr->hdr.det == caf::kNEARDET && sr->energy.numu.ndtrklencat > 0){
72  // cat, not act!
73  sr->energy.numu.ndtrklencat *= 1+fScale*sigma;
74  }
75  }
76 
77  //----------------------------------------------------------------------
79  Shift(double sigma, caf::SRProxy* sr, double& weight) const
80  {
81  if(sr->trk.kalman.tracks.empty()) return;
82 
83  // This is a one-sided systematic, it can never *shorten* a track.
84  // Implementing a one-sided error like this works fine, as it leaves
85  // the objective function smooth and continuous.
86  if(sigma < 0) return;
87 
88  if(sr->hdr.det == caf::kNEARDET){
89  // Note subtle difference between "ndtrklenact" and "ndtrklencat"...
90  if(sr->energy.numu.ndtrklenact > 0 && sr->energy.numu.ndtrklencat == 0){
91  // Add for both ends of the track in the main ND
92  sr->energy.numu.ndtrklenact += 2*fShiftND*sigma;
93  }
94  else if(sr->energy.numu.ndtrklenact == 0 && sr->energy.numu.ndtrklencat > 0){
95  // Add for both ends of the track in the Muon Catcher
96  sr->energy.numu.ndtrklencat += 2*fShiftMuCat*sigma;
97  }
98  else if(sr->energy.numu.ndtrklenact > 0 && sr->energy.numu.ndtrklencat > 0){
99  // Add for one end in the main detector and one in the Muon Catcher
100  sr->energy.numu.ndtrklenact += fShiftND *sigma;
101  sr->energy.numu.ndtrklencat += fShiftMuCat*sigma;
102  }
103  // and of couse if both are zero because there's no track, do nothing
104  }
105  }
106 }
Near Detector underground.
Definition: SREnums.h:10
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
Far Detector at Ash River.
Definition: SREnums.h:11
Cuts and Vars for the 2020 FD DiF Study.
Definition: vars.h:6
const Var weight
caf::Proxy< caf::SRHeader > hdr
Definition: SRProxy.h:2137
caf::Proxy< caf::SRNumuEnergy > numu
Definition: SRProxy.h:214
Proxy for caf::StandardRecord.
Definition: SRProxy.h:2126
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
caf::Proxy< caf::SREnergyBranch > energy
Definition: SRProxy.h:2136
const UnCorrFDMuEScaleSyst2020 kUnCorrFDMuEScaleSyst2020(0.0015)
caf::Proxy< caf::SRTrackBranch > trk
Definition: SRProxy.h:2145
caf::StandardRecord * sr
double sigma(TH1F *hist, double percentile)
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
caf::Proxy< caf::SRKalman > kalman
Definition: SRProxy.h:1797
const PileupMuESyst2020 kPileupMuESyst2020(0.46, 1.3)
void Shift(double sigma, caf::SRProxy *sr, double &weight) const override
Perform the systematic shift.
caf::Proxy< float > ndtrklenact
Definition: SRProxy.h:186
const CorrMuEScaleSyst2020 kCorrMuEScaleSyst2020(0.0074, 0.0074, 0.0013)
const UnCorrNDMuEScaleSyst2020 kUnCorrNDMuEScaleSyst2020(0.0013)
caf::Proxy< std::vector< caf::SRKalmanTrack > > tracks
Definition: SRProxy.h:1780
const UnCorrMuCatMuESyst2020 kUnCorrMuCatMuESyst2020(0.0048)
caf::Proxy< float > ndtrklencat
Definition: SRProxy.h:187
caf::Proxy< caf::Det_t > det
Definition: SRProxy.h:232