source: trunk/examples/extended/analysis/A01/include/A01HodoscopeHit.hh

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

update

File size: 3.7 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: A01HodoscopeHit.hh,v 1.5 2006/06/29 16:31:19 gunter Exp $
27// --------------------------------------------------------------
28//
29#ifndef A01HodoscopeHit_h
30#define A01HodoscopeHit_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 A01HodoscopeHit : public G4VHit
44{
45  public:
46
47      A01HodoscopeHit(G4int i,G4double t);
48      virtual ~A01HodoscopeHit();
49      A01HodoscopeHit(const A01HodoscopeHit &right);
50      const A01HodoscopeHit& operator=(const A01HodoscopeHit &right);
51      int operator==(const A01HodoscopeHit &right) const;
52
53
54      inline void *operator new(size_t);
55      inline void operator delete(void*aHit);
56
57      void Draw();
58      virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
59      virtual std::vector<G4AttValue>* CreateAttValues() const;
60      void Print();
61
62  private:
63      G4int id;
64      G4double time;
65      G4ThreeVector pos;
66      G4RotationMatrix rot;
67      const G4LogicalVolume* pLogV;
68
69  public:
70      inline G4int GetID() const { return id; }
71      inline G4double GetTime() const { return time; }
72      inline void SetTime(G4double val) { time = val; }
73      inline void SetPos(G4ThreeVector xyz) { pos = xyz; }
74      inline G4ThreeVector GetPos() const { return pos; }
75      inline void SetRot(G4RotationMatrix rmat) { rot = rmat; }
76      inline G4RotationMatrix GetRot() const { return rot; }
77      inline void SetLogV(G4LogicalVolume* val) { pLogV = val; }
78      inline const G4LogicalVolume* GetLogV() const { return pLogV; }
79
80};
81
82typedef G4THitsCollection<A01HodoscopeHit> A01HodoscopeHitsCollection;
83
84extern G4Allocator<A01HodoscopeHit> A01HodoscopeHitAllocator;
85
86inline void* A01HodoscopeHit::operator new(size_t)
87{
88  void* aHit;
89  aHit = (void*)A01HodoscopeHitAllocator.MallocSingle();
90  return aHit;
91}
92
93inline void A01HodoscopeHit::operator delete(void*aHit)
94{
95  A01HodoscopeHitAllocator.FreeSingle((A01HodoscopeHit*) aHit);
96}
97
98#endif
99
100
Note: See TracBrowser for help on using the repository browser.