/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Private Attributes
MuonTree Class Reference

#include <MuonTree.h>

List of all members.

Public Member Functions

 MuonTree ()
 My Tree.
 ~MuonTree ()
int create (const char *filename="MuonRpc.root")
int reset ()
int fill ()
int close ()
string IntToString (int intValue)

Public Attributes

int run
 quantities
int evt
int nhits_RPC
int nhits_AD1
int nhits_AD2
int nhits_IWS
int nhits_OWS
int trk1_pdgId
double trk1_t
double trk1_x
double trk1_y
double trk1_z
double trk1_r
double trk1_e
double trk1_px
double trk1_py
double trk1_pz
double trk1_phi
double trk1_ke
double trk1_ve
double npe [8][24]
double tpe [8][24]
double TotDeInOil1
double TotDeInOil2
double TotDeInLso1
double TotDeInLso2
double MuDeInOil1
double MuDeInOil2
double MuDeInLso1
double MuDeInLso2
double MuDxInOil1
double MuDxInOil2
double MuDxInLso1
double MuDxInLso2
double his_t1
double his_x1
double his_y1
double his_z1
double oil1_p_x
double oil1_p_y
double oil1_p_z
double oil1_e_x
double oil1_e_y
double oil1_e_z
double oil1_p_px
double oil1_p_py
double oil1_p_pz
double oil2_p_x
double oil2_p_y
double oil2_p_z
double oil2_e_x
double oil2_e_y
double oil2_e_z
double oil2_p_px
double oil2_p_py
double oil2_p_pz
double phiRec
double oil1_p_x_rec
double oil1_p_y_rec
double oil1_p_z_rec
double oil2_p_x_rec
double oil2_p_y_rec
double oil2_p_z_rec
int nNeutron
int nInOws
int nInOil1
int nInOil2
int nInLso1
int nInLso2

Private Attributes

TFile * m_file
TTree * m_tree

Detailed Description

Definition at line 23 of file MuonTree.h.


Constructor & Destructor Documentation

MuonTree::MuonTree ( )

My Tree.

Sep, 2008 Zhe Wang

Definition at line 12 of file MuonTree.cc.

{}
MuonTree::~MuonTree ( )

Definition at line 15 of file MuonTree.cc.

{}

Member Function Documentation

int MuonTree::create ( const char *  filename = "MuonRpc.root")

create tree

SimHits

MC truth for the first primary track

AD1 hit information

The first vertex of the first track

Definition at line 18 of file MuonTree.cc.

{
  cout<<"TTree Created"<<endl;
  
  m_file=new TFile(filename,"recreate");
  m_tree=new TTree("t","Analysis Tree");    

  m_tree->Branch("run",      &run,      "run/I");
  m_tree->Branch("evt",      &evt,      "evt/I");

  m_tree->Branch("nhits_RPC",&nhits_RPC,"nhits_RPC/I");
  m_tree->Branch("nhits_AD1",&nhits_AD1,"nhits_AD1/I");
  m_tree->Branch("nhits_AD2",&nhits_AD2,"nhits_AD2/I");
  m_tree->Branch("nhits_IWS",&nhits_IWS,"nhits_IWS/I");
  m_tree->Branch("nhits_OWS",&nhits_OWS,"nhits_OWS/I");

  m_tree->Branch("trk1_pdgId",  &trk1_pdgId, "trk1_pdgId/I");

  m_tree->Branch("trk1_t",   &trk1_t,  "trk1_t/D");
  m_tree->Branch("trk1_x",   &trk1_x,  "trk1_x/D");
  m_tree->Branch("trk1_y",   &trk1_y,  "trk1_y/D");
  m_tree->Branch("trk1_z",   &trk1_z,  "trk1_z/D");
  m_tree->Branch("trk1_r",   &trk1_r,  "trk1_r/D");

  m_tree->Branch("trk1_e",   &trk1_e,  "trk1_e/D");
  m_tree->Branch("trk1_px",  &trk1_px, "trk1_px/D");
  m_tree->Branch("trk1_py",  &trk1_py, "trk1_py/D");
  m_tree->Branch("trk1_pz",  &trk1_pz, "trk1_pz/D");
  m_tree->Branch("trk1_phi", &trk1_phi,"trk1_phi/D");

  m_tree->Branch("trk1_ke",  &trk1_ke, "trk1_ke/D");   // kinematic energy
  m_tree->Branch("trk1_ve",  &trk1_ve, "trk1_ve/D");   // visible energy 

  m_tree->Branch("npe",npe,"npe[8][24]/D");   // npe                                                                                 
  m_tree->Branch("tpe",tpe,"tpe[8][24]/D");   // tpe 

  m_tree->Branch("TotDeInOil1", &TotDeInOil1, "TotDeInOil1/D");
  m_tree->Branch("TotDeInOil2", &TotDeInOil2, "TotDeInOil2/D");
  m_tree->Branch("TotDeInLso1", &TotDeInLso1, "TotDeInLso1/D");
  m_tree->Branch("TotDeInLso2", &TotDeInLso2, "TotDeInLso2/D");

  m_tree->Branch("MuDeInOil1",  &MuDeInOil1,  "MuDeInOil1/D"); 
  m_tree->Branch("MuDeInOil2",  &MuDeInOil2,  "MuDeInOil2/D"); 
  m_tree->Branch("MuDeInLso1",  &MuDeInLso1,  "MuDeInLso1/D"); 
  m_tree->Branch("MuDeInLso2",  &MuDeInLso2,  "MuDeInLso2/D"); 

  m_tree->Branch("MuDxInOil1",  &MuDxInOil1,  "MuDxInOil1/D"); 
  m_tree->Branch("MuDxInOil2",  &MuDxInOil2,  "MuDxInOil2/D"); 
  m_tree->Branch("MuDxInLso1",  &MuDxInLso1,  "MuDxInLso1/D"); 
  m_tree->Branch("MuDxInLso2",  &MuDxInLso2,  "MuDxInLso2/D"); 

  m_tree->Branch("his_t1",   &his_t1,  "his_t1/D");
  m_tree->Branch("his_x1",   &his_x1,  "his_x1/D");
  m_tree->Branch("his_y1",   &his_y1,  "his_y1/D");
  m_tree->Branch("his_z1",   &his_z1,  "his_z1/D");

  m_tree->Branch("oil1_p_x",  &oil1_p_x, "oil1_p_x/D");
  m_tree->Branch("oil1_p_y",  &oil1_p_y, "oil1_p_y/D");
  m_tree->Branch("oil1_p_z",  &oil1_p_z, "oil1_p_z/D");
  m_tree->Branch("oil1_e_x",  &oil1_e_x, "oil1_e_x/D");
  m_tree->Branch("oil1_e_y",  &oil1_e_y, "oil1_e_y/D");
  m_tree->Branch("oil1_e_z",  &oil1_e_z, "oil1_e_z/D");
  m_tree->Branch("oil1_p_px",  &oil1_p_px, "oil1_p_px/D");
  m_tree->Branch("oil1_p_py",  &oil1_p_py, "oil1_p_py/D");
  m_tree->Branch("oil1_p_pz",  &oil1_p_pz, "oil1_p_pz/D");

  m_tree->Branch("oil2_p_x",  &oil2_p_x, "oil2_p_x/D");
  m_tree->Branch("oil2_p_y",  &oil2_p_y, "oil2_p_y/D");
  m_tree->Branch("oil2_p_z",  &oil2_p_z, "oil2_p_z/D");
  m_tree->Branch("oil2_e_x",  &oil2_e_x, "oil2_e_x/D");
  m_tree->Branch("oil2_e_y",  &oil2_e_y, "oil2_e_y/D");
  m_tree->Branch("oil2_e_z",  &oil2_e_z, "oil2_e_z/D");
  m_tree->Branch("oil2_p_px",  &oil2_p_px, "oil2_p_px/D");
  m_tree->Branch("oil2_p_py",  &oil2_p_py, "oil2_p_py/D");
  m_tree->Branch("oil2_p_pz",  &oil2_p_pz, "oil2_p_pz/D");


  m_tree->Branch("phiRec",&phiRec,"phiRec/D");   // recontructed phi
  //
  m_tree->Branch("oil1_p_x_rec",  &oil1_p_x_rec, "oil1_p_x_rec/D");
  m_tree->Branch("oil1_p_y_rec",  &oil1_p_y_rec, "oil1_p_y_rec/D");
  m_tree->Branch("oil1_p_z_rec",  &oil1_p_z_rec, "oil1_p_z_rec/D");
  //
  m_tree->Branch("oil2_p_x_rec",  &oil2_p_x_rec, "oil2_p_x_rec/D");
  m_tree->Branch("oil2_p_y_rec",  &oil2_p_y_rec, "oil2_p_y_rec/D");
  m_tree->Branch("oil2_p_z_rec",  &oil2_p_z_rec, "oil2_p_z_rec/D");

  // Number of neutrons
  m_tree->Branch("nNeutron",      &nNeutron,     "nNeutron/I");
  m_tree->Branch("nInOws",      &nInOws,     "nInOws/I");
  m_tree->Branch("nInOil1",      &nInOil1,     "nInOil1/I");
  m_tree->Branch("nInOil2",      &nInOil2,     "nInOil2/I");
  m_tree->Branch("nInLso1",      &nInLso1,     "nInLso1/I");
  m_tree->Branch("nInLso2",      &nInLso2,     "nInLso2/I");


  return  1; // 1 for SUCCESS;
}
int MuonTree::reset ( )

reset all quantities

AD1 hit information

number of neutrons

Definition at line 130 of file MuonTree.cc.

{
  run=0;
  evt=0;

  nhits_RPC=0;
  nhits_AD1=0;
  nhits_AD2=0;
  nhits_IWS=0;
  nhits_OWS=0;

  trk1_pdgId=0;

  trk1_t=0;
  trk1_x=0;
  trk1_y=0;
  trk1_z=0;
  trk1_r=0;

  trk1_e=0;
  trk1_px=0;
  trk1_py=0;
  trk1_pz=0;
  trk1_phi=0;

  trk1_ke=0;  // kinematic energy                                               
  trk1_ve=0;  // visible energy 

  TotDeInOil1=0;
  TotDeInOil2=0;
  TotDeInLso1=0;
  TotDeInLso2=0;

  MuDeInOil1=0;
  MuDeInOil2=0;
  MuDeInLso1=0;
  MuDeInLso2=0;

  MuDxInOil1=0;
  MuDxInOil2=0;
  MuDxInLso1=0;
  MuDxInLso2=0;


  oil1_p_x=0;
  oil1_p_y=0;
  oil1_p_z=0;

  oil1_e_x=0;
  oil1_e_y=0;
  oil1_e_z=0;

  oil1_p_px=0;
  oil1_p_py=0;
  oil1_p_pz=0;

  oil2_p_x=0;
  oil2_p_y=0;
  oil2_p_z=0;

  oil2_e_x=0;
  oil2_e_y=0;
  oil2_e_z=0;

  oil2_p_px=0;
  oil2_p_py=0;
  oil2_p_pz=0;

  phiRec=0;

  oil1_p_x_rec=0;
  oil1_p_y_rec=0;
  oil1_p_z_rec=0;

  oil2_p_x_rec=0;
  oil2_p_y_rec=0;
  oil2_p_z_rec=0;

  for(int ring=0;ring<8;ring++) {
    for(int column=0;column<24;column++) {
      npe[ring][column]=0;  // something invalid                                                                                     
      tpe[ring][column]=99999;  // something invalid                                                                                 
    }
  }

  nNeutron = 0;
  nInOws = 0;
  nInOil1 = 0;
  nInOil2 = 0;
  nInLso1 = 0;
  nInLso2 = 0;

  return 1;  // 1 for SUCCESS;
}
int MuonTree::fill ( )

Definition at line 229 of file MuonTree.cc.

{
  m_tree->Fill();

  return  1; // 1 for SUCCESS;
}
int MuonTree::close ( )

Definition at line 236 of file MuonTree.cc.

{
  m_file->Write();

  return  1; // 1 for SUCCESS;
}
string MuonTree::IntToString ( int  intValue)

Definition at line 243 of file MuonTree.cc.

                                         {

  ostringstream oss (ostringstream::out);

  oss <<intValue;

  string strRetVal=oss.str();

  return(strRetVal);
}

Member Data Documentation

quantities

Definition at line 39 of file MuonTree.h.

Definition at line 40 of file MuonTree.h.

Definition at line 43 of file MuonTree.h.

Definition at line 44 of file MuonTree.h.

Definition at line 45 of file MuonTree.h.

Definition at line 46 of file MuonTree.h.

Definition at line 47 of file MuonTree.h.

Definition at line 50 of file MuonTree.h.

Definition at line 52 of file MuonTree.h.

Definition at line 53 of file MuonTree.h.

Definition at line 54 of file MuonTree.h.

Definition at line 55 of file MuonTree.h.

Definition at line 56 of file MuonTree.h.

Definition at line 58 of file MuonTree.h.

Definition at line 59 of file MuonTree.h.

Definition at line 60 of file MuonTree.h.

Definition at line 61 of file MuonTree.h.

Definition at line 62 of file MuonTree.h.

Definition at line 64 of file MuonTree.h.

Definition at line 65 of file MuonTree.h.

double MuonTree::npe[8][24]

Definition at line 68 of file MuonTree.h.

double MuonTree::tpe[8][24]

Definition at line 69 of file MuonTree.h.

Definition at line 72 of file MuonTree.h.

Definition at line 73 of file MuonTree.h.

Definition at line 74 of file MuonTree.h.

Definition at line 75 of file MuonTree.h.

Definition at line 77 of file MuonTree.h.

Definition at line 78 of file MuonTree.h.

Definition at line 79 of file MuonTree.h.

Definition at line 80 of file MuonTree.h.

Definition at line 82 of file MuonTree.h.

Definition at line 83 of file MuonTree.h.

Definition at line 84 of file MuonTree.h.

Definition at line 85 of file MuonTree.h.

Definition at line 88 of file MuonTree.h.

Definition at line 89 of file MuonTree.h.

Definition at line 90 of file MuonTree.h.

Definition at line 91 of file MuonTree.h.

Definition at line 94 of file MuonTree.h.

Definition at line 95 of file MuonTree.h.

Definition at line 96 of file MuonTree.h.

Definition at line 99 of file MuonTree.h.

Definition at line 100 of file MuonTree.h.

Definition at line 101 of file MuonTree.h.

Definition at line 103 of file MuonTree.h.

Definition at line 104 of file MuonTree.h.

Definition at line 105 of file MuonTree.h.

Definition at line 108 of file MuonTree.h.

Definition at line 109 of file MuonTree.h.

Definition at line 110 of file MuonTree.h.

Definition at line 113 of file MuonTree.h.

Definition at line 114 of file MuonTree.h.

Definition at line 115 of file MuonTree.h.

Definition at line 117 of file MuonTree.h.

Definition at line 118 of file MuonTree.h.

Definition at line 119 of file MuonTree.h.

Definition at line 123 of file MuonTree.h.

Definition at line 125 of file MuonTree.h.

Definition at line 126 of file MuonTree.h.

Definition at line 127 of file MuonTree.h.

Definition at line 129 of file MuonTree.h.

Definition at line 130 of file MuonTree.h.

Definition at line 131 of file MuonTree.h.

Definition at line 134 of file MuonTree.h.

Definition at line 135 of file MuonTree.h.

Definition at line 136 of file MuonTree.h.

Definition at line 137 of file MuonTree.h.

Definition at line 138 of file MuonTree.h.

Definition at line 139 of file MuonTree.h.

TFile* MuonTree::m_file [private]

Definition at line 142 of file MuonTree.h.

TTree* MuonTree::m_tree [private]

Definition at line 143 of file MuonTree.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:07:04 for MDC09b by doxygen 1.7.4