00001 #ifndef L1CaloCluster_h 00002 #define L1CaloCluster_h 00003 00004 00005 #include <ostream> 00006 /* This ClassDescribes the 2x2 cluster thing 0|1 - - The Cluster reference point is 0 (ieta,iphi)=0,0 2|3 00007 00008 M.Bachtis, S.Dasu University of Wisconsin-Madison */ 00009 00010 #include "DataFormats/Math/interface/LorentzVector.h" 00011 #include "SimDataFormats/SLHC/interface/L1CaloTower.h" 00012 #include "SimDataFormats/SLHC/interface/L1CaloTowerFwd.h" 00013 00014 namespace l1slhc 00015 { 00016 00017 class L1CaloCluster 00018 { 00019 00020 friend bool operator==( const l1slhc::L1CaloCluster & a, const l1slhc::L1CaloCluster & b ) 00021 { 00022 if ( a.mIeta != b.mIeta ) 00023 return false; 00024 if ( a.mIphi != b.mIphi ) 00025 return false; 00026 if ( a.mFg != b.mFg ) 00027 return false; 00028 if ( a.mEgamma != b.mEgamma ) 00029 return false; 00030 if ( a.mLeadtowertau != b.mLeadtowertau ) 00031 return false; 00032 if ( a.mEgammavalue != b.mEgammavalue ) 00033 return false; 00034 if ( a.mInnereta != b.mInnereta ) 00035 return false; 00036 if ( a.mInnerphi != b.mInnerphi ) 00037 return false; 00038 if ( a.mIsoclusterseg != b.mIsoclusterseg ) 00039 return false; 00040 if ( a.mIsoclusterstau != b.mIsoclusterstau ) 00041 return false; 00042 if ( a.mIsoeg != b.mIsoeg ) 00043 return false; 00044 if ( a.mIsotau != b.mIsotau ) 00045 return false; 00046 if ( a.mCentral != b.mCentral ) 00047 return false; 00048 if ( a.mE != b.mE ) 00049 return false; 00050 if ( a.mP4 != b.mP4 ) 00051 return false; 00052 return true; 00053 } 00054 00055 00056 public: 00057 L1CaloCluster( ); 00058 L1CaloCluster( const int &, const int & ); 00059 ~L1CaloCluster( ); 00060 00061 void setFg( const bool & ); // Set FG Bit 00062 void setEGamma( const bool & ); // Set EGamma Bit 00063 void setEGammaValue( const int & ); // Set EGamma Value E/E+H (%) 00064 void setIsoClusters( const int &, const int & ); // Number of isolated objectsisolation Clusters 00065 void setIsoEnergy( const int &, const int & ); // Energy of Isolation 00066 void setIsoEG( const bool & ); // EG isolation 00067 void setIsoTau( const bool & ); // Tau isolation 00068 void setCentral( const bool & ); // Central Bit 00069 void setLeadTower( const bool & ); // Lead Tower over threshold bit for taus 00070 void setLorentzVector( const math::PtEtaPhiMLorentzVector & ); // Central Bit 00071 void setPosBits( const int &, const int & ); 00072 void setConstituents( const L1CaloTowerRefVector & ); 00073 void setE( const int & ); 00074 void setLeadTowerE( const int & ); 00075 void setSecondTowerE( const int & ); 00076 void setThirdTowerE( const int & ); 00077 void setFourthTowerE( const int & ); 00078 void setRing1E( const int & ); 00079 void setRing2E( const int & ); 00080 void setRing3E( const int & ); 00081 void setRing4E( const int & ); 00082 void addConstituent( const L1CaloTowerRef & ); 00083 int hasConstituent( const int &, const int & ); 00084 void removeConstituent( const int &, const int & ); 00085 00086 // Get Functions 00087 const int &iEta( ) const; // Eta of origin in integer coordinates 00088 const int &iPhi( ) const; // Phi of Origin in integer 00089 const int &E( ) const; // Compressed Et 00090 const int &LeadTowerE( ) const; // Lead Tower Et 00091 const int &SecondTowerE( ) const; // Lead Tower Et 00092 const int &ThirdTowerE( ) const; // Lead Tower Et 00093 const int &FourthTowerE( ) const; // Lead Tower Et 00094 const int &Ring1E( ) const; // Lead Tower Et 00095 const int &Ring2E( ) const; // Lead Tower Et 00096 const int &Ring3E( ) const; // Lead Tower Et 00097 const int &Ring4E( ) const; // Lead Tower Et 00098 const int &innerEta( ) const; // Weighted position eta 00099 const int &innerPhi( ) const; // Weighted position phi 00100 const L1CaloTowerRefVector & getConstituents( ) const; 00101 L1CaloTowerRef getConstituent( const int & ); 00102 00103 00104 00105 00106 00107 // Electron Variables 00108 const bool & fg( ) const; // Finegrain bit 00109 const bool & eGamma( ) const; // Electron/Photon bit 00110 const int &eGammaValue( ) const; // Electron/Photon bit 00111 00112 // isolation Variables 00113 const bool & isCentral( ) const; // Means that the cluster was not pruned during isolation 00114 const bool & isoEG( ) const; // Egamma Isolatioon 00115 const bool & isoTau( ) const; // Tau isolation 00116 const int &isoClustersEG( ) const; // 2x2 isolation clusters for Egamma cuts 00117 const int &isoClustersTau( ) const; // 2x2 isolation clusters for Tau Cut 00118 const int &isoEnergyEG( ) const; // 2x2 isolation clusters for Egamma cuts 00119 const int &isoEnergyTau( ) const; // 2x2 isolation clusters for Egamma cuts 00120 const bool & hasLeadTower( ) const; 00121 00122 // Trigger Results 00123 bool isEGamma( ) const; // Returns the EGAMMA decision 00124 bool isIsoEGamma( ) const; // Returns the iso EGAMMA decision 00125 bool isTau( ) const; // returns The Tau decison 00126 bool isIsoTau( ) const; // returns The Tau decison 00127 00128 const math::PtEtaPhiMLorentzVector & p4( ) const; // returns Physics wise LorentzVector in eta,phi continuous space 00129 00130 00131 00132 private: 00133 // Refs to teh caloTowwers 00134 L1CaloTowerRefVector mConstituents; 00135 00136 // Coordinates of the reference Point 00137 int mIeta; 00138 int mIphi; 00139 int mE; 00140 int mLeadTowerE; //Lead Tower Energy 00141 int mSecondTowerE; //Lead Tower Energy 00142 int mThirdTowerE; //Lead Tower Energy 00143 int mFourthTowerE; //Lead Tower Energy 00144 int mRing1E; //Lead Tower Energy 00145 int mRing2E; //Lead Tower Energy 00146 int mRing3E; //Lead Tower Energy 00147 int mRing4E; //Lead Tower Energy 00148 // FineGrain / EGamma /Isolations 00149 00150 bool mFg; 00151 bool mEgamma; 00152 bool mCentral; 00153 bool mIsoeg; 00154 bool mLeadtowertau; 00155 bool mIsotau; 00156 int mEgammavalue; 00157 int mInnereta; 00158 int mInnerphi; 00159 int mIsoclusterseg; 00160 int mIsoenergyeg; 00161 int mIsoenergytau; 00162 int mIsoclusterstau; 00163 00164 math::PtEtaPhiMLorentzVector mP4; // Lorentz Vector of precise position 00165 00166 }; 00167 00168 } 00169 00170 // Sorting functor 00171 namespace std{ 00172 bool operator< ( const l1slhc::L1CaloCluster & aLeft, const l1slhc::L1CaloCluster & aRight ); 00173 } 00174 00175 std::ostream & operator<<( std::ostream & , const l1slhc::L1CaloCluster & ); 00176 00177 00178 #endif