ATLAS Offline Software
Loading...
Searching...
No Matches
HGTD_SmearedDigitizationTool.h
Go to the documentation of this file.
1
15
16#ifndef HGTD_FASTSIDIGITIZATION_HGTD_SMEAREDDIGITIZATIONTOOL_H
17#define HGTD_FASTSIDIGITIZATION_HGTD_SMEAREDDIGITIZATIONTOOL_H
18
20#include "GaudiKernel/ITHistSvc.h"
21#include "GaudiKernel/ServiceHandle.h"
22#include "GaudiKernel/ToolHandle.h"
28#include "InDetSimEvent/SiHit.h"
31#include <string>
32
33// forward declarations
35class HGTD_ID;
37class TFile;
38class TTree;
39
40namespace CLHEP {
41class HepRandomEngine;
42}
43
45public:
49
51 std::multimap<IdentifierHash, const Cluster_t*>;
52
53 HGTD_SmearedDigitizationTool(const std::string& type, const std::string& name,
54 const IInterface* parent);
55
57
58 virtual StatusCode initialize() override;
59 virtual StatusCode finalize() override;
60
61 // main method to be called when using this tool
62 virtual StatusCode processAllSubEvents(const EventContext& ctx) override;
63
64private:
65 // methods called within processAllSubEvents
66 StatusCode retrieveTruth(PRD_MultiTruthCollection*& prd_truth_coll);
67
69
70 // create HGTD_Cluster from SiHit
71 StatusCode digitize(const EventContext& ctx,
72 TimedHitCollection<SiHit>& timed_hit_collection,
73 HGTD_DetElement_RIO_Map_t& det_element_rio_map);
74
76 const TimedHitPtr<SiHit>&, const EventContext&);
77
78 StatusCode fillClusterContainer(HGTD_DetElement_RIO_Map_t& det_element_rio_map,
79 ClusterContainer_t& cluster_container);
80
81 float smearPosition(float pos, float sig, float boundary, CLHEP::HepRandomEngine * rndmEngine);
82
83 float smearMeanTime(float time, float time_res, CLHEP::HepRandomEngine * rndmEngine);
84
86 const HGTD_ID* m_hgtd_idhelper{nullptr};
87
88 std::string m_prd_truth_coll_name{"PRD_MultiTruthPixel"};
89
90 ServiceHandle<PileUpMergeSvc> m_merge_svc{this, "MergeSvc", "PileUpMergeSvc", "Merge service used in HGTD fast digitization"};
91 ServiceHandle<IAthRNGSvc> m_rndm_svc{this, "RndmSvc", "AthRNGSvc", "Random number service used in HGTD fast digitization"};
92
93 StringProperty m_cluster_name{this, "HGTD_ClustersContainerName", "HGTD_Cluster", "Name of the HGTD cluster container"};
94
95 StringProperty m_si_hit_collection_name{this, "SiHitCollectionName", "HGTD_Hits", "Name of the Si Hit collection"};
96
97 BooleanProperty m_smear_intersection_position{this, "SmearIntersectionPosition", true, ""};
98 BooleanProperty m_smear_mean_time{this, "SmearMeanTime", true, ""};
99 BooleanProperty m_write_tree{this, "WriteTree", false, ""};
100
101 // will default to 1.3x1.3 pitch size for HGTD, but can be set via property
102 FloatProperty m_pitch_x{this, "pitch_X", 1.3, ""};
103 FloatProperty m_pitch_y{this, "pitch_Y", 1.3, ""};
104 float m_time_res{0.035}; // time resolution in ns
105
106 // variables used only for writing out validation tree (not written by default)
107
108 ServiceHandle<ITHistSvc> m_hist_svc{this, "THistSvc", "THistSvc"};
109 std::unique_ptr<TFile> m_output_file;
110 std::unique_ptr<TTree> m_tree;
111
112 float m_x_hit{};
113 float m_y_hit{};
116
123
124 float m_hit_time{};
126
130
131 float m_err_x_hit{};
132 float m_err_y_hit{};
133
134};
135
136#endif // HGTD_FASTSIDIGITIZATION_HGTD_SMEAREDDIGITIZATIONTOOL_H
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
Trk::PrepRawDataCollection< HGTD_Cluster > HGTD_ClusterCollection
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration.
Trk::PrepRawDataContainer< HGTD_ClusterCollection > HGTD_ClusterContainer
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration.
the preferred mechanism to access information from the different event stores in a pileup job.
helper base class IPileUpTool::toProcess().
The Detector manager has methods to retrieve the Identifier helper and methods to retrieve the detect...
This is an Identifier helper class for the HGTD subdetector.
Definition HGTD_ID.h:47
float smearPosition(float pos, float sig, float boundary, CLHEP::HepRandomEngine *rndmEngine)
TimedHitCollection< SiHit > setupTimedHitCollection()
StatusCode fillClusterContainer(HGTD_DetElement_RIO_Map_t &det_element_rio_map, ClusterContainer_t &cluster_container)
StatusCode digitize(const EventContext &ctx, TimedHitCollection< SiHit > &timed_hit_collection, HGTD_DetElement_RIO_Map_t &det_element_rio_map)
HGTD_SmearedDigitizationTool(const std::string &type, const std::string &name, const IInterface *parent)
std::multimap< IdentifierHash, const Cluster_t * > HGTD_DetElement_RIO_Map_t
StatusCode fillMultiTruthCollection(PRD_MultiTruthCollection *, Cluster_t *, const TimedHitPtr< SiHit > &, const EventContext &)
const HGTD_DetectorManager * m_hgtd_det_manager
virtual StatusCode initialize() override
float smearMeanTime(float time, float time_res, CLHEP::HepRandomEngine *rndmEngine)
virtual StatusCode processAllSubEvents(const EventContext &ctx) override
ServiceHandle< IAthRNGSvc > m_rndm_svc
Random number service.
StatusCode retrieveTruth(PRD_MultiTruthCollection *&prd_truth_coll)
virtual StatusCode finalize() override
ServiceHandle< PileUpMergeSvc > m_merge_svc
A PRD is mapped onto all contributing particles.
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
a smart pointer to a hit that also provides access to the extended timing info of the host event.
Definition TimedHitPtr.h:18