GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Particle identification parameter for FairRutherfordPoint
Particle identification parameter for FairRutherfordPoint [message #14264] Tue, 11 December 2012 23:45 Go to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *dyn.optonline.net
Hi guys,
I am currently using the rutherford example in Fairroot. I run run_rutherford.C and get test.mc.root. I would like to plot the particle hits on the detector as a function of theta for a particular particle, e.g. the theta distribution of photons. I plot these distributions with

root -l data/test.mc.root (in the rutherford macros folder)

cbmsim->Draw("FairRutherfordPoint.fEta>>h1","FairRutherfordPoint.fEta >-10 && FairRutherfordPoint.fEta<10")

where eta is the pseudorapidity and a function of theta.

I would like to just look at the eta distribution of the photons instead of the whole range of particles. I notice that the particle identification information is stored in MCTrack and not in FairRutherfordPoint. I thought of using the command
cbmsim->Draw("FairRutherfordPoint.fEta>>h1","FairRutherfordPoint.fEta >-10 && FairRutherfordPoint.fEta<10 && MCTrack.fPdgCode==22")
However, further analysis showed that this command does not actually plot the fairrutherfordpoint eta distribution of the photon particles. I believe is is because pdgCode is in a different branch from FairRutherfordPoint.

I now want to make pid information an intrinsic property of FairRutherfordPoint. What must I do to get the pdgCode from the MCTrack to the corresponding FairRutherfordPoint?
Re: Particle identification parameter for FairRutherfordPoint [message #14265 is a reply to message #14264] Wed, 12 December 2012 09:14 Go to previous messageGo to next message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 140.181.11*
cbmsim->Draw("FairRutherfordPoint.fEta>>h1","FairRutherfordPoint.fEta >-10 && FairRutherfordPoint.fEta<10 && MCTrack[FairRutherfordPoint.fTrackID].fPdgCode==22")
Re: Particle identification parameter for FairRutherfordPoint [message #14266 is a reply to message #14265] Wed, 12 December 2012 12:25 Go to previous messageGo to next message
Raphael Cervantes is currently offline  Raphael Cervantes
Messages: 34
Registered: September 2012
Location: Stony Brook University
continuous participant
From: *dyn.optonline.net
Hi,
That did the trick, but I don't quite understand what's going on. Can you explain to me why your code works?

Thank you,
Raphael
Re: Particle identification parameter for FairRutherfordPoint [message #14267 is a reply to message #14266] Wed, 12 December 2012 12:46 Go to previous message
StefanoSpataro is currently offline  StefanoSpataro
Messages: 2736
Registered: June 2005
Location: Torino
first-grade participant

From: 140.181.11*
You select the MCTrack corresponding to the track id from the Point. With the [XX] you retrieve the object at the XX position inside the TClonesArray, and the trackID is the position number inside the TCA of the mother MCTrack.
Previous Topic: getting run_rutherford to calculate eta parameter [SOLVED]
Next Topic: configure csh script
Goto Forum:
  


Current Time: Thu Nov 28 09:28:31 CET 2024

Total time taken to generate the page: 0.00702 seconds