CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2_patch1/src/SimDataFormats/SLHC/interface/L1TowerJet.h

Go to the documentation of this file.
00001 #ifndef L1TowerJet_h
00002 #define L1TowerJet_h
00003 
00004 /* 
00005    This class describves the L1 Reconstructed jet M.Bachtis,S.Dasu University of Wisconsin - Madison */
00006 
00007 #include "DataFormats/Math/interface/LorentzVector.h"
00008 #include <vector>
00009 #include "SimDataFormats/SLHC/interface/L1CaloTowerFwd.h"
00010 #include "SimDataFormats/SLHC/interface/L1CaloTower.h"
00011 
00012 
00013 namespace l1slhc
00014 {
00015 
00016         class L1TowerJet
00017         {
00018 
00019           public:
00020 
00021                 enum tJetShape
00022                 {
00023                         square,
00024                         circle
00025                 };
00026 
00027           public:
00028 
00029                 L1TowerJet( );
00030                 L1TowerJet( const int& aJetSize, const L1TowerJet::tJetShape& aJetShapeType , const int& aJetArea );
00031                 L1TowerJet( const int& aJetSize, const L1TowerJet::tJetShape& aJetShapeType , const int& aJetArea , const int& iEta, const int& iPhi);
00032                  ~L1TowerJet(  );
00033 
00034                 // getters
00035                 const int& iEta(  ) const;
00036                 const int& iPhi(  ) const;
00037                 const int& E(  ) const;
00038                 const bool& central(  ) const;
00039 
00040                 //asymmetry member variables
00041                 const int& AsymEta(  ) const;
00042                 const int& AsymPhi(  ) const;
00043 
00044                 //weighted iEta, iPhi
00045                 const double& iWeightedEta( ) const;
00046                 const double& iWeightedPhi( ) const;
00047 
00048                 const double& WeightedEta( ) const;
00049                 const double& WeightedPhi( ) const;
00050 
00051                 const math::PtEtaPhiMLorentzVector& p4(  ) const;       // returns LorentzVector in eta,phi space
00052                 const int& JetSize(  ) const;
00053                 const L1TowerJet::tJetShape& JetShape(  ) const;
00054 
00055                 const int& JetArea(  ) const;
00056 
00057 //              possibly helpful methods
00058 //              double EcalVariance(  ) const;
00059 //              double HcalVariance(  ) const;
00060 //              double EnergyVariance(  ) const;
00061 
00062                 double EcalMAD() const;
00063                 double HcalMAD() const;
00064                 double EnergyMAD() const;
00065 
00066                 // Setters
00067 
00068                 void setP4( const math::PtEtaPhiMLorentzVector & p4 );
00069                 void setCentral( const bool& );
00070 //              void setE( const int& );
00071 
00072                 void CalcWeightediEta();
00073                 void CalcWeightediPhi();
00074 
00075                 void calculateWeightedEta( );
00076                 void calculateWeightedPhi();
00077 
00078 
00079 
00080 
00081                 void addConstituent( const L1CaloTowerRef & Tower );
00082                 L1CaloTowerRefVector::iterator getConstituent( const int& eta , const int& phi );
00083                 void removeConstituent( const int& eta , const int& phi );
00084                 
00085                 const L1CaloTowerRefVector& getConstituents(  ) const;
00086 
00087 
00088 
00089           private:
00090                 int mIeta;
00091                 int mIphi;
00092                 int mE;
00093                 bool mCentral;
00094 
00095                 //add asym
00096                 int mAsymEta;
00097                 int mAsymPhi;
00098 
00099                 //weighted eta and phi
00100                 double mWeightedIeta;
00101                 double mWeightedIphi;
00102                 double mWeightedEta;
00103                 double mWeightedPhi;
00104 
00105 
00106                 int mJetSize;
00107                 L1TowerJet::tJetShape mJetShapeType;
00108                 int mJetArea;
00109 
00110 
00111                 L1CaloTowerRefVector mConstituents;
00112                 math::PtEtaPhiMLorentzVector mP4;
00113 
00114 
00115                 double MAD( std::deque<int>& aDataSet ) const;
00116 
00117         };
00118 
00119 
00120 }
00121 
00122 
00123 // Sorting functor
00124 namespace std{
00125         bool operator< ( const l1slhc::L1TowerJet & aLeft,  const l1slhc::L1TowerJet & aRight );
00126 }
00127 
00128 
00129 std::ostream & operator<<( std::ostream & , const l1slhc::L1TowerJet & );
00130 
00131 #endif