21 const std::string &name,
22 const IInterface *parent)
23 : base_class(
type, name, parent),
39 return StatusCode::SUCCESS;
47 return StatusCode::SUCCESS;
55 auto siHitContainer = std::make_unique<xAOD::AFPSiHitContainer>();
56 auto siHitAuxContainer = std::make_unique<xAOD::AFPSiHitAuxContainer>();
57 siHitContainer->setStore(siHitAuxContainer.get());
63 return StatusCode::SUCCESS;
66 ATH_MSG_DEBUG(
"AFP_Raw2DigiTool: Raw data container retrieved");
73 ATH_CHECK( writeHandle.
record(std::move(siHitContainer), std::move(siHitAuxContainer)) );
75 return StatusCode::SUCCESS;
83 auto tofHitContainer = std::make_unique<xAOD::AFPToFHitContainer>();
84 auto tofHitAuxContainer = std::make_unique<xAOD::AFPToFHitAuxContainer>();
85 tofHitContainer->setStore(tofHitAuxContainer.get());
91 return StatusCode::SUCCESS;
94 ATH_MSG_DEBUG(
"AFP_Raw2DigiTool: Raw data container retrieved");
98 if (
data.hitDiscConfig() == 3 && (
data.header() == 2 || (
data.header() == 1 && !
data.isTrigger())))
102 ATH_CHECK( writeHandle.
record(std::move(tofHitContainer), std::move(tofHitAuxContainer)) );
104 return StatusCode::SUCCESS;
112 return StatusCode::SUCCESS;
121 const uint32_t hitLink =
data.link();
122 const unsigned int robID = collection.
robId();
138 else if (hitLink == 13)
152 const unsigned int hitLink =
data.link();
153 const unsigned int robID = collection.
robId();
162 ATH_MSG_WARNING(
"Unrecognised robID: in dec="<<std::dec<<robID<<
", in hex=0x"<<std::hex<<robID<<std::dec);
165 }
else if (hitLink >= 8 && hitLink <= 11) {
172 ATH_MSG_WARNING(
"Unrecognised robID: in dec="<<std::dec<<robID<<
", in hex=0x"<<std::hex<<robID<<std::dec);
196 const int hptdcID = tofHit->
hptdcID();
198 if((hptdcChannel<0 || hptdcChannel>=12) || (hptdcID<=0 || hptdcID>=3))
200 ATH_MSG_WARNING(
"Invalid hptdcID "<<hptdcID<<
", or hptdcChannel "<<hptdcChannel);
204 int RunID = (ctx.eventID().run_number() > 370000 ? (ctx.eventID().run_number() > 436657 ? 2 : 1) : 0);
209 if(trainID>=0 && barID>=0)
214 else if(trainID==-2 && barID==-2)
217 ATH_MSG_DEBUG(
"Unrecognised hptdcChannel "<<hptdcChannel<<
", hptdcID "<<hptdcID);
219 else if(trainID==-1 && barID==-1)
222 ATH_MSG_WARNING(
"Unrecognised hptdcChannel "<<hptdcChannel<<
", hptdcID "<<hptdcID);
227 ATH_MSG_WARNING(
"Unrecognised trainID "<<trainID<<
" or barID "<<barID<<
"; run "<<ctx.eventID().run_number()<<
", hptdcChannel "<<hptdcChannel<<
", hptdcID "<<hptdcID);
234 return input + discConfig + 1;
235 else if (input == 14)
Definitions of AFP stations identification numbers.
AFP_RawCollection< AFP_SiRawData > AFP_SiRawCollection
Class representing collection of silicon detector data.
AFP_RawCollection< AFP_ToFRawData > AFP_ToFRawCollection
AFP_ToFRawData_v2 AFP_ToFRawData
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
static constexpr unsigned int sideC_2016
ROB ID of stations on C side in 2016.
static constexpr unsigned int sideC
ROB ID of stations on C side.
static constexpr unsigned int sideA
ROB ID of stations on A side.
uint32_t robId() const
ROB in from which the collection was read.
Class representing data record for silicon detectors.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
void setPixelLayerID(int layerID)
Method setting index of the pixel layer with hit.
float depositedCharge() const
Charge deposited in the pixel.
int pixelColIDChip() const
Index of the pixel column in chip coordinate system.
int pixelLayerID() const
Index of the layer of pixels, i.e.
void setPixelRowIDChip(int rowID)
Set pixel row index in the chip coordinate system.
float timeOverThreshold() const
Time over threshold of signal for a pixel.
int pixelRowIDChip() const
Index of the pixel row in chip coordinate system.
void setDepositedCharge(float charge)
Method setting value of the charge deposited in the pixel.
void setTimeOverThreshold(float timeOverThreshold)
Method setting value of time over threshold.
void setStationID(int stationID)
Set index of the station with pixel hit.
void setPixelColIDChip(int colID)
Set pixel column index in the chip coordinate system.
static const int nearC
station with at Z = -205 m
static const int farC
station with at Z = -217 m
static const int farA
station with at Z = 217 m
static const int nearA
station with at Z = 205 m
void setBarInTrainID(const int barInTrainID)
void setPulseLength(float pulseLength)
void setHptdcID(int hptdcID)
void setTrainID(const int barInTrainID)
int hptdcChannel() const
HPTDC channel number.
void setStationID(int side)
int hptdcID() const
Identification number of the HPTDC module.
void setHptdcChannel(int hptdcChannel)
AFPSiHitContainer_v2 AFPSiHitContainer
AFPToFHitContainer_v1 AFPToFHitContainer