|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "EventInfo/EventInfo.h"
46 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
47 static const std::string INDET_BEAMPOS =
"/Indet/Beampos";
53 const std::string&
name,
58 declareInterface< IEventInfoCnvTool >(
this );
64 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
66 if(
detStore()->contains< AthenaAttributeList >( INDET_BEAMPOS ) ) {
71 ATH_MSG_INFO(
"Will not fill beam spot information into "
76 ATH_MSG_WARNING(
"Beam spot information manually disabled on EventInfo object" );
81 #endif // not XAOD_ANALYSIS or GENERATIONBASE
83 #if !defined(XAOD_ANALYSIS) && !defined(SIMULATIONBASE) && !defined(GENERATIONBASE)
85 #endif // not XAOD_ANALYSIS or GENERATIONBASE
88 return StatusCode::SUCCESS;
106 bool copyPileUpLinks,
107 [[maybe_unused]]
const EventContext& ctx )
const
112 return StatusCode::SUCCESS;
130 std::vector< float > eventWeights;
151 for(
unsigned int i = 0;
i < aod->
event_type()->n_mc_event_weights();
163 std::vector< xAOD::EventInfo::StreamTag > streamTags;
164 std::vector< TriggerInfo::StreamTag >::const_iterator st_itr =
166 std::vector< TriggerInfo::StreamTag >::const_iterator st_end =
168 for( ; st_itr != st_end; ++st_itr ) {
169 streamTags.emplace_back( st_itr->name(), st_itr->type(),
170 st_itr->obeysLumiblock(),
171 st_itr->robs(), st_itr->dets() );
178 bool haveLumi =
false;
179 #if !defined(XAOD_ANALYSIS) && !defined(SIMULATIONBASE) && !defined(GENERATIONBASE)
185 float actualMu = 0.0;
186 const float muToLumi = lumiData->
muToLumi();
187 if( std::abs( muToLumi ) > 0.00001 ) {
188 unsigned int bcid = ctx.eventID().bunch_crossing_id();
197 #endif // not XAOD_ANALYSIS or SIMULATIONBASE or GENERATIONBASE
213 for( ; sd_itr != sd_end; ++sd_itr ) {
226 errorStateMap.find( aod->
errorState( sd_itr->second ) );
227 if( state == errorStateMap.end() ) {
229 <<
"Unknown error state found for sub-detector "
230 << sd_itr->second <<
": " << aod->
errorState( sd_itr->second );
231 return StatusCode::FAILURE;
241 if( puei && copyPileUpLinks ) {
243 std::vector< xAOD::EventInfo::SubEvent > subEvents;
246 for( ; itr !=
end; ++itr ) {
250 switch (itr->type()) {
273 << itr->type() <<
") encountered" );
282 subEvents.emplace_back( itr->time(),
291 #if !defined(XAOD_ANALYSIS) && !defined(GENERATIONBASE)
296 beamSpotHandle->beamPos()[
Amg::y ],
297 beamSpotHandle->beamPos()[
Amg::z ] );
299 beamSpotHandle->beamSigma( 1 ),
300 beamSpotHandle->beamSigma( 2 ) );
306 #endif // not XAOD_ANALYSIS or GENERATIONBASE
308 if (!eventWeights.empty()) {
314 ew (*xaod) = std::move (eventWeights);
318 ATH_MSG_DEBUG(
"Finished conversion EventInfo="<<aod<<
" xAOD::EventInfo="<<xaod<<
" content=" << *xaod );
321 return StatusCode::SUCCESS;
const std::vector< float > & lbLuminosityPerBCIDVector() const
void setActualInteractionsPerCrossing(float value)
Set average interactions per crossing for the current BCID.
void setSubEvents(const std::vector< SubEvent > &value)
Set the pileup events that were used in the simulation.
@ Pixel
The pixel tracker.
const std::vector< StreamTag > & streamTags() const
get stream tags
void get_detdescr_tags(NameTagPairVec &pairs) const
Access DetDescr tags.
void setEventNumber(uint64_t value)
Set the current event's event number.
float averageInteractionsPerCrossing() const
average interactions per crossing for all BCIDs - for out-of-time pile-up
This file defines the class for a collection of AttributeLists where each one is associated with a ch...
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
@ HighPtMinimumBias
High pT Minimum bias pileup event.
@ MinimumBias
(Low pT) Minimum bias pileup event
@ IS_CALIBRATION
true: calibration, false: physics
void setBeamPos(float x, float y, float z)
Set the beam spot position.
PileUpType
Enumerator describing the types of pileup events.
void setExtendedLevel1ID(uint32_t value)
Set the extended Level-1 identifier.
@ NotSet
The flag was not set to anything.
This class contains trigger related information.
@ ZeroBias
Zero bias pileup event.
This class provides general information about an event. It extends EventInfo with a list of sub-evts ...
void setBeamPosSigma(float x, float y, float z)
Set the size of the beam spot.
void setDetDescrTags(const DetDescrTags_t &value)
Set the detector description tags.
bool empty() const
Test if the key is blank.
@ Background
The beam background detectors.
@ IS_SIMULATION
true: simulation, false: data
@ LAr
The LAr calorimeter.
number_type detector_mask2(void) const
detector mask0 - bit field indicating which TTC zones have been built into the event,...
float lbAverageLuminosity() const
float mc_event_weight(unsigned int iweight=0) const
Access to MC weight.
SG::IAuxStore * getStore() const
Return the current store, as a non-const interface.
number_type mc_channel_number() const
Access to the MC generator channel number (was used as run number for generator events)
number_type detector_mask0(void) const
detector mask0 - bit field indicating which TTC zones have been built into the event,...
EventFlagErrorState errorState(EventFlagSubDet subDet) const
return error state for a particular sub-detector
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
@ Error
The sub-detector issued an error.
void setBeamTiltYZ(float value)
Set the beam's tilt in radians in YZ.
void setBeamStatus(uint32_t value)
Set the beam spot's status word.
bool setEventFlags(EventFlagSubDet subDet, uint32_t flags)
Set the event flags for a particular sub-detector.
void setStreamTags(const std::vector< StreamTag > &value)
Set the streams that the event was put in.
SubEvent::iterator beginSubEvt()
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
void setLevel1TriggerType(uint16_t value)
Set the Level-1 trigger type.
void resetWithKeyAndIndex(const ID_type &dataID, index_type elemID, IProxyDict *sg=0)
Set the link to an element given by string key and index.
bool setErrorState(EventFlagSubDet subDet, EventFlagErrorState state)
Set the error state for a particular sub-detector.
void setMCEventNumber(uint64_t value)
Set the MC generator's event number.
void setEventTypeBitmask(uint32_t value)
Set the event type bitmask.
Helper class to provide type-safe access to aux data.
std::vector< NameTagPair > NameTagPairVec
unsigned int eventFlags(EventFlagSubDet subDet) const
event flags for a particular sub-detector
void setDetectorMask(uint32_t mask0, uint32_t mask1)
Set the bit fields indicating with TTC timezones were present.
@ Unknown
Type not known/specified.
static const EventTypeCode IS_CALIBRATION
true: IS_CALIBRATION, false: IS_PHYSICS
::StatusCode StatusCode
StatusCode definition for legacy code.
EventID * event_ID()
the unique identification of the event.
@ HaloGas
Halo-gas non-collision background.
number_type detector_mask3(void) const
detector mask1 - bit field indicating which TTC zones have been built into the event,...
#define CHECK(...)
Evaluate an expression and check for errors.
void setStatusElement(uint32_t value)
Set the trigger status element.
void setTimeStamp(uint32_t value)
Set the POSIX time of the event.
void setBCID(uint32_t value)
Set the bunch crossing ID of the event.
EventFlagErrorState
States that a given sub-detector could be in.
void setBeamPosSigmaXY(float value)
Set the beam spot shape's X-Y correlation.
number_type level1TriggerType() const
get level1 trigger type
@ ForwardDet
The forward detectors.
static const EventTypeCode IS_SIMULATION
true: IS_SIMULATION, false: IS_DATA
ElementLink implementation for ROOT usage.
@ Muon
The muon spectrometer.
void setDetectorMaskExt(uint32_t mask2, uint32_t mask3)
Set the bit fields indicating with TTC timezones were present.
float lbAverageInteractionsPerCrossing() const
Helpers for checking error return status codes and reporting errors.
EventFlagSubDet
Sub-detector types for which we store event-level flags.
This class provides general information about an event. Event information is provided by the accessor...
void setAverageInteractionsPerCrossing(float value)
Set average interactions per crossing for all BCIDs.
StatusCode initialize(bool used=true)
setEventNumber setTimeStamp bcid
#define REPORT_MESSAGE(LVL)
Report a message.
Class describing the basic event information.
void setTimeStampNSOffset(uint32_t value)
Set the nanosecond offset wrt. the time stamp.
void setMCChannelNumber(uint32_t value)
Set the MC generator's channel number.
@ Signal
The signal event.
@ Warning
The sub-detector issued a warning.
This class provides information about an overlaid event. It extends EventInfo with a list of sub-evts...
@ Tile
The Tile calorimeter.
number_type extendedLevel1ID() const
get extended level1 ID
static const EventTypeCode IS_TESTBEAM
true: IS_TESTBEAM, false: IS_FROM_ATLAS_DET
uint64_t mc_event_number() const
Access to the MC generator event number.
bool test(EventTypeCode type_code) const
Tests for standard characteristics.
#define ATH_MSG_WARNING(x)
void setRunNumber(uint32_t value)
Set the current event's run number.
std::list< SubEvent >::const_iterator const_iterator
TriggerInfo * trigger_info()
trigger information (ptr may be NULL)
void setBeamTiltXZ(float value)
Set the beam's tilt in radians in XZ.
@ Cavern
Cavern background pileup event.
unsigned int n_mc_event_weights() const
Total number of MC weights.
virtual void lock()=0
Lock the container.
@ Lumi
The luminosity detectors.
void setLumiBlock(uint32_t value)
Set the current event's luminosity block number.
number_type statusElement() const
get status element
@ IS_TESTBEAM
true: testbeam, false: full detector
@ Core
Core flags describing the event.
EventType * event_type()
the type of the event, e.g. simulation, testbeam, etc
SubEvent::iterator endSubEvt()
number_type detector_mask1(void) const
detector mask1 - bit field indicating which TTC zones have been built into the event,...
bool eventType(EventType type) const
Check for one particular bitmask value.
float actualInteractionsPerCrossing() const
Access to number of interactions per crossing: