PixelDigitizationTool.h 3.96 KB
Newer Older
1
/*
2
  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
7
8
9
/**
 * @file PixelDigitization/PixelDigitizationTool.h
 * @author Soshi Tsuno <Soshi.Tsuno@cern.ch>
 * @date January, 2020
 * @brief Handle pixel digitization
 */
10
11
12
13
14
15

#ifndef PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H
#define PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H

#include "AthenaBaseComps/AthAlgTool.h"
#include "PileUpTools/PileUpToolBase.h"
16
#include "AthenaKernel/IAthRNGSvc.h"
17
18
19
20
21
22
#include "HitManagement/TimedHitCollection.h"
#include "InDetSimEvent/SiHitCollection.h"

#include "InDetRawData/InDetRawDataCLASS_DEF.h"
#include "GaudiKernel/ToolHandle.h"
#include "GaudiKernel/ServiceHandle.h"
23

24
#include "StoreGate/ReadHandleKey.h"
25
#include "StoreGate/ReadCondHandleKey.h"
26
#include "StoreGate/WriteHandle.h"
27
#include "StoreGate/WriteHandleKey.h"
28
#include "PileUpTools/PileUpMergeSvc.h"
29

30
#include "InDetSimData/InDetSimDataCollection.h"
31
#include "SensorSimTool.h"
32
#include "FrontEndSimTool.h"
Rebecca Carney's avatar
Rebecca Carney committed
33
#include "EnergyDepositionTool.h"
34

35
#include "InDetReadoutGeometry/SiDetectorElementCollection.h"
36

37
class PixelDigitizationTool : public PileUpToolBase {
38

39
40
  public:
    PixelDigitizationTool(const std::string &type, const std::string &name, const IInterface *pIID);
41

42
43
44
    virtual StatusCode initialize() override;
    virtual StatusCode processAllSubEvents() override;
    virtual StatusCode finalize() override;
45

46
    virtual StatusCode prepareEvent(unsigned int) override;
47
    StatusCode digitizeEvent();
48
    virtual StatusCode mergeEvent() override;
49
    virtual StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents) override final;
50

51
  protected:
Fenfen An's avatar
Fenfen An committed
52
    void addSDO(SiChargedDiodeCollection *collection);
53

54
  private:
55

56
57
58
    PixelDigitizationTool();
    PixelDigitizationTool(const PixelDigitizationTool&);
    PixelDigitizationTool &operator=(const PixelDigitizationTool&);
59

60
    std::vector<SiHitCollection*> m_hitCollPtrs;
61

62
63
    Gaudi::Property<bool> 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", "", "Input HITS collection name"};
64
    SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_pixelDetEleCollKey{this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"};
65
    std::string                                m_inputObjectName{""};
66
67
68
69
70
71
72
    SG::WriteHandleKey<PixelRDO_Container>     m_rdoContainerKey{this, "RDOCollName", "PixelRDOs", "RDO collection name"};
    SG::WriteHandle<PixelRDO_Container>        m_rdoContainer{};
    SG::WriteHandleKey<InDetSimDataCollection> m_simDataCollKey{this, "SDOCollName", "PixelSDO_Map",  "SDO collection name"};
    SG::WriteHandle<InDetSimDataCollection>    m_simDataColl{};
    Gaudi::Property<int>                       m_HardScatterSplittingMode{this, "HardScatterSplittingMode", 0, "Control pileup & signal splitting"};
    bool                                       m_HardScatterSplittingSkipper{false};
    Gaudi::Property<bool>                      m_onlyHitElements{this, "OnlyHitElements", false, "Process only elements with hits"};
73

74
    const PixelID *m_detID{};
75
76


77
    TimedHitCollection<SiHit> *m_timedHits{};
78

79
80
81
82
    ToolHandleArray<SensorSimTool> m_chargeTool{this, "ChargeTools", {}, "List of charge tools"};
    ToolHandleArray<FrontEndSimTool> m_fesimTool{this, "FrontEndSimTools", {}, "List of Front-End simulation tools"};
    ToolHandle<EnergyDepositionTool> m_energyDepositionTool{this, "EnergyDepositionTool", "EnergyDepositionTool", "Energy deposition tool"};

83
  protected:
84

85
    ServiceHandle<IAthRNGSvc> m_rndmSvc{this, "RndmSvc", "AthRNGSvc", ""};  //!< Random number service
86
    ServiceHandle <PileUpMergeSvc> m_mergeSvc{this, "PileUpMergeSvc", "PileUpMergeSvc", ""};
87

88
    Gaudi::Property<bool> m_createNoiseSDO{this, "CreateNoiseSDO",   false,  "Set create noise SDO flag"};
89
90
91
92

};

#endif // PIXELDIGITIZATION_PIXELDIGITIZATIONTOOL_H