forked from FairRootGroup/FairRoot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPixel.h
More file actions
89 lines (68 loc) · 2.88 KB
/
Copy pathPixel.h
File metadata and controls
89 lines (68 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/********************************************************************************
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
#ifndef PIXEL_H
#define PIXEL_H
#include "FairDetector.h" // for FairDetector
#include <Rtypes.h> // for Int_t, Double32_t, Double_t, etc
#include <TLorentzVector.h> // for TLorentzVector
#include <TVector3.h> // for TVector3
class PixelPoint;
class FairVolume;
class TClonesArray;
class Pixel : public FairDetector
{
public:
/** Name : Detector Name
* Active: kTRUE for active detectors (ProcessHits() will be called)
* kFALSE for inactive detectors
*/
Pixel(const char* Name, Bool_t Active);
/** default constructor */
Pixel();
/** destructor */
~Pixel() override;
/** this method is called for each step during simulation
* (see FairMCApplication::Stepping())
*/
Bool_t ProcessHits(FairVolume* v = 0) override;
/** Registers the produced collections in FAIRRootManager. */
void Register() override;
/** Gets the produced collections */
TClonesArray* GetCollection(Int_t iColl) const override;
/** has to be called after each event to reset the containers */
void Reset() override;
/** Create the detector geometry */
void ConstructGeometry() override;
/** This method is an example of how to add your own point
* of type PixelPoint to the clones array
*/
PixelPoint*
AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss);
/** The following methods can be implemented if you need to make
* any optional action in your detector during the transport.
*/
void EndOfEvent() override;
FairModule* CloneModule() const override;
private:
/** Track information to be stored until the track leaves the
active volume.
*/
Int_t fTrackID; //! track index
Int_t fVolumeID; //! volume id
TLorentzVector fPos; //! position at entrance
TLorentzVector fMom; //! momentum at entrance
Double32_t fTime; //! time
Double32_t fLength; //! length
Double32_t fELoss; //! energy loss
/** container for data points */
TClonesArray* fPixelPointCollection;
Pixel(const Pixel&);
Pixel& operator=(const Pixel&);
ClassDefOverride(Pixel, 1);
};
#endif // PIXEL_H