All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Normalize.h
Go to the documentation of this file.
1 #ifndef _sbnanalysis_Normalize_hh_
2 #define _sbnanalysis_Normalize_hh_
3 
4 #include "fhiclcpp/ParameterSet.h"
5 #include "core/Event.hh"
6 #include "core/SubRun.hh"
7 #include "core/FileMeta.hh"
8 
9 namespace ana {
10 namespace SBNOsc {
11 
12 /**
13  * Class to handle normalization of overlay and intime-cosmic samples.
14  */
15 class Normalize {
16 public:
17  /**
18  * Initialize the class
19  * \param fcl The fhicl configuration
20  */
21  void Initialize(const fhicl::ParameterSet &fcl);
22 
23  /**
24  * Add a cosmic event to the normalization
25  * \param event The sbncode core event information
26  */
27  void AddCosmicEvent(const event::Event &event);
28 
29  /**
30  * Add a neutrino event to the normalization
31  * \param event The sbncode core event information
32  */
33  void AddNeutrinoEvent(const event::Event &event);
34 
35  /**
36  * Add a neutrino subrunto the normalization
37  * \param subrun The sbncode core Subrun information
38  */
39  void AddNeutrinoSubRun(const SubRun &subrun);
40 
41  void AddCosmicFile(const FileMeta &meta);
42 
43  /**
44  * Scale the neutrino events to a certain POT. To be called after all events are processed
45  * \param goal_pot The POT to scale the sample to.
46  *
47  * \return The scale factor for each neutrino event to the set POT
48  */
49  double ScaleNeutrino(double goal_pot) const;
50  /**
51  * Scale the cosmic events to a certain POT. To be called after all events are processed
52  * \param goal_pot The POT to scale the sample to.
53  *
54  * \return The scale factor for each cosmic event to the set POT
55  */
56  double ScaleCosmic(double goal_pot) const;
57 
58 
59 private:
62 
65 
67  double fNeutrinoPOT;
69  unsigned fNNeutrinoEvents;
70  unsigned fNCosmicEvents;
71 };
72 
73 
74 
75 } // end namespace ana
76 } // end namespace SBNOsc
77 #endif
process_name standard_reco_uboone fcl
double ScaleCosmic(double goal_pot) const
Definition: Normalize.cc:34
unsigned fNNeutrinoEvents
Definition: Normalize.h:69
void AddNeutrinoEvent(const event::Event &event)
Definition: Normalize.cc:25
process_name opflashCryoW ana
void AddCosmicEvent(const event::Event &event)
Definition: Normalize.cc:23
void AddCosmicFile(const FileMeta &meta)
Definition: Normalize.cc:19
unsigned fCosmicEventsPerFile
Definition: Normalize.h:68
The standard subrun data definition.
Definition: SubRun.hh:23
The standard event data definition.
Definition: Event.hh:228
void AddNeutrinoSubRun(const SubRun &subrun)
Definition: Normalize.cc:29
void Initialize(const fhicl::ParameterSet &fcl)
Definition: Normalize.cc:5
double ScaleNeutrino(double goal_pot) const
Definition: Normalize.cc:62
Metadata for each input file.
Definition: FileMeta.hh:16
unsigned fNCosmicEvents
Definition: Normalize.h:70