ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
TrigSpacePointConversionTool Class Reference

#include <TrigSpacePointConversionTool.h>

Inheritance diagram for TrigSpacePointConversionTool:
Collaboration diagram for TrigSpacePointConversionTool:

Public Member Functions

 TrigSpacePointConversionTool (const std::string &, const std::string &, const IInterface *)
 
virtual ~TrigSpacePointConversionTool ()
 
StatusCode initialize () override
 
StatusCode finalize () override
 
virtual StatusCode getSpacePoints (const IRoiDescriptor &, std::vector< TrigSiSpacePointBase > &, int &, int &, const EventContext &ctx, std::map< Identifier, std::vector< long int > > *clustermap=nullptr) const override final
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 other standard AlgTool methods More...
 

Protected Member Functions

void shiftSpacePoints (std::vector< TrigSiSpacePointBase > &, const EventContext &) const
 
void transformSpacePoints (std::vector< TrigSiSpacePointBase > &, const EventContext &) const
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

ToolHandle< ITrigL2LayerNumberToolm_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberTool"}
 
const AtlasDetectorIDm_atlasId = nullptr
 
const SCT_IDm_sctId = nullptr
 
const PixelIDm_pixelId = nullptr
 
SG::ReadCondHandleKey< InDet::BeamSpotDatam_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
 
std::string m_pixelSpContName
 
std::string m_sctSpContName
 
SG::ReadHandleKey< SpacePointContainerm_sctSpacePointsContainerKey
 
SG::ReadHandleKey< SpacePointContainerm_pixelSpacePointsContainerKey
 
bool m_filter_phi
 
bool m_useBeamTilt
 
bool m_useNewScheme
 
bool m_usePixelSpacePoints
 
bool m_useSctSpacePoints
 
ToolHandle< IRegSelToolm_regsel_pix { this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" }
 new region selector tools More...
 
ToolHandle< IRegSelToolm_regsel_sct { this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT" }
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 28 of file TrigSpacePointConversionTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigSpacePointConversionTool()

TrigSpacePointConversionTool::TrigSpacePointConversionTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 23 of file TrigSpacePointConversionTool.cxx.

25  :
26  AthAlgTool(t,n,p)
27 {
28  declareInterface< ITrigSpacePointConversionTool >( this );
29 
30  declareProperty( "DoPhiFiltering", m_filter_phi = true );
31  declareProperty( "UseBeamTilt", m_useBeamTilt = true );
32  declareProperty( "UseNewLayerScheme", m_useNewScheme = false );
33  declareProperty( "PixelSP_ContainerName", m_pixelSpacePointsContainerKey = std::string("PixelTrigSpacePoints"));
34  declareProperty( "SCT_SP_ContainerName", m_sctSpacePointsContainerKey = "SCT_TrigSpacePoints" );
35  declareProperty( "UsePixelSpacePoints", m_usePixelSpacePoints = true );
36  declareProperty( "UseSctSpacePoints", m_useSctSpacePoints = true );
37 }

◆ ~TrigSpacePointConversionTool()

virtual TrigSpacePointConversionTool::~TrigSpacePointConversionTool ( )
inlinevirtual

Definition at line 33 of file TrigSpacePointConversionTool.h.

33 {};

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ finalize()

StatusCode TrigSpacePointConversionTool::finalize ( )
override

Definition at line 94 of file TrigSpacePointConversionTool.cxx.

94  {
95 
97  return sc;
98 }

◆ getSpacePoints()

StatusCode TrigSpacePointConversionTool::getSpacePoints ( const IRoiDescriptor internalRoI,
std::vector< TrigSiSpacePointBase > &  output,
int &  nPix,
int &  nSct,
const EventContext &  ctx,
std::map< Identifier, std::vector< long int > > *  clustermap = nullptr 
) const
finaloverridevirtual

Implements ITrigSpacePointConversionTool.

Definition at line 101 of file TrigSpacePointConversionTool.cxx.

102  {
103 
104  output.clear();
105 
106  const SpacePointContainer* pixelSpacePointsContainer = nullptr;
107  if (m_usePixelSpacePoints) {
109  ATH_CHECK(pixHandle.isValid());
110  pixelSpacePointsContainer = pixHandle.ptr();
111  }
112  const SpacePointContainer* sctSpacePointsContainer = nullptr;
113  if (m_useSctSpacePoints) {
115  ATH_CHECK(sctHandle.isValid());
116  sctSpacePointsContainer = sctHandle.ptr();
117  }
118 
119  std::vector<IdentifierHash> listOfPixIds;
120  std::vector<IdentifierHash> listOfSctIds;
121 
122  // m_regionSelector->DetHashIDList(PIXEL, internalRoI, listOfPixIds);
123  // m_regionSelector->DetHashIDList(SCT, internalRoI, listOfSctIds);
124 
125  m_regsel_pix->HashIDList( internalRoI, listOfPixIds );
126  m_regsel_sct->HashIDList( internalRoI, listOfSctIds );
127 
128 
129  int offsets[3];
130 
131  offsets[0] = m_layerNumberTool->offsetEndcapPixels();
132  offsets[1] = m_layerNumberTool->offsetBarrelSCT();
133  offsets[2] = m_layerNumberTool->offsetEndcapSCT();
134 
136 
137  //filter spacepoints to reject those beyound internalRoI boundaries
138 
139  nPix = 0;
140  nSct = 0;
141  if ( clustermap!=nullptr ) {
142 
143  ATH_MSG_DEBUG("LRT Mode: clustermap supplied and being used to remove spacepoints from clusters already on tracks");
144  // In LRT mode a cluster map is supplied to enable removal of clusters on tracks.
145  FTF::RoI_Filter filter(output, lc, &internalRoI, m_filter_phi, clustermap);
147 
148  if(m_useNewScheme) {
149  if (m_usePixelSpacePoints) nPix=selector.select(*pixelSpacePointsContainer,listOfPixIds, m_layerNumberTool->pixelLayers());
150  if (m_useSctSpacePoints) nSct=selector.select(*sctSpacePointsContainer,listOfSctIds, m_layerNumberTool->sctLayers());
151  }
152  else {
153  if (m_usePixelSpacePoints) nPix=selector.select(*pixelSpacePointsContainer,listOfPixIds);
154  if (m_useSctSpacePoints) nSct=selector.select(*sctSpacePointsContainer,listOfSctIds);
155  }
156 
157 
158  } else {
159  FTF::RoI_Filter filter(output, lc, &internalRoI, m_filter_phi);
161 
162  if(m_useNewScheme) {
163  if (m_usePixelSpacePoints) nPix=selector.select(*pixelSpacePointsContainer,listOfPixIds, m_layerNumberTool->pixelLayers());
164  if (m_useSctSpacePoints) nSct=selector.select(*sctSpacePointsContainer,listOfSctIds, m_layerNumberTool->sctLayers());
165  }
166  else {
167  if (m_usePixelSpacePoints) nPix=selector.select(*pixelSpacePointsContainer,listOfPixIds);
168  if (m_useSctSpacePoints) nSct=selector.select(*sctSpacePointsContainer,listOfSctIds);
169  }
170  }
172  else transformSpacePoints(output, ctx);
173 
174  ATH_MSG_DEBUG("Returning "<<nPix<< " Pixel Spacepoints and "<<nSct<< " SCT SpacePoints");
175  return StatusCode::SUCCESS;
176 }

◆ initialize()

StatusCode TrigSpacePointConversionTool::initialize ( )
override

Definition at line 39 of file TrigSpacePointConversionTool.cxx.

39  {
40 
42 
43  ATH_MSG_INFO("In initialize...");
44 
45  // sc = serviceLocator()->service( m_regionSelectorName, m_regionSelector);
46  // if ( sc.isFailure() ) {
47  // ATH_MSG_FATAL("Unable to retrieve RegionSelector Service " << m_regionSelectorName);
48  // return sc;
49  // }
50 
51  ATH_CHECK(m_regsel_pix.retrieve());
52  ATH_CHECK(m_regsel_sct.retrieve());
53 
54  sc=m_layerNumberTool.retrieve();
55  if(sc.isFailure()) {
56  ATH_MSG_ERROR("Could not retrieve "<<m_layerNumberTool);
57  return sc;
58  }
59 
60  sc = detStore()->retrieve(m_atlasId, "AtlasID");
61  if (sc.isFailure()) {
62  ATH_MSG_FATAL("Could not get ATLAS ID helper");
63  return sc;
64  }
65 
66  sc = detStore()->retrieve(m_pixelId, "PixelID");
67  if (sc.isFailure()) {
68  ATH_MSG_FATAL("Could not get Pixel ID helper");
69  return sc;
70  }
71 
72  sc = detStore()->retrieve(m_sctId, "SCT_ID");
73  if (sc.isFailure()) {
74  ATH_MSG_FATAL("Could not get SCT ID helper");
75  return sc;
76  }
77 
79 
81  ATH_MSG_FATAL("Both usePixelSpacePoints and useSctSpacePoints set to False. At least one needs to be True");
82  return StatusCode::FAILURE;
83  }
84  if (!m_useSctSpacePoints) ATH_MSG_INFO("Only converting Pixel spacepoints => PPP seeds only");
85  if (!m_usePixelSpacePoints) ATH_MSG_INFO("Only converting SCT spacepoints => SSS seeds only");
88 
89  ATH_MSG_INFO("TrigSpacePointConversionTool initialized ");
90 
91  return sc;
92 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

static const InterfaceID& ITrigSpacePointConversionTool::interfaceID ( )
inlinestaticinherited

other standard AlgTool methods

< the Tool's interface

Definition at line 27 of file ITrigSpacePointConversionTool.h.

27  {
28  return IID_ITrigSpacePointConversionTool;
29  }

◆ msg() [1/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ shiftSpacePoints()

void TrigSpacePointConversionTool::shiftSpacePoints ( std::vector< TrigSiSpacePointBase > &  output,
const EventContext &  ctx 
) const
protected

Definition at line 179 of file TrigSpacePointConversionTool.cxx.

179  {
180 
182  const Amg::Vector3D &vertex = beamSpotHandle->beamPos();
183  double shift_x = vertex.x() - beamSpotHandle->beamTilt(0)*vertex.z();
184  double shift_y = vertex.y() - beamSpotHandle->beamTilt(1)*vertex.z();
185 
186  std::for_each(output.begin(), output.end(), FTF::SpacePointShifter(shift_x, shift_y));
187 
188 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ transformSpacePoints()

void TrigSpacePointConversionTool::transformSpacePoints ( std::vector< TrigSiSpacePointBase > &  output,
const EventContext &  ctx 
) const
protected

Definition at line 191 of file TrigSpacePointConversionTool.cxx.

191  {
192 
194  const Amg::Vector3D &origin = beamSpotHandle->beamPos();
195  double tx = tan(beamSpotHandle->beamTilt(0));
196  double ty = tan(beamSpotHandle->beamTilt(1));
197 
198  double phi = atan2(ty,tx);
199  double theta = acos(1.0/sqrt(1.0+tx*tx+ty*ty));
200  double sint = sin(theta);
201  double cost = cos(theta);
202  double sinp = sin(phi);
203  double cosp = cos(phi);
204 
205  std::array<float, 4> xtrf{}, ytrf{}, ztrf{};
206 
207  xtrf[0] = float(origin.x());
208  xtrf[1] = float(cost*cosp*cosp+sinp*sinp);
209  xtrf[2] = float(cost*sinp*cosp-sinp*cosp);
210  xtrf[3] =-float(sint*cosp);
211 
212  ytrf[0] = float(origin.y());
213  ytrf[1] = float(cost*cosp*sinp-sinp*cosp);
214  ytrf[2] = float(cost*sinp*sinp+cosp*cosp);
215  ytrf[3] =-float(sint*sinp);
216 
217  ztrf[0] = float(origin.z());
218  ztrf[1] = float(sint*cosp);
219  ztrf[2] = float(sint*sinp);
220  ztrf[3] = float(cost);
221 
222  std::for_each(output.begin(), output.end(), FTF::SpacePointTransform(xtrf, ytrf, ztrf));
223 
224 }

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_atlasId

const AtlasDetectorID* TrigSpacePointConversionTool::m_atlasId = nullptr
protected

Definition at line 47 of file TrigSpacePointConversionTool.h.

◆ m_beamSpotKey

SG::ReadCondHandleKey<InDet::BeamSpotData> TrigSpacePointConversionTool::m_beamSpotKey { this, "BeamSpotKey", "BeamSpotData", "SG key for beam spot" }
protected

Definition at line 51 of file TrigSpacePointConversionTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_filter_phi

bool TrigSpacePointConversionTool::m_filter_phi
protected

Definition at line 57 of file TrigSpacePointConversionTool.h.

◆ m_layerNumberTool

ToolHandle<ITrigL2LayerNumberTool> TrigSpacePointConversionTool::m_layerNumberTool {this, "layerNumberTool", "TrigL2LayerNumberTool"}
protected

Definition at line 45 of file TrigSpacePointConversionTool.h.

◆ m_pixelId

const PixelID* TrigSpacePointConversionTool::m_pixelId = nullptr
protected

Definition at line 49 of file TrigSpacePointConversionTool.h.

◆ m_pixelSpacePointsContainerKey

SG::ReadHandleKey<SpacePointContainer> TrigSpacePointConversionTool::m_pixelSpacePointsContainerKey
protected

Definition at line 55 of file TrigSpacePointConversionTool.h.

◆ m_pixelSpContName

std::string TrigSpacePointConversionTool::m_pixelSpContName
protected

Definition at line 53 of file TrigSpacePointConversionTool.h.

◆ m_regsel_pix

ToolHandle<IRegSelTool> TrigSpacePointConversionTool::m_regsel_pix { this, "RegSelTool_Pixel", "RegSelTool/RegSelTool_Pixel" }
protected

new region selector tools

Definition at line 67 of file TrigSpacePointConversionTool.h.

◆ m_regsel_sct

ToolHandle<IRegSelTool> TrigSpacePointConversionTool::m_regsel_sct { this, "RegSelTool_SCT", "RegSelTool/RegSelTool_SCT" }
protected

Definition at line 68 of file TrigSpacePointConversionTool.h.

◆ m_sctId

const SCT_ID* TrigSpacePointConversionTool::m_sctId = nullptr
protected

Definition at line 48 of file TrigSpacePointConversionTool.h.

◆ m_sctSpacePointsContainerKey

SG::ReadHandleKey<SpacePointContainer> TrigSpacePointConversionTool::m_sctSpacePointsContainerKey
protected

Definition at line 54 of file TrigSpacePointConversionTool.h.

◆ m_sctSpContName

std::string TrigSpacePointConversionTool::m_sctSpContName
protected

Definition at line 53 of file TrigSpacePointConversionTool.h.

◆ m_useBeamTilt

bool TrigSpacePointConversionTool::m_useBeamTilt
protected

Definition at line 58 of file TrigSpacePointConversionTool.h.

◆ m_useNewScheme

bool TrigSpacePointConversionTool::m_useNewScheme
protected

Definition at line 59 of file TrigSpacePointConversionTool.h.

◆ m_usePixelSpacePoints

bool TrigSpacePointConversionTool::m_usePixelSpacePoints
protected

Definition at line 60 of file TrigSpacePointConversionTool.h.

◆ m_useSctSpacePoints

bool TrigSpacePointConversionTool::m_useSctSpacePoints
protected

Definition at line 61 of file TrigSpacePointConversionTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
cost
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition: hcg.cxx:921
python.tests.PyTestsLib.finalize
def finalize(self)
_info( "content of StoreGate..." ) self.sg.dump()
Definition: PyTestsLib.py:53
TrigSpacePointConversionTool::transformSpacePoints
void transformSpacePoints(std::vector< TrigSiSpacePointBase > &, const EventContext &) const
Definition: TrigSpacePointConversionTool.cxx:191
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TrigSpacePointConversionTool::m_sctSpacePointsContainerKey
SG::ReadHandleKey< SpacePointContainer > m_sctSpacePointsContainerKey
Definition: TrigSpacePointConversionTool.h:54
SG::ReadHandle< SpacePointContainer >
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
initialize
void initialize()
Definition: run_EoverP.cxx:894
TrigSpacePointConversionTool::shiftSpacePoints
void shiftSpacePoints(std::vector< TrigSiSpacePointBase > &, const EventContext &) const
Definition: TrigSpacePointConversionTool.cxx:179
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:71
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
python.LumiCalcHtml.lc
lc
Definition: LumiCalcHtml.py:579
TrigSpacePointConversionTool::m_pixelSpacePointsContainerKey
SG::ReadHandleKey< SpacePointContainer > m_pixelSpacePointsContainerKey
Definition: TrigSpacePointConversionTool.h:55
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
FTF::RoI_Filter
Definition: SpacePointConversionUtils.h:125
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
FTF::LayerCalculator
Definition: SpacePointConversionUtils.h:29
covarianceTool.filter
filter
Definition: covarianceTool.py:514
TrigSpacePointConversionTool::m_pixelId
const PixelID * m_pixelId
Definition: TrigSpacePointConversionTool.h:49
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
beamspotman.n
n
Definition: beamspotman.py:731
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigSpacePointConversionTool::m_beamSpotKey
SG::ReadCondHandleKey< InDet::BeamSpotData > m_beamSpotKey
Definition: TrigSpacePointConversionTool.h:51
TrigSpacePointConversionTool::m_filter_phi
bool m_filter_phi
Definition: TrigSpacePointConversionTool.h:57
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
FTF::SpacePointShifter
Definition: SpacePointConversionUtils.h:200
drawFromPickle.tan
tan
Definition: drawFromPickle.py:36
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
TrigSpacePointConversionTool::m_layerNumberTool
ToolHandle< ITrigL2LayerNumberTool > m_layerNumberTool
Definition: TrigSpacePointConversionTool.h:45
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge.output
output
Definition: merge.py:17
TrigSpacePointConversionTool::m_regsel_pix
ToolHandle< IRegSelTool > m_regsel_pix
new region selector tools
Definition: TrigSpacePointConversionTool.h:67
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
FTF::SpacePointTransform
Definition: SpacePointConversionUtils.h:217
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
TrigSpacePointConversionTool::m_regsel_sct
ToolHandle< IRegSelTool > m_regsel_sct
Definition: TrigSpacePointConversionTool.h:68
TrigSpacePointConversionTool::m_atlasId
const AtlasDetectorID * m_atlasId
Definition: TrigSpacePointConversionTool.h:47
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
a
TList * a
Definition: liststreamerinfos.cxx:10
python.selector.AtlRunQuerySelectorLhcOlc.selector
selector
Definition: AtlRunQuerySelectorLhcOlc.py:611
h
FTF::SpacePointSelector
Definition: SpacePointConversionUtils.h:161
TrigSpacePointConversionTool::m_usePixelSpacePoints
bool m_usePixelSpacePoints
Definition: TrigSpacePointConversionTool.h:60
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
SpacePointContainer
Definition: Tracking/TrkEvent/TrkSpacePoint/TrkSpacePoint/SpacePointContainer.h:29
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
TrigSpacePointConversionTool::m_useBeamTilt
bool m_useBeamTilt
Definition: TrigSpacePointConversionTool.h:58
TrigSpacePointConversionTool::m_useNewScheme
bool m_useNewScheme
Definition: TrigSpacePointConversionTool.h:59
TrigSpacePointConversionTool::m_useSctSpacePoints
bool m_useSctSpacePoints
Definition: TrigSpacePointConversionTool.h:61
TileDCSDataPlotter.tx
tx
Definition: TileDCSDataPlotter.py:878
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
readCCLHist.float
float
Definition: readCCLHist.py:83
fitman.k
k
Definition: fitman.py:528
TrigSpacePointConversionTool::m_sctId
const SCT_ID * m_sctId
Definition: TrigSpacePointConversionTool.h:48