GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Tracking » Problem with secondary tracks
Re: Problem with secondary tracks [message #12381 is a reply to message #12379] Thu, 28 July 2011 23:24 Go to previous messageGo to previous message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: 46.248.220*

If I understand your code in "PndTpcDetector::ProcessHits" you are miss-using the trackID variable, this member variable comes from the base class FairMCPoint and the whole filtering is based on this inheritance (The FairMCStack has no idea about detector or experiments code).
To explain this: The trackID is used normally as unique identifier of a track, i.e: it is the index of this track in the array, and when you get the mother ID of a track you get also the index of that mother in the array. In your code you are setting the trackID to the mother ID:

 Bool_t  PndTpcDetector::ProcessHits( FairVolume *v)
    TParticle* mother=gMC->GetStack()->GetCurrentTrack();
    if(mother->IsPrimary()) secID = 0;
    else while(!mother->IsPrimary()){
    //std::cout<<"Fetching mother id="<<trackID<<std::endl;

  // trackID is now ID of primary mother
  // if the mother is already primary, secID is 0
  // else secID is an (arbitrary) number !=0

 //gotta love TClonesArray syntax!
  PndTpcPoint* p=AddHit(trackID, secID, volumeID, pos.Vect(), mom.Vect(),
			time, length, eLoss);

As you see, the PndTpcPoint has a variable trackID which does not correspond to the track index anymore, and this will miss up the whole filtering! So I would suggest you to define a new variable in your TpcPoint which hold the info you need without miss-using the trackID.

Hope this will help you, now I will enjoy the rest of my vacation!



Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: bug in PidCorrelator
Next Topic: Update on eta_c reconstruction with STT and TPC
Goto Forum:

Current Time: Thu Jul 18 16:26:59 CEST 2024

Total time taken to generate the page: 0.00858 seconds