[807] | 1 | // |
---|
| 2 | // ******************************************************************** |
---|
| 3 | // * License and Disclaimer * |
---|
| 4 | // * * |
---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of * |
---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and * |
---|
| 7 | // * conditions of the Geant4 Software License, included in the file * |
---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These * |
---|
| 9 | // * include a list of copyright holders. * |
---|
| 10 | // * * |
---|
| 11 | // * Neither the authors of this software system, nor their employing * |
---|
| 12 | // * institutes,nor the agencies providing financial support for this * |
---|
| 13 | // * work make any representation or warranty, express or implied, * |
---|
| 14 | // * regarding this software system or assume any liability for its * |
---|
| 15 | // * use. Please see the license in the file LICENSE and URL above * |
---|
| 16 | // * for the full disclaimer and the limitation of liability. * |
---|
| 17 | // * * |
---|
| 18 | // * This code implementation is the result of the scientific and * |
---|
| 19 | // * technical work of the GEANT4 collaboration. * |
---|
| 20 | // * By using, copying, modifying or distributing the software (or * |
---|
| 21 | // * any work based on the software) you agree to acknowledge its * |
---|
| 22 | // * use in resulting scientific publications, and indicate your * |
---|
| 23 | // * acceptance of all terms of the Geant4 Software license. * |
---|
| 24 | // ******************************************************************** |
---|
| 25 | // |
---|
| 26 | // |
---|
| 27 | // $Id: GammaRayTelCalorimeterHit.hh,v 1.3 2006/06/29 15:55:03 gunter Exp $ |
---|
[1337] | 28 | // GEANT4 tag $Name: geant4-09-04-beta-01 $ |
---|
[807] | 29 | // ------------------------------------------------------------ |
---|
| 30 | // GEANT 4 class header file |
---|
| 31 | // CERN Geneva Switzerland |
---|
| 32 | // |
---|
| 33 | // |
---|
| 34 | // ------------ GammaRayTelCalorimeterHit ------ |
---|
| 35 | // by R.Giannitrapani, F.Longo & G.Santin (13 nov 2000) |
---|
| 36 | // |
---|
| 37 | // ************************************************************ |
---|
| 38 | // This Class describe the hits on the Calorimeter |
---|
| 39 | |
---|
| 40 | #ifndef GammaRayTelCalorimeterHit_h |
---|
| 41 | #define GammaRayTelCalorimeterHit_h 1 |
---|
| 42 | |
---|
| 43 | #include "G4VHit.hh" |
---|
| 44 | #include "G4THitsCollection.hh" |
---|
| 45 | #include "G4Allocator.hh" |
---|
| 46 | #include "G4ThreeVector.hh" |
---|
| 47 | |
---|
| 48 | |
---|
| 49 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 50 | |
---|
| 51 | class GammaRayTelCalorimeterHit : public G4VHit |
---|
| 52 | { |
---|
| 53 | public: |
---|
| 54 | |
---|
| 55 | GammaRayTelCalorimeterHit(); |
---|
| 56 | ~GammaRayTelCalorimeterHit(); |
---|
| 57 | GammaRayTelCalorimeterHit(const GammaRayTelCalorimeterHit&); |
---|
| 58 | const GammaRayTelCalorimeterHit& operator=(const |
---|
| 59 | GammaRayTelCalorimeterHit&); |
---|
| 60 | int operator==(const GammaRayTelCalorimeterHit&) const; |
---|
| 61 | |
---|
| 62 | inline void* operator new(size_t); |
---|
| 63 | inline void operator delete(void*); |
---|
| 64 | |
---|
| 65 | void Draw(); |
---|
| 66 | void Print(); |
---|
| 67 | |
---|
| 68 | private: |
---|
| 69 | |
---|
| 70 | G4double EdepCAL; // Energy deposited on the ACD tile |
---|
| 71 | G4ThreeVector pos; // Position of the hit |
---|
| 72 | G4int CALBarNumber; // Number of the CAL tile |
---|
| 73 | G4int CALPlaneNumber; // Number of the CAL plane |
---|
| 74 | G4int IsCALPlane; // Type of the plane (0 X, 1 Y) |
---|
| 75 | |
---|
| 76 | public: |
---|
| 77 | |
---|
| 78 | inline void AddEnergy(G4double de) {EdepCAL += de;}; |
---|
| 79 | inline void SetCALBarNumber(G4int i) {CALBarNumber = i;}; |
---|
| 80 | inline void SetCALPlaneNumber(G4int i) {CALPlaneNumber = i;}; |
---|
| 81 | inline void SetCALType(G4int i) {IsCALPlane = i;}; |
---|
| 82 | inline void SetPos(G4ThreeVector xyz){ pos = xyz; } |
---|
| 83 | |
---|
| 84 | inline G4double GetEdepCAL() { return EdepCAL; }; |
---|
| 85 | inline G4int GetCALBarNumber() { return CALBarNumber; }; |
---|
| 86 | inline G4int GetCALPlaneNumber() { return CALPlaneNumber; }; |
---|
| 87 | inline G4int GetCALType() {return IsCALPlane;}; |
---|
| 88 | inline G4ThreeVector GetPos() { return pos; }; |
---|
| 89 | |
---|
| 90 | }; |
---|
| 91 | |
---|
| 92 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 93 | |
---|
| 94 | typedef G4THitsCollection<GammaRayTelCalorimeterHit> GammaRayTelCalorimeterHitsCollection; |
---|
| 95 | |
---|
| 96 | extern G4Allocator<GammaRayTelCalorimeterHit> GammaRayTelCalorimeterHitAllocator; |
---|
| 97 | |
---|
| 98 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 99 | |
---|
| 100 | inline void* GammaRayTelCalorimeterHit::operator new(size_t) |
---|
| 101 | { |
---|
| 102 | void* aHit; |
---|
| 103 | aHit = (void*) GammaRayTelCalorimeterHitAllocator.MallocSingle(); |
---|
| 104 | return aHit; |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.... |
---|
| 108 | |
---|
| 109 | inline void GammaRayTelCalorimeterHit::operator delete(void* aHit) |
---|
| 110 | { |
---|
| 111 | GammaRayTelCalorimeterHitAllocator.FreeSingle((GammaRayTelCalorimeterHit*) aHit); |
---|
| 112 | } |
---|
| 113 | |
---|
| 114 | #endif |
---|
| 115 | |
---|
| 116 | |
---|
| 117 | |
---|
| 118 | |
---|
| 119 | |
---|
| 120 | |
---|
| 121 | |
---|
| 122 | |
---|
| 123 | |
---|
| 124 | |
---|