Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:03:49

0001 #ifndef CastorReco_CastorEgamma_h
0002 #define CastorReco_CastorEgamma_h
0003 /** \class reco::CastorEgamma CastorEgamma.h DataFormats/CastorReco/CastorEgamma.h
0004  *  
0005  * Class for Castor electrons/photons
0006  *
0007  * \author Hans Van Haevermaet, University of Antwerp
0008  *
0009  *
0010  */
0011 #include <vector>
0012 #include "DataFormats/Math/interface/Point3D.h"
0013 #include "DataFormats/CastorReco/interface/CastorCluster.h"
0014 
0015 namespace reco {
0016 
0017   class CastorEgamma : public CastorCluster {
0018   public:
0019     /// default constructor. Sets energy to zero
0020     CastorEgamma() : energycal_(0.) {}
0021 
0022     /// constructor from values
0023     CastorEgamma(const double energycal, const CastorClusterRef& usedCluster);
0024 
0025     /// destructor
0026     ~CastorEgamma() override;
0027 
0028     /// Egamma energy
0029     double energy() const { return (*usedCluster_).energy(); }
0030 
0031     /// Egamma energycal
0032     double energycal() const { return energycal_; }
0033 
0034     /// Egamma centroid position
0035     ROOT::Math::XYZPoint position() const { return (*usedCluster_).position(); }
0036 
0037     /// vector of used Clusters
0038     CastorClusterRef getUsedCluster() const { return usedCluster_; }
0039 
0040     /// comparison >= operator
0041     bool operator>=(const CastorEgamma& rhs) const { return (energycal_ >= rhs.energycal_); }
0042 
0043     /// comparison > operator
0044     bool operator>(const CastorEgamma& rhs) const { return (energycal_ > rhs.energycal_); }
0045 
0046     /// comparison <= operator
0047     bool operator<=(const CastorEgamma& rhs) const { return (energycal_ <= rhs.energycal_); }
0048 
0049     /// comparison <= operator
0050     bool operator<(const CastorEgamma& rhs) const { return (energycal_ < rhs.energycal_); }
0051 
0052     /// Egamma em energy
0053     double emEnergy() const { return (*usedCluster_).emEnergy(); }
0054 
0055     /// Egamma had energy
0056     double hadEnergy() const { return (*usedCluster_).hadEnergy(); }
0057 
0058     /// Egamma em/tot ratio
0059     double fem() const { return (*usedCluster_).fem(); }
0060 
0061     /// Egamma width in phi
0062     double width() const { return (*usedCluster_).width(); }
0063 
0064     /// Egamma depth in z
0065     double depth() const { return (*usedCluster_).depth(); }
0066 
0067     /// Egamma hotcell/tot ratio
0068     double fhot() const { return (*usedCluster_).fhot(); }
0069 
0070     /// Egamma sigma z
0071     double sigmaz() const { return (*usedCluster_).sigmaz(); }
0072 
0073     /// pseudorapidity of Egamma centroid
0074     double eta() const { return (*usedCluster_).eta(); }
0075 
0076     /// azimuthal angle of Egamma centroid
0077     double phi() const { return (*usedCluster_).phi(); }
0078 
0079     /// x of Egamma centroid
0080     double x() const { return (*usedCluster_).x(); }
0081 
0082     /// y of Egamma centroid
0083     double y() const { return (*usedCluster_).y(); }
0084 
0085     /// rho of Egamma centroid
0086     double rho() const { return (*usedCluster_).rho(); }
0087 
0088   private:
0089     /// Egamma energycal
0090     double energycal_;
0091 
0092     /// used CastorClusters
0093     CastorClusterRef usedCluster_;
0094   };
0095 
0096   // define CastorEgammaCollection
0097   typedef std::vector<CastorEgamma> CastorEgammaCollection;
0098 
0099 }  // namespace reco
0100 
0101 #endif