#include <LCDMcPart.hh>
Collaboration diagram for LCDMcPart:

Public Member Functions | |
| LCDMcPart () | |
| ~LCDMcPart () | |
| LCDMcPart (int newTag, LCDMcPart *part, const Hep3Vector &pos) | |
| int | GetParticleID () const |
| int | GetParticleTag () const |
| int | GetParentTag () const |
| int | GetGenStatus () const |
| int | GetG4Status () const |
| double | GetCharge () const |
| double | GetChargeFromPid (int pid=0) |
| ________________________________________________________________________ | |
| void | SetParticleID (int id) |
| void | SetParticleTag (int tag) |
| void | SetParentTag (int parent) |
| void | SetGenStatus (int status) |
| void | SetG4Status (int status) |
| void | SetCharge (float charge) |
| void | SetChargeFromPid (int pid=0) |
| ________________________________________________________________________ | |
| void | GetMotherTags (int &first, int &last) const |
| void | SetMotherTags (int first, int last) |
| void | GetDaughterTags (int &first, int &last) const |
| void | SetDaughterTags (int first, int last) |
| void | SetPosition (const Hep3Vector &position) |
| void | SetTermPosition (const Hep3Vector &term_pos) |
| void | Set4Momentum (const HepLorentzVector &momentum) |
| void | SetCalorimeterEntrancePoint (const Hep3Vector &pos) |
| void | SetCalorimeterEntranceMomentum (const Hep3Vector &pmom) |
| Hep3Vector & | GetPosition () |
| Hep3Vector & | GetTermPosition () |
| Hep3Vector & | GetCalorimeterEntrancePoint () |
| Hep3Vector & | GetCalorimeterEntranceMomentum () |
| HepLorentzVector & | Get4Momentum () |
| Hep3Vector * | GetPositionPtr () |
| Hep3Vector * | GetTermPositionPtr () |
| HepLorentzVector * | Get4MomentumPtr () |
| void | setTrkID (int trkid) |
| int | getTrkID () |
| void | printParents () const |
| ________________________________________________________________________ | |
| void | printDaughters () const |
Private Member Functions | |
| void | InitPartChgTable (int *tbl) |
| ________________________________________________________________________ | |
| int | partchg3 (int id) |
| ________________________________________________________________________________________________________________________________________________ | |
Private Attributes | |
| int | m_partID |
| int | m_partTag |
| int | m_firstDau |
| int | m_lastDau |
| int | m_GenStatus |
| int | m_G4Status |
| float | m_charge |
| int | m_parent |
| int | m_parent2 |
| int | m_trkid |
| Hep3Vector | m_position |
| Hep3Vector | m_term_pos |
| Hep3Vector | m_calEntry |
| Hep3Vector | m_calMomentum |
| HepLorentzVector | m_4momentum |
|
|
Definition at line 24 of file LCDMcPart.cc.
00025 : m_partID(0), m_partTag(-999) 00026 , m_firstDau(0), m_lastDau(-1) 00027 , m_GenStatus(0), m_G4Status(0), m_charge(0.0) 00028 , m_parent(-1), m_parent2(-1), m_trkid(0) 00029 , m_position(0,0,0) 00030 , m_term_pos(0,0,0) 00031 , m_4momentum(0,0,0,0) 00032 { 00033 } |
|
|
Definition at line 12 of file LCDMcPart.hh.
00012 {}
|
|
||||||||||||||||
|
Definition at line 41 of file LCDMcPart.cc. References GetCharge(), GetG4Status(), GetParticleID(), GetParticleTag(), GetTermPosition(), getTrkID(), m_charge, m_G4Status, m_GenStatus, m_parent, m_parent2, m_partID, m_partTag, m_trkid, SetG4Status(), and SetTermPosition().
00042 : m_firstDau(0), m_lastDau(-1) // no preassigned children 00043 , m_position(pos) 00044 , m_4momentum(0,0,0,0) 00045 { 00046 m_partTag = newTag; 00047 m_parent = part->GetParticleTag(); 00048 m_parent2 = -1; 00049 m_GenStatus = 4; // geant-generated 00050 00051 // Some of the variables are the same 00052 m_trkid = part->getTrkID(); 00053 m_partID = part->GetParticleID(); 00054 m_charge = part->GetCharge(); 00055 00056 // some are moved into the new object and reset in the original one 00057 m_G4Status = part->GetG4Status(); 00058 part->SetG4Status(2); 00059 00060 this->SetTermPosition( part->GetTermPosition() ); 00061 part->SetTermPosition(pos); 00062 00063 // left for McPartManager: children and 4-momentum 00064 } |
|
|
Definition at line 72 of file LCDMcPart.hh. References m_4momentum. Referenced by LCDG4McPartManager::CheckPrimaryParticle(), LCDG4EventAction::EndOfEventAction(), LCDG4McPartManager::FindSingleBestAssociation(), LCDG4LcioHelper::getMCParticleLcio(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4McPartManager::PrintMcPart().
00072 { return m_4momentum; }
|
|
|
Definition at line 76 of file LCDMcPart.hh. References m_4momentum. Referenced by LCDG4EventAction::EndOfEventAction(), and LCDG4readStdFile::GeneratePrimaryVertex().
00076 { return &m_4momentum; }
|
|
|
Definition at line 71 of file LCDMcPart.hh. References m_calMomentum. Referenced by LCDG4EventAction::EndOfEventAction().
00071 { return m_calMomentum; }
|
|
|
Definition at line 70 of file LCDMcPart.hh. References m_calEntry. Referenced by LCDG4EventAction::EndOfEventAction().
00070 { return m_calEntry; }
|
|
|
Definition at line 23 of file LCDMcPart.hh. References m_charge. Referenced by LCDG4EventAction::EndOfEventAction(), LCDG4LcioHelper::getMCParticleLcio(), and LCDMcPart().
00023 { return m_charge; } // Charge
|
|
|
________________________________________________________________________
Definition at line 188 of file LCDMcPart.cc. References m_partID, and partchg3(). Referenced by LCDG4McPartManager::PrintMcPart(), and SetChargeFromPid().
|
|
||||||||||||
|
Definition at line 44 of file LCDMcPart.hh. References m_firstDau, and m_lastDau. Referenced by LCDG4McPartManager::EraseAllPreassignedDescendants(), and LCDG4readStdFile::GeneratePrimaryVertex().
00044 {
00045 first = m_firstDau;
00046 last = m_lastDau;
00047 }
|
|
|
Definition at line 22 of file LCDMcPart.hh. References m_G4Status. Referenced by LCDG4EventAction::EndOfEventAction(), LCDG4LcioHelper::getMCParticleLcio(), LCDMcPart(), and LCDG4McPartManager::PrintMcPart().
00022 { return m_G4Status; } // geant4 status code
|
|
|
Definition at line 21 of file LCDMcPart.hh. References m_GenStatus. Referenced by LCDG4EventAction::EndOfEventAction(), LCDG4readStdFile::GeneratePrimaryVertex(), LCDG4LcioHelper::getMCParticleLcio(), LCDG4McPartManager::MakeLCDMcPart(), LCDG4McPartManager::PreTracking(), and LCDG4McPartManager::PrintMcPart().
00021 { return m_GenStatus;} // generator status code
|
|
||||||||||||
|
Definition at line 35 of file LCDMcPart.hh. References m_parent, and m_parent2. Referenced by LCDG4readStdFile::GeneratePrimaryVertex().
|
|
|
Definition at line 20 of file LCDMcPart.hh. References m_parent. Referenced by LCDG4EventAction::EndOfEventAction(), LCDG4McPartManager::MakeLCDMcPart(), LCDG4McPartManager::PostTracking(), and LCDG4McPartManager::PrintMcPart().
00020 { return m_parent; } // Parent pointer
|
|
|
Definition at line 18 of file LCDMcPart.hh. References m_partID. Referenced by LCDG4McPartManager::AssociateFromComplexLists(), LCDG4McPartManager::CheckPrimaryParticle(), LCDG4EventAction::EndOfEventAction(), LCDG4readStdFile::GeneratePrimaryVertex(), LCDG4McPartManager::GetDaughterCandidates(), LCDG4LcioHelper::getMCParticleLcio(), LCDMcPart(), LCDG4McPartManager::MakeLCDMcPart(), LCDG4McPartManager::PreTracking(), and LCDG4McPartManager::PrintMcPart().
00018 { return m_partID; } // Particle ID
|
|
|
Definition at line 19 of file LCDMcPart.hh. References m_partTag. Referenced by LCDG4McPartManager::AssignTagToTrack(), LCDG4McPartManager::CheckPrimaryParticle(), LCDG4LcioHelper::getMCParticleLcio(), LCDMcPart(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4McPartManager::PreTracking().
00019 { return m_partTag; } // Particle tag
|
|
|
Definition at line 68 of file LCDMcPart.hh. References m_position. Referenced by LCDG4LcioHelper::getMCParticleLcio(), LCDG4readStdFile::MakeMcParts(), LCDG4McPartManager::PostTracking(), and LCDG4McPartManager::PrintMcPart().
00068 { return m_position; }
|
|
|
Definition at line 74 of file LCDMcPart.hh. References m_position.
00074 { return &m_position; }
|
|
|
Definition at line 69 of file LCDMcPart.hh. References m_term_pos. Referenced by LCDG4EventAction::EndOfEventAction(), LCDG4LcioHelper::getMCParticleLcio(), LCDMcPart(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4McPartManager::PostTracking().
00069 { return m_term_pos; }
|
|
|
Definition at line 75 of file LCDMcPart.hh. References m_term_pos.
00075 { return &m_term_pos; }
|
|
|
Definition at line 80 of file LCDMcPart.hh. References m_trkid. Referenced by LCDG4McPartManager::AssignTagToTrack(), LCDG4McPartManager::IsInOutput(), LCDMcPart(), and LCDG4McPartManager::MakeLCDMcPart().
00080 {return m_trkid;}
|
|
|
________________________________________________________________________
Definition at line 90 of file LCDMcPart.cc. References N_PART. Referenced by partchg3().
00090 {
00091 /* most of the entries are 0 */
00092 int nLeft = N_PART + 1;
00093 int *pEntry = tbl;
00094
00095 while (nLeft--) {
00096 *pEntry++ = 0;
00097 }
00098
00099 /* Now put in the non-zero entries */
00100 tbl[1] = -1;
00101 tbl[2] = 2;
00102 tbl[3] = -1;
00103 tbl[4] = 2;
00104 tbl[5] = -1;
00105 tbl[6] = 2;
00106 tbl[7] = -1;
00107 tbl[8] = 2;
00108 tbl[11] = -3;
00109 tbl[13] = -3;
00110 tbl[15] = -3;
00111 tbl[17] = -3;
00112 tbl[24] = 3;
00113 tbl[34] = 3;
00114 tbl[37] = 3;
00115 tbl[53] = 6;
00116 tbl[54] = 3;
00117 tbl[55] = 6;
00118
00119 return;
00120 }
|
|
|
________________________________________________________________________________________________________________________________________________
Definition at line 124 of file LCDMcPart.cc. References InitPartChgTable(), and N_PART. Referenced by GetChargeFromPid().
00124 {
00125
00126 int kqa, kqn, kq1, kq2, kq3, kqj, irt, kqx;
00127 int hepchg;
00128
00129 /*
00130 To lessen chances of Fortran-to-c conversion problems, let "real" entries
00131 start at index = 1
00132 */
00133 static int ichg[N_PART + 1];
00134 static int initDone = 0;
00135 if (!initDone) {
00136 InitPartChgTable(&ichg[0]);
00137 initDone = 1;
00138 }
00139
00140 /* Initial values. Simple case of direct readout. */
00141 hepchg = 0;
00142
00143 kqa = abs(id);
00144 kqn = kqa/1000000000 % 10;
00145 kqx = kqa/1000000 % 10;
00146 kq3 = kqa/1000 % 10;
00147 kq2 = kqa/100 % 10;
00148 kq1 = kqa/10 % 10;
00149 kqj = kqa % 10;
00150 irt = kqa % 10000;
00151
00152 /* illegal or ion */
00153 if ((kqa == 0) || (kqa >= 10000000)) {
00154 /* set ion charge to zero - not enough information */
00155 if (kqn == 1) hepchg = 0;
00156 } else if (kqa <= 100) {
00157 /* direct translation; i.e., can use abs(id) as index into table */
00158 hepchg = ichg[kqa];
00159 } else if (kqj == 0) {
00160 /* KS and KL (and undefined) */
00161 hepchg = 0;
00162 } else if ((kqx > 0) && (irt <= 100)) {
00163 /* direct translation -- use irt as index into table */
00164 hepchg = ichg[irt];
00165 } else if (kq3 == 0) {
00166 /* Construction from quark content for heavy meson, diquark, baryon. */
00167 /* Mesons. */
00168 hepchg = ichg[kq2] - ichg[kq1];
00169 /* Strange or beauty mesons. */
00170 if ((kq2 == 3) || (kq2 == 5)) hepchg = ichg[kq1] - ichg[kq2];
00171 } else if (kq1 == 0) {
00172 /* Diquarks. */
00173 hepchg = ichg[kq3] + ichg[kq2];
00174 } else {
00175 /* Baryons */
00176 hepchg = ichg[kq3] + ichg[kq2] + ichg[kq1];
00177 }
00178
00179 /* fix sign of charge */
00180 if ((id < 0) && (hepchg != 0)) hepchg = -hepchg;
00181
00182 return hepchg;
00183 }
|
|
|
Definition at line 214 of file LCDMcPart.cc. References m_firstDau, and m_lastDau.
00214 {
00215 G4cout<< "daughter tag(s) = "<< m_firstDau;
00216 if(m_lastDau>0) G4cout<< "..."<< m_lastDau;
00217 G4cout<< G4endl;
00218 }
|
|
|
________________________________________________________________________
Definition at line 208 of file LCDMcPart.cc. References m_parent, and m_parent2.
|
|
|
Definition at line 61 of file LCDMcPart.hh. References m_4momentum. Referenced by LCDG4PrimaryGeneratorAction::GeneratePrimaries(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4readStdFile::MakeMcParts().
00062 { m_4momentum = momentum; }
|
|
|
Definition at line 65 of file LCDMcPart.hh. References m_calMomentum. Referenced by LCDG4McPartManager::SetCalorimeterEntrancePoint().
00066 { m_calMomentum = pmom; }
|
|
|
Definition at line 63 of file LCDMcPart.hh. References m_calEntry. Referenced by LCDG4McPartManager::SetCalorimeterEntrancePoint().
00064 { m_calEntry = pos; }
|
|
|
Definition at line 31 of file LCDMcPart.hh. References m_charge.
00031 { m_charge = charge; }
|
|
|
________________________________________________________________________
Definition at line 198 of file LCDMcPart.cc. References GetChargeFromPid(), and m_charge. Referenced by LCDG4PrimaryGeneratorAction::GeneratePrimaries(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4readStdFile::MakeMcParts().
00198 {
00199 m_charge = GetChargeFromPid(pid);
00200 }
|
|
||||||||||||
|
Definition at line 48 of file LCDMcPart.hh. References m_firstDau, and m_lastDau. Referenced by LCDG4readStdFile::MakeMcParts().
00048 {
00049 m_firstDau = first;
00050 m_lastDau = last;
00051 }
|
|
|
Definition at line 30 of file LCDMcPart.hh. References m_G4Status. Referenced by LCDG4EventAction::EndOfEventAction(), LCDMcPart(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4McPartManager::PostTracking().
00030 { m_G4Status = status; }
|
|
|
Definition at line 29 of file LCDMcPart.hh. References m_GenStatus. Referenced by LCDG4McPartManager::EraseAllPreassignedDescendants(), LCDG4PrimaryGeneratorAction::GeneratePrimaries(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4readStdFile::MakeMcParts().
00029 { m_GenStatus = status; }
|
|
||||||||||||
|
Definition at line 39 of file LCDMcPart.hh. References m_parent, and m_parent2. Referenced by LCDG4readStdFile::MakeMcParts().
|
|
|
Definition at line 28 of file LCDMcPart.hh. References m_parent. Referenced by LCDG4PrimaryGeneratorAction::GeneratePrimaries(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4readStdFile::MakeMcParts().
00028 { m_parent = parent; }
|
|
|
Definition at line 26 of file LCDMcPart.hh. References m_partID. Referenced by LCDG4PrimaryGeneratorAction::GeneratePrimaries(), LCDG4McPartManager::MakeLCDMcPart(), and LCDG4readStdFile::MakeMcParts().
00026 { m_partID = id; }
|
|
|
Definition at line 27 of file LCDMcPart.hh. References m_partTag. Referenced by LCDG4McPartManager::MakeLCDMcPart(), and LCDG4readStdFile::MakeMcParts().
00027 { m_partTag = tag; }
|
|
|
Definition at line 55 of file LCDMcPart.hh. References m_position. Referenced by LCDG4PrimaryGeneratorAction::GeneratePrimaries(), LCDG4McPartManager::MakeLCDMcPart(), LCDG4readStdFile::MakeMcParts(), and LCDG4McPartManager::PostTracking().
00056 { m_position = position; }
|
|
|
Definition at line 58 of file LCDMcPart.hh. References m_term_pos. Referenced by LCDMcPart(), LCDG4readStdFile::MakeMcParts(), and LCDG4McPartManager::PostTracking().
00059 { m_term_pos = term_pos; }
|
|
|
Definition at line 79 of file LCDMcPart.hh. References m_trkid. Referenced by LCDG4McPartManager::AssignTagToTrack(), and LCDG4McPartManager::MakeLCDMcPart().
00079 { m_trkid=trkid;}
|
|
|
Definition at line 108 of file LCDMcPart.hh. Referenced by Get4Momentum(), Get4MomentumPtr(), and Set4Momentum(). |
|
|
Definition at line 106 of file LCDMcPart.hh. Referenced by GetCalorimeterEntrancePoint(), and SetCalorimeterEntrancePoint(). |
|
|
Definition at line 107 of file LCDMcPart.hh. Referenced by GetCalorimeterEntranceMomentum(), and SetCalorimeterEntranceMomentum(). |
|
|
Definition at line 99 of file LCDMcPart.hh. Referenced by GetCharge(), LCDMcPart(), SetCharge(), and SetChargeFromPid(). |
|
|
Definition at line 95 of file LCDMcPart.hh. Referenced by GetDaughterTags(), printDaughters(), and SetDaughterTags(). |
|
|
Definition at line 98 of file LCDMcPart.hh. Referenced by GetG4Status(), LCDMcPart(), and SetG4Status(). |
|
|
Definition at line 97 of file LCDMcPart.hh. Referenced by GetGenStatus(), LCDMcPart(), and SetGenStatus(). |
|
|
Definition at line 96 of file LCDMcPart.hh. Referenced by GetDaughterTags(), printDaughters(), and SetDaughterTags(). |
|
|
Definition at line 100 of file LCDMcPart.hh. Referenced by GetMotherTags(), GetParentTag(), LCDMcPart(), printParents(), SetMotherTags(), and SetParentTag(). |
|
|
Definition at line 101 of file LCDMcPart.hh. Referenced by GetMotherTags(), LCDMcPart(), printParents(), and SetMotherTags(). |
|
|
Definition at line 93 of file LCDMcPart.hh. Referenced by GetChargeFromPid(), GetParticleID(), LCDMcPart(), and SetParticleID(). |
|
|
Definition at line 94 of file LCDMcPart.hh. Referenced by GetParticleTag(), LCDMcPart(), and SetParticleTag(). |
|
|
Definition at line 104 of file LCDMcPart.hh. Referenced by GetPosition(), GetPositionPtr(), and SetPosition(). |
|
|
Definition at line 105 of file LCDMcPart.hh. Referenced by GetTermPosition(), GetTermPositionPtr(), and SetTermPosition(). |
|
|
Definition at line 102 of file LCDMcPart.hh. Referenced by getTrkID(), LCDMcPart(), and setTrkID(). |
1.3.4