Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-03-17 10:49:19

0001 #ifndef CastorReco_CastorJet_h
0002 #define CastorReco_CastorJet_h
0003 /** \class reco::CastorJet CastorJet.h DataFormats/CastorReco/CastorJet.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 CastorJet : public CastorCluster {
0018   public:
0019     /// default constructor. Sets energy to zero
0020     CastorJet() : energycal_(0.) {}
0021 
0022     /// constructor from values
0023     CastorJet(const double energycal, const CastorClusterRef& usedCluster);
0024 
0025     /// destructor
0026     ~CastorJet() override;
0027 
0028     /// Jet energy
0029     double energy() const { return (*usedCluster_).energy(); }
0030 
0031     /// Jet energycal
0032     double energycal() const { return energycal_; }
0033 
0034     /// Jet 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 CastorJet& rhs) const { return (energycal_ >= rhs.energycal_); }
0042 
0043     /// comparison > operator
0044     bool operator>(const CastorJet& rhs) const { return (energycal_ > rhs.energycal_); }
0045 
0046     /// comparison <= operator
0047     bool operator<=(const CastorJet& rhs) const { return (energycal_ <= rhs.energycal_); }
0048 
0049     /// comparison <= operator
0050     bool operator<(const CastorJet& rhs) const { return (energycal_ < rhs.energycal_); }
0051 
0052     /// Jet em energy
0053     double emEnergy() const { return (*usedCluster_).emEnergy(); }
0054 
0055     /// Jet had energy
0056     double hadEnergy() const { return (*usedCluster_).hadEnergy(); }
0057 
0058     /// Jet em/tot ratio
0059     double fem() const { return (*usedCluster_).fem(); }
0060 
0061     /// Jet width in phi
0062     double width() const { return (*usedCluster_).width(); }
0063 
0064     /// Jet depth in z
0065     double depth() const { return (*usedCluster_).depth(); }
0066 
0067     /// Jet hotcell/tot ratio
0068     double fhot() const { return (*usedCluster_).fhot(); }
0069 
0070     /// Jet sigma z
0071     double sigmaz() const { return (*usedCluster_).sigmaz(); }
0072 
0073     /// pseudorapidity of Jet centroid
0074     double eta() const { return (*usedCluster_).eta(); }
0075 
0076     /// azimuthal angle of Jet centroid
0077     double phi() const { return (*usedCluster_).phi(); }
0078 
0079     /// x of Jet centroid
0080     double x() const { return (*usedCluster_).x(); }
0081 
0082     /// y of Jet centroid
0083     double y() const { return (*usedCluster_).y(); }
0084 
0085     /// rho of Jet centroid
0086     double rho() const { return (*usedCluster_).rho(); }
0087 
0088   private:
0089     /// Jet energycal
0090     double energycal_;
0091 
0092     /// used CastorClusters
0093     CastorClusterRef usedCluster_;
0094   };
0095 
0096   // define CastorJetCollection
0097   typedef std::vector<CastorJet> CastorJetCollection;
0098 
0099 }  // namespace reco
0100 
0101 #endif