source: trunk/examples/extended/analysis/A01/include/A01HadCalorimeterHit.hh @ 893

Last change on this file since 893 was 807, checked in by garnier, 16 years ago

update

File size: 3.9 KB
Line 
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// $Id: A01HadCalorimeterHit.hh,v 1.5 2006/06/29 16:31:12 gunter Exp $
27// --------------------------------------------------------------
28//
29#ifndef A01HadCalorimeterHit_h
30#define A01HadCalorimeterHit_h 1
31
32#include "G4VHit.hh"
33#include "G4THitsCollection.hh"
34#include "G4Allocator.hh"
35#include "G4ThreeVector.hh"
36#include "G4LogicalVolume.hh"
37#include "G4Transform3D.hh"
38#include "G4RotationMatrix.hh"
39
40class G4AttDef;
41class G4AttValue;
42
43class A01HadCalorimeterHit : public G4VHit
44{
45  public:
46
47      A01HadCalorimeterHit();
48      A01HadCalorimeterHit(G4int iCol,G4int iRow);
49      virtual ~A01HadCalorimeterHit();
50      A01HadCalorimeterHit(const A01HadCalorimeterHit &right);
51      const A01HadCalorimeterHit& operator=(const A01HadCalorimeterHit &right);
52      int operator==(const A01HadCalorimeterHit &right) const;
53
54      inline void *operator new(size_t);
55      inline void operator delete(void *aHit);
56
57      virtual void Draw();
58      virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
59      virtual std::vector<G4AttValue>* CreateAttValues() const;
60      virtual void Print();
61
62  private:
63      G4int columnID;
64      G4int rowID;
65      G4double edep;
66      G4ThreeVector pos;
67      G4RotationMatrix rot;
68
69  public:
70      inline void SetColumnID(G4int z) { columnID = z; }
71      inline G4int GetColumnID() const { return columnID; }
72      inline void SetRowID(G4int z) { rowID = z; }
73      inline G4int GetRowID() const { return rowID; }
74      inline void SetEdep(G4double de) { edep = de; }
75      inline void AddEdep(G4double de) { edep += de; }
76      inline G4double GetEdep() const { return edep; }
77      inline void SetPos(G4ThreeVector xyz) { pos = xyz; }
78      inline G4ThreeVector GetPos() const { return pos; }
79      inline void SetRot(G4RotationMatrix rmat) { rot = rmat; }
80      inline G4RotationMatrix GetRot() const { return rot; }
81
82};
83
84typedef G4THitsCollection<A01HadCalorimeterHit> A01HadCalorimeterHitsCollection;
85
86extern G4Allocator<A01HadCalorimeterHit> A01HadCalorimeterHitAllocator;
87
88inline void* A01HadCalorimeterHit::operator new(size_t)
89{
90  void* aHit;
91  aHit = (void*)A01HadCalorimeterHitAllocator.MallocSingle();
92  return aHit;
93}
94
95inline void A01HadCalorimeterHit::operator delete(void* aHit)
96{
97  A01HadCalorimeterHitAllocator.FreeSingle((A01HadCalorimeterHit*) aHit);
98}
99
100#endif
101
102
Note: See TracBrowser for help on using the repository browser.