00001
00002
00003 #ifndef XAODEGAMMA_VERSIONS_EGAMMA_V1_H
00004 #define XAODEGAMMA_VERSIONS_EGAMMA_V1_H
00005
00006
00007 #include "AthLinks/ElementLink.h"
00008
00009
00010 #include "xAODBase/IParticle.h"
00011
00012
00013 #include "xAODEgamma/EgammaDefs.h"
00014 #include "xAODEgamma/EgammaEnums.h"
00015
00016
00017 #include "xAODCaloEvent/CaloCluster.h"
00018 #include "xAODCaloEvent/CaloClusterContainer.h"
00019
00020
00021 #include "xAODPrimitives/IsolationCorrection.h"
00022 #include "xAODPrimitives/IsolationType.h"
00023 #include "xAODPrimitives/IsolationFlavour.h"
00024
00025
00026 #include "EventPrimitives/EventPrimitives.h"
00027
00028
00029 #include "CxxUtils/final.h"
00030 #include "CxxUtils/override.h"
00031
00032 #include <stdint.h>
00033
00034 namespace xAOD {
00035
00048 class Egamma_v1 :public IParticle {
00049
00050 protected:
00055
00057
00059 Egamma_v1();
00060
00062 Egamma_v1(const Egamma_v1& eg );
00064
00065 public:
00066
00069
00071 Egamma_v1& operator=(const Egamma_v1& eg);
00072
00074
00075
00079
00081 virtual double pt() const ATH_FINAL;
00082
00084 virtual double eta() const ATH_FINAL;
00085
00087 virtual double phi() const ATH_FINAL;
00088
00090 virtual double m() const ATH_FINAL;
00091
00093 virtual double e() const ATH_FINAL;
00094
00096 virtual double rapidity() const ATH_FINAL;
00097
00099 typedef IParticle::FourMom_t FourMom_t;
00100
00102 virtual const FourMom_t& p4() const ATH_FINAL;
00103
00105 virtual Type::ObjectType type() const ATH_OVERRIDE =0 ;
00106
00108
00109
00112
00114 void setP4(float pt, float eta, float phi, float m);
00115
00117 void setPt(float pt);
00118
00120 void setEta(float eta);
00121
00123 void setPhi(float phi);
00124
00126 void setM(float m);
00127
00129
00132
00134 typedef Eigen::Matrix<float,4,4> EgammaCovMatrix_t;
00135
00137 EgammaCovMatrix_t covMatrix() const;
00138
00140 void setCovMatrix(const EgammaCovMatrix_t& cov);
00142
00145
00148 size_t nCaloClusters() const;
00149
00152 const xAOD::CaloCluster* caloCluster( size_t index = 0 ) const;
00153
00156 const ElementLink< CaloClusterContainer >&
00157 caloClusterLink( size_t index = 0 ) const;
00158
00160 typedef std::vector< ElementLink< CaloClusterContainer > > CLELVec_t;
00161
00163 const CLELVec_t& caloClusterLinks() const;
00165 void setCaloClusterLinks( const CLELVec_t& links );
00166
00168
00169
00172
00174 uint16_t author(uint16_t bitmask=EgammaParameters::AuthorALL) const;
00175
00177 void addAuthor( uint16_t );
00178
00180 void setAuthor( uint16_t );
00181
00183
00184
00190
00192 bool showerShapeValue(float& value,const EgammaParameters::ShowerShapeType information) const;
00193
00196 float showerShapeValue(const EgammaParameters::ShowerShapeType information) const;
00197
00199 bool setShowerShapeValue(float value, const EgammaParameters::ShowerShapeType information) ;
00200
00202
00208
00210 bool isolation(float& value, const Iso::IsolationType information) const;
00211
00214 float isolation(const Iso::IsolationType information) const;
00215
00217 bool setIsolation(float value, const Iso::IsolationType information);
00218
00219
00221 bool isolationValue(float& value, const Iso::IsolationType information) const{
00222
00223 return isolation(value,information);
00224 }
00227 float isolationValue(const Iso::IsolationType information) const{
00228
00229 return isolation(information);
00230 }
00232 bool setIsolationValue(float value, const Iso::IsolationType information){
00233 return setIsolation(value,information);
00234 }
00235
00237
00238
00244
00246 bool isolationCaloCorrection(float& value, const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection corr,
00247 const Iso::IsolationCorrectionParameter param) const;
00248
00251 float isolationCaloCorrection(const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection corr,
00252 const Iso::IsolationCorrectionParameter param) const;
00253
00255 bool setIsolationCaloCorrection(float value, const Iso::IsolationFlavour flavour, const Iso::IsolationCaloCorrection corr,
00256 const Iso::IsolationCorrectionParameter param);
00257
00259 bool isolationCaloCorrection(float& value, Iso::IsolationType type , Iso::IsolationCaloCorrection corr) const;
00260
00263 float isolationCaloCorrection(Iso::IsolationType type, Iso::IsolationCaloCorrection corr) const;
00264
00266 bool setIsolationCaloCorrection(float value, Iso::IsolationType type, Iso::IsolationCaloCorrection corr);
00267
00269 bool isolationTrackCorrection(float& value, const Iso::IsolationFlavour flavour , const Iso::IsolationTrackCorrection corr ) const;
00270
00273 float isolationTrackCorrection(const Iso::IsolationFlavour flavour , const Iso::IsolationTrackCorrection corr) const;
00274
00276 bool setIsolationTrackCorrection(float value, const Iso::IsolationFlavour flavour , const Iso::IsolationTrackCorrection corr);
00277
00278
00280 bool isolationCorrectionBitset(std::bitset<32>& value, const Iso::IsolationFlavour flavour ) const;
00281
00284 std::bitset<32> isolationCorrectionBitset(const Iso::IsolationFlavour flavour ) const;
00285
00287 bool setIsolationCorrectionBitset(uint32_t value, const Iso::IsolationFlavour flavour );
00288
00290
00291
00294
00296 bool isGoodOQ(uint32_t mask ) const;
00297
00299 uint32_t OQ( ) const;
00300
00302 void setOQ(uint32_t newOQ);
00303
00305
00308
00315 bool passSelection(bool& value, const xAOD::EgammaParameters::SelectionMenu menu ) const;
00316
00320 bool passSelection( const xAOD::EgammaParameters::SelectionMenu menu ) const;
00321
00323 void setPassSelection(bool value, const xAOD::EgammaParameters::SelectionMenu menu);
00324
00330 bool selectionisEM(unsigned int& value, const xAOD::EgammaParameters::SelectionisEM isEM) const;
00331
00335 unsigned int selectionisEM(const xAOD::EgammaParameters::SelectionisEM isEM) const;
00336
00338 void setSelectionisEM(unsigned int value, const xAOD::EgammaParameters::SelectionisEM isEM);
00339
00341
00342
00345
00351 bool passSelection(bool& value, const std::string& menu ) const;
00352
00356 bool passSelection( const std::string& menu ) const;
00357
00359 void setPassSelection(bool value, const std::string& menu);
00360
00366 bool selectionisEM(unsigned int& value, const std::string& isEM) const;
00367
00371 unsigned int selectionisEM(const std::string& isEM) const;
00372
00374 void setSelectionisEM(unsigned int value, const std::string& isEM);
00375
00381 bool likelihoodValue(float& value, const std::string& LHValue=std::string("LHValue")) const;
00382
00386 float likelihoodValue(const std::string& LHValue=std::string("LHValue")) const;
00387
00389 void setLikelihoodValue(float value, const std::string& LHValue=std::string("LHValue"));
00390
00392
00393 private:
00395
00397 mutable FourMom_t m_p4;
00399
00401 mutable bool m_p4Cached;
00402
00403
00404
00405 };
00406
00407
00408 }
00409
00410
00411 #endif // XAODEGAMMA_VERSIONS_EGAMMA_V1_H