CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 22 of file PrintRecoObjects.h.

Constructor & Destructor Documentation

PrintRecoObjects::PrintRecoObjects ( )
inline

Definition at line 25 of file PrintRecoObjects.h.

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

Definition at line 26 of file PrintRecoObjects.h.

26 {};

Member Function Documentation

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

Definition at line 43 of file PrintRecoObjects.cc.

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

Referenced by print().

43  {
44  std::string append=" ";
45  char cindex[128];
47  if ( a.subdetId() == 3 ){
48  append+="_TIB_L";
49  sprintf(cindex,"%d",tTopo->tibLayer(detid));
50  } else if ( a.subdetId() == 4 ) {
51  if(tTopo->tidSide(detid)==1){
52  append+="_M_D";
53  }else{
54  append+="_M_P";
55  }
56  sprintf(cindex,"%d",tTopo->tidWheel(detid));
57  } else if ( a.subdetId() == 5 ) {
58  append+="_TOB_L";
59  sprintf(cindex,"%d",tTopo->tobLayer(detid));
60  } else if ( a.subdetId() == 6 ) {
61  if(tTopo->tecSide(detid)==1){
62  append+="_TEC_M";
63  }else{
64  append+="_TEC_P";
65  }
66  sprintf(cindex,"%d",tTopo->tecWheel(detid));
67  }
68 
69  append+=std::string(cindex);
70  return append;
71 }
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:17
double a
Definition: hdecay.h:121
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 6 of file PrintRecoObjects.cc.

References ecalMGPA::adc(), SiStripCluster::amplitudes(), SiStripCluster::barycenter(), SiStripCluster::firstStrip(), and customizeTrackingMonitorSeedNumber::idx.

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

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

Definition at line 22 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().

22  {
23 
24  ss << "\n\t nHits "<< tjS.nHits()
25  << "\n\t PTrajectoryStateOnDet: detid " << tjS.startingState().detId()
26  << " tsos momentum" << tjS.startingState().parameters().momentum()
28  << " charge " << tjS.startingState().parameters().charge()
29  << "\n\t error ";
30  for(size_t ie=0;ie<15;++ie)
31  ss << "\t " << tjS.startingState().error(ie);
32  for(TrajectorySeed::const_iterator iter=tjS.recHits().first;iter!=tjS.recHits().second;++iter)
33  ss << "\n\t TrackingRecHit on detid " << iter->geographicalId().rawId() << " \t localPos " << iter->localPosition();
34 
35 }
T mag2() const
Definition: PV3DBase.h:66
T y() const
Definition: PV3DBase.h:63
recHitContainer::const_iterator const_iterator
T sqrt(T t)
Definition: SSEVec.h:48
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 38 of file PrintRecoObjects.cc.

References getString().

38  {
39  ss<< getString(detid,tTopo);
40 }
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 74 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().

74  {
75 
76  ss
77  << "[PrintObject] "
78  << "\n\tcharge \t" << track->charge()
79  << "\talgo \t" << track->algo()
80  << "\n\treferencePoint \t" << track->referencePoint() << " \t r: " << track->referencePoint().rho()
81  << "\n\tinnerpos \t" << track->innerPosition() << " \t r: " << track->innerPosition().rho();
82 
83 
84  ss
85  << "\n\tmomentum \t" << track->momentum() << " pt " << track->momentum().rho()
86  << "\n\tinnerMom \t" << track->innerMomentum() << " pt " << track->innerMomentum().rho();
87 
88 
89  ss
90  << "\n\tinnerok \t" << track->innerOk()
91  << "\n\tinnerdetid \t" << track->innerDetId()
92  << "\n\tdxy \t" << track->dxy()
93  << "\n\tdxy(vx) \t" << track->dxy(vx)
94  << "\t where vx \t" << vx
95  << std::endl;
96 
97 }
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:634
bool innerOk() const
return true if the innermost hit is valid
Definition: Track.h:50
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:628
const math::XYZPoint & innerPosition() const
position of the innermost hit
Definition: Track.h:55
TrackAlgorithm algo() const
Definition: TrackBase.h:450
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
Definition: Track.h:60
int charge() const
track electric charge
Definition: TrackBase.h:520
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:544
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
Definition: Track.h:99