00001 00002 // File: SimG4HcalHitCluster.h 00003 // Cluster class for analysis in SimG4HcalValidation 00005 #ifndef Validation_HcalHits_SimG4HcalHitCluster_H 00006 #define Validation_HcalHits_SimG4HcalHitCluster_H 00007 00008 #include "SimDataFormats/CaloHit/interface/CaloHit.h" 00009 #include <iostream> 00010 #include <vector> 00011 00012 class SimG4HcalHitCluster { 00013 00014 public: 00015 00016 SimG4HcalHitCluster(); 00017 virtual ~SimG4HcalHitCluster(); 00018 00019 double e() const {return ec;} 00020 double eta() const {return etac;} 00021 double phi() const {return phic;} 00022 std::vector<CaloHit> * getHits() {return &hitsc;} 00023 00024 bool operator<(const SimG4HcalHitCluster& cluster) const; 00025 SimG4HcalHitCluster& operator+=(const CaloHit& hit); 00026 00027 double collectEcalEnergyR(); 00028 00029 private: 00030 00031 double my_cosh(float eta) {return 0.5 * (exp(eta) + exp(-eta));} 00032 double my_sinh(float eta) {return 0.5 * (exp(eta) - exp(-eta));} 00033 00034 double ec, etac, phic; 00035 std::vector<CaloHit> hitsc; 00036 00037 }; 00038 00039 std::ostream& operator<<(std::ostream&, const SimG4HcalHitCluster&); 00040 00041 #endif