CMS 3D CMS Logo

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

#include <SimDataFormats/HcalTestBeam/interface/PHcalTB06Info.h>

Classes

struct  Hit
 
struct  Vtx
 

Public Types

typedef std::vector< float > FloatVector
 
typedef std::vector< HitHitVector
 
typedef std::vector< int > IntVector
 
typedef std::vector< VtxVtxVector
 

Public Member Functions

void clear ()
 
float eta () const
 
int evNum () const
 
float initE () const
 
int partID () const
 
 PHcalTB06Info ()
 
float phi () const
 
int primary () const
 
void saveHit (unsigned int det, double eta, double phi, double e, double t)
 
void setEdep (double simtot, double sime, double simh)
 
void setPrimary (int primary, int id, double energy, double eta, double phi)
 
void setVtxPrim (int evNum, int type, double x, double y, double z, double u, double v, double w, double px, double py, double pz)
 
void setVtxSec (int id, int pdg, double px, double py, double pz, double ek)
 
float simEcE () const
 
float simEtotal () const
 
float simHcE () const
 
Hit simHit (unsigned int i) const
 
float simHitE (unsigned int i) const
 
float simHitEta (unsigned int i) const
 
unsigned int simHitID (unsigned int i) const
 
float simHitPhi (unsigned int i) const
 
HitVector simHits () const
 
float simHitT (unsigned int i) const
 
int vtxPartID (unsigned int i) const
 
float vtxPrimPx () const
 
float vtxPrimPy () const
 
float vtxPrimPz () const
 
float vtxPrimR () const
 
float vtxPrimU () const
 
float vtxPrimV () const
 
float vtxPrimW () const
 
float vtxPrimX () const
 
float vtxPrimY () const
 
float vtxPrimZ () const
 
int vtxSec () const
 
float vtxSecEKin (unsigned int i) const
 
VtxVector vtxSecondaries () const
 
Vtx vtxSecondary (unsigned int i) const
 
float vtxSecPx (unsigned int i) const
 
float vtxSecPy (unsigned int i) const
 
float vtxSecPz (unsigned int i) const
 
int vtxTrackID (unsigned int i) const
 
int vtxType () const
 
virtual ~PHcalTB06Info ()
 

Private Attributes

float digEEc
 
float digEHc
 
float digEtot
 
float eBeam
 
float etaBeam
 
int hit
 
HitVector hits
 
int idBeam
 
int nPrimary
 
float phiBeam
 
float simEEc
 
float simEHc
 
float simEtot
 
int v1EvNum
 
int v1Nsec
 
float v1Px
 
float v1Py
 
float v1Pz
 
float v1R
 
VtxVector v1Sec
 
int v1Type
 
float v1U
 
float v1V
 
float v1W
 
float v1X
 
float v1Y
 
float v1Z
 

Detailed Description

Description: Histogram handling class for analysis

Usage: Simulation information for test beam studies of 2004 Test Beam Contains beam information, hits and digitised results

Definition at line 30 of file PHcalTB06Info.h.

Member Typedef Documentation

typedef std::vector<float> PHcalTB06Info::FloatVector

Definition at line 55 of file PHcalTB06Info.h.

typedef std::vector<Hit> PHcalTB06Info::HitVector

Definition at line 58 of file PHcalTB06Info.h.

typedef std::vector<int> PHcalTB06Info::IntVector

Definition at line 56 of file PHcalTB06Info.h.

typedef std::vector<Vtx> PHcalTB06Info::VtxVector

Definition at line 57 of file PHcalTB06Info.h.

Constructor & Destructor Documentation

PHcalTB06Info::PHcalTB06Info ( )

Definition at line 32 of file PHcalTB06Info.cc.

References clear().

32  {
33  clear();
34 }
PHcalTB06Info::~PHcalTB06Info ( )
virtual

Definition at line 40 of file PHcalTB06Info.cc.

40  {
41 }

Member Function Documentation

void PHcalTB06Info::clear ( void  )

Definition at line 58 of file PHcalTB06Info.cc.

References eBeam, etaBeam, hits, idBeam, nPrimary, phiBeam, simEEc, simEHc, simEtot, v1EvNum, v1Nsec, v1Px, v1Py, v1Pz, v1Sec, v1Type, v1U, v1V, v1W, v1X, v1Y, and v1Z.

Referenced by PHcalTB06Info().

58  {
59  nPrimary = idBeam =0;
60  eBeam = etaBeam = phiBeam = 0;
61 
62  simEtot = simEEc = simEHc = 0;
63 
64  hit = 0;
65  hits.clear();
66 
67  v1EvNum = v1Type = v1Nsec = 0;
68  v1X = v1Y = v1Z = v1U = v1V = v1W = 0;
69  v1Px = v1Py = v1Pz = 0;
70  v1Sec.clear();
71 }
VtxVector v1Sec
HitVector hits
float PHcalTB06Info::eta ( void  ) const
inline

Definition at line 64 of file PHcalTB06Info.h.

References etaBeam.

64 {return etaBeam;}
int PHcalTB06Info::evNum ( ) const
inline

Definition at line 78 of file PHcalTB06Info.h.

References v1EvNum.

Referenced by setVtxPrim().

78 {return v1EvNum;}
float PHcalTB06Info::initE ( ) const
inline

Definition at line 63 of file PHcalTB06Info.h.

References eBeam.

63 {return eBeam;}
int PHcalTB06Info::partID ( ) const
inline

Definition at line 62 of file PHcalTB06Info.h.

References idBeam.

62 {return idBeam;}
float PHcalTB06Info::phi ( void  ) const
inline

Definition at line 65 of file PHcalTB06Info.h.

References phiBeam.

65 {return phiBeam;}
int PHcalTB06Info::primary ( ) const
inline

Definition at line 61 of file PHcalTB06Info.h.

References nPrimary.

Referenced by setPrimary().

61 {return nPrimary;}
void PHcalTB06Info::saveHit ( unsigned int  det,
double  eta,
double  phi,
double  e,
double  t 
)

Definition at line 96 of file PHcalTB06Info.cc.

References PHcalTB06Info::Hit::e, PHcalTB06Info::Hit::eta, hit, hits, PHcalTB06Info::Hit::id, LogDebug, PHcalTB06Info::Hit::phi, and PHcalTB06Info::Hit::t.

Referenced by HcalTB06Analysis::fillEvent().

97  {
98 
99  int nh = hit;
100  hit++;
101  PHcalTB06Info::Hit newHit;
102  newHit.id = id;
103  newHit.eta = (float)(eta);
104  newHit.phi = (float)(phi);
105  newHit.e = (float)(e);
106  newHit.t = (float)(t);
107  hits.push_back(newHit);
108  LogDebug("SimHCalData") << "PHcalTB06Info::saveHit " << hit << " ID 0x"
109  << std::hex << hits[nh].id << std::dec << " Eta "
110  << hits[nh].eta << " Phi " << hits[nh].phi
111  << " E " << hits[nh].e << " t " << hits[nh].t;
112 }
#define LogDebug(id)
float phi() const
Definition: PHcalTB06Info.h:65
unsigned int id
Definition: PHcalTB06Info.h:48
HitVector hits
float eta() const
Definition: PHcalTB06Info.h:64
void PHcalTB06Info::setEdep ( double  simtot,
double  sime,
double  simh 
)

Definition at line 86 of file PHcalTB06Info.cc.

References LogDebug, simEEc, simEHc, and simEtot.

Referenced by HcalTB06Analysis::fillEvent().

86  {
87 
88  simEtot = (float)simtot;
89  simEEc = (float)sime;
90  simEHc = (float)simh;
91 
92  LogDebug("SimHCalData") << "PHcalTB06Info::setEdep: simEtot " << simEtot
93  << " simEEc " << simEEc << " simEHc " << simEHc;
94 }
#define LogDebug(id)
void PHcalTB06Info::setPrimary ( int  primary,
int  id,
double  energy,
double  eta,
double  phi 
)

Definition at line 73 of file PHcalTB06Info.cc.

References eBeam, etaBeam, idBeam, LogDebug, nPrimary, phiBeam, and primary().

Referenced by HcalTB06Analysis::fillEvent().

74  {
75 
76  nPrimary = primary;
77  idBeam = id;
78  eBeam = (float)(energy);
79  etaBeam = (float)(etav);
80  phiBeam = (float)(phiv);
81  LogDebug("SimHCalData") << "PHcalTB06Info::setPrimary: nPrimary " << nPrimary
82  << " partID " << idBeam << " initE " << eBeam
83  << " eta " << etaBeam << " phi " << phiBeam;
84 }
#define LogDebug(id)
int primary() const
Definition: PHcalTB06Info.h:61
void PHcalTB06Info::setVtxPrim ( int  evNum,
int  type,
double  x,
double  y,
double  z,
double  u,
double  v,
double  w,
double  px,
double  py,
double  pz 
)

Definition at line 114 of file PHcalTB06Info.cc.

References evNum(), LogDebug, alignCSCRings::r, mathSSE::sqrt(), v1EvNum, v1Px, v1Py, v1Pz, v1R, v1Type, v1U, v1V, v1W, v1X, v1Y, and v1Z.

Referenced by HcalTB06Analysis::fillEvent().

116  {
117 
118  v1EvNum = evNum;
119  v1Type = type;
120  double r= sqrt(x*x+y*y+z*z);
121  v1X = (float)(x);
122  v1Y = (float)(y);
123  v1Z = (float)(z);
124  v1R = (float)(r);
125  v1Px = (float)(px);
126  v1Py = (float)(py);
127  v1Pz = (float)(pz);
128  v1U = (float)(u);
129  v1V = (float)(v);
130  v1W = (float)(w);
131  LogDebug("SimHCalData") << "PHcalTB06Info::setVtxPrim: EvNum " << v1EvNum
132  << " Type " << v1Type << " X/Y/Z/R " << v1X << "/"
133  << v1Y << "/" << v1Z << "/" << v1R << " Px/Py/Pz "
134  << v1Px << "/" << v1Py << "/" << v1Pz << " U/V/W "
135  << v1U << "/" << v1V << "/" << v1W;
136 }
#define LogDebug(id)
type
Definition: HCALResponse.h:21
float float float z
T sqrt(T t)
Definition: SSEVec.h:48
T w() const
Definition: DDAxes.h:10
int evNum() const
Definition: PHcalTB06Info.h:78
void PHcalTB06Info::setVtxSec ( int  id,
int  pdg,
double  px,
double  py,
double  pz,
double  ek 
)

Definition at line 138 of file PHcalTB06Info.cc.

References PHcalTB06Info::Vtx::eKin, LogDebug, BeamSpotFilterParameters_cfi::newVtx, PHcalTB06Info::Vtx::partID, PHcalTB06Info::Vtx::px, PHcalTB06Info::Vtx::py, PHcalTB06Info::Vtx::pz, PHcalTB06Info::Vtx::trackID, v1Nsec, and v1Sec.

Referenced by HcalTB06Analysis::fillEvent().

139  {
140 
141  int ns = v1Nsec;
142  v1Nsec++;
144  newVtx.trackID = id;
145  newVtx.partID = pdg;
146  newVtx.px = (float)(px);
147  newVtx.py = (float)(py);
148  newVtx.pz = (float)(pz);
149  newVtx.eKin = (float)(ek);
150  v1Sec.push_back(newVtx);
151  LogDebug("SimHCalData") << "PHcalTB06Info::setVtxSec " << v1Nsec << " ID "
152  << v1Sec[ns].trackID << " PDG Code "
153  << v1Sec[ns].partID << " Px/Py/Pz/Ek "
154  << v1Sec[ns].px << "/" << v1Sec[ns].py << "/"
155  << v1Sec[ns].pz << "/" << v1Sec[ns].eKin;
156 }
#define LogDebug(id)
VtxVector v1Sec
float PHcalTB06Info::simEcE ( ) const
inline

Definition at line 67 of file PHcalTB06Info.h.

References simEEc.

67 {return simEEc;}
float PHcalTB06Info::simEtotal ( ) const
inline

Definition at line 66 of file PHcalTB06Info.h.

References simEtot.

66 {return simEtot;}
float PHcalTB06Info::simHcE ( ) const
inline

Definition at line 68 of file PHcalTB06Info.h.

References simEHc.

68 {return simEHc;}
Hit PHcalTB06Info::simHit ( unsigned int  i) const
inline

Definition at line 71 of file PHcalTB06Info.h.

References hits, and i.

71 {return hits[i];}
int i
Definition: DBlmapReader.cc:9
HitVector hits
float PHcalTB06Info::simHitE ( unsigned int  i) const
inline

Definition at line 75 of file PHcalTB06Info.h.

References hits, and i.

75 {return hits[i].e;}
int i
Definition: DBlmapReader.cc:9
HitVector hits
float PHcalTB06Info::simHitEta ( unsigned int  i) const
inline

Definition at line 73 of file PHcalTB06Info.h.

References hits, and i.

73 {return hits[i].eta;}
int i
Definition: DBlmapReader.cc:9
HitVector hits
unsigned int PHcalTB06Info::simHitID ( unsigned int  i) const
inline

Definition at line 72 of file PHcalTB06Info.h.

References hits, and i.

72 {return hits[i].id;}
int i
Definition: DBlmapReader.cc:9
HitVector hits
float PHcalTB06Info::simHitPhi ( unsigned int  i) const
inline

Definition at line 74 of file PHcalTB06Info.h.

References hits, and i.

74 {return hits[i].phi;}
int i
Definition: DBlmapReader.cc:9
HitVector hits
HitVector PHcalTB06Info::simHits ( ) const
inline

Definition at line 70 of file PHcalTB06Info.h.

References hits.

70 {return hits;}
HitVector hits
float PHcalTB06Info::simHitT ( unsigned int  i) const
inline

Definition at line 76 of file PHcalTB06Info.h.

References hits, and i.

76 {return hits[i].t;}
int i
Definition: DBlmapReader.cc:9
HitVector hits
int PHcalTB06Info::vtxPartID ( unsigned int  i) const
inline

Definition at line 94 of file PHcalTB06Info.h.

References i, and v1Sec.

94 {return v1Sec[i].partID;}
int i
Definition: DBlmapReader.cc:9
VtxVector v1Sec
float PHcalTB06Info::vtxPrimPx ( ) const
inline

Definition at line 87 of file PHcalTB06Info.h.

References v1Px.

87 {return v1Px;}
float PHcalTB06Info::vtxPrimPy ( ) const
inline

Definition at line 88 of file PHcalTB06Info.h.

References v1Py.

88 {return v1Py;}
float PHcalTB06Info::vtxPrimPz ( ) const
inline

Definition at line 89 of file PHcalTB06Info.h.

References v1Pz.

89 {return v1Pz;}
float PHcalTB06Info::vtxPrimR ( ) const
inline

Definition at line 83 of file PHcalTB06Info.h.

References v1R.

83 {return v1R;}
float PHcalTB06Info::vtxPrimU ( ) const
inline

Definition at line 84 of file PHcalTB06Info.h.

References v1U.

84 {return v1U;}
float PHcalTB06Info::vtxPrimV ( ) const
inline

Definition at line 85 of file PHcalTB06Info.h.

References v1V.

85 {return v1V;}
float PHcalTB06Info::vtxPrimW ( ) const
inline

Definition at line 86 of file PHcalTB06Info.h.

References v1W.

86 {return v1W;}
float PHcalTB06Info::vtxPrimX ( ) const
inline

Definition at line 80 of file PHcalTB06Info.h.

References v1X.

80 {return v1X;}
float PHcalTB06Info::vtxPrimY ( ) const
inline

Definition at line 81 of file PHcalTB06Info.h.

References v1Y.

81 {return v1Y;}
float PHcalTB06Info::vtxPrimZ ( ) const
inline

Definition at line 82 of file PHcalTB06Info.h.

References v1Z.

82 {return v1Z;}
int PHcalTB06Info::vtxSec ( ) const
inline

Definition at line 90 of file PHcalTB06Info.h.

References v1Nsec.

90 {return v1Nsec;}
float PHcalTB06Info::vtxSecEKin ( unsigned int  i) const
inline

Definition at line 98 of file PHcalTB06Info.h.

References i, and v1Sec.

98 {return v1Sec[i].eKin;}
int i
Definition: DBlmapReader.cc:9
VtxVector v1Sec
VtxVector PHcalTB06Info::vtxSecondaries ( ) const
inline

Definition at line 91 of file PHcalTB06Info.h.

References v1Sec.

91 {return v1Sec;}
VtxVector v1Sec
Vtx PHcalTB06Info::vtxSecondary ( unsigned int  i) const
inline

Definition at line 92 of file PHcalTB06Info.h.

References i, and v1Sec.

92 {return v1Sec[i];}
int i
Definition: DBlmapReader.cc:9
VtxVector v1Sec
float PHcalTB06Info::vtxSecPx ( unsigned int  i) const
inline

Definition at line 95 of file PHcalTB06Info.h.

References i, and v1Sec.

95 {return v1Sec[i].px;}
int i
Definition: DBlmapReader.cc:9
VtxVector v1Sec
float PHcalTB06Info::vtxSecPy ( unsigned int  i) const
inline

Definition at line 96 of file PHcalTB06Info.h.

References i, and v1Sec.

96 {return v1Sec[i].py;}
int i
Definition: DBlmapReader.cc:9
VtxVector v1Sec
float PHcalTB06Info::vtxSecPz ( unsigned int  i) const
inline

Definition at line 97 of file PHcalTB06Info.h.

References i, and v1Sec.

97 {return v1Sec[i].pz;}
int i
Definition: DBlmapReader.cc:9
VtxVector v1Sec
int PHcalTB06Info::vtxTrackID ( unsigned int  i) const
inline

Definition at line 93 of file PHcalTB06Info.h.

References i, and v1Sec.

93 {return v1Sec[i].trackID;}
int i
Definition: DBlmapReader.cc:9
VtxVector v1Sec
int PHcalTB06Info::vtxType ( ) const
inline

Definition at line 79 of file PHcalTB06Info.h.

References v1Type.

79 {return v1Type;}

Member Data Documentation

float PHcalTB06Info::digEEc
private

Definition at line 125 of file PHcalTB06Info.h.

float PHcalTB06Info::digEHc
private

Definition at line 125 of file PHcalTB06Info.h.

float PHcalTB06Info::digEtot
private

Definition at line 125 of file PHcalTB06Info.h.

float PHcalTB06Info::eBeam
private

Definition at line 121 of file PHcalTB06Info.h.

Referenced by clear(), initE(), and setPrimary().

float PHcalTB06Info::etaBeam
private

Definition at line 121 of file PHcalTB06Info.h.

Referenced by clear(), eta(), and setPrimary().

int PHcalTB06Info::hit
private

Definition at line 128 of file PHcalTB06Info.h.

Referenced by saveHit().

HitVector PHcalTB06Info::hits
private
int PHcalTB06Info::idBeam
private

Definition at line 120 of file PHcalTB06Info.h.

Referenced by clear(), partID(), and setPrimary().

int PHcalTB06Info::nPrimary
private

Definition at line 120 of file PHcalTB06Info.h.

Referenced by clear(), primary(), and setPrimary().

float PHcalTB06Info::phiBeam
private

Definition at line 121 of file PHcalTB06Info.h.

Referenced by clear(), phi(), and setPrimary().

float PHcalTB06Info::simEEc
private

Definition at line 124 of file PHcalTB06Info.h.

Referenced by clear(), setEdep(), and simEcE().

float PHcalTB06Info::simEHc
private

Definition at line 124 of file PHcalTB06Info.h.

Referenced by clear(), setEdep(), and simHcE().

float PHcalTB06Info::simEtot
private

Definition at line 124 of file PHcalTB06Info.h.

Referenced by clear(), setEdep(), and simEtotal().

int PHcalTB06Info::v1EvNum
private

Definition at line 132 of file PHcalTB06Info.h.

Referenced by clear(), evNum(), and setVtxPrim().

int PHcalTB06Info::v1Nsec
private

Definition at line 132 of file PHcalTB06Info.h.

Referenced by clear(), setVtxSec(), and vtxSec().

float PHcalTB06Info::v1Px
private

Definition at line 134 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimPx().

float PHcalTB06Info::v1Py
private

Definition at line 134 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimPy().

float PHcalTB06Info::v1Pz
private

Definition at line 134 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimPz().

float PHcalTB06Info::v1R
private

Definition at line 133 of file PHcalTB06Info.h.

Referenced by setVtxPrim(), and vtxPrimR().

VtxVector PHcalTB06Info::v1Sec
private
int PHcalTB06Info::v1Type
private

Definition at line 132 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxType().

float PHcalTB06Info::v1U
private

Definition at line 133 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimU().

float PHcalTB06Info::v1V
private

Definition at line 133 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimV().

float PHcalTB06Info::v1W
private

Definition at line 133 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimW().

float PHcalTB06Info::v1X
private

Definition at line 133 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimX().

float PHcalTB06Info::v1Y
private

Definition at line 133 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimY().

float PHcalTB06Info::v1Z
private

Definition at line 133 of file PHcalTB06Info.h.

Referenced by clear(), setVtxPrim(), and vtxPrimZ().