Geant4  9.6.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
A01DriftChamberHit.hh
Go to the documentation of this file.
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 //
28 //
29 // $Id$
30 // --------------------------------------------------------------
31 //
32 #ifndef A01DriftChamberHit_h
33 #define A01DriftChamberHit_h 1
34 
35 #include "G4VHit.hh"
36 #include "G4THitsCollection.hh"
37 #include "G4Allocator.hh"
38 #include "G4ThreeVector.hh"
39 #include "G4LogicalVolume.hh"
40 #include "G4Transform3D.hh"
41 #include "G4RotationMatrix.hh"
42 
43 class G4AttDef;
44 class G4AttValue;
45 
46 class A01DriftChamberHit : public G4VHit
47 {
48  public:
51  virtual ~A01DriftChamberHit();
53  const A01DriftChamberHit& operator=(const A01DriftChamberHit &right);
54  int operator==(const A01DriftChamberHit &right) const;
55 
56  inline void *operator new(size_t);
57  inline void operator delete(void *aHit);
58 
59  inline float x();
60  inline float y();
61 
62  virtual void Draw();
63  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
64  virtual std::vector<G4AttValue>* CreateAttValues() const;
65  virtual void Print();
66 
67  private:
68  G4int fLayerID;
69  G4double fTime;
70  G4ThreeVector fLocalPos;
71  G4ThreeVector fWorldPos;
72 
73  public:
74  inline void SetLayerID(G4int z) { fLayerID = z; }
75  inline G4int GetLayerID() const { return fLayerID; }
76  inline void SetTime(G4double t) { fTime = t; }
77  inline G4double GetTime() const { return fTime; }
78  inline void SetLocalPos(G4ThreeVector xyz) { fLocalPos = xyz; }
79  inline G4ThreeVector GetLocalPos() const { return fLocalPos; }
80  inline void SetWorldPos(G4ThreeVector xyz) { fWorldPos = xyz; }
81  inline G4ThreeVector GetWorldPos() const { return fWorldPos; }
82 };
83 
85 
87 
88 inline void* A01DriftChamberHit::operator new(size_t)
89 {
90  void* aHit;
91  aHit = (void*)A01DriftChamberHitAllocator.MallocSingle();
92  return aHit;
93 }
94 
95 inline void A01DriftChamberHit::operator delete(void* aHit)
96 {
97  A01DriftChamberHitAllocator.FreeSingle((A01DriftChamberHit*) aHit);
98 }
99 
100 #endif
101 
102