#include <SimG4HcalHitCluster.h>
Public Member Functions | |
double | collectEcalEnergyR () |
double | e () const |
double | eta () const |
std::vector< CaloHit > * | getHits () |
SimG4HcalHitCluster & | operator+= (const CaloHit &hit) |
bool | operator< (const SimG4HcalHitCluster &cluster) const |
double | phi () const |
SimG4HcalHitCluster () | |
virtual | ~SimG4HcalHitCluster () |
Private Member Functions | |
double | my_cosh (float eta) |
double | my_sinh (float eta) |
Private Attributes | |
double | ec |
double | etac |
std::vector< CaloHit > | hitsc |
double | phic |
Definition at line 12 of file SimG4HcalHitCluster.h.
SimG4HcalHitCluster::SimG4HcalHitCluster | ( | ) |
Definition at line 9 of file SimG4HcalHitCluster.cc.
SimG4HcalHitCluster::~SimG4HcalHitCluster | ( | ) | [virtual] |
Definition at line 11 of file SimG4HcalHitCluster.cc.
{}
double SimG4HcalHitCluster::collectEcalEnergyR | ( | ) |
Definition at line 57 of file SimG4HcalHitCluster.cc.
References hitsc.
double SimG4HcalHitCluster::e | ( | ) | const [inline] |
Definition at line 19 of file SimG4HcalHitCluster.h.
References ec.
Referenced by operator<(), and operator<<().
{return ec;}
double SimG4HcalHitCluster::eta | ( | void | ) | const [inline] |
Definition at line 20 of file SimG4HcalHitCluster.h.
References etac.
Referenced by operator<(), operator<<(), and SimG4HcalHitJetFinder::rDist().
{return etac;}
std::vector<CaloHit>* SimG4HcalHitCluster::getHits | ( | ) | [inline] |
double SimG4HcalHitCluster::my_cosh | ( | float | eta | ) | [inline, private] |
Definition at line 31 of file SimG4HcalHitCluster.h.
References funct::exp().
Referenced by operator+=().
double SimG4HcalHitCluster::my_sinh | ( | float | eta | ) | [inline, private] |
Definition at line 32 of file SimG4HcalHitCluster.h.
References funct::exp().
Referenced by operator+=().
SimG4HcalHitCluster & SimG4HcalHitCluster::operator+= | ( | const CaloHit & | hit | ) |
Definition at line 17 of file SimG4HcalHitCluster.cc.
References funct::cos(), CaloHit::e(), ec, CaloHit::eta(), etac, hitsc, funct::log(), my_cosh(), my_sinh(), CaloHit::phi(), phic, funct::sin(), funct::tan(), and theta().
{ hitsc.push_back(hit); if (ec == 0. && etac == 0. && phic == 0.) { ec = hit.e(); etac = hit.eta(); phic = hit.phi(); } else { // cluster px,py,pz double et = ec / my_cosh(etac); double px = et * cos(phic); double py = et * sin(phic); double pz = et * my_sinh(etac); CLHEP::HepLorentzVector clusHLV(px,py,pz,ec); // hit px,py,pz double eh = hit.e(); double etah = hit.eta(); double phih = hit.phi(); et = eh / my_cosh(etah); px = et * cos(phih); py = et * sin(phih); pz = et * my_sinh(etah); CLHEP::HepLorentzVector hitHLV(px,py,pz,eh); // clus + hit clusHLV += hitHLV; double theta = clusHLV.theta(); etac = -log(tan(theta/2.)); phic = clusHLV.phi(); ec = clusHLV.t(); } return *this; }
bool SimG4HcalHitCluster::operator< | ( | const SimG4HcalHitCluster & | cluster | ) | const |
double SimG4HcalHitCluster::phi | ( | void | ) | const [inline] |
Definition at line 21 of file SimG4HcalHitCluster.h.
References phic.
Referenced by operator<<(), and SimG4HcalHitJetFinder::rDist().
{return phic;}
double SimG4HcalHitCluster::ec [private] |
Definition at line 34 of file SimG4HcalHitCluster.h.
Referenced by e(), operator+=(), and operator<().
double SimG4HcalHitCluster::etac [private] |
Definition at line 34 of file SimG4HcalHitCluster.h.
Referenced by eta(), operator+=(), and operator<().
std::vector<CaloHit> SimG4HcalHitCluster::hitsc [private] |
Definition at line 35 of file SimG4HcalHitCluster.h.
Referenced by collectEcalEnergyR(), getHits(), and operator+=().
double SimG4HcalHitCluster::phic [private] |
Definition at line 34 of file SimG4HcalHitCluster.h.
Referenced by operator+=(), and phi().