-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #691 from granadogmarc/MonolithicCrystal
Monolithic crystal
- Loading branch information
Showing
12 changed files
with
1,077 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/*---------------------- | ||
Copyright (C): OpenGATE Collaboration | ||
This software is distributed under the terms | ||
of the GNU Lesser General Public Licence (LGPL) | ||
See LICENSE.md for further details | ||
----------------------*/ | ||
|
||
// OK GND 2022 | ||
/*! | ||
\class GateDiscretizer (by [email protected]) | ||
\brief for discretizing the position within a monolithic crystal | ||
- For each volume the local position of the interactions within the crystal are discretized. | ||
the X,Y,Z vector is translated into the IDs of virtual divisions within the crystal | ||
ocuppying the levels of SubmoduleID, CrystalID and LayerID. | ||
*/ | ||
|
||
#ifndef GateDiscretizer_h | ||
#define GateDiscretizer_h 1 | ||
|
||
#include "GateVDigitizerModule.hh" | ||
#include "GateDigi.hh" | ||
#include "GateClockDependent.hh" | ||
#include "GateCrystalSD.hh" | ||
|
||
#include "globals.hh" | ||
|
||
#include "GateSinglesDigitizer.hh" | ||
|
||
|
||
class GateDiscretizer : public GateVDigitizerModule | ||
{ | ||
public: | ||
|
||
GateDiscretizer(GateSinglesDigitizer *digitizer, G4String name); | ||
~GateDiscretizer(); | ||
adder_policy_t m_positionPolicy; | ||
|
||
private: | ||
GateAdderMessenger *m_Messenger; | ||
|
||
GateDigi* m_outputDigi; | ||
GateDigiCollection* m_OutputDigiCollection; | ||
GateSinglesDigitizer *m_digitizer; | ||
|
||
|
||
|
||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
135 changes: 135 additions & 0 deletions
135
source/digits_hits/include/GateVirtualSegmentationSD.hh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
/*---------------------- | ||
Copyright (C): OpenGATE Collaboration | ||
This software is distributed under the terms | ||
of the GNU Lesser General Public Licence (LGPL) | ||
See LICENSE.md for further details | ||
----------------------*/ | ||
|
||
// OK GND 2022 | ||
/*This class is not used by GATE ! | ||
The purpose of this class is to help to create new users digitizer module(DM). | ||
Please, check GateVirtualSegmentationSD.cc for more detals | ||
*/ | ||
|
||
|
||
/*! \class GateVirtualSegmentationSD | ||
\brief GateVirtualSegmentationSD - For each volume the local position of the interactions within the crystal are virtually segmented. | ||
the X,Y,Z vector is translated into the IDs of virtual divisions within the crystal | ||
- GateVirtualSegmentationSD - by [email protected] | ||
\sa GateVirtualSegmentationSD, GateVirtualSegmentationSDMessenger | ||
*/ | ||
|
||
#ifndef GateVirtualSegmentationSD_h | ||
#define GateVirtualSegmentationSD_h 1 | ||
|
||
#include "GateVDigitizerModule.hh" | ||
#include "GateDigi.hh" | ||
#include "GateClockDependent.hh" | ||
#include "GateCrystalSD.hh" | ||
|
||
#include "globals.hh" | ||
|
||
#include "GateVirtualSegmentationSDMessenger.hh" | ||
#include "GateSinglesDigitizer.hh" | ||
|
||
|
||
class GateVirtualSegmentationSD : public GateVDigitizerModule | ||
{ | ||
public: | ||
|
||
GateVirtualSegmentationSD(GateSinglesDigitizer *digitizer, G4String name); | ||
|
||
~GateVirtualSegmentationSD(); | ||
|
||
void Digitize() override; | ||
|
||
//! These functions return the pitch in use. | ||
G4String GetNameAxis() { return m_nameAxis; } | ||
G4double GetPitch() { return m_pitch; } | ||
G4double GetPitchX() { return m_pitchX; } | ||
G4double GetPitchY() { return m_pitchY; } | ||
G4double GetPitchZ() { return m_pitchZ; } | ||
|
||
G4double calculatePitch(G4double crystal_size, G4double target_pitch); | ||
|
||
|
||
//Set Parameter | ||
void SetNameAxis(const G4String&); | ||
|
||
void SetUseMacroGenerator(G4bool val) {useMacroGenerator=val;} | ||
|
||
//Set Variables | ||
void SetPitch(G4double val) { m_pitch = val; } | ||
void SetPitchX(G4double val) { m_pitchX = val; } | ||
void SetPitchY(G4double val) { m_pitchY = val; } | ||
void SetPitchZ(G4double val) { m_pitchZ = val; } | ||
|
||
void SetParameters(); | ||
|
||
void SetVirtualID(int nBins,double pitch, G4double pos, int depth); | ||
void DescribeMyself(size_t ); | ||
|
||
protected: | ||
// *******implement your parameters here | ||
G4double m_pitch; | ||
|
||
G4String m_nameAxis; | ||
G4double m_pitchX; | ||
G4double m_pitchY; | ||
G4double m_pitchZ; | ||
|
||
G4int nBinsX; | ||
G4int nBinsY; | ||
G4int nBinsZ; | ||
|
||
G4double pitchX; | ||
G4double pitchY; | ||
G4double pitchZ; | ||
|
||
G4int depthX; | ||
G4int depthY; | ||
G4int depthZ; | ||
|
||
G4double xLength; | ||
G4double yLength; | ||
G4double zLength; | ||
|
||
//These are in Spatial pitch but aren't there rom touchable? | ||
//We'll need to check | ||
|
||
//G4Navigator* m_Navigator; | ||
//G4TouchableHistoryHandle m_Touchable; | ||
|
||
private: | ||
|
||
G4int m_systemDepth; | ||
|
||
G4int m_IsFirstEntry; | ||
|
||
G4bool useMacroGenerator; | ||
|
||
GateDigi* m_outputDigi; | ||
|
||
GateVirtualSegmentationSDMessenger *m_Messenger; | ||
|
||
GateDigiCollection* m_OutputDigiCollection; | ||
|
||
GateSinglesDigitizer *m_digitizer; | ||
|
||
|
||
}; | ||
|
||
|
||
#endif | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.