00001
00002 #ifndef ISOLATIONSELECTION_ISOLATIONCONDITION_H
00003 #define ISOLATIONSELECTION_ISOLATIONCONDITION_H
00004
00005 #include <memory>
00006 #include <vector>
00007 #include <map>
00008 #include "xAODPrimitives/IsolationType.h"
00009 #include <xAODPrimitives/tools/getIsolationAccessor.h>
00010 #include "AthContainers/AuxElement.h"
00011 #include "xAODBase/IParticle.h"
00012
00013
00014 class TF1;
00015 class TH3F;
00016
00017 struct strObj{
00018 float pt;
00019 float eta;
00020 std::vector< float > isolationValues;
00021 xAOD::Type::ObjectType type;
00022 };
00023
00024 namespace CP
00025 {
00026 class IsolationCondition{
00027 public:
00028 IsolationCondition(std::string name, xAOD::Iso::IsolationType isoType):m_name(name),m_isolationType(isoType),m_cutValue(-999.){
00029 m_acc = xAOD::getIsolationAccessor(m_isolationType);
00030 };
00031 virtual ~IsolationCondition(){}
00032
00033
00034 IsolationCondition():m_name(""),m_isolationType(xAOD::Iso::numIsolationTypes),m_acc(0),m_cutValue(-999){};
00035 void setName(std::string name){m_name = name;}
00036 void setCut(xAOD::Iso::IsolationType isoType){
00037 m_isolationType = isoType;
00038 m_acc = xAOD::getIsolationAccessor(m_isolationType);
00039 };
00040
00041 IsolationCondition(const IsolationCondition& rhs) = delete;
00042 IsolationCondition& operator=(const IsolationCondition& rhs) = delete;
00043
00044 std::string name(){return m_name;}
00045 virtual bool accept(const xAOD::IParticle& x, std::map< xAOD::Iso::IsolationType, float >* cutValues=0) = 0;
00046 virtual bool accept(const strObj& x, std::map< xAOD::Iso::IsolationType, float >* cutValues=0) = 0;
00047
00048 protected:
00049 std::string m_name;
00050 xAOD::Iso::IsolationType m_isolationType;
00051 SG::AuxElement::Accessor< float >* m_acc;
00052 float m_cutValue;
00053 };
00054 }
00055 #endif