ATLAS Offline Software
TrigTauRecMerged.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TRIGTAUREC_TRIGTAURECMERGED_H
6 #define TRIGTAUREC_TRIGTAURECMERGED_H
7 
8 #include "GaudiKernel/ToolHandle.h"
9 
14 
17 
20 #include "xAODJet/JetContainer.h"
23 
25 
26  public:
27 
28  TrigTauRecMerged(const std::string& name, ISvcLocator* pSvcLocator);
29 
30  virtual StatusCode initialize() override;
31  virtual StatusCode execute(const EventContext& ctx) const override;
32 
33  private:
34 
35  template<class T, class U, class V> StatusCode deepCopy(T*& containerOut, U*& containerStoreOut, const V* dummyContainerType,
36  const T*& oldContainer);
37  template<class W, class V, class T> StatusCode deepCopy(W& writeHandle,
38  const V* dummyContainerType,
39  const T*& oldContainer) const;
40 
52  };
53 
56  NoVtxCont=1
57  };
58 
60  const ToolHandleArray<ITauToolBase> m_commonTools{this, "ComTools", {}, "List of ITauToolBase tools"};
61  const ToolHandleArray<ITauToolBase> m_vertexFinderTools{this, "VFTools", {}, "Vertex Finder tools"};
62  const ToolHandleArray<ITauToolBase> m_trackFinderTools{this, "TFTools", {}, "Track Finder tools"};
63  const ToolHandleArray<ITauToolBase> m_vertexVarsTools{this, "VVTools", {}, "Vertex Variables tools"};
64  const ToolHandleArray<ITauToolBase> m_idTools{this, "IDTools", {}, "Vertex Variables tools"};
65 
66 
67 
68  // Monitoring tool
69  const ToolHandle< GenericMonitoringTool > m_monTool { this, "MonTool", "", "Monitoring tool" };
70 
71  //Gaudi::Property< std::string > m_outputName {this,"OutputCollection","TrigTauRecMerged","Name of output collection"};
72  SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roIInputKey { this,"RoIInputKey","InputRoI","Input RoI name"};
73  SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clustersKey { this, "clustersKey", "CaloClusters", "caloclusters in view" };
74  SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksKey { this, "Key_trackPartInputContainer", "InDetTrackParticles", "input track particle container key"};
75  SG::ReadHandleKey< xAOD::VertexContainer> m_vertexKey { this, "Key_vertexInputContainer", "HLT_IDVertex_Tau", "input vertex container key"};
76  SG::ReadHandleKey< xAOD::TauJetContainer> m_trigTauJetKey { this, "Key_trigTauJetInputContainer", "HLT_taujet", "input taujet container" };
77  SG::ReadHandleKey< xAOD::TauTrackContainer> m_trigTauTrackInKey { this, "Key_trigTauTrackInputContainer", "HLT_tautrack_input", "input tautrack container" };
78 
79  SG::WriteHandleKey< xAOD::JetContainer > m_trigtauSeedOutKey { this,"Key_trigJetSeedOutputKey","HLT_jet_seed","Key for output jets which are seed for tau jets"};
80  SG::WriteHandleKey< xAOD::TauJetContainer > m_trigtauRecOutKey {this,"Key_trigTauJetOutputContainer","HLT_taujet","Output taujet container"};
81  SG::WriteHandleKey< xAOD::TauTrackContainer > m_trigtauTrkOutKey {this,"Key_trigTauTrackOutputContainer","HLT_tautrack","Output tautrack container"};
82 
83 };
84 
85  // Function to perform deep copy on container
86  template<class W, class V, class T>
88  const V* ,
89  const T*& oldContainer) const {
90  if(!writeHandle.isValid()){
91  ATH_MSG_FATAL("Provided with an invalid write handle ");
92  return StatusCode::FAILURE;
93  }
94  if(oldContainer != nullptr){
95  for( const V* v : *oldContainer ){
96  V* newV = new V();
97  // Put objects into new container
98  writeHandle->push_back(newV);
99  // Copy across aux store
100  *newV = *v;
101  }
102  }
103  return StatusCode::SUCCESS;
104  }
105 
106 #endif
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
TrigTauRecMerged::NoClustKey
@ NoClustKey
Definition: TrigTauRecMerged.h:46
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
TrigTauRecMerged::NoClustCont
@ NoClustCont
Definition: TrigTauRecMerged.h:45
TrigTauRecMerged::m_idTools
const ToolHandleArray< ITauToolBase > m_idTools
Definition: TrigTauRecMerged.h:64
TrigTauRecMerged::NoJetAttach
@ NoJetAttach
Definition: TrigTauRecMerged.h:48
TrigTauRecMerged::m_commonTools
const ToolHandleArray< ITauToolBase > m_commonTools
internal tool store
Definition: TrigTauRecMerged.h:60
TrigTauRecMerged::NoROIDescr
@ NoROIDescr
Definition: TrigTauRecMerged.h:42
JetTiledMap::W
@ W
Definition: TiledEtaPhiMap.h:44
TrigTauRecMerged::TrigTauRecMerged
TrigTauRecMerged(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TrigTauRecMerged.cxx:34
TrigTauRecMerged::m_vertexFinderTools
const ToolHandleArray< ITauToolBase > m_vertexFinderTools
Definition: TrigTauRecMerged.h:61
TrigTauRecMerged::m_clustersKey
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clustersKey
Definition: TrigTauRecMerged.h:73
TauTrackContainer.h
SG::ReadHandleKey< TrigRoiDescriptorCollection >
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
GenericMonitoringTool.h
TrigTauRecMerged::m_trigtauSeedOutKey
SG::WriteHandleKey< xAOD::JetContainer > m_trigtauSeedOutKey
Definition: TrigTauRecMerged.h:79
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
TrigTauRecMerged::m_vertexVarsTools
const ToolHandleArray< ITauToolBase > m_vertexVarsTools
Definition: TrigTauRecMerged.h:63
TrigTauRecMerged::m_trigtauRecOutKey
SG::WriteHandleKey< xAOD::TauJetContainer > m_trigtauRecOutKey
Definition: TrigTauRecMerged.h:80
TrigTauRecMerged::m_vertexKey
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexKey
Definition: TrigTauRecMerged.h:75
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TrigTauRecMerged::EmptyClustCont
@ EmptyClustCont
Definition: TrigTauRecMerged.h:47
TrigTauRecMerged::TAUEFCALOMON
TAUEFCALOMON
Definition: TrigTauRecMerged.h:41
TrigTauRecMerged::initialize
virtual StatusCode initialize() override
Definition: TrigTauRecMerged.cxx:39
TrigTauRecMerged::NoHLTtauAttach
@ NoHLTtauAttach
Definition: TrigTauRecMerged.h:49
TauJetContainer.h
TrigTauRecMerged
Definition: TrigTauRecMerged.h:24
TrigTauRecMerged::m_roIInputKey
SG::ReadHandleKey< TrigRoiDescriptorCollection > m_roIInputKey
Definition: TrigTauRecMerged.h:72
TrigTauRecMerged::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: TrigTauRecMerged.cxx:86
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
TrigTauRecMerged::NoHLTtauDetAttach
@ NoHLTtauDetAttach
Definition: TrigTauRecMerged.h:50
TrigTauRecMerged::NoVtxCont
@ NoVtxCont
Definition: TrigTauRecMerged.h:56
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TrigTauRecMerged::m_trigTauJetKey
SG::ReadHandleKey< xAOD::TauJetContainer > m_trigTauJetKey
Definition: TrigTauRecMerged.h:76
TrigTauRecMerged::m_trackFinderTools
const ToolHandleArray< ITauToolBase > m_trackFinderTools
Definition: TrigTauRecMerged.h:62
TrigTauRecMerged::NoCellCont
@ NoCellCont
Definition: TrigTauRecMerged.h:43
ITauToolBase.h
python.PyAthena.v
v
Definition: PyAthena.py:157
VertexContainer.h
JetContainer.h
TrigTauRecMerged::m_trigTauTrackInKey
SG::ReadHandleKey< xAOD::TauTrackContainer > m_trigTauTrackInKey
Definition: TrigTauRecMerged.h:77
TrigTauRecMerged::NoTrkCont
@ NoTrkCont
Definition: TrigTauRecMerged.h:55
TrigTauRecMerged::NoHLTtauXdetAttach
@ NoHLTtauXdetAttach
Definition: TrigTauRecMerged.h:51
TrigTauRecMerged::EmptyCellCont
@ EmptyCellCont
Definition: TrigTauRecMerged.h:44
TrigRoiDescriptor.h
TrigTauRecMerged::deepCopy
StatusCode deepCopy(T *&containerOut, U *&containerStoreOut, const V *dummyContainerType, const T *&oldContainer)
TrigTauRecMerged::m_trigtauTrkOutKey
SG::WriteHandleKey< xAOD::TauTrackContainer > m_trigtauTrkOutKey
Definition: TrigTauRecMerged.h:81
TrigTauRecMerged::TAUEFTRKMON
TAUEFTRKMON
Definition: TrigTauRecMerged.h:54
TrigTauRecMerged::m_monTool
const ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigTauRecMerged.h:69
TrackParticleContainer.h
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
TrigTauRecMerged::m_tracksKey
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tracksKey
Definition: TrigTauRecMerged.h:74