DigiScintHit Class Reference

#include <DigiScintHit.h>

List of all members.

Public Types

enum  EFailMode {
  kInvalidStrip = 0x0001, kNegEnergy = 0x0002, kNullEnergy = 0x0004, kBadGeom = 0x0008,
  kNullPath = 0x0010, kPhotonComputer = 0x0020, kFailMask = 0xFFFF
}
typedef enum
DigiScintHit::EFailMode 
FailMode_t

Public Member Functions

 DigiScintHit ()
 DigiScintHit (const DigiScintHit &)
 DigiScintHit (Int_t trkId, Int_t trkPid, Float_t trkEnergy, PlexStripEndId sid, Float_t t1, Float_t x1, Float_t y1, Float_t z1, Float_t t2, Float_t x2, Float_t y2, Float_t z2, Float_t ds, Float_t de, Float_t trkPx1=0., Float_t trkPy1=0., Float_t trkPz1=0.)
void SetTrackId (Int_t trackid)
void SetT1 (Float_t newTime)
void SetT2 (Float_t newTime)
Int_t TrackId () const
Float_t ParticleEnergy () const
Float_t ParticleKineticEnergy () const
Int_t ParticleId () const
const PlexStripEndIdStripEndId () const
Int_t Plane () const
Int_t Strip () const
Float_t T1 () const
Float_t X1 () const
Float_t Y1 () const
Float_t Z1 () const
Float_t T2 () const
Float_t X2 () const
Float_t Y2 () const
Float_t Z2 () const
Float_t DS () const
Float_t DE () const
Float_t ParticlePX1 () const
Float_t ParticlePY1 () const
Float_t ParticlePZ1 () const
UShort_t FailBits () const
Bool_t TestFailBit (FailMode_t failbit) const
UShort_t TestFailBits (UShort_t failmask=kFailMask) const
void SetFailBit (FailMode_t failbit)
virtual void Print (Option_t *option="") const
virtual const char * AsString (Option_t *option="") const
virtual std::ostream & FormatToOStream (std::ostream &os, Option_t *option="") const

Private Attributes

PlexStripEndId fStripId
Float_t fT1
Float_t fX1
Float_t fY1
Float_t fZ1
Float_t fT2
Float_t fX2
Float_t fY2
Float_t fZ2
Float_t fDS
Float_t fDE
Float_t fParticleEnergy
Float_t fParticlePX1
Float_t fParticlePY1
Float_t fParticlePZ1
Int_t fParticleId
Int_t fTrackId
UShort_t fFailBits

Friends

std::ostream & operator<< (std::ostream &os, const DigiScintHit &h)

Detailed Description

Definition at line 14 of file DigiScintHit.h.


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
kInvalidStrip 
kNegEnergy 
kNullEnergy 
kBadGeom 
kNullPath 
kPhotonComputer 
kFailMask 

Definition at line 19 of file DigiScintHit.h.

00019                          {
00020     kInvalidStrip   = 0x0001,
00021     kNegEnergy      = 0x0002,
00022     kNullEnergy     = 0x0004,
00023     kBadGeom        = 0x0008,
00024     kNullPath       = 0x0010,
00025     kPhotonComputer = 0x0020,
00026     kFailMask       = 0xFFFF
00027   } FailMode_t;


Constructor & Destructor Documentation

DigiScintHit::DigiScintHit (  ) 

Definition at line 22 of file DigiScintHit.cxx.

00022                            :
00023   fStripId(),
00024   fT1(0),
00025   fX1(0),
00026   fY1(0),
00027   fZ1(0),
00028   fT2(0),
00029   fX2(0),
00030   fY2(0),
00031   fZ2(0),
00032   fDS(0),
00033   fDE(0),
00034   fParticleEnergy(0),
00035   fParticlePX1(0),
00036   fParticlePY1(0),
00037   fParticlePZ1(0),
00038   fParticleId(0),
00039   fTrackId(0),
00040   fFailBits(0)
00041 { }

DigiScintHit::DigiScintHit ( const DigiScintHit in  ) 

Definition at line 45 of file DigiScintHit.cxx.

00045                                                  :
00046   TObject(in),
00047   fStripId(in.StripEndId()),
00048   fT1(in.T1()),
00049   fX1(in.X1()),
00050   fY1(in.Y1()),
00051   fZ1(in.Z1()),
00052   fT2(in.T2()),
00053   fX2(in.X2()),
00054   fY2(in.Y2()),
00055   fZ2(in.Z2()),
00056   fDS(in.DS()),
00057   fDE(in.DE()),
00058   fParticleEnergy(in.ParticleEnergy()),
00059   fParticlePX1(in.ParticlePX1()),
00060   fParticlePY1(in.ParticlePY1()),
00061   fParticlePZ1(in.ParticlePZ1()),
00062   fParticleId(in.ParticleId()),
00063   fTrackId(in.TrackId()),
00064   fFailBits(in.FailBits())
00065 {
00066 }

DigiScintHit::DigiScintHit ( Int_t  trkId,
Int_t  trkPid,
Float_t  trkEnergy,
PlexStripEndId  sid,
Float_t  t1,
Float_t  x1,
Float_t  y1,
Float_t  z1,
Float_t  t2,
Float_t  x2,
Float_t  y2,
Float_t  z2,
Float_t  ds,
Float_t  de,
Float_t  trkPx1 = 0.,
Float_t  trkPy1 = 0.,
Float_t  trkPz1 = 0. 
)

Definition at line 70 of file DigiScintHit.cxx.

00075                                                                            :
00076   fStripId(sid),
00077   fT1(t1),
00078   fX1(x1),
00079   fY1(y1),
00080   fZ1(z1),
00081   fT2(t2),
00082   fX2(x2),
00083   fY2(y2),
00084   fZ2(z2),
00085   fDS(ds),
00086   fDE(de),
00087   fParticleEnergy(trkEnergy),
00088   fParticlePX1(trkPx1),
00089   fParticlePY1(trkPy1),
00090   fParticlePZ1(trkPz1),
00091   fParticleId(trkPid),
00092   fTrackId(trkId),
00093   fFailBits(0)
00094 { }


Member Function Documentation

const char * DigiScintHit::AsString ( Option_t *  option = ""  )  const [virtual]

Definition at line 128 of file DigiScintHit.cxx.

References PlexStripEndId::AsString(), Munits::cm, DE(), DS(), Form(), Munits::GeV, Munits::MeV, Munits::ns, ParticleEnergy(), ParticleId(), ParticleKineticEnergy(), Plane(), Strip(), StripEndId(), T1(), TrackId(), X1(), Y1(), and Z1().

Referenced by FormatToOStream(), Print(), Truthifier::Print(), and SimDetector::SortDigiPE().

00129 {
00130   TParticlePDG* part = TDatabasePDG::Instance()->GetParticle(ParticleId());
00131 
00132   switch(option[0]) {
00133   case 'e': // (E)xtended printout.
00134   case 'E':
00135     return Form("DigiScintHit Track=%d  Particle=%s(%d) E=%.1f GeV K=%f GeV\n" 
00136                 "             Strip: %s\n"
00137                 "             (%5.2f, %4.3f, %4.3f), %.1f ns\n"
00138                 "             dE/dx = %.2f MeV / %.1f cm\n",
00139                 TrackId(),
00140                 (part==0)?"unknown":part->GetName(),
00141                 ParticleId(),
00142                 ParticleEnergy()/Munits::GeV,
00143                 ParticleKineticEnergy()/Munits::GeV,
00144                 StripEndId().AsString(),
00145                 X1(),Y1(),Z1(),T1()/Munits::ns,
00146                 DE()/Munits::MeV,
00147                 DS()/Munits::cm           
00148                 );
00149   case 'o': // old
00150     return Form("DigiScintHit (Trk %d) (%s) (%.1f GeV) (%.1f MeV/%.1f cm) (Plane %d Strip %d)",
00151                 TrackId(),
00152                 (part==0)?"unknown":part->GetName(),
00153                 ParticleEnergy()/Munits::GeV,
00154                 DE()/Munits::MeV,
00155                 DS()/Munits::cm,
00156                 Plane(),
00157                 Strip() 
00158                 );                
00159   default:
00160     return Form("DigiScintHit %s (Trk %4d=%6s %.2f GeV) (%.2f MeV/%.2f cm) %f",
00161                 StripEndId().AsString("c"),
00162                 TrackId(),
00163                 (part==0)?"unknown":part->GetName(),
00164                 ParticleEnergy()/Munits::GeV,
00165                 DE()/Munits::MeV,
00166                 DS()/Munits::cm,
00167                 T1()/Munits::ns
00168                 );                
00169   }
00170   return ""; // Keep compiler happy.
00171 }

Float_t DigiScintHit::DE (  )  const [inline]
Float_t DigiScintHit::DS (  )  const [inline]
UShort_t DigiScintHit::FailBits (  )  const [inline]

Definition at line 62 of file DigiScintHit.h.

References fFailBits.

Referenced by NtpMCModule::FillNtpMCDigiScintHit().

00062 { return fFailBits; }

std::ostream & DigiScintHit::FormatToOStream ( std::ostream &  os,
Option_t *  option = "" 
) const [virtual]

Definition at line 120 of file DigiScintHit.cxx.

References AsString().

Referenced by operator<<().

00122 {
00123    os << AsString(option);
00124    return os;
00125 }

Float_t DigiScintHit::ParticleEnergy (  )  const [inline]
Int_t DigiScintHit::ParticleId (  )  const [inline]
Float_t DigiScintHit::ParticleKineticEnergy (  )  const

Definition at line 98 of file DigiScintHit.cxx.

References Munits::GeV, ParticleEnergy(), and ParticleId().

Referenced by ScintHitTruthModule::Ana(), AsString(), and PhotonTransport::SimulateScintHit().

00099 {
00100   TParticlePDG* part = TDatabasePDG::Instance()->GetParticle(ParticleId());
00101   Float_t mass = 0;
00102   if(part) 
00103     mass = part->Mass()*Munits::GeV;
00104   return ParticleEnergy()-mass;
00105 }

Float_t DigiScintHit::ParticlePX1 (  )  const [inline]

Definition at line 59 of file DigiScintHit.h.

References fParticlePX1.

Referenced by NtpMCModule::FillNtpMCStdHep().

00059 { return fParticlePX1; }

Float_t DigiScintHit::ParticlePY1 (  )  const [inline]

Definition at line 60 of file DigiScintHit.h.

References fParticlePY1.

Referenced by NtpMCModule::FillNtpMCStdHep().

00060 { return fParticlePY1; }

Float_t DigiScintHit::ParticlePZ1 (  )  const [inline]

Definition at line 61 of file DigiScintHit.h.

References fParticlePZ1.

Referenced by NtpMCModule::FillNtpMCStdHep().

00061 { return fParticlePZ1; }

Int_t DigiScintHit::Plane (  )  const [inline]
void DigiScintHit::Print ( Option_t *  option = ""  )  const [virtual]

Definition at line 114 of file DigiScintHit.cxx.

References AsString().

Referenced by RerootToTruthModule::Ana().

00115 {
00116    std::cout << this->AsString(option) << std::endl;
00117 }

void DigiScintHit::SetFailBit ( FailMode_t  failbit  )  [inline]

Definition at line 67 of file DigiScintHit.h.

References fFailBits.

00067 { fFailBits |= failbit; }

void DigiScintHit::SetT1 ( Float_t  newTime  )  [inline]

Definition at line 39 of file DigiScintHit.h.

References fT1.

Referenced by ConcatArrays::OffsetTime().

00039 { fT1 = newTime; }

void DigiScintHit::SetT2 ( Float_t  newTime  )  [inline]

Definition at line 40 of file DigiScintHit.h.

References fT2.

Referenced by ConcatArrays::OffsetTime().

00040 { fT2 = newTime; }

void DigiScintHit::SetTrackId ( Int_t  trackid  )  [inline]

Definition at line 38 of file DigiScintHit.h.

References fTrackId.

Referenced by ConcatArrays::ConcatDigiScintHits().

00038 { fTrackId = trackid; }

Int_t DigiScintHit::Strip (  )  const [inline]
const PlexStripEndId& DigiScintHit::StripEndId (  )  const [inline]
Float_t DigiScintHit::T1 (  )  const [inline]
Float_t DigiScintHit::T2 (  )  const [inline]
Bool_t DigiScintHit::TestFailBit ( FailMode_t  failbit  )  const [inline]

Definition at line 63 of file DigiScintHit.h.

References fFailBits.

00064                         { return (Bool_t) ((fFailBits & failbit) != 0); }

UShort_t DigiScintHit::TestFailBits ( UShort_t  failmask = kFailMask  )  const [inline]

Definition at line 65 of file DigiScintHit.h.

References fFailBits.

00066                         { return (UShort_t) (fFailBits & failmask); }

Int_t DigiScintHit::TrackId (  )  const [inline]
Float_t DigiScintHit::X1 (  )  const [inline]
Float_t DigiScintHit::X2 (  )  const [inline]
Float_t DigiScintHit::Y1 (  )  const [inline]
Float_t DigiScintHit::Y2 (  )  const [inline]
Float_t DigiScintHit::Z1 (  )  const [inline]
Float_t DigiScintHit::Z2 (  )  const [inline]

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const DigiScintHit h 
) [friend]

Member Data Documentation

Float_t DigiScintHit::fDE [private]

Definition at line 87 of file DigiScintHit.h.

Referenced by DE().

Float_t DigiScintHit::fDS [private]

Definition at line 86 of file DigiScintHit.h.

Referenced by DS().

UShort_t DigiScintHit::fFailBits [private]

Definition at line 94 of file DigiScintHit.h.

Referenced by FailBits(), SetFailBit(), TestFailBit(), and TestFailBits().

Float_t DigiScintHit::fParticleEnergy [private]

Definition at line 88 of file DigiScintHit.h.

Referenced by ParticleEnergy().

Int_t DigiScintHit::fParticleId [private]

Definition at line 92 of file DigiScintHit.h.

Referenced by ParticleId().

Float_t DigiScintHit::fParticlePX1 [private]

Definition at line 89 of file DigiScintHit.h.

Referenced by ParticlePX1().

Float_t DigiScintHit::fParticlePY1 [private]

Definition at line 90 of file DigiScintHit.h.

Referenced by ParticlePY1().

Float_t DigiScintHit::fParticlePZ1 [private]

Definition at line 91 of file DigiScintHit.h.

Referenced by ParticlePZ1().

Definition at line 77 of file DigiScintHit.h.

Referenced by Plane(), Strip(), and StripEndId().

Float_t DigiScintHit::fT1 [private]

Definition at line 78 of file DigiScintHit.h.

Referenced by SetT1(), and T1().

Float_t DigiScintHit::fT2 [private]

Definition at line 82 of file DigiScintHit.h.

Referenced by SetT2(), and T2().

Int_t DigiScintHit::fTrackId [private]

Definition at line 93 of file DigiScintHit.h.

Referenced by SetTrackId(), and TrackId().

Float_t DigiScintHit::fX1 [private]

Definition at line 79 of file DigiScintHit.h.

Referenced by X1().

Float_t DigiScintHit::fX2 [private]

Definition at line 83 of file DigiScintHit.h.

Referenced by X2().

Float_t DigiScintHit::fY1 [private]

Definition at line 80 of file DigiScintHit.h.

Referenced by Y1().

Float_t DigiScintHit::fY2 [private]

Definition at line 84 of file DigiScintHit.h.

Referenced by Y2().

Float_t DigiScintHit::fZ1 [private]

Definition at line 81 of file DigiScintHit.h.

Referenced by Z1().

Float_t DigiScintHit::fZ2 [private]

Definition at line 85 of file DigiScintHit.h.

Referenced by Z2().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1