Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:32:27

0001 ///////////////////////////////////////////////////////////////////////////////
0002 // File: SimG4HcalHitCluster.h
0003 // Cluster class for analysis in SimG4HcalValidation
0004 ///////////////////////////////////////////////////////////////////////////////
0005 #ifndef Validation_HcalHits_SimG4HcalHitCluster_H
0006 #define Validation_HcalHits_SimG4HcalHitCluster_H
0007 
0008 #include "SimDataFormats/CaloHit/interface/CaloHit.h"
0009 #include <iostream>
0010 #include <vector>
0011 
0012 class SimG4HcalHitCluster {
0013 public:
0014   SimG4HcalHitCluster();
0015   ~SimG4HcalHitCluster() = default;
0016 
0017   double e() const { return ec; }
0018   double eta() const { return etac; }
0019   double phi() const { return phic; }
0020   std::vector<CaloHit> *getHits() { return &hitsc; }
0021 
0022   bool operator<(const SimG4HcalHitCluster &cluster) const;
0023   SimG4HcalHitCluster &operator+=(const CaloHit &hit);
0024 
0025   double collectEcalEnergyR();
0026 
0027 private:
0028   double my_cosh(float eta) { return 0.5 * (exp(eta) + exp(-eta)); }
0029   double my_sinh(float eta) { return 0.5 * (exp(eta) - exp(-eta)); }
0030 
0031   double ec, etac, phic;
0032   std::vector<CaloHit> hitsc;
0033 };
0034 
0035 std::ostream &operator<<(std::ostream &, const SimG4HcalHitCluster &);
0036 
0037 #endif