#include <PTSimHit.h>
Public Member Functions | |
| PTSimHit () | |
| virtual | ~PTSimHit () |
| virtual std::ostream & | Print (std::ostream &os) const |
| virtual void | Print (Option_t *option="") const |
| void | CreateDigiScintHit (TClonesArray &hitarray) const |
| void | Clear (Option_t *="") |
| void | Init (const PlexStripEndId &seid, Int_t pdg, Int_t trkind, const TLorentzVector &globalpos, const TLorentzVector &localpos, const TLorentzVector &p4) |
| void | SetCurrentState (const TLorentzVector &globalpos, const TLorentzVector &localpos, const TLorentzVector &p4) |
| void | AddELoss (Double_t eloss) |
| void | AddStep (Double_t step) |
| void | UseLinearStep (bool uselinearstep=true) |
| Double_t | GetELoss () const |
| Double_t | GetStep () const |
| Int_t | GetPdg () const |
| Int_t | GetTrkIndex () const |
Private Attributes | |
| PlexStripEndId | fStripEndId |
| Int_t | fPdg |
| Int_t | fTrkIndex |
| Double_t | fELoss |
| Double_t | fStep |
| TLorentzVector | fGlobalPos0 |
| TLorentzVector | fLocalPos0 |
| TLorentzVector | fP40 |
| TLorentzVector | fGlobalPos |
| TLorentzVector | fLocalPos |
| TLorentzVector | fP4 |
| bool | fUseLinearStep |
|
|
Definition at line 31 of file PTSimHit.cxx. References Clear(). 00031 : fUseLinearStep(false) { 00032 // Default constructor 00033 this -> Clear(); // initialize data members 00034 }
|
|
|
Definition at line 37 of file PTSimHit.cxx. 00037 {
00038 // Destructor
00039
00040 }
|
|
|
Definition at line 45 of file PTSimHit.h. References fELoss. Referenced by PTSimApplication::Stepping(). 00045 { fELoss += eloss; }
|
|
|
Definition at line 46 of file PTSimHit.h. References fStep. Referenced by PTSimApplication::Stepping(). 00046 { fStep += step; }
|
|
|
Definition at line 43 of file PTSimHit.cxx. References fELoss, fGlobalPos, fGlobalPos0, fLocalPos, fLocalPos0, fP4, fP40, fPdg, fStep, fStripEndId, fTrkIndex, PlexPlaneId::SetDetector(), PlexPlaneId::SetPlane(), and PlexStripEndId::SetStrip(). Referenced by PTSimHit(), and PTSimApplication::Stepping(). 00043 {
00044 // Resets hit data so that object can be reused
00045
00046 fStripEndId.SetDetector(Detector::kFar);
00047 fStripEndId.SetPlane(999);
00048 fStripEndId.SetStrip(999);
00049 fPdg = 0;
00050 fTrkIndex = -1;
00051 fGlobalPos0.SetXYZT(0,0,0,0);
00052 fLocalPos0.SetXYZT(0,0,0,0);
00053 fP40.SetPxPyPzE(0,0,0,0);
00054 fGlobalPos.SetXYZT(0,0,0,0);
00055 fLocalPos.SetXYZT(0,0,0,0);
00056 fP4.SetPxPyPzE(0,0,0,0);
00057 fELoss = 0;
00058 fStep = 0;
00059
00060 }
|
|
|
Definition at line 63 of file PTSimHit.cxx. References fLocalPos, fLocalPos0, fP40, fPdg, fStripEndId, fTrkIndex, PlexPlaneId::GetPlane(), and MSG. Referenced by PTSimApplication::Stepping(). 00063 {
00064 // Creates DigiScintHit from stored data and adds it to users
00065 // TClonesArray at position entry
00066
00067 MSG("PTSim",Msg::kVerbose) << "PTSimHit::CreateDigiScintHit\n"
00068 << *(this) << endl;
00069
00070 if ( fStripEndId.GetPlane() == 999 ) {
00071 MSG("PTSim",Msg::kFatal)
00072 << "CreateDigiScintHit called with invalid plane id " << endl;
00073 abort();
00074 }
00075
00076 Int_t entry = hitarray.GetEntriesFast();
00077 Double_t step = fStep;
00078 if ( fUseLinearStep ) {
00079 // This is a bad idea but is useful for comparing to gminos
00080 double dx = fLocalPos.X() - fLocalPos0.X();
00081 double dy = fLocalPos.Y() - fLocalPos0.Y();
00082 double dz = fLocalPos.Z() - fLocalPos0.Z();
00083 step = sqrt(dx*dx+dy*dy+dz*dz);
00084 }
00085
00086 new((hitarray)[entry]) DigiScintHit(fTrkIndex,fPdg,fP40.E(),
00087 fStripEndId,
00088 fLocalPos0.T(),
00089 fLocalPos0.X()*Munits::cm,
00090 fLocalPos0.Y()*Munits::cm,
00091 fLocalPos0.Z()*Munits::cm,
00092 fLocalPos.T(),
00093 fLocalPos.X()*Munits::cm,
00094 fLocalPos.Y()*Munits::cm,
00095 fLocalPos.Z()*Munits::cm,
00096 step*Munits::cm,fELoss,
00097 fP40.Px(),fP40.Py(),fP40.Pz());
00098 return;
00099 }
|
|
|
Definition at line 50 of file PTSimHit.h. Referenced by PTSimApplication::Stepping(). 00050 { return fELoss; }
|
|
|
Definition at line 52 of file PTSimHit.h. 00052 { return fPdg; }
|
|
|
Definition at line 51 of file PTSimHit.h. 00051 { return fStep; }
|
|
|
Definition at line 53 of file PTSimHit.h. Referenced by PTSimApplication::Stepping(). 00053 { return fTrkIndex; }
|
|
||||||||||||||||||||||||||||
|
Definition at line 103 of file PTSimHit.cxx. References fGlobalPos0, fLocalPos0, fP40, fPdg, fStripEndId, and fTrkIndex. Referenced by PTSimApplication::Stepping(). 00106 {
00107 // Store entry point data for this hit
00108
00109 fStripEndId = seid;
00110 fPdg = pdg;
00111 fTrkIndex = trkind;
00112 fGlobalPos0 = globalpos;
00113 fLocalPos0 = localpos;
00114 fP40 = p4;
00115
00116 return;
00117
00118 }
|
|
|
Definition at line 153 of file PTSimHit.cxx. References Print(). 00153 {
00154 // Print hit in form supported by TObject::Print.
00155
00156 Print(std::cout);
00157 return;
00158 }
|
|
|
Definition at line 121 of file PTSimHit.cxx. References PlexStripEndId::AsString(), fELoss, fGlobalPos, fGlobalPos0, fLocalPos, fLocalPos0, fP4, fP40, fPdg, fStep, fStripEndId, and fTrkIndex. Referenced by Print(). 00121 {
00122 // Print hit data on ostream.
00123
00124
00125 os << "PTSimHit:" << endl;
00126
00127 os << "StripEndId " << fStripEndId.AsString()
00128 << " particle id(pdg) " << fPdg
00129 << " trk index " << fTrkIndex << endl;
00130 os << "Entry x,y,z (local)(cm): " << fLocalPos0.X() << " " << fLocalPos0.Y()
00131 << " " << fLocalPos0.Z() << endl;
00132 os << " x,y,z(global)(cm): " << fGlobalPos0.X() << " "
00133 << fGlobalPos0.Y() << " "
00134 << fGlobalPos0.Z() << endl;
00135 os << " time(sec) " << fLocalPos0.T() << " p4(GeV) "
00136 << fP40.Px() << " " << fP40.Py() << " "
00137 << fP40.Pz() << " " << fP40.E() << endl;
00138 os << "Exit x,y,z (local)(cm): " << fLocalPos.X() << " " << fLocalPos.Y()
00139 << " " << fLocalPos.Z() << endl;
00140 os << " x,y,z(global)(cm): " << fGlobalPos.X() << " "
00141 << fGlobalPos.Y() << " "
00142 << fGlobalPos.Z() << endl;
00143 os << " time(sec) " << fLocalPos.T() << " p4(GeV) "
00144 << fP4.Px() << " " << fP4.Py() << " "
00145 << fP4.Pz() << " " << fP4.E() << endl;
00146 os << "Eloss(GeV) " << fELoss << " Step(cm) " << fStep << endl;
00147
00148 return os;
00149
00150 }
|
|
||||||||||||||||
|
Definition at line 161 of file PTSimHit.cxx. References fGlobalPos, fLocalPos, and fP4. Referenced by PTSimApplication::Stepping(). 00163 {
00164 // Store current data for this track
00165
00166 fGlobalPos = globalpos;
00167 fLocalPos = localpos;
00168 fP4 = p4;
00169
00170 return;
00171
00172 }
|
|
|
Definition at line 47 of file PTSimHit.h. References fUseLinearStep. Referenced by PTSimApplication::UseLinearStep(). 00047 { fUseLinearStep = uselinearstep; }
|
|
|
Definition at line 60 of file PTSimHit.h. Referenced by AddELoss(), Clear(), and Print(). |
|
|
Definition at line 65 of file PTSimHit.h. Referenced by Clear(), Print(), and SetCurrentState(). |
|
|
Definition at line 62 of file PTSimHit.h. |
|
|
Definition at line 66 of file PTSimHit.h. Referenced by Clear(), CreateDigiScintHit(), Print(), and SetCurrentState(). |
|
|
Definition at line 63 of file PTSimHit.h. Referenced by Clear(), CreateDigiScintHit(), Init(), and Print(). |
|
|
Definition at line 67 of file PTSimHit.h. Referenced by Clear(), Print(), and SetCurrentState(). |
|
|
Definition at line 64 of file PTSimHit.h. Referenced by Clear(), CreateDigiScintHit(), Init(), and Print(). |
|
|
Definition at line 58 of file PTSimHit.h. Referenced by Clear(), CreateDigiScintHit(), Init(), and Print(). |
|
|
Definition at line 61 of file PTSimHit.h. |
|
|
Definition at line 57 of file PTSimHit.h. Referenced by Clear(), CreateDigiScintHit(), Init(), and Print(). |
|
|
Definition at line 59 of file PTSimHit.h. Referenced by Clear(), CreateDigiScintHit(), Init(), and Print(). |
|
|
Definition at line 68 of file PTSimHit.h. Referenced by UseLinearStep(). |
1.3.9.1