VarVals.h
Go to the documentation of this file.
1 /*
2  * \file VarVals.h
3  * \brief Base container for the Vars that constitute an event.
4  *
5  * Created on: \date June 13, 2016
6  * Original author: \author J. Wolcott <jwolcott@fnal.gov>
7  *
8  */
9 
10 #ifndef COVARIANCEMATRIXFIT_CORE_VARVALS_H_
11 #define COVARIANCEMATRIXFIT_CORE_VARVALS_H_
12 
13 #include <string>
14 #include <cstdint>
15 
16 #include "cetlib_except/exception.h"
18 
22 
23 namespace cmf
24 {
25  struct TruthVars{
26 
28  : fTrueE (std::numeric_limits<float>::lowest())
29  , fTruePDG (std::numeric_limits<float>::lowest())
30  , fTrueCCNC (std::numeric_limits<float>::lowest())
31  , fTrueIntType (std::numeric_limits<float>::lowest())
32  , fTruePDGOrig (std::numeric_limits<float>::lowest())
33  , fTrueParentPDG (std::numeric_limits<float>::lowest())
34  , fTrueParentPT (std::numeric_limits<float>::lowest())
35  , fTrueParentPZ (std::numeric_limits<float>::lowest())
36  , fTrueParentDecay (std::numeric_limits<float>::lowest())
37  , fTrueParentTargetPDG(std::numeric_limits<float>::lowest())
38  , fTrueHitNuc (std::numeric_limits<float>::lowest())
39  , fTrueIntMode (std::numeric_limits<float>::lowest())
40  {}
41 
42  float fTrueE; ///< True nu energy
43  float fTruePDG; ///< true PDG
44  float fTrueCCNC; ///< true cc vs nc
45  float fTrueIntType; ///< true interaction type
46  float fTruePDGOrig; ///< true PDG of original neutrino
47  float fTrueParentPDG; ///< true PDG of neutrino parent
48  float fTrueParentPT; ///< true p_T of neutrino parent
49  float fTrueParentPZ; ///< true p_Z of neutrino parent
50  float fTrueParentDecay; ///< true parent decay mode
51  float fTrueParentTargetPDG; ///< true parent pdg code off the target
52  float fTrueHitNuc; ///< true hit nucleus
53  float fTrueIntMode; ///< true interaction mode
54  };
55 
56  class EventId{
57 
58  public:
60  : run (std::numeric_limits<int>::lowest())
61  , subrun(std::numeric_limits<int>::lowest())
62  , event (std::numeric_limits<int>::lowest())
63  , cycle (std::numeric_limits<int>::lowest())
64  , slice (std::numeric_limits<int>::lowest())
65  {}
66 
67  EventId(int r,
68  int s,
69  int e,
70  int c,
71  int slc)
72  : run (r)
73  , subrun(s)
74  , event (e)
75  , cycle (c)
76  , slice (slc)
77  {}
78 
79  int run;
80  int subrun;
81  int event;
82  int cycle;
83  int slice;
84 
85  friend std::ostream& operator << (std::ostream & o, cmf::EventId const& evid);
86 
87  bool operator<(EventId const& evid) const;
88  bool operator==(EventId const& evid) const;
89 
90  };
91 
92  struct DataVars{
93 
94  // initialize the Fake_Weight to be 1, it will be reset if Fake_Data are generated
96  : fNuE_CVN (std::numeric_limits<float>::lowest())
97  , fNuE_NumMichel (std::numeric_limits<float>::lowest())
98  , fHad_RecoE (std::numeric_limits<float>::lowest())
99  , fLep_RecoE (std::numeric_limits<float>::lowest())
100  , fLep_RecoE_MCFrac(0.)
101  , fRecoQ2 (std::numeric_limits<float>::lowest())
102  , fFake_Weight (1.)
103  {}
104 
105  DataVars(float nuecvn,
106  float nuenummichel,
107  float hadrece,
108  float leprece,
109  float leprecemcfrac,
110  float recoQ2,
111  float fakewgt)
112  : fNuE_CVN (nuecvn)
113  , fNuE_NumMichel (nuenummichel)
114  , fHad_RecoE (hadrece)
115  , fLep_RecoE (leprece)
116  , fLep_RecoE_MCFrac(leprecemcfrac)
117  , fRecoQ2 (recoQ2)
118  , fFake_Weight (fakewgt)
119  {}
120 
121  float fNuE_CVN; ///<
122  float fNuE_NumMichel; ///<
123  float fHad_RecoE; ///<
124  float fLep_RecoE; ///<
125  float fLep_RecoE_MCFrac; ///< fraction of leptonic energy in muon catcher
126  float fRecoQ2; ///< reconstructed Q^2
127  float fFake_Weight; ///< Weight for fake data events
128  };
129 
130  // set the default values to be unity, ie no weighting applied
131  struct WeightVars{
132 
134  : fXSecCVPPFX_Weight (1.)
135  , fRPACCQE_Weight (1.)
136  , fRPARES_Weight (1.)
137  , fDISvnCC1pi_Weight (1.)
138  , fEmpiricalMEC_Weight (1.)
139  , fEmpiricalMECtoGENIEQE_Weight (1.)
140  , fEmpiricalMECtoGENIERES_Weight(1.)
141  , fOtherDIS_Weight (1.)
142  , fXSecCV2020_Weight (1.)
143  , fPPFXFluxCV_Weight (1.)
144  {}
145 
146  float fXSecCVPPFX_Weight; ///< Was Tufts weight for SA
147  float fRPACCQE_Weight; ///< To be used for systematic evaluation ONLY
148  float fRPARES_Weight; ///< To be used for systematic evaluation ONLY
149  float fDISvnCC1pi_Weight; ///< To be used for systematic evaluation ONLY
150  float fEmpiricalMEC_Weight; ///< Ditto
153  float fOtherDIS_Weight; ///< Ditto
154  float fXSecCV2020_Weight; ///< For 2020 Ana, store weights seperately
155  float fPPFXFluxCV_Weight; ///< For 2020 Ana, store weights seperately
156  };
157 
158  // struct to hold weights of systematic parameters with shifts related to
159  // different sigma shifts in the underlying parameter
160  struct SystVar {
161 
162  SystVar(uint8_t type)
163  : fType(type)
164  , fMinus2Sigma(1.)
165  , fMinus1Sigma(1.)
166  , fPlus1Sigma(1.)
167  , fPlus2Sigma(1.)
168  {}
169 
170  SystVar(uint8_t type,
171  float minus2,
172  float minus1,
173  float plus1,
174  float plus2)
175  : fType(type)
176  , fMinus2Sigma(minus2)
177  , fMinus1Sigma(minus1)
178  , fPlus1Sigma(plus1)
179  , fPlus2Sigma(plus2)
180  {}
181 
182  uint8_t Type() const { return fType; }
183  std::vector<float> SigmasAsVec() const;
184  float SigmaWeight(uint8_t const& sigmaLevel) const;
185 
186  bool operator==(cmf::SystVar const& other) const { return fType == other.Type(); }
187  bool operator <(cmf::SystVar const& other) const { return fType < other.Type(); }
188 
189  friend std::ostream& operator << (std::ostream & o, cmf::SystVar const& sv);
190 
191  uint8_t fType; ///< key for this parameter
192  float fMinus2Sigma; ///< weight associated with this change in the underlying parameter
193  float fMinus1Sigma; ///< weight associated with this change in the underlying parameter
194  float fPlus1Sigma; ///< weight associated with this change in the underlying parameter
195  float fPlus2Sigma; ///< weight associated with this change in the underlying parameter
196  };
197 
198  //----------------------------------------------------------------------------
199  inline std::vector<float> SystVar::SigmasAsVec() const
200  {
201  return std::move(std::vector<float>({fMinus2Sigma,
202  fMinus1Sigma,
203  fPlus1Sigma,
204  fPlus2Sigma}));
205  }
206 
207  //----------------------------------------------------------------------------
208  inline float SystVar::SigmaWeight(uint8_t const& sigmaLevel) const
209  {
210  if(sigmaLevel == cmf::kMinus2Sigma) return fMinus2Sigma;
211  else if(sigmaLevel == cmf::kMinus1Sigma) return fMinus1Sigma;
212  else if(sigmaLevel == cmf::kPlus1Sigma ) return fPlus1Sigma;
213  else if(sigmaLevel == cmf::kPlus2Sigma ) return fPlus2Sigma;
214 
215  // default to no change in weight
216  return 1.;
217  }
218 
219  typedef std::vector<cmf::SystVar> SystVarColl;
220 
221  // set the default values to be unity, ie no weighting applied
222  // TODO: PROD5CHANGE remove the GENIEVar struct when we are ready to make Prod5 event lists
223  // we will use a flat vector to make those trees and load directly into GENIEVars
224  struct GENIEVar{
225 
227  : fMinus2Sigma(1.)
228  , fMinus1Sigma(1.)
229  , fPlus1Sigma (1.)
230  , fPlus2Sigma (1.)
231  {}
232 
235  float fPlus1Sigma;
236  float fPlus2Sigma;
237  };
238 
239  struct GENIEVars{
240 
241  private:
242 
243  public:
244  GENIEVars() = default;
245 
252 
253  //2018 edits: remove SumSmall, add newly used systs
260 
262 
263  // 2017: the variables below are just glommed into SumSmallXSecJoint2017, or not used at all
264  //GENIEVar fEtaNCEL; ///<
265  //GENIEVar fVecCCQE_shape; ///<
266  //GENIEVar fMaCOHpi; ///<
267  //GENIEVar fR0COHpi; ///<
268  //GENIEVar fRvpCC1pi; ///<
269  //GENIEVar fRvpCC2pi; ///<
270  //GENIEVar fRvpNC1pi; ///<
271  //GENIEVar fRvpNC2pi; ///<
272  //GENIEVar fRvnCC1pi; ///<
273  //GENIEVar fRvnCC2pi; ///<
274  //GENIEVar fRvnNC1pi; ///<
275  //GENIEVar fRvnNC2pi; ///<
276  //GENIEVar fRvbarpCC1pi; ///<
277  //GENIEVar fRvbarpCC2pi; ///<
278  //GENIEVar fRvbarpNC1pi; ///<
279  //GENIEVar fRvbarpNC2pi; ///<
280  //GENIEVar fRvbarnCC1pi; ///<
281  //GENIEVar fRvbarnCC2pi; ///<
282  //GENIEVar fRvbarnNC1pi; ///<
283  //GENIEVar fRvbarnNC2pi; ///<
284  //GENIEVar fAhtBY; ///<
285  //GENIEVar fBhtBY; ///<
286  //GENIEVar fCV1uBY; ///<
287  //GENIEVar fCV2uBY; ///<
288  //GENIEVar fAGKY_xF1pi; ///<
289  //GENIEVar fAGKY_pT1pi; ///<
290  //GENIEVar fMFP_pi; ///<
291  //GENIEVar fBR1gamma; ///<
292  //GENIEVar fBR1eta; ///<
293  //GENIEVar fTheta_Delta2Npi; ///<
294 
295  // the following GENIE knobs are not currently used in the analysis, so
296  // remove them to save the memory of storing them and their 4 sigma values
297 // GENIEVar fNormCCQE_EnuDep; ///<
298 // GENIEVar fMaCCQE; ///<
299 // GENIEVar fNormCCRES; ///<
300 // GENIEVar fMaCCRES_shape; ///<
301 // GENIEVar fMvCCRES_shape; ///<
302 // GENIEVar fNormNCRES; ///<
303 // GENIEVar fAhtBYshape; ///<
304 // GENIEVar fBhtBYshape; ///<
305 // GENIEVar fCV1uBYshape; ///<
306 // GENIEVar fCV2uBYshape; ///<
307 // GENIEVar fNC; ///<
308 // GENIEVar fMFP_N; ///<
309 
310  /* GENIEVar fMaNCEL; ///< 1 */
311  /* GENIEVar fNormCCQE; ///< 2 */
312  /* GENIEVar fMaCCQE_shape; ///< 3 */
313  /* GENIEVar fMaCCRES; ///< 4 */
314  /* GENIEVar fMvCCRES; ///< 5 */
315  /* GENIEVar fMaNCRES; ///< 6 */
316  /* GENIEVar fMvNCRES; ///< 7 */
317  /* GENIEVar fNormDISCC; ///< 8 */
318  /* GENIEVar fRnubarnuCC; ///< 9 */
319  /* GENIEVar fDISNuclMod; ///< 10 */
320  /* GENIEVar fFormZone; ///< 11 */
321  /* GENIEVar fFrCEx_pi; ///< 12 */
322  /* GENIEVar fFrElas_pi; ///< 13 */
323  /* GENIEVar fFrInel_pi; ///< 14 */
324  /* GENIEVar fFrAbs_pi; ///< 15 */
325  /* GENIEVar fFrPiProd_pi; ///< 16 */
326  /* GENIEVar fFrCEx_N; ///< 17 */
327  /* GENIEVar fFrElas_N; ///< 18 */
328  /* GENIEVar fFrInel_N; ///< 19 */
329  /* GENIEVar fFrAbs_N; ///< 20 */
330  /* GENIEVar fFrPiProd_N; ///< 21 */
331  /* GENIEVar fCCQEPauliSupViaKF; ///< 22 */
332  /* GENIEVar fCCQEMomDistroFGtoSF; ///< 23 */
333 
334 
335  };
336 
337  /// \brief Base container for the MC related Vars that constitute an event.
338  class MCVarVals
339  {
340  private:
344 
345  public:
347  {}
348 
350  cmf::WeightVars const& wv)
351  : fTruthVars (tv)
352  , fWeightVars(wv)
353  {}
354 
356  cmf::WeightVars const& wv,
357  cmf::SystVarColl const& gv)
358  : fTruthVars (tv)
359  , fWeightVars(wv)
360  , fSystematicShifts(gv)
361  {}
362 
363 
364  /// Access a Var by name.
365  float val_at(uint8_t const& varkey) const;
366 
367  std::map<float, float> SystVarWgts(uint8_t const& varkey) const;
368 
369  friend std::ostream& operator << (std::ostream & o, cmf::MCVarVals const& mcvv);
370 
371  // The following functions should only be used for making eventlist trees
372  cmf::TruthVars const& TruthVars() const { return fTruthVars; }
373  cmf::WeightVars const& WeightVars() const { return fWeightVars; }
374  cmf::SystVarColl const& SystematicShifts() const { return fSystematicShifts; }
375 
376  };
377 
378  /// \brief Base container for the MC related Vars that constitute an event.
380  {
381  private:
382 
383  float NuRecoEVal(cmf::MetaData const& md) const;
384 
386 
387  public:
388  DataVarVals () = default;
389 
391  : fDataVars(dv)
392  {}
393 
394  /// Access a Var by name.
395  /// Throws if the var doesn't exist
396  float val_at(uint8_t const& varkey,
397  cmf::MetaData const& md) const;
398 
399  void set_val_at(uint8_t const& varkey,
400  float const& val);
401 
402  friend std::ostream& operator << (std::ostream & o, cmf::DataVarVals const& dvv);
403 
404  // The following function should only be used for making eventlist trees
405  cmf::DataVars const& DataVars() const { return fDataVars; }
406 
407  };
408 
409  static float RecoEnergy(float leptonicEnergy,
410  float hadronicEnergy,
411  cmf::MetaData const& md);
412 
413  static float NuMuEnergy(float leptonicEnergy,
414  float hadronicEnergy);
415 
416  static float NuEEnergy(float leptonicEnergy,
417  float hadronicEnergy,
418  cmf::BeamType_t const& beamType);
419 
420  static float NCEnergy(float hadronicEnergy);
421 
422  static float NCEnergy(float leptonicEnergy,
423  float hadronicEnergy,
424  cmf::BeamType_t const& beamType,
425  cmf::DetType_t const& detector);
426 
427 } /* namespace cmf */
428 
429 //----------------------------------------------------------------------------
430 // TODO remove this code
431 //inline void cmf::MCVarVals::SetGENIEVarVal(GENIEVar & var,
432 // std::string const& sigma,
433 // float const& wgt)
434 //{
435 // // the weights are constructed as 1 for each sigma. Multiply by the passed
436 // // value because the SumSmallXSecJoint2017 is the product of all the components
437 // if (cmf::VarNameToKey(sigma) == cmf::kMinus2Sigma) var.fMinus2Sigma *= wgt;
438 // else if(cmf::VarNameToKey(sigma) == cmf::kMinus1Sigma) var.fMinus1Sigma *= wgt;
439 // else if(cmf::VarNameToKey(sigma) == cmf::kPlus1Sigma ) var.fPlus1Sigma *= wgt;
440 // else if(cmf::VarNameToKey(sigma) == cmf::kPlus2Sigma ) var.fPlus2Sigma *= wgt;
441 // else
442 // LOG_WARNING("MCVarVals")
443 // << "GENIE var sigma "
444 // << sigma
445 // << "is not recognized, will not set weight";
446 //}
447 
448 //----------------------------------------------------------------------------
449 inline float cmf::RecoEnergy(float leptonicEnergy,
450  float hadronicEnergy,
451  cmf::MetaData const& md)
452 {
453  if (md.IsNuMuSelected()) return cmf::NuMuEnergy(leptonicEnergy, hadronicEnergy );
454  #if PRODUCTION5
455  else if(md.IsNCSelected() ) return cmf::NCEnergy (leptonicEnergy, hadronicEnergy, md.BeamType(), md.detector);
456  #else
457  else if(md.IsNCSelected() ) return cmf::NCEnergy (hadronicEnergy);
458  #endif
459  else if(md.IsNuESelected() ) return cmf::NuEEnergy (leptonicEnergy, hadronicEnergy, md.BeamType());
460  else
461  throw cet::exception("DataVarVals")
462  << "Unknown selection type "
463  << md.selectionType
464  << " requested to be used in calculating reconstructed energy";
465 
466  return std::numeric_limits<float>::lowest();
467 }
468 
469 //----------------------------------------------------------------------------
470 inline float cmf::NuMuEnergy(float leptonicEnergy,
471  float hadronicEnergy)
472 {
473  return leptonicEnergy + hadronicEnergy;
474 
475 }
476 
477 //----------------------------------------------------------------------------
478 inline float cmf::NuEEnergy(float leptonicEnergy,
479  float hadronicEnergy,
480  cmf::BeamType_t const& beamType)
481 {
482  // p0 and p3 are 0.0 for both FHC and RHC
483  // 2020
484  #ifdef PRODUCTION5
485  float p0 = 0.0;
486  float p1 = (beamType == kFHC) ? 1.01777 : 0.988258;
487  float p2 = (beamType == kFHC) ? 1.10868 : 1.20084;
488  float p3 = 0.0;
489  float p4 = (beamType == kFHC) ? 1.43541e-03 : 1.92904e-07;
490  float p5 = (beamType == kFHC) ? 1.09628e-01 : 1.20704e-07;
491  float fr = (beamType == kFHC) ? 1. / 1.0355622 : 1. / 1.0111873;
492  #else
493  // 2018
494  float p0 = 0.0;
495  float p1 = (beamType == kFHC) ? 1.00756 : 0.980479;
496  float p2 = (beamType == kFHC) ? 1.07093 : 1.45170;
497  float p3 = 0.0;
498  float p4 = (beamType == kFHC) ? 1.28608e-2 : -5.82609e-3;
499  float p5 = (beamType == kFHC) ? 2.27129e-1 : -2.27599e-1;
500  float fr = (beamType == kFHC) ? 1. / 1.0501206 : 1. / 1.001766;
501  #endif
502 
503  return fr *(( p5 * hadronicEnergy * hadronicEnergy) +
504  ( p4 * leptonicEnergy * leptonicEnergy) +
505  ( p3 * leptonicEnergy * hadronicEnergy) +
506  ( p2 * hadronicEnergy) +
507  ( p1 * leptonicEnergy) +
508  p0 );
509 }
510 
511 //----------------------------------------------------------------------------
512 // TODO: PROD5CHANGE remove this function
513 inline float cmf::NCEnergy(float hadronicEnergy)
514 {
515  return hadronicEnergy;
516 }
517 
518 //----------------------------------------------------------------------------
519 inline float cmf::NCEnergy(float leptonicEnergy,
520  float hadronicEnergy,
521  cmf::BeamType_t const& beamType ,
522  cmf::DetType_t const& detector )
523 {
524  // Note: leptonicEnergy must be the EM-like energy, as calculated by kEME_2020
525  // and hadronicEnergy must be the hadronic-like energy, as calculated by kHADE_2020
526  // If we don't have a tuned correction return the total calorimetric energy
527  if (beamType != kFHC ||
528  (detector != cmf::kNEARDET && detector != cmf::kFARDET))
529  return leptonicEnergy + hadronicEnergy;
530 
531  // Set up correction parameters
532  double pars[4][6] = { {1.049, 0.795, 0.8409, 0.17, 0.82, -1.00}, // ND FHC
533  {1.025, 0.797, 0.9162, 0.53, -0.26, -1.48}, // FD FHC
534  {1.000, 1.000, 1.0000, 0.00, 0.00, 0.00}, // ND RHC
535  {1.000, 1.000, 1.0000, 0.00, 0.00, 0.00} };// FD RHC
536 
537  // set detector/beam index
538  int detCur = (detector == cmf::kFARDET) + ((beamType == kRHC)<<1); // bitshift magic
539 
540  // return the energy estimator
541  return (leptonicEnergy / pars[detCur][0] + hadronicEnergy / pars[detCur][1])
542  / (pars[detCur][2] + pars[detCur][3] * std::pow(leptonicEnergy + hadronicEnergy + pars[detCur][4],2) * std::exp(pars[detCur][5] * (leptonicEnergy + hadronicEnergy)));
543 }
544 #endif /* COVARIANCEMATRIXFIT_CORE_VARVALS_H_ */
float fDISvnCC1pi_Weight
To be used for systematic evaluation ONLY.
Definition: VarVals.h:149
float fMinus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:192
float fTruePDGOrig
true PDG of original neutrino
Definition: VarVals.h:46
static float NuMuEnergy(float leptonicEnergy, float hadronicEnergy)
Definition: VarVals.h:470
MCVarVals(cmf::TruthVars const &tv, cmf::WeightVars const &wv, cmf::SystVarColl const &gv)
Definition: VarVals.h:355
float fEmpiricalMECtoGENIEQE_Weight
Ditto.
Definition: VarVals.h:151
float fPlus2Sigma
Definition: VarVals.h:236
static float NuEEnergy(float leptonicEnergy, float hadronicEnergy, cmf::BeamType_t const &beamType)
Definition: VarVals.h:478
bool operator==(cmf::SystVar const &other) const
Definition: VarVals.h:186
float fEmpiricalMEC_Weight
Ditto.
Definition: VarVals.h:150
float fFake_Weight
Weight for fake data events.
Definition: VarVals.h:127
GENIEVar fFrAbs_N
11
Definition: VarVals.h:258
cmf::WeightVars fWeightVars
Definition: VarVals.h:342
float fRecoQ2
reconstructed Q^2
Definition: VarVals.h:126
EventId(int r, int s, int e, int c, int slc)
Definition: VarVals.h:67
cmf::DetType_t detector
Definition: Structs.h:114
float fPPFXFluxCV_Weight
For 2020 Ana, store weights seperately.
Definition: VarVals.h:155
float fTrueHitNuc
true hit nucleus
Definition: VarVals.h:52
GENIEVar fMvCCRES
4
Definition: VarVals.h:249
float fTrueCCNC
true cc vs nc
Definition: VarVals.h:44
float fTrueParentDecay
true parent decay mode
Definition: VarVals.h:50
float fTruePDG
true PDG
Definition: VarVals.h:43
constexpr T pow(T x)
Definition: pow.h:75
float fPlus1Sigma
Definition: VarVals.h:235
float fNuE_CVN
Definition: VarVals.h:121
GENIEVar fCCQEPauliSupViaKF
12
Definition: VarVals.h:259
float fPlus2Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:195
enum cmf::det_type DetType_t
float fTrueParentPT
true p_T of neutrino parent
Definition: VarVals.h:48
::xsd::cxx::tree::exception< char > exception
Definition: Database.h:225
GENIEVar fRPACCQEshapeSupp
6
Definition: VarVals.h:251
float fEmpiricalMECtoGENIERES_Weight
Ditto.
Definition: VarVals.h:152
DataVars(float nuecvn, float nuenummichel, float hadrece, float leprece, float leprecemcfrac, float recoQ2, float fakewgt)
Definition: VarVals.h:105
uint8_t fType
key for this parameter
Definition: VarVals.h:191
cmf::DataVars const & DataVars() const
Definition: VarVals.h:405
float fRPARES_Weight
To be used for systematic evaluation ONLY.
Definition: VarVals.h:148
std::ostream & operator<<(std::ostream &o, cmf::Event const &event)
Definition: Event.cxx:27
cmf::SystVarColl fSystematicShifts
Definition: VarVals.h:343
float fTrueE
True nu energy.
Definition: VarVals.h:42
float fMinus1Sigma
Definition: VarVals.h:234
Base container for the MC related Vars that constitute an event.
Definition: VarVals.h:338
float fLep_RecoE_MCFrac
fraction of leptonic energy in muon catcher
Definition: VarVals.h:125
MCVarVals(cmf::TruthVars const &tv, cmf::WeightVars const &wv)
Definition: VarVals.h:349
const XML_Char * s
Definition: expat.h:262
float SigmaWeight(uint8_t const &sigmaLevel) const
Definition: VarVals.h:208
SystVar(uint8_t type, float minus2, float minus1, float plus1, float plus2)
Definition: VarVals.h:170
int subrun
Definition: VarVals.h:80
float fTrueParentPDG
true PDG of neutrino parent
Definition: VarVals.h:47
cmf::TruthVars fTruthVars
Definition: VarVals.h:341
float fRPACCQE_Weight
To be used for systematic evaluation ONLY.
Definition: VarVals.h:147
cmf::TruthVars const & TruthVars() const
Definition: VarVals.h:372
cmf::SelectionType_t selectionType
Definition: Structs.h:116
GENIEVar fDefault
Definition: VarVals.h:261
float fMinus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:193
GENIEVar fFrInel_pi
8
Definition: VarVals.h:255
int cycle
Definition: VarVals.h:82
GENIEVar fFrCEx_N
9
Definition: VarVals.h:256
fvar< T > exp(const fvar< T > &x)
Definition: exp.hpp:10
GenericCut< T > operator<(double c, const GenericVar< T > &v)
Definition: Var.h:153
bool IsNuMuSelected() const
Definition: Structs.cxx:219
std::vector< float > SigmasAsVec() const
Definition: VarVals.h:199
float fXSecCV2020_Weight
For 2020 Ana, store weights seperately.
Definition: VarVals.h:154
bool operator==(FC &A, FC &B)
int slice
Definition: VarVals.h:83
Base container for the MC related Vars that constitute an event.
Definition: VarVals.h:379
float fXSecCVPPFX_Weight
Was Tufts weight for SA.
Definition: VarVals.h:146
float fTrueParentPZ
true p_Z of neutrino parent
Definition: VarVals.h:49
Definition: run.py:1
std::vector< cmf::SystVar > SystVarColl
Definition: VarVals.h:219
cmf::DataVars fDataVars
Definition: VarVals.h:385
GENIEVar fMaCCQE
1
Definition: VarVals.h:246
Module to combine a set of results into a single file currently only does one data product type at a ...
Definition: Event.cxx:24
GENIEVar fMaCCRES
2
Definition: VarVals.h:247
DataVarVals(cmf::DataVars const &dv)
Definition: VarVals.h:390
GENIEVar fFrElas_N
10
Definition: VarVals.h:257
GENIEVar fFormZone
7
Definition: VarVals.h:254
std::string pars("Th23Dmsq32")
static float RecoEnergy(float leptonicEnergy, float hadronicEnergy, cmf::MetaData const &md)
Definition: VarVals.h:449
cmf::WeightVars const & WeightVars() const
Definition: VarVals.h:373
float fNuE_NumMichel
Definition: VarVals.h:122
enum cmf::beam_type BeamType_t
TRandom3 r(0)
float fMinus2Sigma
Definition: VarVals.h:233
uint8_t Type() const
Definition: VarVals.h:182
GENIEVar fMaNCRES
3
Definition: VarVals.h:248
cmf::BeamType_t BeamType() const
Definition: Structs.cxx:178
float fOtherDIS_Weight
Ditto.
Definition: VarVals.h:153
SystVar(uint8_t type)
Definition: VarVals.h:162
float fHad_RecoE
Definition: VarVals.h:123
GENIEVar fRPACCQEshapeEnh
5
Definition: VarVals.h:250
cmf::SystVarColl const & SystematicShifts() const
Definition: VarVals.h:374
Float_t e
Definition: plot.C:35
float fTrueIntType
true interaction type
Definition: VarVals.h:45
static float NCEnergy(float hadronicEnergy)
Definition: VarVals.h:513
float fTrueIntMode
true interaction mode
Definition: VarVals.h:53
int event
Definition: VarVals.h:81
float fTrueParentTargetPDG
true parent pdg code off the target
Definition: VarVals.h:51
float fLep_RecoE
Definition: VarVals.h:124
bool IsNuESelected() const
Definition: Structs.cxx:225
bool IsNCSelected() const
Definition: Structs.cxx:231
float fPlus1Sigma
weight associated with this change in the underlying parameter
Definition: VarVals.h:194