Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DigiScintHit.h

Go to the documentation of this file.
00001 
00002 // $Id: DigiScintHit.h,v 1.11 2009/05/19 19:07:18 kasahara Exp $
00003 //
00004 // Define the structure for a hit in the active detector element
00005 //
00006 // messier@indiana.edu
00008 #ifndef DIGISCINTHIT_H
00009 #define DIGISCINTHIT_H
00010 #include <iosfwd>
00011 #include "TObject.h"
00012 #include "Plex/PlexStripEndId.h"
00013 
00014 class DigiScintHit : public TObject 
00015 {
00016 public:
00017 
00018   // Photon Transport reasons to reject hit
00019   typedef enum EFailMode {
00020     kInvalidStrip   = 0x0001,
00021     kNegEnergy      = 0x0002,
00022     kNullEnergy     = 0x0004,
00023     kBadGeom        = 0x0008,
00024     kNullPath       = 0x0010,
00025     kPhotonComputer = 0x0020,
00026     kFailMask       = 0xFFFF
00027   } FailMode_t;
00028 
00029   DigiScintHit();
00030   DigiScintHit(const DigiScintHit&);
00031   DigiScintHit(Int_t trkId, Int_t trkPid, Float_t trkEnergy,
00032                PlexStripEndId sid, 
00033                Float_t t1, Float_t x1, Float_t y1, Float_t z1,
00034                Float_t t2, Float_t x2, Float_t y2, Float_t z2,
00035                Float_t ds, Float_t de,
00036                Float_t trkPx1 = 0., Float_t trkPy1 = 0., Float_t trkPz1 = 0.);
00037 
00038   void                  SetTrackId(Int_t trackid) { fTrackId = trackid; }
00039   void                  SetT1(Float_t newTime)    { fT1 = newTime; }
00040   void                  SetT2(Float_t newTime)    { fT2 = newTime; }
00041   
00042   Int_t                 TrackId()        const { return fTrackId;        }
00043   Float_t               ParticleEnergy() const { return fParticleEnergy; }
00044   Float_t               ParticleKineticEnergy() const;
00045   Int_t                 ParticleId()     const { return fParticleId;     }
00046   const PlexStripEndId& StripEndId()     const { return fStripId;        }
00047   Int_t                 Plane()          const { return fStripId.GetPlane();}
00048   Int_t                 Strip()          const { return fStripId.GetStrip();}
00049   Float_t               T1()             const { return fT1; }
00050   Float_t               X1()             const { return fX1; }
00051   Float_t               Y1()             const { return fY1; }
00052   Float_t               Z1()             const { return fZ1; }
00053   Float_t               T2()             const { return fT2; }
00054   Float_t               X2()             const { return fX2; }
00055   Float_t               Y2()             const { return fY2; }
00056   Float_t               Z2()             const { return fZ2; }
00057   Float_t               DS()             const { return fDS; }
00058   Float_t               DE()             const { return fDE; }
00059   Float_t               ParticlePX1()    const { return fParticlePX1; }
00060   Float_t               ParticlePY1()    const { return fParticlePY1; }
00061   Float_t               ParticlePZ1()    const { return fParticlePZ1; }
00062   UShort_t              FailBits()       const { return fFailBits; }
00063   Bool_t                TestFailBit(FailMode_t failbit) const 
00064                         { return (Bool_t) ((fFailBits & failbit) != 0); }
00065   UShort_t              TestFailBits(UShort_t failmask = kFailMask) const 
00066                         { return (UShort_t) (fFailBits & failmask); }
00067   void                  SetFailBit(FailMode_t failbit){ fFailBits |= failbit; }
00068 
00069   // Printing.
00070   virtual void          Print(Option_t* option = "") const;
00071   virtual const char*   AsString(Option_t* option = "") const;
00072   friend  std::ostream& operator<<(std::ostream& os, const DigiScintHit& h);
00073   virtual std::ostream&    FormatToOStream(std::ostream& os,
00074                                            Option_t *option="") const;
00075 
00076 private:
00077   PlexStripEndId fStripId;        // The strip end id
00078   Float_t        fT1;             // Time at start of segment (sec)
00079   Float_t        fX1;             // X pos. at start of segment (strip frame)
00080   Float_t        fY1;             // Y pos. at start of segment (strip frame)
00081   Float_t        fZ1;             // Z pos. at start of segment (strip frame)
00082   Float_t        fT2;             // Time at end of segment (sec)
00083   Float_t        fX2;             // X position at end of segment (strip frame)
00084   Float_t        fY2;             // Y position at end of segment (strip frame)
00085   Float_t        fZ2;             // Z position at end of segment (strip frame)
00086   Float_t        fDS;             // Total path length (m)
00087   Float_t        fDE;             // Total energy deposited (GeV)
00088   Float_t        fParticleEnergy; // Parent particle energy (GeV)
00089   Float_t        fParticlePX1;    // Parent particle p_x at start of segment
00090   Float_t        fParticlePY1;    // Parent particle p_y at start of segment
00091   Float_t        fParticlePZ1;    // Parent particle p_z at start of segment
00092   Int_t          fParticleId;     // Parent particle type
00093   Int_t          fTrackId;        // ID of track that produced hit
00094   UShort_t       fFailBits;       // Bits indicate reason hit failed if not 0
00095     
00096   ClassDef(DigiScintHit,4) // Simulated hit on scintillator
00097 };
00098 
00099 #endif
00100 

Generated on Mon Feb 15 11:06:37 2010 for loon by  doxygen 1.3.9.1