|
ATLAS Offline Software
|
#include <HGTD_DigitizationTool.h>
|
FloatProperty | m_charge_threshold {this, "ChargeThreshold", 625., "Minimum charge threshold in ASIC"} |
|
BooleanProperty | m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."} |
|
SG::ReadHandleKey< SiHitCollection > | m_hitsContainerKey {this, "InputObjectName", "HGTD_Hits", "Input HITS collection name"} |
|
std::string | m_inputObjectName {""} |
|
SG::WriteHandle< HGTD_RDO_Container > | m_hgtd_rdo_container |
| RDO container handle. More...
|
|
SG::WriteHandleKey< HGTD_RDO_Container > | m_output_rdo_cont_key {this, "OutputObjectName", "HGTD_RDOs", "Output Object name"} |
|
SG::WriteHandle< InDetSimDataCollection > | m_sdo_collection_map |
| SDO Map handle. More...
|
|
SG::WriteHandleKey< InDetSimDataCollection > | m_output_sdo_coll_key {this, "OutputSDOName", "HGTD_SDO_Map", "Output SDO container name"} |
|
SG::ReadCondHandleKey< InDetDD::HGTD_DetectorElementCollection > | m_HGTDDetEleCollKey {this, "HGTDDetEleCollKey", "HGTD_DetectorElementCollection", "Key of HGTD_DetectorElementCollection for HGTD"} |
|
ServiceHandle< PileUpMergeSvc > | m_merge_svc {this, "MergeSvc", "PileUpMergeSvc", "Merge service used in Pixel & HGTD digitization"} |
|
ServiceHandle< IAthRNGSvc > | m_rndm_svc {this, "RndmSvc", "AthRNGSvc", "Random Number Service used in HGTD & Pixel digitization"} |
| Random number service. More...
|
|
std::list< ISiChargedDiodesProcessorTool * > | m_diode_processor_tools |
|
ToolHandle< IFrontEnd > | m_hgtd_front_end_tool {this, "FrontEnd", "HGTD_FrontEndTool", "Tool for pulse shape simulation"} |
|
ToolHandle< IHGTD_SurfaceChargesGenerator > | m_hgtd_surf_charge_gen {this, "SurfaceChargesGenerator", "HGTD_SurfaceChargesGenerator", "Choice of using a more detailed charge drift model"} |
|
const HGTD_ID * | m_id_helper {nullptr} |
| Handle to the ID helper. More...
|
|
std::unique_ptr< TimedHitCollection< SiHit > > | m_timed_hit_coll {nullptr} |
|
std::vector< bool > | m_processed_elements |
| In order to process all element rather than just those with hits we create a vector to keep track of which elements have been processed. More...
|
|
std::vector< std::unique_ptr< SiHitCollection > > | m_hit_coll_ptrs {} |
|
Definition at line 48 of file HGTD_DigitizationTool.h.
◆ HGTD_DigitizationTool()
HGTD_DigitizationTool::HGTD_DigitizationTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ applyProcessorTools()
void HGTD_DigitizationTool::applyProcessorTools |
( |
SiChargedDiodeCollection * |
charged_diodes, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| const |
|
private |
FIXME: will be implemented once we know how much noise we expect.
Step by step processor tools applied on diodes. These should simulate: Preamplifier -> Discriminator -> TDC. Is called within digitizeHitsPerDetectorElement.
Used tools: FrontEndTool, which calls the Amplifier inside
Definition at line 302 of file HGTD_DigitizationTool.cxx.
306 int processorNumber = 0;
317 proc->process(*charged_diodes, rndmEngine);
◆ createAndStoreSDO()
Definition at line 399 of file HGTD_DigitizationTool.cxx.
402 std::vector<InDetSimData::Deposit> deposits;
410 for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
412 const list_t &charges =
413 (*i_chargedDiode).second.totalCharge().chargeComposition();
415 bool real_particle_hit =
false;
418 list_t::const_iterator charge_list_itr_end = charges.end();
419 list_t::const_iterator charge_list_itr = charges.begin();
421 for (; charge_list_itr != charge_list_itr_end; ++charge_list_itr) {
427 if (!real_particle_hit) {
438 real_particle_hit =
true;
444 std::vector<InDetSimData::Deposit>::reverse_iterator theDeposit =
446 std::vector<InDetSimData::Deposit>::reverse_iterator depositsR_end =
448 std::vector<InDetSimData::Deposit>::reverse_iterator i_Deposit =
450 for (; i_Deposit != depositsR_end; ++i_Deposit) {
451 if ((*i_Deposit).first == trkLink) {
452 theDeposit = i_Deposit;
458 if (theDeposit != depositsR_end) {
459 if((*theDeposit).second > charge_list_itr->time()){
460 (*theDeposit).first = trkLink;
461 (*theDeposit).second = charge_list_itr->time();
464 deposits.emplace_back(trkLink, charge_list_itr->time());
470 if (real_particle_hit) {
473 (*i_chargedDiode).second.getReadoutCell();
475 int phi_index = readout_cell.
phiIndex();
477 charged_diodes->identify(), phi_index,
eta_index);
479 m_sdo_collection_map->try_emplace(id_readout, std::move(deposits), (*i_chargedDiode).second.flag());
◆ createRDOCollection()
Definition at line 337 of file HGTD_DigitizationTool.cxx.
342 std::unique_ptr<HGTD_RDO_Collection> rdo_collection =
343 std::make_unique<HGTD_RDO_Collection>(idHash_de);
352 for (; i_chargedDiode != i_chargedDiode_end; ++i_chargedDiode) {
361 <<
" does not pass threshold of "
367 (*i_chargedDiode).second.getReadoutCell();
369 int phi_index = readout_cell.
phiIndex();
372 <<
" phi:" << phi_index);
384 float toa =
charge.time();
386 unsigned int dummy_tot = 256;
387 unsigned short dummy_bcid = 0;
388 unsigned short dummy_l1a = 0;
389 unsigned short dummy_l1id = 0;
391 std::unique_ptr<HGTD_RDO> p_rdo = std::make_unique<HGTD_RDO>(
392 id_readout, toa, dummy_tot, dummy_bcid, dummy_l1a, dummy_l1id);
394 rdo_collection->
push_back(p_rdo.release());
396 return rdo_collection;
◆ DeclareInterfaceID()
IPileUpTool::DeclareInterfaceID |
( |
IPileUpTool |
, |
|
|
1 |
, |
|
|
0 |
|
|
) |
| |
|
inherited |
◆ digitizeHitsPerDetectorElement()
StatusCode HGTD_DigitizationTool::digitizeHitsPerDetectorElement |
( |
const EventContext & |
ctx, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
|
private |
Definition at line 231 of file HGTD_DigitizationTool.cxx.
232 ATH_MSG_DEBUG(
"HGTD_DigitizationTool::digitizeHitsPerDetectorElement");
237 if (elements==
nullptr) {
239 return StatusCode::FAILURE;
256 fist_hit->getBarrelEndcap(), fist_hit->getLayerDisk(),
257 fist_hit->getPhiModule(), fist_hit->getEtaModule());
265 std::unique_ptr<SiChargedDiodeCollection> charged_diode_coll =
266 std::make_unique<SiChargedDiodeCollection>(det_elem);
271 for (; coll_itr != coll_itr_end; ++coll_itr) {
282 current_hit, charged_diode_coll.get(), det_elem, rndmEngine, ctx);
289 std::unique_ptr<HGTD_RDO_Collection> rdo_collection =
299 return StatusCode::SUCCESS;
◆ filterPassed() [1/2]
virtual bool IPileUpTool::filterPassed |
( |
| ) |
const |
|
pure virtualinherited |
flags whether the event should be removed or not
◆ filterPassed() [2/2]
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ initialize()
StatusCode HGTD_DigitizationTool::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ interfaceID()
const InterfaceID & HGTD_DigitizationTool::interfaceID |
( |
| ) |
|
|
inlinestatic |
◆ mergeEvent()
StatusCode HGTD_DigitizationTool::mergeEvent |
( |
const EventContext & |
| ) |
|
|
finaloverridevirtual |
◆ prepareEvent()
StatusCode HGTD_DigitizationTool::prepareEvent |
( |
const EventContext & |
, |
|
|
unsigned int |
|
|
) |
| |
|
finaloverridevirtual |
◆ processAllSubEvents() [1/2]
StatusCode HGTD_DigitizationTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
finaloverridevirtual |
◆ processAllSubEvents() [2/2]
virtual StatusCode IPileUpTool::processAllSubEvents |
|
inherited |
dummy implementation to allow compilation while all Digitization packages are migrated to use this new interface.
◆ processBunchXing()
called for each active bunch-crossing (time in ns)
Implements IPileUpTool.
Definition at line 90 of file HGTD_DigitizationTool.cxx.
94 ATH_MSG_DEBUG(
"HGTD_DigitizationTool::processBunchXing " << bunch_xing);
101 TimedHitCollList_t timed_hit_coll_list;
104 sub_event_itr, sub_event_itr_end).isSuccess())) and
105 timed_hit_coll_list.size() == 0) {
107 return StatusCode::FAILURE;
109 ATH_MSG_VERBOSE(timed_hit_coll_list.size() <<
" SiHitCollections with key " <<
115 std::unique_ptr<SiHitCollection> hitCollPtr{std::make_unique<SiHitCollection>(*iColl->second)};
117 ATH_MSG_DEBUG(
"SiHitCollection found with " << hitCollPtr->size() <<
120 <<
" index: " << timeIndex.index()
121 <<
" type: " << timeIndex.type());
126 return StatusCode::SUCCESS;
◆ resetFilter() [1/2]
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ resetFilter() [2/2]
virtual void IPileUpTool::resetFilter |
( |
| ) |
|
|
pure virtualinherited |
◆ retrieveHitCollection()
StatusCode HGTD_DigitizationTool::retrieveHitCollection |
( |
const EventContext & |
ctx | ) |
|
|
private |
Retrieve the SiHit collection and place it in a TimedHitCollection.
Definition at line 172 of file HGTD_DigitizationTool.cxx.
173 ATH_MSG_DEBUG(
"HGTD_DigitizationTool::retrieveHitCollection()");
181 if (!hitCollection.isValid()) {
182 ATH_MSG_ERROR(
"Could not get HGTD SiHitCollection container " << hitCollection.name() <<
" from store " << hitCollection.store());
183 return StatusCode::FAILURE;
189 ATH_MSG_DEBUG(
"SiHitCollection found with " << hitCollection->size() <<
" hits");
191 return StatusCode::SUCCESS;
194 TimedHitCollList_t timed_hit_coll_list;
195 unsigned int n_si_hits(0);
201 timed_hit_coll_list.size() == 0) {
203 return StatusCode::FAILURE;
215 while (coll_itr != coll_itr_end) {
224 ATH_MSG_DEBUG(
"SiTrackerHitCollection found with" << collection->size()
228 return StatusCode::SUCCESS;
◆ storeRDOCollection()
StatusCode HGTD_DigitizationTool::storeRDOCollection |
( |
std::unique_ptr< HGTD_RDO_Collection > |
coll | ) |
|
|
private |
◆ toProcess() [1/2]
virtual bool IPileUpTool::toProcess |
( |
int |
bunchXing | ) |
const |
|
pure virtualinherited |
flags whether this tool is "live" for bunchXing (time in ns) implemented by default in PileUpToolBase as FirstXing<=bunchXing<=LastXing
◆ toProcess() [2/2]
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ m_charge_threshold
FloatProperty HGTD_DigitizationTool::m_charge_threshold {this, "ChargeThreshold", 625., "Minimum charge threshold in ASIC"} |
|
private |
◆ m_diode_processor_tools
◆ m_filterPassed
bool PileUpToolBase::m_filterPassed {true} |
|
protectedinherited |
◆ m_firstXing
Gaudi::Property<int> PileUpToolBase::m_firstXing |
|
protectedinherited |
Initial value:{this, "FirstXing", -999,
"First bunch-crossing in which det is live"}
Definition at line 54 of file PileUpToolBase.h.
◆ m_hgtd_front_end_tool
◆ m_hgtd_rdo_container
◆ m_hgtd_surf_charge_gen
◆ m_HGTDDetEleCollKey
◆ m_hit_coll_ptrs
std::vector<std::unique_ptr<SiHitCollection> > HGTD_DigitizationTool::m_hit_coll_ptrs {} |
|
private |
◆ m_hitsContainerKey
◆ m_id_helper
◆ m_inputObjectName
std::string HGTD_DigitizationTool::m_inputObjectName {""} |
|
private |
◆ m_lastXing
Gaudi::Property<int> PileUpToolBase::m_lastXing |
|
protectedinherited |
Initial value:{this, "LastXing", 999,
"Last bunch-crossing in which det is live"}
Definition at line 56 of file PileUpToolBase.h.
◆ m_merge_svc
◆ m_onlyUseContainerName
BooleanProperty HGTD_DigitizationTool::m_onlyUseContainerName {this, "OnlyUseContainerName", true, "Don't use the ReadHandleKey directly. Just extract the container name from it."} |
|
private |
◆ m_output_rdo_cont_key
◆ m_output_sdo_coll_key
◆ m_processed_elements
std::vector<bool> HGTD_DigitizationTool::m_processed_elements |
|
private |
In order to process all element rather than just those with hits we create a vector to keep track of which elements have been processed.
This is useful for adding random noise (?!) NB. an element is an hgtd module
Definition at line 131 of file HGTD_DigitizationTool.h.
◆ m_rndm_svc
◆ m_sdo_collection_map
◆ m_timed_hit_coll
◆ m_vetoPileUpTruthLinks
Gaudi::Property<int> PileUpToolBase::m_vetoPileUpTruthLinks |
|
protectedinherited |
Initial value:{this, "VetoPileUpTruthLinks", true,
"Ignore links to suppressed pile-up truth"}
Definition at line 58 of file PileUpToolBase.h.
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
virtual IdentifierHash identifyHash() const override final
SiChargedDiodeIterator end()
int phiIndex() const
Get phi index. Equivalent to strip().
#define ATH_MSG_VERBOSE(x)
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
std::vector< SiCharge > list_t
SiChargedDiodeIterator begin()
SiChargedDiodeMap::iterator SiChargedDiodeIterator
Identifier wafer_id(int endcap, int layer, int phi_module, int eta_module) const
For a single crystal.
std::list< value_t > type
type of the collection of timed data object
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
a link optimized in size for a GenParticle in a McEventCollection
const SiTotalCharge & totalCharge() const
int etaIndex() const
Get eta index.
void setIdentifier(Identifier id)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
size_type wafer_hash_max(void) const
A wrapper class for event-slot-local random engines.
const IdentifierHash & identifierHash() const
IDC::IDENTIFIABLE * addCollection(const Identifier collId, IDC *idc, const IDHELPER &idHelper, MsgStream &log)
double charge(const T &p)
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
Identifier pixel_id(int endcap, int layer, int phi_module, int eta_module, int phi_index, int eta_index) const
For an individual pixel.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
a struct encapsulating the identifier of a pile-up event
bool no_truth_link(const T &p)
Method to establish if a if the object is linked to something which was never saved to the HepMC Trut...
virtual Identifier identify() const override final