#include <Validation/HcalHits/interface/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 | ( | ) |
SimG4HcalHitCluster::~SimG4HcalHitCluster | ( | ) | [virtual] |
double SimG4HcalHitCluster::collectEcalEnergyR | ( | ) |
Definition at line 57 of file SimG4HcalHitCluster.cc.
00057 { 00058 00059 double sum = 0.; 00060 std::vector<CaloHit>::iterator itr; 00061 00062 for (itr = hitsc.begin(); itr < hitsc.end(); itr++) { 00063 if (itr->det() == 10 || itr->det() == 11 || itr->det() == 12) { 00064 sum += itr->e(); 00065 } 00066 } 00067 return sum; 00068 }
double SimG4HcalHitCluster::e | ( | ) | const [inline] |
Definition at line 19 of file SimG4HcalHitCluster.h.
References ec.
Referenced by operator<(), and operator<<().
00019 {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().
00020 {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.
00017 { 00018 00019 hitsc.push_back(hit); 00020 00021 if (ec == 0. && etac == 0. && phic == 0.) { 00022 ec = hit.e(); 00023 etac = hit.eta(); 00024 phic = hit.phi(); 00025 } else { 00026 // cluster px,py,pz 00027 double et = ec / my_cosh(etac); 00028 double px = et * cos(phic); 00029 double py = et * sin(phic); 00030 double pz = et * my_sinh(etac); 00031 00032 HepLorentzVector clusHLV(px,py,pz,ec); 00033 00034 // hit px,py,pz 00035 double eh = hit.e(); 00036 double etah = hit.eta(); 00037 double phih = hit.phi(); 00038 et = eh / my_cosh(etah); 00039 px = et * cos(phih); 00040 py = et * sin(phih); 00041 pz = et * my_sinh(etah); 00042 00043 HepLorentzVector hitHLV(px,py,pz,eh); 00044 00045 // clus + hit 00046 clusHLV += hitHLV; 00047 00048 double theta = clusHLV.theta(); 00049 etac = -log(tan(theta/2.)); 00050 phic = clusHLV.phi(); 00051 ec = clusHLV.t(); 00052 } 00053 00054 return *this; 00055 }
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().
00021 {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] |