CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes
NtupleROOTFile Class Reference

#include <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]
 

Detailed Description

Reads a "h2root" converted cmkin ntpl; Joanna Weng 1/2006

Definition at line 14 of file NtupleROOTFile.h.

Constructor & Destructor Documentation

NtupleROOTFile::NtupleROOTFile ( std::string  filename,
int  id 
)
NtupleROOTFile::~NtupleROOTFile ( )
virtual

Definition at line 79 of file NtupleROOTFile.cc.

References mergeVDriftHistosByStation::file, and diffTreeTool::tree.

79  {
80  delete tree;
81  delete file;
82 }
NtupleROOTFile::NtupleROOTFile ( )
inlineprivate

Definition at line 51 of file NtupleROOTFile.h.

51 {}

Member Function Documentation

int NtupleROOTFile::getEntries ( void  ) const
virtual

Definition at line 190 of file NtupleROOTFile.cc.

190  {
191  return (int)tree->GetEntries();
192 }
virtual int NtupleROOTFile::getId ( ) const
inlinevirtual

Definition at line 31 of file NtupleROOTFile.h.

References id_.

31 {return id_;}
int NtupleROOTFile::getIdhep ( int  j) const
virtual

Definition at line 104 of file NtupleROOTFile.cc.

Referenced by Ntuple2HepMCFiller::createParticle().

104  {
105  return Idhep[j-1];
106 }
int j
Definition: DBlmapReader.cc:9
Int_t Idhep[4000]
int NtupleROOTFile::getIsthep ( int  j) const
virtual

Definition at line 131 of file NtupleROOTFile.cc.

References getId(), and ntuplemaker::status.

Referenced by Ntuple2HepMCFiller::createParticle().

131  {
132  if(getId() != 100){
133 
134  int jsm= this->getJsmhep(j);
135  int jsd= this->getJsdhep(j);
136  // this is the CMS compression for ntuple id 101
137  int idj=jsm/16000000;
138  int idk=jsd/16000000;
139  int status = idk*100+idj;
140  return status;
141  }
142  return Isthep[j-1];
143 }
virtual int getJsdhep(int j) const
virtual int getJsmhep(int j) const
Int_t Isthep[4000]
int j
Definition: DBlmapReader.cc:9
virtual int getId() const
tuple status
Definition: ntuplemaker.py:245
int NtupleROOTFile::getJdahep ( int  j,
int  idx 
) const
virtual

Definition at line 164 of file NtupleROOTFile.cc.

References getId().

Referenced by Ntuple2HepMCFiller::number_children().

164  {
165  if(getId() != 100){
166  int jsd= this->getJsdhep(j);
167  // we have to compute it
168  // this is the CMS compression for ntuple id 101
169  int da1 = (jsd%16000000)/4000;
170  int da2= jsd%4000;
171  // 1. daughter
172  if (idx==0) return da1;
173  // 2. daughter
174  if (idx==1) return da2;
175  }
176  return Jdahep[j-1][idx];
177 }
virtual int getJsdhep(int j) const
int j
Definition: DBlmapReader.cc:9
virtual int getId() const
Int_t Jdahep[4000][2]
int NtupleROOTFile::getJmohep ( int  j,
int  idx 
) const
virtual

Definition at line 147 of file NtupleROOTFile.cc.

References getId().

Referenced by Ntuple2HepMCFiller::buildProductionVertex(), and Ntuple2HepMCFiller::number_parents().

147  {
148  if(getId() != 100){
149 
150  int jsm= this->getJsmhep(j);
151  //we have to compute it
152  // this is the CMS compression for ntuple id 101
153  int mo1 = (jsm%16000000)/4000;
154  int mo2 = jsm%4000;
155  // 1. mother
156  if (idx==0) return mo1;
157  // 2. mother
158  if (idx==1) return mo2;
159  }
160  return Jmohep[j-1][idx];
161 }
virtual int getJsmhep(int j) const
Int_t Jmohep[4000][2]
int j
Definition: DBlmapReader.cc:9
virtual int getId() const
int NtupleROOTFile::getJsdhep ( int  j) const
virtual

Definition at line 121 of file NtupleROOTFile.cc.

References gather_cfg::cout, and getId().

121  {
122  if(getId() != 101){
123  cout<<"NtupleROOTFile::getJsdhep: ERROR: "
124  <<"only available for ID 101 ntuples"<<endl;
125  return 0;
126  }
127  return Jsdhep[j-1];
128 }
int j
Definition: DBlmapReader.cc:9
virtual int getId() const
Int_t Jsdhep[4000]
tuple cout
Definition: gather_cfg.py:121
int NtupleROOTFile::getJsmhep ( int  j) const
virtual

Definition at line 110 of file NtupleROOTFile.cc.

References gather_cfg::cout, and getId().

110  {
111  if(getId() != 101){
112  cout<<"NtupleROOTFile::getJsmhep: ERROR: "
113  <<"only available for ID 101 ntuples"<<endl;
114  return 0;
115  }
116  return Jsmhep[j-1];
117 }
int j
Definition: DBlmapReader.cc:9
virtual int getId() const
tuple cout
Definition: gather_cfg.py:121
Int_t Jsmhep[4000]
int NtupleROOTFile::getNevhep ( ) const
virtual

Definition at line 94 of file NtupleROOTFile.cc.

Referenced by Ntuple2HepMCFiller::buildProductionVertex(), and Ntuple2HepMCFiller::readCurrentEvent().

94  {
95 
96  return tree->GetEntries();
97 
98  // jw 8.3.2006:changed, since there seem to be ntpls
99  // where this entry is not correctly filled
100  //return Nevhep;
101 }
int NtupleROOTFile::getNhep ( ) const
virtual

Definition at line 90 of file NtupleROOTFile.cc.

Referenced by Ntuple2HepMCFiller::number_parents(), and Ntuple2HepMCFiller::toGenEvent().

90  {
91  return Nhep;
92 }
double NtupleROOTFile::getPhep ( int  j,
int  idx 
) const
virtual

Definition at line 180 of file NtupleROOTFile.cc.

Referenced by Ntuple2HepMCFiller::createParticle().

180  {
181  return Phep[j-1][idx];
182 }
int j
Definition: DBlmapReader.cc:9
Float_t Phep[4000][5]
double NtupleROOTFile::getVhep ( int  j,
int  idx 
) const
virtual

Definition at line 185 of file NtupleROOTFile.cc.

Referenced by Ntuple2HepMCFiller::buildProductionVertex().

185  {
186  return Vhep[j-1][idx];
187 }
int j
Definition: DBlmapReader.cc:9
Float_t Vhep[4000][4]
void NtupleROOTFile::setEvent ( int  event) const
virtual

Definition at line 85 of file NtupleROOTFile.cc.

Referenced by Ntuple2HepMCFiller::readCurrentEvent().

85  {
86  tree->GetEntry(event);
87 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past

Member Data Documentation

TFile* NtupleROOTFile::file
private

Definition at line 36 of file NtupleROOTFile.h.

int NtupleROOTFile::id_
protected

Definition at line 34 of file NtupleROOTFile.h.

Referenced by getId().

Int_t NtupleROOTFile::Idhep[4000]
private

Definition at line 42 of file NtupleROOTFile.h.

Int_t NtupleROOTFile::Isthep[4000]
private

Definition at line 47 of file NtupleROOTFile.h.

Int_t NtupleROOTFile::Jdahep[4000][2]
private

Definition at line 49 of file NtupleROOTFile.h.

Int_t NtupleROOTFile::Jmohep[4000][2]
private

Definition at line 48 of file NtupleROOTFile.h.

Int_t NtupleROOTFile::Jsdhep[4000]
private

Definition at line 44 of file NtupleROOTFile.h.

Int_t NtupleROOTFile::Jsmhep[4000]
private

Definition at line 43 of file NtupleROOTFile.h.

Int_t NtupleROOTFile::Nevhep
private

Definition at line 41 of file NtupleROOTFile.h.

Int_t NtupleROOTFile::Nhep
private

Definition at line 40 of file NtupleROOTFile.h.

Float_t NtupleROOTFile::Phep[4000][5]
private

Definition at line 45 of file NtupleROOTFile.h.

TTree* NtupleROOTFile::tree
private

Definition at line 37 of file NtupleROOTFile.h.

Referenced by svgfig.SVG::__str__(), and python.cmstools.EventTree::SetAlias().

Float_t NtupleROOTFile::Vhep[4000][4]
private

Definition at line 46 of file NtupleROOTFile.h.