81 LOG(error) <<
"CbmPlutoGenerator: Input file not open!";
87 LOG(error) <<
"CbmPlutoGenerator: No more events in input file!";
94 TDatabasePDG* dataBase = TDatabasePDG::Instance();
103 for (Int_t iPart = 0; iPart < nParts; iPart++) {
106 Int_t* pdgType = 0x0;
112 LOG(warn) <<
"CbmPlutoGenerator: Unknown type " << part->
ID() <<
", setting PDG code to " << dummyPdg <<
".";
115 LOG(info) << iPart <<
" Particle (geant " << part->
ID() <<
" PDG " << *pdgType <<
" -> "
116 << dataBase->GetParticle(*pdgType)->GetName();
119 Int_t dielectron = 99009911;
120 Int_t dimuon = 99009913;
123 LOG(warn) <<
"PDG code changed by user defintion to " << *pdgType;
125 else if (part->
ID() == 51)
126 pdgType = &dielectron;
127 else if (part->
ID() == 50)
135 TLorentzVector mom = part->
Vect4();
136 Double_t px = mom.Px();
137 Double_t py = mom.Py();
138 Double_t pz = mom.Pz();
139 Double_t ee = mom.E();
142 Double_t vx = vertex.x() * 0.1;
143 Double_t vy = vertex.y() * 0.1;
144 Double_t vz = vertex.z() * 0.1;
146 Bool_t wanttracking = kTRUE;
147 if (!found || idx > -1) wanttracking = kFALSE;
148 Int_t parent = parIdx;
149 LOG(info) <<
"Add particle with parent at index " << parIdx <<
" and do tracking " << wanttracking;
152 primGen->AddTrack(*pdgType, px, py, pz, vx, vy, vz, parent, wanttracking, ee);
Int_t GetParentIndex() const
Int_t GetDaughterIndex() const
TLorentzVector Vect4() const