GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Tracking » Urgent fixes in FairGeanePro.cxx needed
Re: Urgent fixes in FairGeanePro.cxx needed [message #8157 is a reply to message #8154] Tue, 31 March 2009 17:06 Go to previous messageGo to previous message
asanchez is currently offline  asanchez
Messages: 350
Registered: March 2006
first-grade participant
From: *kph.uni-mainz.de
Hi Felix,
maybe you can use the following function
for those particles whose pdg is larger than 5000
,namely, ions. i have some time ago problems
also to extract the charge using the
TDatabasePDG::Instance()->GetParticle(pdg)->Charge()/3..

the variable ion corresponds to the pdg code of the
particle, for example, 1000010020.

Int_t PndHypDPatternRecoTask::GetChargeIon(Int_t ion)
261 {
262 Int_t A,Z,L;
263
264 if(ion>1000000000&&(ion<1010000000))
265 { ion -= 1000000000;
266 Z = ion/10000;
267 ion -= 10000*Z;
268 A = ion/10;
269 cout<<" ion charge "<<Z<<endl;
270
271 return Z;
272
273 }

I hope it can help you,
best regrads
Alicia S.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: problem with TrackCand
Next Topic: WirepointHitPolicy detplane implementation
Goto Forum:
  


Current Time: Tue Apr 16 07:08:00 CEST 2024

Total time taken to generate the page: 0.00868 seconds