 |
ATLAS Offline Software
|
#include <HGTD_SmearedDigitizationTool.h>
|
StatusCode | retrieveTruth (PRD_MultiTruthCollection *&prd_truth_coll) |
|
TimedHitCollection< SiHit > | setupTimedHitCollection () |
|
StatusCode | digitize (const EventContext &ctx, TimedHitCollection< SiHit > &timed_hit_collection, HGTD_DetElement_RIO_Map_t &det_element_rio_map) |
|
StatusCode | fillMultiTruthCollection (PRD_MultiTruthCollection *, Cluster_t *, const TimedHitPtr< SiHit > &, const EventContext &) |
|
StatusCode | fillClusterContainer (HGTD_DetElement_RIO_Map_t &det_element_rio_map, ClusterContainer_t &cluster_container) |
|
float | smearPosition (float pos, float sig, float boundary, CLHEP::HepRandomEngine *rndmEngine) |
|
float | smearMeanTime (float time, float time_res, CLHEP::HepRandomEngine *rndmEngine) |
|
|
const HGTD_DetectorManager * | m_hgtd_det_manager {nullptr} |
|
const HGTD_ID * | m_hgtd_idhelper {nullptr} |
|
std::string | m_prd_truth_coll_name {"PRD_MultiTruthPixel"} |
|
ServiceHandle< PileUpMergeSvc > | m_merge_svc {this, "MergeSvc", "PileUpMergeSvc", "Merge service used in HGTD fast digitization"} |
|
ServiceHandle< IAthRNGSvc > | m_rndm_svc {this, "RndmSvc", "AthRNGSvc", "Random number service used in HGTD fast digitization"} |
| Random number service. More...
|
|
StringProperty | m_cluster_name {this, "HGTD_ClustersContainerName", "HGTD_Cluster", "Name of the HGTD cluster container"} |
|
StringProperty | m_si_hit_collection_name {this, "SiHitCollectionName", "HGTD_Hits", "Name of the Si Hit collection"} |
|
BooleanProperty | m_smear_intersection_position {this, "SmearIntersectionPosition", true, ""} |
|
BooleanProperty | m_smear_mean_time {this, "SmearMeanTime", true, ""} |
|
BooleanProperty | m_write_tree {this, "WriteTree", false, ""} |
|
FloatProperty | m_pitch_x {this, "pitch_X", 1.3, ""} |
|
FloatProperty | m_pitch_y {this, "pitch_Y", 1.3, ""} |
|
float | m_time_res {0.035} |
|
ServiceHandle< ITHistSvc > | m_hist_svc {this, "THistSvc", "THistSvc"} |
|
std::unique_ptr< TFile > | m_output_file |
|
std::unique_ptr< TTree > | m_tree |
|
float | m_x_hit {} |
|
float | m_y_hit {} |
|
float | m_x_hit_smeared {} |
|
float | m_y_hit_smeared {} |
|
float | m_x_entry_hit {} |
|
float | m_y_entry_hit {} |
|
float | m_z_entry_hit {} |
|
float | m_x_exit_hit {} |
|
float | m_y_exit_hit {} |
|
float | m_z_exit_hit {} |
|
float | m_hit_time {} |
|
float | m_hit_time_smeared {} |
|
float | m_x_cluster_global {} |
|
float | m_y_cluster_global {} |
|
float | m_z_cluster_global {} |
|
float | m_err_x_hit {} |
|
float | m_err_y_hit {} |
|
◆ Cluster_t
◆ ClusterCollection_t
◆ ClusterContainer_t
◆ HGTD_DetElement_RIO_Map_t
◆ HGTD_SmearedDigitizationTool()
HGTD_SmearedDigitizationTool::HGTD_SmearedDigitizationTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~HGTD_SmearedDigitizationTool()
HGTD_SmearedDigitizationTool::~HGTD_SmearedDigitizationTool |
( |
| ) |
|
|
default |
◆ digitize()
Definition at line 161 of file HGTD_SmearedDigitizationTool.cxx.
165 ATH_MSG_DEBUG(
"--- HGTD_SmearedDigitizationTool: in digitize() ---");
170 CLHEP::HepRandomEngine* rndmEngine = rngWrapper->
getEngine(ctx);
185 int endcap = hit->getBarrelEndcap();
186 int layer = hit->getLayerDisk();
187 int phi_module = hit->getPhiModule();
188 int eta_module = hit->getEtaModule();
191 << endcap <<
", layer_disk " <<
layer <<
", phi_module "
192 << phi_module <<
", eta_module " << eta_module);
198 if (!curr_det_element) {
199 ATH_MSG_ERROR(
"could not get detector element for SolidStateDetector");
206 HepGeom::Point3D<double> hit_loc_start_pos = hit->localStartPosition();
207 HepGeom::Point3D<double> hit_loc_end_pos = hit->localEndPosition();
209 HepGeom::Point3D<double> hit_glob_start_pos =
211 HepGeom::Point3D<double> hit_glob_end_pos =
214 double globa_entry_x = hit_glob_start_pos.x();
215 double globa_entry_y = hit_glob_start_pos.y();
220 double globa_exit_x = hit_glob_end_pos.x();
221 double globa_exit_y = hit_glob_end_pos.y();
226 double dist_x = std::abs(std::abs(globa_exit_x) - std::abs(globa_entry_x));
227 double dist_y = std::abs(std::abs(globa_exit_y) - std::abs(globa_entry_y));
243 << entry_id <<
" --- exitId " << exit_id);
244 ATH_MSG_DEBUG(
"--- HGTD_SmearedDigitizationTool: entryCellId "
245 << entry_cell_id <<
" --- exitCellId " << exit_cell_id);
252 double intersection_x = 0.5 * (globa_entry_x + globa_exit_x);
253 double intersection_y = 0.5 * (globa_entry_y + globa_exit_y);
258 double times_x = floor(dist_x /
m_pitch_x);
259 double times_y = floor(dist_y /
m_pitch_y);
261 double sigma_x =
m_pitch_x / std::sqrt(12);
262 double sigma_y =
m_pitch_y / std::sqrt(12);
264 int element_x = times_x + 1;
265 int element_y = times_y + 1;
271 curr_det_element->
width() / 2.,
274 curr_det_element->
length() / 2.,
286 std::vector<Identifier> rdo_list = {intersection_id};
291 if (!current_cell_id.
isValid()) {
302 covariance.setIdentity();
307 float hit_time = hit->meanTime();
314 std::vector<int> tot_vec = {0};
317 si_width, curr_det_element, std::move(cluster_err),
330 det_element_rio_map.insert(
331 std::pair<IdentifierHash, const Cluster_t*>(wafer_id, cluster));
336 return StatusCode::SUCCESS;
◆ fillClusterContainer()
Definition at line 375 of file HGTD_SmearedDigitizationTool.cxx.
378 "--- HGTD_SmearedDigitizationTool: in fillClusterContainer() ---");
384 for (;
i !=
e;
i = det_element_rio_map.upper_bound(
i->first)) {
386 std::pair<RIO_map_t::iterator, RIO_map_t::iterator>
range;
387 range = det_element_rio_map.equal_range(
i->first);
397 cluster_coll->setIdentifier(det_element->
identify());
403 cluster_coll->size());
404 cluster_coll->push_back(cluster);
407 if (cluster_container.addCollection(cluster_coll, wafer_id)
409 ATH_MSG_WARNING(
"Could not add collection to Identifiable container!");
413 return StatusCode::SUCCESS;
◆ fillMultiTruthCollection()
Definition at line 359 of file HGTD_SmearedDigitizationTool.cxx.
364 << *cluster <<
" and link = " << trk_link);
368 map->insert(std::make_pair(cluster->identify(), trk_link));
372 return StatusCode::SUCCESS;
◆ filterPassed()
virtual bool PileUpToolBase::filterPassed |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ finalize()
StatusCode HGTD_SmearedDigitizationTool::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode HGTD_SmearedDigitizationTool::initialize |
( |
| ) |
|
|
overridevirtual |
◆ processAllSubEvents() [1/2]
StatusCode HGTD_SmearedDigitizationTool::processAllSubEvents |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtual |
Reimplemented from PileUpToolBase.
Definition at line 88 of file HGTD_SmearedDigitizationTool.cxx.
90 ATH_MSG_DEBUG(
"[HGTD_SmearedDigitizationTool::processAllSubEvents]");
92 auto cluster_container =
95 cluster_container->cleanup();
102 timed_hit_collection,
103 det_element_rio_map));
107 *cluster_container));
109 return StatusCode::SUCCESS;
◆ 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()
|
inlineoverridevirtualinherited |
Reimplemented in SimpleMergeMcEventCollTool, NewMergeMcEventCollTool, MdtDigitizationTool, TileHitVecToCntTool, MM_DigitizationTool, TRTDigitizationTool, RpcDigitizationTool, LArPileUpTool, AFP_PileUpTool, CscDigitizationTool, PixelDigitizationTool, TgcDigitizationTool, ZDC_PileUpTool, ALFA_PileUpTool, BCM_DigitizationTool, LUCID_PileUpTool, MergeMcEventCollTool, MergeCalibHitsTool, MergeGenericMuonSimHitCollTool, MergeHijingParsTool, MergeTrackRecordCollTool, MergeTruthJetsTool, MergeTruthParticlesTool, TestPileUpTool, MuonR4::MuonDigitizationTool, SCT_FastDigitizationTool, PixelFastDigitizationTool, SiSmearedDigitizationTool, TRTFastDigitizationTool, sTgcDigitizationTool, and HGTD_DigitizationTool.
Definition at line 43 of file PileUpToolBase.h.
46 return StatusCode::SUCCESS;
◆ resetFilter()
virtual void PileUpToolBase::resetFilter |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ retrieveTruth()
◆ setupTimedHitCollection()
Definition at line 126 of file HGTD_SmearedDigitizationTool.cxx.
134 TimedHitCollList_t hit_coll_list;
135 unsigned int num_si_hits(0);
140 hit_coll_list.empty()) {
142 return timed_hit_coll;
145 ATH_MSG_DEBUG(hit_coll_list.size() <<
" SiHitCollections with key "
148 timed_hit_coll.
reserve(num_si_hits);
151 for(
auto hit_coll : hit_coll_list) {
153 timed_hit_coll.
insert(hit_coll.first, si_collection);
154 ATH_MSG_DEBUG(
"SiHitCollection found with " << si_collection->size()
157 return timed_hit_coll;
◆ smearMeanTime()
float HGTD_SmearedDigitizationTool::smearMeanTime |
( |
float |
time, |
|
|
float |
time_res, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
|
private |
◆ smearPosition()
float HGTD_SmearedDigitizationTool::smearPosition |
( |
float |
pos, |
|
|
float |
sig, |
|
|
float |
boundary, |
|
|
CLHEP::HepRandomEngine * |
rndmEngine |
|
) |
| |
|
private |
Definition at line 339 of file HGTD_SmearedDigitizationTool.cxx.
341 ATH_MSG_DEBUG(
"[HGTD_SmearedDigitizationTool::smearPosition] pos: "
342 <<
pos <<
" sig: " <<
sig <<
" boundary: " << boundary);
343 float smeared_pos =
pos;
344 float smear_para = 0.;
347 smear_para = CLHEP::RandGauss::shoot(rndmEngine, 0.,
sig);
349 }
while (std::abs(smeared_pos + smear_para) > boundary);
350 smeared_pos += smear_para;
◆ toProcess()
virtual bool PileUpToolBase::toProcess |
( |
int |
bunchXing | ) |
const |
|
inlineoverridevirtualinherited |
◆ m_cluster_name
StringProperty HGTD_SmearedDigitizationTool::m_cluster_name {this, "HGTD_ClustersContainerName", "HGTD_Cluster", "Name of the HGTD cluster container"} |
|
private |
◆ m_err_x_hit
float HGTD_SmearedDigitizationTool::m_err_x_hit {} |
|
private |
◆ m_err_y_hit
float HGTD_SmearedDigitizationTool::m_err_y_hit {} |
|
private |
◆ 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_det_manager
◆ m_hgtd_idhelper
const HGTD_ID* HGTD_SmearedDigitizationTool::m_hgtd_idhelper {nullptr} |
|
private |
◆ m_hist_svc
ServiceHandle<ITHistSvc> HGTD_SmearedDigitizationTool::m_hist_svc {this, "THistSvc", "THistSvc"} |
|
private |
◆ m_hit_time
float HGTD_SmearedDigitizationTool::m_hit_time {} |
|
private |
◆ m_hit_time_smeared
float HGTD_SmearedDigitizationTool::m_hit_time_smeared {} |
|
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_output_file
std::unique_ptr<TFile> HGTD_SmearedDigitizationTool::m_output_file |
|
private |
◆ m_pitch_x
FloatProperty HGTD_SmearedDigitizationTool::m_pitch_x {this, "pitch_X", 1.3, ""} |
|
private |
◆ m_pitch_y
FloatProperty HGTD_SmearedDigitizationTool::m_pitch_y {this, "pitch_Y", 1.3, ""} |
|
private |
◆ m_prd_truth_coll_name
std::string HGTD_SmearedDigitizationTool::m_prd_truth_coll_name {"PRD_MultiTruthPixel"} |
|
private |
◆ m_rndm_svc
◆ m_si_hit_collection_name
StringProperty HGTD_SmearedDigitizationTool::m_si_hit_collection_name {this, "SiHitCollectionName", "HGTD_Hits", "Name of the Si Hit collection"} |
|
private |
◆ m_smear_intersection_position
BooleanProperty HGTD_SmearedDigitizationTool::m_smear_intersection_position {this, "SmearIntersectionPosition", true, ""} |
|
private |
◆ m_smear_mean_time
BooleanProperty HGTD_SmearedDigitizationTool::m_smear_mean_time {this, "SmearMeanTime", true, ""} |
|
private |
◆ m_time_res
float HGTD_SmearedDigitizationTool::m_time_res {0.035} |
|
private |
◆ m_tree
std::unique_ptr<TTree> HGTD_SmearedDigitizationTool::m_tree |
|
private |
◆ 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.
◆ m_write_tree
BooleanProperty HGTD_SmearedDigitizationTool::m_write_tree {this, "WriteTree", false, ""} |
|
private |
◆ m_x_cluster_global
float HGTD_SmearedDigitizationTool::m_x_cluster_global {} |
|
private |
◆ m_x_entry_hit
float HGTD_SmearedDigitizationTool::m_x_entry_hit {} |
|
private |
◆ m_x_exit_hit
float HGTD_SmearedDigitizationTool::m_x_exit_hit {} |
|
private |
◆ m_x_hit
float HGTD_SmearedDigitizationTool::m_x_hit {} |
|
private |
◆ m_x_hit_smeared
float HGTD_SmearedDigitizationTool::m_x_hit_smeared {} |
|
private |
◆ m_y_cluster_global
float HGTD_SmearedDigitizationTool::m_y_cluster_global {} |
|
private |
◆ m_y_entry_hit
float HGTD_SmearedDigitizationTool::m_y_entry_hit {} |
|
private |
◆ m_y_exit_hit
float HGTD_SmearedDigitizationTool::m_y_exit_hit {} |
|
private |
◆ m_y_hit
float HGTD_SmearedDigitizationTool::m_y_hit {} |
|
private |
◆ m_y_hit_smeared
float HGTD_SmearedDigitizationTool::m_y_hit_smeared {} |
|
private |
◆ m_z_cluster_global
float HGTD_SmearedDigitizationTool::m_z_cluster_global {} |
|
private |
◆ m_z_entry_hit
float HGTD_SmearedDigitizationTool::m_z_entry_hit {} |
|
private |
◆ m_z_exit_hit
float HGTD_SmearedDigitizationTool::m_z_exit_hit {} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
HepGeom::Point3D< double > hitLocalToLocal3D(const HepGeom::Point3D< double > &hitPosition) const
Same as previuos method but 3D.
JetConstituentVector::iterator iterator
Identifier identifierOfPosition(const Amg::Vector2D &localPos) const
Full identifier of the cell for a given position: assumes a raw local position (no Lorentz shift)
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
IdentifierHash wafer_hash(Identifier wafer_id) const
wafer hash from id
size_type wafer_hash_max() const
Eigen::Matrix< double, 2, 1 > Vector2D
A PRD is mapped onto all contributing particles.
bool isValid() const
Test if its in a valid state.
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
bool nextDetectorElement(const_iterator &b, const_iterator &e)
sets an iterator range with the hits of current detector element returns a bool when done
std::vector< std::string > intersection(std::vector< std::string > &v1, std::vector< std::string > &v2)
#define AmgSymMatrix(dim)
std::list< value_t > type
type of the collection of timed data object
a link optimized in size for a GenParticle in a McEventCollection
const InDetDD::HGTD_DetectorElement * getDetectorElement(const Identifier &id) const
access to individual elements : via Identifier
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
void reserve(unsigned int numberOfHits)
reserve a timed vector numberOfHits in size.
void setHashAndIndex(unsigned short collHash, unsigned short objIndex)
TEMP for testing: might make some classes friends later ...
double width() const
Methods from design (inline)
bool isValid() const
Validity check.
Ensure that the ATLAS eigen extensions are properly loaded.
Definition of ATLAS Math & Geometry primitives (Amg)
A wrapper class for event-slot-local random engines.
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
static HepMcParticleLink getRedirectedLink(const HepMcParticleLink &particleLink, uint32_t eventIndex, const EventContext &ctx)
Return a HepMcParticleLink pointing at the same particle, but in a different GenEvent.
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
def time(flags, cells_name, *args, **kw)
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
#define ATH_MSG_WARNING(x)
double length() const
Length in eta direction (z - barrel, r - endcap)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const =0
SiCellId from Identifier.
virtual Identifier identify() const override final
identifier of this detector element (inline)