#include <NtpMCStdHep.h>
Public Member Functions | |
| NtpMCStdHep () | |
| virtual | ~NtpMCStdHep () |
| virtual std::ostream & | Print (std::ostream &os, const Option_t *option="", std::string printpreface="", const TClonesArray *stdheparray=0) const |
| virtual void | Print (const Option_t *option="") const |
| Float_t | P () const |
| Float_t | Charge () const |
| std::string | ParticleName () const |
Public Attributes | |
| UInt_t | index |
| Short_t | mc |
| Int_t | parent [2] |
| Int_t | child [2] |
| Int_t | IstHEP |
| Int_t | IdHEP |
| Float_t | mass |
| Float_t | p4 [4] |
| Float_t | vtx [4] |
| Int_t | ndethit |
| NtpMCStdHepHit | dethit [2] |
|
|
Definition at line 28 of file NtpMCStdHep.cxx. References child, LoadMinosPDG(), p4, parent, and vtx. 00028 : index(0),mc(-1),IstHEP(0),IdHEP(0),mass(0), 00029 ndethit(0) { 00030 // 00031 // Purpose: Default constructor 00032 // 00033 00034 LoadMinosPDG(); 00035 00036 for ( Int_t i = 0; i < 2; i++ ) { 00037 parent[i] = -1; 00038 child[i] = -1; 00039 } 00040 00041 for ( Int_t i = 0; i < 4; i++ ) { 00042 p4[i] = 0.; 00043 vtx[i] = 0.; 00044 } 00045 00046 }
|
|
|
Definition at line 27 of file NtpMCStdHep.h. 00027 {}
|
|
|
Definition at line 49 of file NtpMCStdHep.cxx. References IdHEP. Referenced by MCMonitorCosmicHistograms::FillReTrDelQPCurve(). 00049 {
00050 //
00051 // Purpose: Return charge of particle in units of |e|, e.g.
00052 // electron has charge -1. Returns -999 if unknown
00053 //
00054
00055 const TDatabasePDG& dbpdg = *(TDatabasePDG::Instance());
00056 Double_t charge = -999;
00057 if ( dbpdg.GetParticle(IdHEP) ) charge
00058 = dbpdg.GetParticle(IdHEP)->Charge();
00059 // TParticlePDG returns charge in units of |e|/3, e.g. electron has charge -3
00060 // Convert to units of |e|
00061 return charge/3.;
00062
00063 }
|
|
|
Definition at line 37 of file NtpMCStdHep.h. References p4. Referenced by MCMonitorCosmicHistograms::FillReTrDelQPCurve(). 00037 {return TMath::Sqrt(p4[0]*p4[0]+p4[1]*p4[1]+p4[2]*p4[2]);}
|
|
|
Definition at line 66 of file NtpMCStdHep.cxx. References IdHEP. Referenced by MCMonitorCosmicHistograms::FillHistsReTrTrk(). 00066 {
00067 //
00068 // Purpose: Return name of particle, "???" if unknown
00069 //
00070
00071 const TDatabasePDG& dbpdg = *(TDatabasePDG::Instance());
00072 std::string partname = "???";
00073 if ( dbpdg.GetParticle(IdHEP) ) partname=dbpdg.GetParticle(IdHEP)->GetName();
00074
00075 return partname;
00076
00077 }
|
|
|
Definition at line 133 of file NtpMCStdHep.cxx. References option, and Print(). 00133 {
00134 //
00135 // Purpose: Print stdhep data in form supported by TObject::Print.
00136 //
00137 // Arguments: option (not used).
00138 //
00139
00140 Print(std::cout,option);
00141 return;
00142
00143 }
|
|
||||||||||||||||||||
|
Definition at line 80 of file NtpMCStdHep.cxx. References child, dethit, IdHEP, index, IstHEP, NtpMCStdHepHit::IsValid(), mc, ndethit, p4, parent, and vtx. Referenced by inuke_reweight::add_to_stdhep(), MadScanDisplay::Display(), MadEvDisplay::Display(), NtpMCModule::FillNtpMCStdHep(), Print(), NtpMCRecord::Print(), and inuke_reweight::test_fill_stdhep(). 00083 {
00084 // Print stdhep data on ostream. If the stdheparray has been given
00085 // (default null), than print all descendants of this particle as well.
00086
00087 const TDatabasePDG& dbpdg = *(TDatabasePDG::Instance());
00088 std::string partname = "???";
00089 if ( dbpdg.GetParticle(IdHEP) ) partname=dbpdg.GetParticle(IdHEP)->GetName();
00090 std::string statusname = "/" + std::string(UtilIstHEP::AsString(IstHEP));
00091
00092 // only keep first 12 characters for print
00093 if (statusname.size() > 12) statusname.resize(12);
00094
00095 ostringstream oss;
00096 oss << printpreface.c_str() << "[" << index << "]";
00097 Int_t prefacesize = oss.str().size();
00098 std::string blanks(prefacesize,' ');
00099
00100 os << oss.str().c_str()
00101 << IdHEP << "/" << partname.c_str()
00102 << " s: " << IstHEP << statusname.c_str()
00103 << setprecision(3)
00104 << " v: " << vtx[0] << " " << vtx[1] << " " << vtx[2]
00105 << " mc: " << mc
00106 << "\n" << blanks.c_str()
00107 << "t(ns): " << vtx[3]/Munits::nanosecond
00108 << " p: " << p4[0] << " " << p4[1] << " " << p4[2]
00109 << " P: " << parent[0] << " " << parent[1]
00110 << " C: " << child[0] << " " << child[1] << " ndethit: " << ndethit
00111 << endl;
00112 if ( dethit[0].IsValid() ) {
00113 os << blanks.c_str() << "First Hit: " << dethit[0];
00114 os << blanks.c_str() << "Last Hit: " << dethit[1];
00115 }
00116
00117 if ( stdheparray && child[0] >= 0 ) {
00118 Int_t nd = child[1] - child[0] + 1;
00119 if ( nd > 0 ) {
00120 for (Int_t id = child[0]; id <= child[1]; id++ ) {
00121 const NtpMCStdHep* cdpart
00122 = dynamic_cast<const NtpMCStdHep*>(stdheparray->At(id));
00123 cdpart->Print(os,"",blanks,stdheparray);
00124 }
00125 }
00126 }
00127
00128 return os;
00129
00130 }
|
|
|
|
Definition at line 57 of file NtpMCStdHep.h. Referenced by NtpMCModule::FillNtpMCStdHep(), NuReco::GetMuonFirstHitEnergy(), NuReco::GetMuonLastHitEnergy(), and Print(). |
|
|
|
|
|
|
|
Definition at line 56 of file NtpMCStdHep.h. Referenced by NtpMCModule::FillNtpMCStdHep(), and Print(). |
|
|
|
|
Definition at line 55 of file NtpMCStdHep.h. Referenced by inuke_reweight::add_to_stdhep(), MadScanDisplay::Display(), MadEvDisplay::Display(), CondensedNtpModuleAtm::FillMCInformation(), NtpMCModule::FillNtpMCStdHep(), NtpMCStdHep(), and Print(). |
1.3.9.1