CMS 3D CMS Logo

List of all members | Public Member Functions
PrintRecoObjects Class Reference

#include <PrintRecoObjects.h>

Public Member Functions

std::string getString (uint32_t detid, const TrackerTopology *tTopo) const
 
void print (std::stringstream &ss, const reco::Track *track, const math::XYZPoint &vx)
 
void print (std::stringstream &ss, const SiStripCluster &clus)
 
void print (std::stringstream &ss, const TrajectorySeed &tjS)
 
void print (std::stringstream &ss, const uint32_t &detid, const TrackerTopology *tTopo) const
 
 PrintRecoObjects ()
 
 ~PrintRecoObjects ()
 

Detailed Description

Definition at line 20 of file PrintRecoObjects.h.

Constructor & Destructor Documentation

◆ PrintRecoObjects()

PrintRecoObjects::PrintRecoObjects ( )
inline

Definition at line 22 of file PrintRecoObjects.h.

22 {};

◆ ~PrintRecoObjects()

PrintRecoObjects::~PrintRecoObjects ( )
inline

Definition at line 23 of file PrintRecoObjects.h.

23 {};

Member Function Documentation

◆ getString()

std::string PrintRecoObjects::getString ( uint32_t  detid,
const TrackerTopology tTopo 
) const

Definition at line 35 of file PrintRecoObjects.cc.

35  {
36  std::string append = " ";
37  char cindex[128];
38  SiStripDetId a(detid);
39  if (a.subdetId() == 3) {
40  append += "_TIB_L";
41  sprintf(cindex, "%d", tTopo->tibLayer(detid));
42  } else if (a.subdetId() == 4) {
43  if (tTopo->tidSide(detid) == 1) {
44  append += "_M_D";
45  } else {
46  append += "_M_P";
47  }
48  sprintf(cindex, "%d", tTopo->tidWheel(detid));
49  } else if (a.subdetId() == 5) {
50  append += "_TOB_L";
51  sprintf(cindex, "%d", tTopo->tobLayer(detid));
52  } else if (a.subdetId() == 6) {
53  if (tTopo->tecSide(detid) == 1) {
54  append += "_TEC_M";
55  } else {
56  append += "_TEC_P";
57  }
58  sprintf(cindex, "%d", tTopo->tecWheel(detid));
59  }
60 
61  append += std::string(cindex);
62  return append;
63 }

References a, mps_setup::append, AlCaHLTBitMon_QueryRunRegistry::string, TrackerTopology::tecSide(), TrackerTopology::tecWheel(), TrackerTopology::tibLayer(), TrackerTopology::tidSide(), TrackerTopology::tidWheel(), and TrackerTopology::tobLayer().

Referenced by print().

◆ print() [1/4]

void PrintRecoObjects::print ( std::stringstream &  ss,
const reco::Track track,
const math::XYZPoint vx 
)

Definition at line 65 of file PrintRecoObjects.cc.

65  {
66  ss << "[PrintObject] "
67  << "\n\tcharge \t" << track->charge() << "\talgo \t" << track->algo() << "\n\treferencePoint \t"
68  << track->referencePoint() << " \t r: " << track->referencePoint().rho() << "\n\tinnerpos \t"
69  << track->innerPosition() << " \t r: " << track->innerPosition().rho();
70 
71  ss << "\n\tmomentum \t" << track->momentum() << " pt " << track->momentum().rho() << "\n\tinnerMom \t"
72  << track->innerMomentum() << " pt " << track->innerMomentum().rho();
73 
74  ss << "\n\tinnerok \t" << track->innerOk() << "\n\tinnerdetid \t" << track->innerDetId() << "\n\tdxy \t"
75  << track->dxy() << "\n\tdxy(vx) \t" << track->dxy(vx) << "\t where vx \t" << vx << std::endl;
76 }

References contentValuesCheck::ss, and HLT_FULL_cff::track.

◆ print() [2/4]

void PrintRecoObjects::print ( std::stringstream &  ss,
const SiStripCluster clus 
)

◆ print() [3/4]

void PrintRecoObjects::print ( std::stringstream &  ss,
const TrajectorySeed tjS 
)

Definition at line 17 of file PrintRecoObjects.cc.

17  {
18  ss << "\n\t nHits " << tjS.nHits() << "\n\t PTrajectoryStateOnDet: detid " << tjS.startingState().detId()
19  << " tsos momentum" << tjS.startingState().parameters().momentum() << " pt "
20  << sqrt(tjS.startingState().parameters().momentum().mag2() -
22  << " charge " << tjS.startingState().parameters().charge() << "\n\t error ";
23  for (size_t ie = 0; ie < 15; ++ie)
24  ss << "\t " << tjS.startingState().error(ie);
25  for (auto const& recHit : tjS.recHits()) {
26  ss << "\n\t TrackingRecHit on detid " << recHit.geographicalId().rawId() << " \t localPos "
27  << recHit.localPosition();
28  }
29 }

References LocalTrajectoryParameters::charge(), PTrajectoryStateOnDet::detId(), PTrajectoryStateOnDet::error(), PV3DBase< T, PVType, FrameType >::mag2(), LocalTrajectoryParameters::momentum(), TrajectorySeed::nHits(), PTrajectoryStateOnDet::parameters(), rpcPointValidation_cfi::recHit, TrajectorySeed::recHits(), mathSSE::sqrt(), contentValuesCheck::ss, TrajectorySeed::startingState(), and PV3DBase< T, PVType, FrameType >::y().

◆ print() [4/4]

void PrintRecoObjects::print ( std::stringstream &  ss,
const uint32_t &  detid,
const TrackerTopology tTopo 
) const

Definition at line 31 of file PrintRecoObjects.cc.

31  {
32  ss << getString(detid, tTopo);
33 }

References getString(), and contentValuesCheck::ss.

HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11713
SiStripCluster::barycenter
float barycenter() const
Definition: SiStripCluster.cc:25
PTrajectoryStateOnDet::error
float & error(int i)
Definition: PTrajectoryStateOnDet.h:63
TrajectorySeed::nHits
unsigned int nHits() const
Definition: TrajectorySeed.h:53
gpuClustering::adc
uint16_t *__restrict__ uint16_t const *__restrict__ adc
Definition: gpuClusterChargeCut.h:20
PV3DBase::mag2
T mag2() const
Definition: PV3DBase.h:63
rpcPointValidation_cfi.recHit
recHit
Definition: rpcPointValidation_cfi.py:7
TrackerTopology::tidWheel
unsigned int tidWheel(const DetId &id) const
Definition: TrackerTopology.h:201
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
SiStripCluster::firstStrip
uint16_t firstStrip() const
Definition: SiStripCluster.h:46
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
PTrajectoryStateOnDet::detId
unsigned int detId() const
Definition: PTrajectoryStateOnDet.h:65
PrintRecoObjects::getString
std::string getString(uint32_t detid, const TrackerTopology *tTopo) const
Definition: PrintRecoObjects.cc:35
mathSSE::sqrt
T sqrt(T t)
Definition: SSEVec.h:19
LocalTrajectoryParameters::charge
TrackCharge charge() const
Charge (-1, 0 or 1)
Definition: LocalTrajectoryParameters.h:110
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ALCARECOTkAlJpsiMuMu_cff.charge
charge
Definition: ALCARECOTkAlJpsiMuMu_cff.py:47
a
double a
Definition: hdecay.h:119
mps_setup.append
append
Definition: mps_setup.py:85
PV3DBase::y
T y() const
Definition: PV3DBase.h:60
TrackerTopology::tidSide
unsigned int tidSide(const DetId &id) const
Definition: TrackerTopology.h:190
SiStripCluster::size
uint8_t size() const
Definition: SiStripCluster.h:63
SiStripCluster::amplitudes
SiStripCluster const & amplitudes() const
Definition: SiStripCluster.h:68
TrajectorySeed::recHits
RecHitRange recHits() const
Definition: TrajectorySeed.h:52
TrackerTopology::tobLayer
unsigned int tobLayer(const DetId &id) const
Definition: TrackerTopology.h:147
PTrajectoryStateOnDet::parameters
const LocalTrajectoryParameters & parameters() const
Definition: PTrajectoryStateOnDet.h:60
LocalTrajectoryParameters::momentum
LocalVector momentum() const
Momentum vector in the local frame.
Definition: LocalTrajectoryParameters.h:88
TrajectorySeed::startingState
PTrajectoryStateOnDet const & startingState() const
Definition: TrajectorySeed.h:55
SiStripDetId
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
TrackerTopology::tecWheel
unsigned int tecWheel(const DetId &id) const
Definition: TrackerTopology.h:198
TrackerTopology::tibLayer
unsigned int tibLayer(const DetId &id) const
Definition: TrackerTopology.h:150
TrackerTopology::tecSide
unsigned int tecSide(const DetId &id) const
Definition: TrackerTopology.h:184