NuFCEvent2 Class Reference

A highly reduced NuEvent object used for event libraries in the Feldman-Cousins analysis. More...

#include <NuFCEvent2.h>

List of all members.

Public Member Functions

 NuFCEvent2 ()
 Creates an empty event.
 NuFCEvent2 (const NuEvent &ev)
 Create a new instance from a NuEvent object.
void FillFrom (const NuEvent &ev)
 Fill this instance from a NuEvent object.
void FillFrom (const NuFCEvent &ev)
 Fill this instance from an old, NuFCEvent object.
void Expand (NuEvent &ev) const
 Expand into an existing NuEvent object.
void Reset ()
 Reset all variables to the defaults.
void PrintVars (void) const
 Print out the variables to screen.
Detector::Detector_t Detector (void) const
 Access the detector associated with the event.
Float_t Rw (void) const
 Returns the RW value.
Float_t EnergyMC (void) const
 Returns the true energy value.
 operator NuEvent () const
 DEBUG: Allow automatic conversion into NuEvent objects.
 ClassDef (NuFCEvent2, 1)

Private Attributes

Float_t trkEn
 track energy (range or curv. depending on containment)
Float_t shwEn
 shower energy (e.g. primary shw energy)
Float_t rw
 the weight to use as default
Float_t energyMC
 what could be truely reco'd: neuEn*y for NC
Float_t neuEnMC
 p4neu[3];
Float_t ppvz
 mc.flux.ppvz
Int_t ptype
 mc.flux.ptype
Float_t fluxErr
 was the track containted
Char_t containedTrk
 was the track containted
Char_t detector
 1=near 2=far
Char_t iaction
 CC=1, NC=0.
Char_t charge
 +1 or -1: simply derived from qp (from trk fit)
Char_t inu
 >0 particles, <0 anti-particles
Char_t inunoosc
 >0 particles, <0 anti-particles

Friends

class NuEventVector

Detailed Description

A highly reduced NuEvent object used for event libraries in the Feldman-Cousins analysis.

This design has changed somewhat since the original (NtupleUtils) version - you may no longer access the data members directly, a necessary step because with multiple analyses we may need to compress the data members for individual reduced event objects.

If you really do need to access the members of this class, then write an accessor for it.

Author:
Nick Devenish, Last commit by
Author
nickd
Version:
Revision
1.1
Date:
Date
2011/04/23 14:20:37

Definition at line 35 of file NuFCEvent2.h.


Constructor & Destructor Documentation

NuFCEvent2::NuFCEvent2 (  ) 

Creates an empty event.

Definition at line 22 of file NuFCEvent2.cxx.

00023 {
00024   this->Reset();
00025 }

NuFCEvent2::NuFCEvent2 ( const NuEvent ev  )  [explicit]

Create a new instance from a NuEvent object.

Definition at line 29 of file NuFCEvent2.cxx.

References FillFrom().

00029                                         : TObject()
00030 {
00031   this->FillFrom(ev);
00032 }


Member Function Documentation

NuFCEvent2::ClassDef ( NuFCEvent2  ,
 
)
Detector::Detector_t NuFCEvent2::Detector ( void   )  const [inline]

Access the detector associated with the event.

Definition at line 85 of file NuFCEvent2.h.

References detector.

Referenced by NuFCEventManager::AddEvent(), and NuFCEventManager::AddFile().

00085                                           {
00086     return static_cast<Detector::Detector_t>(detector);
00087   }

Float_t NuFCEvent2::EnergyMC ( void   )  const [inline]

Returns the true energy value.

Definition at line 93 of file NuFCEvent2.h.

References energyMC.

Referenced by NuFCExperimentGenerator::GenerateFDSample().

00093 { return energyMC; }

void NuFCEvent2::Expand ( NuEvent ev  )  const

Expand into an existing NuEvent object.

Definition at line 84 of file NuFCEvent2.cxx.

References NuEvent::charge, charge, NuEvent::containedTrk, containedTrk, detector, NuEvent::detector, NuEvent::energy, energyMC, NuEvent::energyMC, fluxErr, NuEvent::fluxErr, NuEvent::iaction, iaction, NuEvent::inu, inu, inunoosc, NuEvent::inunoosc, neuEnMC, NuEvent::neuEnMC, NuEvent::ppvz, ppvz, NuEvent::ptype, ptype, rw, NuEvent::rw, NuEvent::shwEn, shwEn, NuEvent::trkEn, and trkEn.

Referenced by NuFCExperimentGenerator::GenerateFDSample(), and operator NuEvent().

00085 {
00086   // Reverse-allocate the varaibles
00087   ev.trkEn = trkEn;
00088   ev.shwEn = shwEn;
00089   ev.rw = rw;
00090   ev.energyMC = energyMC;
00091   ev.neuEnMC = neuEnMC;
00092   ev.ppvz = ppvz;
00093   ev.ptype = ptype;
00094   ev.fluxErr = fluxErr;
00095   ev.containedTrk = containedTrk;
00096   ev.detector = detector;
00097   ev.iaction = iaction;
00098   ev.charge = charge;
00099   ev.inu = inu;
00100   ev.inunoosc = inunoosc;
00101   
00102   // Now, fill any const or dependant variables
00103   ev.energy = ev.trkEn + ev.shwEn;
00104   
00105 }

void NuFCEvent2::FillFrom ( const NuFCEvent ev  ) 

Fill this instance from an old, NuFCEvent object.

Definition at line 62 of file NuFCEvent2.cxx.

References NuFCEvent::charge, charge, containedTrk, NuFCEvent::containedTrk, detector, NuFCEvent::detector, NuFCEvent::energyMC, energyMC, NuFCEvent::fluxErr, fluxErr, NuFCEvent::iaction, iaction, inu, NuFCEvent::inu, NuFCEvent::inunoosc, inunoosc, neuEnMC, NuFCEvent::neuEnMC, ppvz, NuFCEvent::ppvz, NuFCEvent::ptype, ptype, rw, NuFCEvent::rw, NuFCEvent::shwEn, shwEn, NuFCEvent::trkEn, and trkEn.

00063 {
00064   trkEn = ev.trkEn;
00065   shwEn = ev.shwEn;
00066   rw = ev.rw;
00067   energyMC = ev.energyMC;
00068   neuEnMC = ev.neuEnMC;
00069   
00070   ppvz = ev.ppvz;
00071   ptype = ev.ptype;
00072   fluxErr = ev.fluxErr;
00073   
00074   containedTrk = ev.containedTrk;
00075   detector = ev.detector;
00076   iaction = ev.iaction;
00077   charge = ev.charge;
00078   inu = ev.inu;
00079   inunoosc = ev.inunoosc;
00080 }

void NuFCEvent2::FillFrom ( const NuEvent ev  ) 

Fill this instance from a NuEvent object.

Definition at line 36 of file NuFCEvent2.cxx.

References NuEvent::charge, charge, NuEvent::containedTrk, containedTrk, detector, NuEvent::detector, energyMC, NuEvent::energyMC, fluxErr, NuEvent::fluxErr, NuEvent::iaction, iaction, NuEvent::inu, inu, inunoosc, NuEvent::inunoosc, neuEnMC, NuEvent::neuEnMC, NuEvent::ppvz, ppvz, NuEvent::ptype, ptype, rw, NuEvent::rw, NuEvent::shwEn, shwEn, NuEvent::trkEn, and trkEn.

Referenced by NuFCEvent2(), and Reset().

00037 {
00038   trkEn = ev.trkEn;
00039   shwEn = ev.shwEn;
00040   rw = ev.rw;
00041   energyMC = ev.energyMC;
00042   neuEnMC = ev.neuEnMC;
00043 
00044   // energy = ev.energy;
00045 
00046 
00047   ppvz = ev.ppvz;
00048   ptype = ev.ptype;
00049   fluxErr = ev.fluxErr;  
00050 
00051 
00052   containedTrk = ev.containedTrk;
00053   detector = ev.detector;
00054   iaction = ev.iaction;
00055   charge = ev.charge;
00056   inu = ev.inu;
00057   inunoosc = ev.inunoosc;
00058 }

NuFCEvent2::operator NuEvent (  )  const [inline]

DEBUG: Allow automatic conversion into NuEvent objects.

Definition at line 96 of file NuFCEvent2.h.

References Expand().

00096 { NuEvent nu; Expand(nu); return nu; }

void NuFCEvent2::PrintVars ( void   )  const

Print out the variables to screen.

Definition at line 119 of file NuFCEvent2.cxx.

References charge, containedTrk, detector, energyMC, fluxErr, iaction, inu, inunoosc, neuEnMC, ppvz, ptype, rw, shwEn, and trkEn.

00120 {
00121   cout << "NuFCEvent2 Object:\n";
00122   
00123   cout << "  trkEn:    " << trkEn << "\n";
00124   cout << "  shwEn:    " << shwEn << "\n";
00125   cout << "  rw:       " << rw << "\n";
00126   cout << "  energyMC: " << energyMC << "\n";
00127   cout << "  neuEnMC:  " << neuEnMC << "\n";
00128 
00129   cout << "  ppvz:     " << ppvz << "\n";
00130   cout << "  ptype:    " << ptype << "\n";
00131   cout << "  fluxErr:  " << fluxErr << "\n";
00132 
00133   cout << "  containedTrk: " << (Int_t)containedTrk << "\n";
00134   cout << "  inunoosc: " << (Int_t)inunoosc << "\n";
00135   cout << "  detector: " << (Int_t)detector << "\n";
00136   cout << "  iaction:  " << (Int_t)iaction << "\n";
00137   cout << "  charge:   " << (Int_t)charge << "\n";
00138   cout << "  inu:      " << (Int_t)inu << "\n";
00139 }

void NuFCEvent2::Reset (  ) 

Reset all variables to the defaults.

Definition at line 108 of file NuFCEvent2.cxx.

References FillFrom(), and fluxErr.

00109 {
00110   // Reset to the exact same defaults as NuEvent
00111   FillFrom(NuEvent());
00112   // But, set fluxErr to zero to match previous behaviour
00113   fluxErr = 0;
00114   
00115 }

Float_t NuFCEvent2::Rw ( void   )  const [inline]

Returns the RW value.

Definition at line 90 of file NuFCEvent2.h.

References rw.

Referenced by TestEventVector::testFCEvent2().

00090 { return rw; }


Friends And Related Function Documentation

friend class NuEventVector [friend]

Definition at line 38 of file NuFCEvent2.h.


Member Data Documentation

Char_t NuFCEvent2::charge [private]

+1 or -1: simply derived from qp (from trk fit)

Definition at line 57 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Char_t NuFCEvent2::containedTrk [private]

was the track containted

Definition at line 54 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Char_t NuFCEvent2::detector [private]

1=near 2=far

Definition at line 55 of file NuFCEvent2.h.

Referenced by Detector(), Expand(), FillFrom(), and PrintVars().

Float_t NuFCEvent2::energyMC [private]

what could be truely reco'd: neuEn*y for NC

Definition at line 44 of file NuFCEvent2.h.

Referenced by EnergyMC(), Expand(), FillFrom(), and PrintVars().

Float_t NuFCEvent2::fluxErr [private]

was the track containted

Definition at line 52 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), PrintVars(), and Reset().

Char_t NuFCEvent2::iaction [private]

CC=1, NC=0.

Definition at line 56 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Char_t NuFCEvent2::inu [private]

>0 particles, <0 anti-particles

Definition at line 58 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Char_t NuFCEvent2::inunoosc [private]

>0 particles, <0 anti-particles

Definition at line 59 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Float_t NuFCEvent2::neuEnMC [private]

p4neu[3];

Definition at line 45 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Float_t NuFCEvent2::ppvz [private]

mc.flux.ppvz

Definition at line 50 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Int_t NuFCEvent2::ptype [private]

mc.flux.ptype

Definition at line 51 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Float_t NuFCEvent2::rw [private]

the weight to use as default

Definition at line 43 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), PrintVars(), and Rw().

Float_t NuFCEvent2::shwEn [private]

shower energy (e.g. primary shw energy)

Definition at line 42 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().

Float_t NuFCEvent2::trkEn [private]

track energy (range or curv. depending on containment)

Definition at line 41 of file NuFCEvent2.h.

Referenced by Expand(), FillFrom(), and PrintVars().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1