Public Member Functions | Public Attributes | List of all members
decay.Decay Class Reference
Inheritance diagram for decay.Decay:
object

Public Member Functions

def __init__ (self, root_file, det)
 
def fill (self, thisentry)
 
def save (self, root_file)
 
def book_hists (self)
 
def GetIdxDet (self, detname)
 

Public Attributes

 idxdet
 
 thistag
 
 thisgroup
 
short int type
 
short int number
 
char name [SIZE_OF_OBJ_NAME]
 
cat_entry star
 

Detailed Description

Definition at line 20 of file decay.py.

Constructor & Destructor Documentation

def decay.Decay.__init__ (   self,
  root_file,
  det 
)

Definition at line 21 of file decay.py.

Referenced by PandAna.core.core.spectrum.fill().

21  def __init__(self,root_file,det):
22  self.idxdet = self.GetIdxDet(det)
23  self.thistag = "decay_" + det
24  root_file.mkdir(self.thistag)
25  self.thisgroup = self.book_hists()
26  return
27 
def __init__(self, root_file, det)
Definition: decay.py:21
def GetIdxDet(self, detname)
Definition: decay.py:69
def book_hists(self)
Definition: decay.py:59

Member Function Documentation

def decay.Decay.book_hists (   self)

Definition at line 59 of file decay.py.

References novadaq::HexUtils.format(), ancestor.Ancestor.thistag, and decay.Decay.thistag.

59  def book_hists(self):
60  hist_group = []
61  for i in hists1D:
62  hist_group.append(TH1F("{}_{}".format(self.thistag, i[0]), ";{};".format(i[0]), i[1], i[2], i[3]))
63  for i in hists2D:
64  hist_group.append(TH2F("{}_{}".format(self.thistag, i[0]), ";{};".format(i[0]), i[1], i[2], i[3], i[4], i[5], i[6]))
65  return hist_group
66 
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
def book_hists(self)
Definition: decay.py:59
def decay.Decay.fill (   self,
  thisentry 
)

Definition at line 30 of file decay.py.

References Fill(), ancestor.Ancestor.idxdet, decay.Decay.idxdet, std.sqrt(), ancestor.Ancestor.thisgroup, and decay.Decay.thisgroup.

30  def fill(self, thisentry):
31  wgt = (thisentry.dk2nu.decay.nimpwt)*(thisentry.dk2nu.nuray[self.idxdet].wgt)
32  #1D:
33  self.thisgroup[0].Fill(thisentry.dk2nu.decay.ndecay, wgt)
34  self.thisgroup[1].Fill(thisentry.dk2nu.decay.ntype, wgt)
35  self.thisgroup[2].Fill(thisentry.dk2nu.decay.ptype, wgt)
36  self.thisgroup[3].Fill(thisentry.dk2nu.decay.nimpwt,wgt)
37  self.thisgroup[4].Fill(thisentry.dk2nu.decay.vz,wgt)
38  #2D:
39  self.thisgroup[5].Fill(thisentry.dk2nu.decay.vx,thisentry.dk2nu.decay.vy,wgt)
40  pdpt = sqrt( thisentry.dk2nu.decay.pdpx* thisentry.dk2nu.decay.pdpx +
41  thisentry.dk2nu.decay.pdpy * thisentry.dk2nu.decay.pdpy )
42  self.thisgroup[6].Fill(thisentry.dk2nu.decay.pdpz,pdpt, wgt)
43  pppt = thisentry.dk2nu.decay.pppz * sqrt( thisentry.dk2nu.decay.ppdxdz* thisentry.dk2nu.decay.ppdxdz +
44  thisentry.dk2nu.decay.ppdydz* thisentry.dk2nu.decay.ppdydz )
45  self.thisgroup[7].Fill(thisentry.dk2nu.decay.pppz,pppt, wgt)
46 
47  return
48 
T sqrt(T number)
Definition: d0nt_math.hpp:156
correl_yv Fill(-(dy[iP-1][iC-1]), hyv->GetBinContent(iP, iC))
def fill(self, thisentry)
Definition: decay.py:30
def decay.Decay.GetIdxDet (   self,
  detname 
)

Definition at line 69 of file decay.py.

69  def GetIdxDet(self,detname):
70  idx = -1
71  if detname == "random":
72  idx = 0
73  elif detname == "minosnd":
74  idx = 2
75  elif detname == "novand":
76  idx = 3
77  elif detname == "minosfd":
78  idx = 8
79  elif detname == "novafd":
80  idx = 9
81  else:
82  print "Bad input, no detector found!"
83  exit (1)
84  return idx
85 
def GetIdxDet(self, detname)
Definition: decay.py:69
def decay.Decay.save (   self,
  root_file 
)

Definition at line 51 of file decay.py.

References ancestor.Ancestor.thisgroup, decay.Decay.thisgroup, ancestor.Ancestor.thistag, and decay.Decay.thistag.

51  def save(self,root_file):
52  root_file.cd(self.thistag)
53  for i in self.thisgroup:
54  i.Write()
55  return
56 
def save(self, root_file)
Definition: decay.py:51

Member Data Documentation

decay.Decay.idxdet

Definition at line 22 of file decay.py.

Referenced by nuray.Nuray.fill(), vdbl.Vdbl.fill(), tgtexit.Tgtexit.fill(), and decay.Decay.fill().

short int object::number
inherited

Definition at line 115 of file novas.h.

cat_entry object::star
inherited

Definition at line 117 of file novas.h.

short int object::type
inherited

Definition at line 114 of file novas.h.


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