Linear Collider Forum



Home » Analysis and Reconstruction » Analysis Tools » how to get VtxBarrHits for a particle?
Re: how to get VtxBarrHits for a particle? [message #1222 is a reply to message #1219] Tue, 16 October 2007 06:28 Go to previous message
Dmitry Onoprienko
Messages: 26
Registered: May 2004
Location: Kansas State University
Hi Andrei,

Layers are numbered separately for each tracking subdetector, so
simTrackerHit.getLayer() == 0
will be true for innermost layers of VXD barrel, VXD endcap, outer tracker barrel, outer tracker endcap, and forward tracker.

Given a SimTrackerHit, you can check whether it is in VXD barrel by evaluating
simTrackerHit.getSubdetector().getName().equals("VertexBarrel")

Or, if would like to avoid string comparison at every step, you can look up Subdetector object for the vertex barrel by name once, and then compare it to the object returned by simTrackerHit.getSubdetector(). In practice, that will not make much difference since Java compiler caches short Strings, and will be doing object identity comparison anyway.

Alternatively, you can fill the map only with hits from "VtxBarrHits" list that can be fetched from the event by
List<SimTrackerHit> hitList = event.get(SimTrackerHit.class, "VtxBarrHits");

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:question on The Students' Getting Started Guide
Next Topic:Neural Nets and lcsim.org
Goto Forum:
  


Current Time: Tue Oct 16 13:33:06 Pacific Daylight Time 2018
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software