#include <IOMC/NtupleConverter/interface/NtupleROOTFile.h>
Public Member Functions | |
virtual int | getEntries () const |
virtual int | getId () const |
virtual int | getIdhep (int j) const |
virtual int | getIsthep (int j) const |
virtual int | getJdahep (int j, int idx) const |
virtual int | getJmohep (int j, int idx) const |
virtual int | getJsdhep (int j) const |
virtual int | getJsmhep (int j) const |
virtual int | getNevhep () const |
virtual int | getNhep () const |
virtual double | getPhep (int j, int idx) const |
virtual double | getVhep (int j, int idx) const |
NtupleROOTFile (std::string filename, int id) | |
virtual void | setEvent (int event) const |
virtual | ~NtupleROOTFile () |
Protected Attributes | |
int | id_ |
Private Member Functions | |
NtupleROOTFile () | |
Private Attributes | |
TFile * | file |
Int_t | Idhep [4000] |
Int_t | Isthep [4000] |
Int_t | Jdahep [4000][2] |
Int_t | Jmohep [4000][2] |
Int_t | Jsdhep [4000] |
Int_t | Jsmhep [4000] |
Int_t | Nevhep |
Int_t | Nhep |
Float_t | Phep [4000][5] |
TTree * | tree |
Float_t | Vhep [4000][4] |
Definition at line 14 of file NtupleROOTFile.h.
NtupleROOTFile::NtupleROOTFile | ( | std::string | filename, | |
int | id | |||
) |
NtupleROOTFile::~NtupleROOTFile | ( | ) | [virtual] |
NtupleROOTFile::NtupleROOTFile | ( | ) | [inline, private] |
Definition at line 190 of file NtupleROOTFile.cc.
00190 { 00191 return (int)tree->GetEntries(); 00192 }
virtual int NtupleROOTFile::getId | ( | ) | const [inline, virtual] |
Definition at line 31 of file NtupleROOTFile.h.
References id_.
Referenced by getIsthep(), getJdahep(), getJmohep(), getJsdhep(), and getJsmhep().
00031 {return id_;}
Definition at line 104 of file NtupleROOTFile.cc.
References Idhep.
Referenced by Ntuple2HepMCFiller::createParticle().
Definition at line 131 of file NtupleROOTFile.cc.
References getId(), getJsdhep(), getJsmhep(), Isthep, and StDecayID::status.
Referenced by Ntuple2HepMCFiller::createParticle().
00131 { 00132 if(getId() != 100){ 00133 00134 int jsm= this->getJsmhep(j); 00135 int jsd= this->getJsdhep(j); 00136 // this is the CMS compression for ntuple id 101 00137 int idj=jsm/16000000; 00138 int idk=jsd/16000000; 00139 int status = idk*100+idj; 00140 return status; 00141 } 00142 return Isthep[j-1]; 00143 }
Definition at line 164 of file NtupleROOTFile.cc.
References getId(), getJsdhep(), and Jdahep.
Referenced by Ntuple2HepMCFiller::number_children().
00164 { 00165 if(getId() != 100){ 00166 int jsd= this->getJsdhep(j); 00167 // we have to compute it 00168 // this is the CMS compression for ntuple id 101 00169 int da1 = (jsd%16000000)/4000; 00170 int da2= jsd%4000; 00171 // 1. daughter 00172 if (idx==0) return da1; 00173 // 2. daughter 00174 if (idx==1) return da2; 00175 } 00176 return Jdahep[j-1][idx]; 00177 }
Definition at line 147 of file NtupleROOTFile.cc.
References getId(), getJsmhep(), Jmohep, mo1, and mo2.
Referenced by Ntuple2HepMCFiller::buildProductionVertex(), and Ntuple2HepMCFiller::number_parents().
00147 { 00148 if(getId() != 100){ 00149 00150 int jsm= this->getJsmhep(j); 00151 //we have to compute it 00152 // this is the CMS compression for ntuple id 101 00153 int mo1 = (jsm%16000000)/4000; 00154 int mo2 = jsm%4000; 00155 // 1. mother 00156 if (idx==0) return mo1; 00157 // 2. mother 00158 if (idx==1) return mo2; 00159 } 00160 return Jmohep[j-1][idx]; 00161 }
Definition at line 121 of file NtupleROOTFile.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), getId(), and Jsdhep.
Referenced by getIsthep(), and getJdahep().
00121 { 00122 if(getId() != 101){ 00123 cout<<"NtupleROOTFile::getJsdhep: ERROR: " 00124 <<"only available for ID 101 ntuples"<<endl; 00125 return 0; 00126 } 00127 return Jsdhep[j-1]; 00128 }
Definition at line 110 of file NtupleROOTFile.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), getId(), and Jsmhep.
Referenced by getIsthep(), and getJmohep().
00110 { 00111 if(getId() != 101){ 00112 cout<<"NtupleROOTFile::getJsmhep: ERROR: " 00113 <<"only available for ID 101 ntuples"<<endl; 00114 return 0; 00115 } 00116 return Jsmhep[j-1]; 00117 }
int NtupleROOTFile::getNevhep | ( | ) | const [virtual] |
Definition at line 94 of file NtupleROOTFile.cc.
Referenced by Ntuple2HepMCFiller::buildProductionVertex(), and Ntuple2HepMCFiller::readCurrentEvent().
00094 { 00095 00096 return tree->GetEntries(); 00097 00098 // jw 8.3.2006:changed, since there seem to be ntpls 00099 // where this entry is not correctly filled 00100 //return Nevhep; 00101 }
int NtupleROOTFile::getNhep | ( | ) | const [virtual] |
Definition at line 90 of file NtupleROOTFile.cc.
References Nhep.
Referenced by Ntuple2HepMCFiller::number_parents(), and Ntuple2HepMCFiller::toGenEvent().
00090 { 00091 return Nhep; 00092 }
Definition at line 180 of file NtupleROOTFile.cc.
References Phep.
Referenced by Ntuple2HepMCFiller::createParticle().
Definition at line 185 of file NtupleROOTFile.cc.
References Vhep.
Referenced by Ntuple2HepMCFiller::buildProductionVertex().
Definition at line 85 of file NtupleROOTFile.cc.
Referenced by Ntuple2HepMCFiller::readCurrentEvent().
TFile* NtupleROOTFile::file [private] |
int NtupleROOTFile::id_ [protected] |
Int_t NtupleROOTFile::Idhep[4000] [private] |
Int_t NtupleROOTFile::Isthep[4000] [private] |
Int_t NtupleROOTFile::Jdahep[4000][2] [private] |
Int_t NtupleROOTFile::Jmohep[4000][2] [private] |
Int_t NtupleROOTFile::Jsdhep[4000] [private] |
Int_t NtupleROOTFile::Jsmhep[4000] [private] |
Int_t NtupleROOTFile::Nevhep [private] |
Definition at line 41 of file NtupleROOTFile.h.
Int_t NtupleROOTFile::Nhep [private] |
Float_t NtupleROOTFile::Phep[4000][5] [private] |
TTree* NtupleROOTFile::tree [private] |
Definition at line 37 of file NtupleROOTFile.h.
Float_t NtupleROOTFile::Vhep[4000][4] [private] |