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 SiStripCluster &clus)
 
void print (std::stringstream &ss, const TrajectorySeed &tjS)
 
void print (std::stringstream &ss, const uint32_t &detid, const TrackerTopology *tTopo) const
 
void print (std::stringstream &ss, const reco::Track *track, const math::XYZPoint &vx)
 
 PrintRecoObjects ()
 
 ~PrintRecoObjects ()
 

Detailed Description

Definition at line 20 of file PrintRecoObjects.h.

Constructor & Destructor Documentation

PrintRecoObjects::PrintRecoObjects ( )
inline

Definition at line 22 of file PrintRecoObjects.h.

22 {};
PrintRecoObjects::~PrintRecoObjects ( )
inline

Member Function Documentation

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

Definition at line 33 of file PrintRecoObjects.cc.

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

Referenced by print(), and ~PrintRecoObjects().

33  {
34  std::string append = " ";
35  char cindex[128];
36  SiStripDetId a(detid);
37  if (a.subdetId() == 3) {
38  append += "_TIB_L";
39  sprintf(cindex, "%d", tTopo->tibLayer(detid));
40  } else if (a.subdetId() == 4) {
41  if (tTopo->tidSide(detid) == 1) {
42  append += "_M_D";
43  } else {
44  append += "_M_P";
45  }
46  sprintf(cindex, "%d", tTopo->tidWheel(detid));
47  } else if (a.subdetId() == 5) {
48  append += "_TOB_L";
49  sprintf(cindex, "%d", tTopo->tobLayer(detid));
50  } else if (a.subdetId() == 6) {
51  if (tTopo->tecSide(detid) == 1) {
52  append += "_TEC_M";
53  } else {
54  append += "_TEC_P";
55  }
56  sprintf(cindex, "%d", tTopo->tecWheel(detid));
57  }
58 
59  append += std::string(cindex);
60  return append;
61 }
unsigned int tibLayer(const DetId &id) const
unsigned int tidWheel(const DetId &id) const
unsigned int tidSide(const DetId &id) const
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:18
double a
Definition: hdecay.h:119
unsigned int tecWheel(const DetId &id) const
unsigned int tobLayer(const DetId &id) const
unsigned int tecSide(const DetId &id) const
void PrintRecoObjects::print ( std::stringstream &  ss,
const SiStripCluster clus 
)

Definition at line 5 of file PrintRecoObjects.cc.

References ecalMGPA::adc(), SiStripCluster::amplitudes(), SiStripCluster::barycenter(), ALCARECOTkAlJpsiMuMu_cff::charge, SiStripCluster::firstStrip(), and training_settings::idx.

Referenced by PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::analyze(), SeedForPhotonConversion1Leg::buildSeed(), SeedForPhotonConversionFromQuadruplets::buildSeed(), PhotonConversionTrajectorySeedProducerFromSingleLegAlgo::find(), SeedForPhotonConversion1Leg::initialKinematic(), SeedForPhotonConversionFromQuadruplets::initialKinematic(), and ~PrintRecoObjects().

5  {
6  ss << "\n\t"
7  << " firstStrip " << clus.firstStrip() << " size " << clus.amplitudes().size();
8  float charge = 0;
9  size_t idx = 0;
10  for (auto adc : clus.amplitudes()) {
11  charge += adc;
12  ss << "\n\t\t strip " << ++idx << " adc " << (size_t)adc;
13  }
14  ss << "\n\t\t charge " << charge << " barycenter " << clus.barycenter() << std::endl;
15 }
uint16_t firstStrip() const
float barycenter() const
constexpr int adc(sample_type sample)
get the ADC sample (12 bits)
const std::vector< uint8_t > & amplitudes() const
void PrintRecoObjects::print ( std::stringstream &  ss,
const TrajectorySeed tjS 
)

Definition at line 17 of file PrintRecoObjects.cc.

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

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 (TrajectorySeed::const_iterator iter = tjS.recHits().first; iter != tjS.recHits().second; ++iter)
26  ss << "\n\t TrackingRecHit on detid " << iter->geographicalId().rawId() << " \t localPos " << iter->localPosition();
27 }
T mag2() const
Definition: PV3DBase.h:63
T y() const
Definition: PV3DBase.h:60
recHitContainer::const_iterator const_iterator
T sqrt(T t)
Definition: SSEVec.h:19
unsigned int detId() const
LocalVector momentum() const
Momentum vector in the local frame.
PTrajectoryStateOnDet const & startingState() const
range recHits() const
TrackCharge charge() const
Charge (-1, 0 or 1)
unsigned int nHits() const
const LocalTrajectoryParameters & parameters() const
void PrintRecoObjects::print ( std::stringstream &  ss,
const uint32_t &  detid,
const TrackerTopology tTopo 
) const

Definition at line 29 of file PrintRecoObjects.cc.

References getString().

29  {
30  ss << getString(detid, tTopo);
31 }
std::string getString(uint32_t detid, const TrackerTopology *tTopo) const
void PrintRecoObjects::print ( std::stringstream &  ss,
const reco::Track track,
const math::XYZPoint vx 
)

Definition at line 63 of file PrintRecoObjects.cc.

References reco::TrackBase::algo(), reco::TrackBase::charge(), reco::TrackBase::dxy(), reco::Track::innerDetId(), reco::Track::innerMomentum(), reco::Track::innerOk(), reco::Track::innerPosition(), reco::TrackBase::momentum(), and reco::TrackBase::referencePoint().

63  {
64  ss << "[PrintObject] "
65  << "\n\tcharge \t" << track->charge() << "\talgo \t" << track->algo() << "\n\treferencePoint \t"
66  << track->referencePoint() << " \t r: " << track->referencePoint().rho() << "\n\tinnerpos \t"
67  << track->innerPosition() << " \t r: " << track->innerPosition().rho();
68 
69  ss << "\n\tmomentum \t" << track->momentum() << " pt " << track->momentum().rho() << "\n\tinnerMom \t"
70  << track->innerMomentum() << " pt " << track->innerMomentum().rho();
71 
72  ss << "\n\tinnerok \t" << track->innerOk() << "\n\tinnerdetid \t" << track->innerDetId() << "\n\tdxy \t"
73  << track->dxy() << "\n\tdxy(vx) \t" << track->dxy(vx) << "\t where vx \t" << vx << std::endl;
74 }
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:632
bool innerOk() const
return true if the innermost hit is valid
Definition: Track.h:53
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:629
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:56
TrackAlgorithm algo() const
Definition: TrackBase.h:526
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:59
int charge() const
track electric charge
Definition: TrackBase.h:575
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:587
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: Track.h:82