source: trunk/examples/extended/analysis/A01/include/A01DriftChamberHit.hh@ 1036

Last change on this file since 1036 was 807, checked in by garnier, 18 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: A01DriftChamberHit.hh,v 1.5 2006/06/29 16:30:55 gunter Exp $
27// --------------------------------------------------------------
28//
29#ifndef A01DriftChamberHit_h
30#define A01DriftChamberHit_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 A01DriftChamberHit : public G4VHit
44{
45 public:
46
47 A01DriftChamberHit();
48 A01DriftChamberHit(G4int z);
49 virtual ~A01DriftChamberHit();
50 A01DriftChamberHit(const A01DriftChamberHit &right);
51 const A01DriftChamberHit& operator=(const A01DriftChamberHit &right);
52 int operator==(const A01DriftChamberHit &right) const;
53
54 inline void *operator new(size_t);
55 inline void operator delete(void *aHit);
56
57 inline float x();
58 inline float y();
59
60 virtual void Draw();
61 virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
62 virtual std::vector<G4AttValue>* CreateAttValues() const;
63 virtual void Print();
64
65 private:
66 G4int layerID;
67 G4double time;
68 G4ThreeVector localPos;
69 G4ThreeVector worldPos;
70
71 public:
72 inline void SetLayerID(G4int z) { layerID = z; }
73 inline G4int GetLayerID() const { return layerID; }
74 inline void SetTime(G4double t) { time = t; }
75 inline G4double GetTime() const { return time; }
76 inline void SetLocalPos(G4ThreeVector xyz) { localPos = xyz; }
77 inline G4ThreeVector GetLocalPos() const { return localPos; }
78 inline void SetWorldPos(G4ThreeVector xyz) { worldPos = xyz; }
79 inline G4ThreeVector GetWorldPos() const { return worldPos; }
80};
81
82typedef G4THitsCollection<A01DriftChamberHit> A01DriftChamberHitsCollection;
83
84extern G4Allocator<A01DriftChamberHit> A01DriftChamberHitAllocator;
85
86inline void* A01DriftChamberHit::operator new(size_t)
87{
88 void* aHit;
89 aHit = (void*)A01DriftChamberHitAllocator.MallocSingle();
90 return aHit;
91}
92
93inline void A01DriftChamberHit::operator delete(void* aHit)
94{
95 A01DriftChamberHitAllocator.FreeSingle((A01DriftChamberHit*) aHit);
96}
97
98#endif
99
100
Note: See TracBrowser for help on using the repository browser.