Changeset 45 for MEMPHYS


Ignore:
Timestamp:
Dec 1, 2005, 5:06:29 PM (19 years ago)
Author:
campagne
Message:

implement visualization attributes

Location:
MEMPHYS/HEAD/MEMPHYS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • MEMPHYS/HEAD/MEMPHYS/MEMPHYSWCDigi.hh

    r10 r45  
    66#include "G4Allocator.hh"
    77#include "G4ThreeVector.hh"
     8#include "G4Colour.hh"
     9#include "G4LogicalVolume.hh"
     10#include "G4Transform3D.hh"
     11
     12//std
     13#include <vector>
     14
     15
    816
    917class MEMPHYSWCDigi : public G4VDigi {
     
    1321  MEMPHYSWCDigi();
    1422  virtual ~MEMPHYSWCDigi();
    15   MEMPHYSWCDigi(const MEMPHYSWCDigi&);
    16   const MEMPHYSWCDigi& operator=(const MEMPHYSWCDigi&);
    1723  int operator==(const MEMPHYSWCDigi&) const;
    1824 
     
    2228  void Draw(); //JEC FIXME what do we do with this?
    2329  void Print();
     30  //JEC 1/12/05 implement same mechanism as Trajectory
     31  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
     32  virtual std::vector<G4AttValue>* CreateAttValues() const;
    2433
    2534private:
     35
     36  //JEC make Ctor and assignation private
     37  MEMPHYSWCDigi(const MEMPHYSWCDigi&);
     38  const MEMPHYSWCDigi& operator=(const MEMPHYSWCDigi&);
    2639 
    2740  G4int   tubeID;
    2841  G4float pe;   
    2942  G4float time;
    30  
     43
     44  //JEC for vizu
     45  G4Colour         colour;
     46  G4Transform3D    transform;
     47  G4LogicalVolume* pLogV;
     48 
    3149public:
    3250 
    33   inline void SetTubeID(G4int tube) {tubeID = tube;};
    34   inline void SetPe(G4float Q)      {pe     = Q;};
    35   inline void SetTime(G4float T)    {time   = T;};
    36  
    37   inline G4int   GetTubeID() {return tubeID;};
    38   inline G4float GetPe()     {return pe;};
    39   inline G4float GetTime()   {return time;};
     51  inline void SetTubeID(G4int tube) {tubeID = tube;}
     52  inline void SetPe(G4float Q)      {pe     = Q;}
     53  inline void SetTime(G4float T)    {time   = T;}
     54
     55  //JEC 1/12/05 for vizu
     56  void SetColour(G4Colour aColour) { colour = aColour; }
     57  void UpdateColour() {/* not yet implemented */}
     58  inline void SetTransform(G4Transform3D aTrans) { transform = aTrans; }
     59  inline void SetLogicalVolume(G4LogicalVolume* logV) {pLogV = logV;}
     60
     61
     62  inline G4int   GetTubeID() {return tubeID;}
     63  inline G4float GetPe()     {return pe;}
     64  inline G4float GetTime()   {return time;}
    4065 
    4166};
  • MEMPHYS/HEAD/MEMPHYS/MEMPHYSWCHit.hh

    r10 r45  
    66#include "G4THitsCollection.hh"
    77#include "G4Allocator.hh"
     8#include "G4Transform3D.hh"
    89#include "G4ThreeVector.hh"
    910#include "G4LogicalVolume.hh"
    1011#include "G4ios.hh"
     12#include "G4Colour.hh"
     13
    1114
    1215//std
     
    2629  void Draw(); //JEC FIXME what do we do with this?
    2730  void Print();
     31  //JEC 1/12/05 implement same mechanism as Trajectory
     32  virtual const std::map<G4String,G4AttDef>* GetAttDefs() const;
     33  virtual std::vector<G4AttValue>* CreateAttValues() const;
     34
     35
    2836 
    2937 public:
    3038 
    31   void SetTubeID       (G4int tube)                 { tubeID = tube; };
    32   void SetTrackID      (G4int track)                { trackID = track; };
    33   void SetEdep         (G4double de)                { edep = de; };
    34   void SetPos          (G4ThreeVector xyz)          { pos = xyz; };
    35   void SetRot          (G4RotationMatrix rotMatrix) { rot = rotMatrix; };
     39  void SetTubeID       (G4int tube)                 { tubeID = tube; }
     40  void SetTrackID      (G4int track)                { trackID = track; }
     41  void SetEdep         (G4double de)                { edep = de; }
     42  //  void SetPos          (G4ThreeVector xyz)          { pos = xyz; }
     43  // void SetRot          (G4RotationMatrix rotMatrix) { rot = rotMatrix; }
     44  void SetTransform (G4Transform3D aTrans) { transform = aTrans; }
    3645  void SetLogicalVolume(G4LogicalVolume* logV)      { pLogV = logV;}
     46  void SetColour(G4Colour aColour) { colour = aColour; }
     47  void UpdateColour(); //modify color at the end of the event
    3748
    3849  // This is temporarily used for the drawing scale
    39   void SetMaxPe(G4int number = 0)  {maxPe   = number;};
     50  void SetMaxPe(G4int number = 0)  {maxPe   = number;}
    4051
    4152  void AddPe(G4float hitTime); 
    4253
    43   G4int         GetTubeID()     { return tubeID; };
    44   G4int         GetTrackID()    { return trackID; };
    45   G4ThreeVector GetPos()        { return pos; };
    46   G4int         GetTotalPe()    { return totalPe;};
    47   G4float       GetTime(int i)  { return time[i];};
     54  G4int         GetTubeID()     { return tubeID; }
     55  G4int         GetTrackID()    { return trackID; }
     56  //G4ThreeVector GetPos()        { return pos; }
     57  G4int         GetTotalPe()    { return totalPe;}
     58  G4float       GetTime(int i)  { return time[i]; }
     59  G4Transform3D GetTransform()  { return transform; }
     60  G4LogicalVolume* GetLogicalVolume() { return pLogV; }
     61  G4Colour GetColour() { return colour; }
     62 
    4863 
    4964  void SortHitTimes() {   sort(time.begin(),time.end()); }
     
    6075  G4int            trackID;
    6176  G4double         edep;
    62   G4ThreeVector    pos;
    63   G4RotationMatrix rot;
     77  //G4ThreeVector    pos;
     78  //G4RotationMatrix rot;
     79
     80  //JEC to GB
     81  G4Colour         colour;
     82  G4Transform3D    transform;
    6483  G4LogicalVolume* pLogV;
    6584
Note: See TracChangeset for help on using the changeset viewer.