Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
rho_t.h
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: rho_t.h
4 // Created: Tue Oct 13 10:33:35 EDT 2009
5 // Creator: davidl (on Darwin harriet.jlab.org 9.8.0 i386)
6 //
7 
8 #ifndef _rho_t_
9 #define _rho_t_
10 
11 #include <math.h>
12 
13 #include <iostream>
14 
15 #include <TObject.h>
16 #include <TVector3.h>
17 #include <TLorentzVector.h>
18 
19 class rho_t:public TObject{
20  public:
21 
22  rho_t(void):m(0.0){}
23 
24  Double32_t m; // invariant mass of pip and pim
25  TLorentzVector pip; // pi+ parameters
26  TLorentzVector pim; // pi- parameters
27  Bool_t isfiducial; // True if both reconstructed pi+ and pi- are in fiducial phasespace
28 
29  // This is used to sort the TClonesArray rho in Event
30  Bool_t IsSortable(void) const { return kTRUE;}
31  Int_t Compare(const TObject *a) const{
32  Double32_t diff = fabs(((rho_t*)this)->m-0.77) - fabs(((rho_t*)a)->m-0.77);
33  Int_t idiff = diff>0.0 ? +1:(diff<0.0 ? -1:0);
34  return idiff;
35  }
36 
37  rho_t& operator=(const rho_t &ti){
38  this->m = ti.m;
39  this->pip = ti.pip;
40  this->pim = ti.pim;
41  this->isfiducial = ti.isfiducial;
42  return *this;
43  }
44 
45  private:
46  ClassDef(rho_t,1);
47 };
48 
49 
50 
51 #endif // _rho_t_
52 
ClassDef(rho_t, 1)
rho_t & operator=(const rho_t &ti)
Definition: rho_t.h:37
TLorentzVector pim
Definition: rho_t.h:26
Definition: rho_t.h:19
Bool_t isfiducial
Definition: rho_t.h:27
Double32_t m
Definition: rho_t.h:24
Bool_t IsSortable(void) const
Definition: rho_t.h:30
rho_t(void)
Definition: rho_t.h:22
TLorentzVector pip
Definition: rho_t.h:25
Int_t Compare(const TObject *a) const
Definition: rho_t.h:31