Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
phys_tree/Event.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: Event.cc
4 // Created: Tue Oct 13 09:55:12 EDT 2009
5 // Creator: davidl (on Darwin harriet.jlab.org 9.8.0 i386)
6 //
7 
8 
9 
10 #include "Event.h"
11 #include "Particle.h"
12 
13 //------------------
14 // Event (ctor)
15 //------------------
17 {
18  pip = new TClonesArray("Particle", MAX_PART);
19  pim = new TClonesArray("Particle", MAX_PART);
20  Kp = new TClonesArray("Particle", MAX_PART);
21  Km = new TClonesArray("Particle", MAX_PART);
22  proton = new TClonesArray("Particle", MAX_PART);
23  photon = new TClonesArray("Particle", MAX_PART);
24  neutron = new TClonesArray("Particle", MAX_PART);
25 
26  pip_match = new TClonesArray("Particle", MAX_PART);
27  pim_match = new TClonesArray("Particle", MAX_PART);
28  Kp_match = new TClonesArray("Particle", MAX_PART);
29  Km_match = new TClonesArray("Particle", MAX_PART);
30  proton_match = new TClonesArray("Particle", MAX_PART);
31  photon_match = new TClonesArray("Particle", MAX_PART);
32  neutron_match = new TClonesArray("Particle", MAX_PART);
33 }
34 
35 //------------------
36 // ~Event (dtor)
37 //------------------
39 {
40  delete pip;
41  delete pim;
42  delete Kp;
43  delete Km;
44  delete proton;
45  delete photon;
46  delete neutron;
47 
48  delete pip_match;
49  delete pim_match;
50  delete Kp_match;
51  delete Km_match;
52  delete proton_match;
53  delete photon_match;
54  delete neutron_match;
55 }
56 
57 //------------------
58 // Clear
59 //------------------
60 void Event::Clear(void)
61 {
62  Npip = 0;
63  Npim = 0;
64  NKp = 0;
65  NKm = 0;
66  Nproton = 0;
67  Nphoton = 0;
68  Nneutron = 0;
69  pip->Clear(); // delete entries in TClonesArray (without freeing memory)
70  pim->Clear(); // delete entries in TClonesArray (without freeing memory)
71  Kp->Clear(); // delete entries in TClonesArray (without freeing memory)
72  Km->Clear(); // delete entries in TClonesArray (without freeing memory)
73  proton->Clear(); // delete entries in TClonesArray (without freeing memory)
74  photon->Clear(); // delete entries in TClonesArray (without freeing memory)
75  neutron->Clear(); // delete entries in TClonesArray (without freeing memory)
76 
77  pip_match->Clear();
78  pim_match->Clear();
79  Kp_match->Clear();
80  Km_match->Clear();
81  proton_match->Clear();
82  photon_match->Clear();
83  neutron_match->Clear();
84 
85  target.SetXYZT(0.0, 0.0, 0.0, 0.0);
86  beam.SetXYZT(0.0, 0.0, 0.0, 0.0);
87  vertex.SetXYZ(0.0, 0.0, 65.0);
88  W.SetXYZT(0.0, 0.0, 0.0, 0.0);
89 
90  all_fiducial = false;
91  all_mesons_fiducial = false;
92  all_photons_fiducial = false;
93  all_neutrons_fiducial = false;
94  all_protons_fiducial = false;
95 }
96 
97 
TClonesArray * proton_match
Closest match proton (truth or recon, whatever is not in proton)
bool all_neutrons_fiducial
TClonesArray * Kp
Definition: mc_tree/Event.h:51
Definition: photon.h:15
bool all_mesons_fiducial
TClonesArray * pip
Definition: mc_tree/Event.h:49
UInt_t Npip
Definition: mc_tree/Event.h:36
TClonesArray * photon
Definition: mc_tree/Event.h:54
void Clear(void)
UInt_t Nphoton
Definition: mc_tree/Event.h:41
UInt_t Npim
Definition: mc_tree/Event.h:37
UInt_t Nneutron
Definition: mc_tree/Event.h:42
TClonesArray * Km_match
Closest match K- (truth or recon, whatever is not in Km)
TClonesArray * neutron
Definition: mc_tree/Event.h:55
TClonesArray * pip_match
Closest match pi+ (truth or recon, whatever is not in pip)
UInt_t NKm
Definition: mc_tree/Event.h:39
bool all_photons_fiducial
UInt_t NKp
Definition: mc_tree/Event.h:38
TClonesArray * proton
Definition: mc_tree/Event.h:53
TLorentzVector W
Definition: mc_tree/Event.h:65
TClonesArray * pim_match
Closest match pi- (truth or recon, whatever is not in pim)
TLorentzVector target
Definition: mc_tree/Event.h:62
UInt_t Nproton
Definition: mc_tree/Event.h:40
bool all_fiducial
Definition: mc_tree/Event.h:67
TClonesArray * pim
Definition: mc_tree/Event.h:50
bool all_protons_fiducial
#define MAX_PART
Definition: mc_tree/Event.h:22
TClonesArray * Km
Definition: mc_tree/Event.h:52
TClonesArray * neutron_match
Closest match neutron (truth or recon, whatever is not in neutron)
TLorentzVector beam
TVector3 vertex
TClonesArray * Kp_match
Closest match K+ (truth or recon, whatever is not in Kp)
TClonesArray * photon_match
Closest match photon (truth or recon, whatever is not in photon)