StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
TopologyMap.cc
1 //
2 // Pibero Djawotho <pibero@iucf.indiana.edu>
3 // Indiana University
4 // November 3, 2005
5 //
6 
7 #include "Track.hh"
8 #include "TopologyMap.hh"
9 
10 TopologyMap::TopologyMap(Track* track) : mFarEast(0), mNearEast(0), mNearWest(0), mFarWest(0)
11 {
12  for (Track::iterator i = track->begin(); i != track->end(); ++i) {
13  StHit* hit = *i;
14  float z = hit->position().z();
15  if (-200 <= z && z < -150) ++mFarEast;
16  else if ( -50 <= z && z < 0) ++mNearEast;
17  else if ( 0 <= z && z < 50) ++mNearWest;
18  else if ( 150 <= z && z <= 200) ++mFarWest;
19  }
20 }
21 
22 ostream& operator<<(ostream& os, const TopologyMap& topoMap)
23 {
24  return os << topoMap. farEast() << '\t'
25  << topoMap.nearEast() << '\t'
26  << topoMap.nearWest() << '\t'
27  << topoMap. farWest();
28 }
Number of hits in diffent zones of the TPC for a given track.
Definition: TopologyMap.hh:29
Definition: StHit.h:125
TopologyMap(Track *track=0)
Constructor creates the topology map.
Definition: TopologyMap.cc:10
C++ STL includes.
Definition: AgUStep.h:47
int nearEast() const
Number of hits in near east of TPC (-50 &lt;= z &lt; 0 cm)
Definition: TopologyMap.hh:65
int nearWest() const
Number of hits in near west of TPC (0 &lt;= z &lt; 50 cm)
Definition: TopologyMap.hh:66