CMS 3D CMS Logo

Public Member Functions | Static Public Member Functions

HitInfo Class Reference

#include <HitInfo.h>

List of all members.

Public Member Functions

 HitInfo ()
 HitInfo ()
 ~HitInfo ()
 ~HitInfo ()

Static Public Member Functions

static std::string getInfo (const DetId &id)
static std::string getInfo (const PSimHit &simHit)
static std::string getInfo (std::vector< const TrackingRecHit * > recHits)
static std::string getInfo (const TrackingRecHit &recHit)
static std::string getInfo (const DetId &id)
static std::string getInfo (const PSimHit &simHit)
static std::string getInfo (std::vector< const TrackingRecHit * > recHits)
static std::string getInfo (const TrackingRecHit &recHit)

Detailed Description

Definition at line 11 of file HitInfo.h.


Constructor & Destructor Documentation

HitInfo::HitInfo ( )

Definition at line 14 of file HitInfo.cc.

{
}
HitInfo::~HitInfo ( )

Definition at line 19 of file HitInfo.cc.

{
}
HitInfo::HitInfo ( )
HitInfo::~HitInfo ( )

Member Function Documentation

string HitInfo::getInfo ( const DetId id) [static]

Definition at line 24 of file HitInfo.cc.

References PXFDetId::blade(), PXFDetId::disk(), info, PXBDetId::ladder(), PXBDetId::layer(), PXFDetId::module(), PXBDetId::module(), python::connectstrParser::o, PXFDetId::panel(), evf::utils::pid, PixelSubdetector::PixelBarrel, and PXFDetId::side().

Referenced by TrackCleaner::cleanTracks(), LowPtClusterShapeSeedComparitor::compatible(), PlotRecTracks::getPixelInfo(), PlotRecTracks::getStripInfo(), PixelTripletLowPtGenerator::hitTriplets(), and PlotSimTracks::printSimTracks().

{
  std::string info;

  if(id.subdetId() == int(PixelSubdetector::PixelBarrel))
  {
    // 0 + (layer-1)<<1 + (ladder-1)%2 : 0-5
    PXBDetId pid(id);
    ostringstream o;
    o << " (" << pid.layer()  << "|" << pid.ladder()
      <<  "|" << pid.module() << ")";
    info += o.str();
  }
  else
  {
    // 6 + (disk-1)<<1 + (panel-1)%2
    PXFDetId pid(id);
    ostringstream o;
    o << " (" << pid.side()   << "|" << pid.disk()
      <<  "|" << pid.blade()  << "|" << pid.panel()
      <<  "|" << pid.module() << ")";
    info += o.str();
  }

  return info;
}
static std::string HitInfo::getInfo ( const PSimHit simHit) [static]
static std::string HitInfo::getInfo ( std::vector< const TrackingRecHit * >  recHits) [static]
static std::string HitInfo::getInfo ( const TrackingRecHit recHit) [static]
static std::string HitInfo::getInfo ( const DetId id) [static]
string HitInfo::getInfo ( const PSimHit simHit) [static]

Definition at line 73 of file HitInfo.cc.

References PSimHit::detUnitId(), info, python::connectstrParser::o, and PSimHit::particleType().

{
  std::string info;

  DetId id = DetId(simHit.detUnitId());

  {
    ostringstream o;
    o << simHit.particleType();

    info += " | pid=" + o.str();
  }

  {
    ostringstream o;
//    o << theTracker->idToDet(id)->subDetector();
    o << id.subdetId();

    info += " | " + o.str();
  }

  return info + getInfo(id);;
}
string HitInfo::getInfo ( std::vector< const TrackingRecHit * >  recHits) [static]

Definition at line 60 of file HitInfo.cc.

References info.

{
  std::string info;

  for(std::vector<const TrackingRecHit *>::const_iterator
        recHit = recHits.begin();
        recHit!= recHits.end(); recHit++)
     info += getInfo(**recHit);

  return info;
}
string HitInfo::getInfo ( const TrackingRecHit recHit) [static]

Definition at line 52 of file HitInfo.cc.

References TrackingRecHit::geographicalId(), and errorMatrix2Lands_multiChannel::id.

{
  DetId id(recHit.geographicalId());

  return getInfo(id);
}