ATLAS Offline Software
Functions
RoiUpdaterTool.cxx File Reference
#include "TrigSteeringEvent/TrigRoiDescriptorCollection.h"
#include "RoiUpdaterTool.h"
Include dependency graph for RoiUpdaterTool.cxx:

Go to the source code of this file.

Functions

void zrange (double nsigma, double fence, double &zed, double &zedMinus, double &zedPlus, const SG::ReadCondHandleKey< InDet::BeamSpotData > &bs, const EventContext &ctx)
 

Function Documentation

◆ zrange()

void zrange ( double  nsigma,
double  fence,
double &  zed,
double &  zedMinus,
double &  zedPlus,
const SG::ReadCondHandleKey< InDet::BeamSpotData > &  bs,
const EventContext &  ctx 
)

0x4 is the online flag - 0x7 is presumably converged online

technically, updating the z position itself should not be needed

Definition at line 33 of file RoiUpdaterTool.cxx.

33  {
34 
35  SG::ReadCondHandle<InDet::BeamSpotData> beamSpotHandle( bs, ctx );
36 
37  uint32_t bitmap = beamSpotHandle->beamStatus();
38 
40  if ( ( (bitmap & 0x7) == 0x7 ) || !(bitmap & 0x4) ) {
41  double zsigma = beamSpotHandle->beamSigma(2);
42  double zpos = beamSpotHandle->beamPos()[2];
43 
44  zed = zpos;
45  zedMinus = zpos - nsigma*zsigma - fence;
46  zedPlus = zpos + nsigma*zsigma + fence;
47  }
48  else {
49  zedMinus = -RoiDescriptor::zedWidthDefault();
50  zedPlus = RoiDescriptor::zedWidthDefault();
51  }
52 
53 }
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
xAOD::uint32_t
setEventNumber uint32_t
Definition: EventInfo_v1.cxx:127
RoiDescriptor::zedWidthDefault
static double zedWidthDefault()
Definition: RoiDescriptor.h:183