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
 
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
 
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 23 of file PrintRecoObjects.h.

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

Definition at line 24 of file PrintRecoObjects.h.

24 {};

Member Function Documentation

std::string PrintRecoObjects::getString ( uint32_t  detid) const

Definition at line 46 of file PrintRecoObjects.cc.

References a, python.multivaluedict::append(), TIDDetId::side(), TECDetId::side(), and DetId::subdetId().

Referenced by print().

46  {
47  std::string append=" ";
48  char cindex[128];
50  if ( a.subdetId() == 3 ){
51  append+="_TIB_L";
52  sprintf(cindex,"%d",TIBDetId(detid).layer());
53  } else if ( a.subdetId() == 4 ) {
54  if(TIDDetId(detid).side()==1){
55  append+="_M_D";
56  }else{
57  append+="_M_P";
58  }
59  sprintf(cindex,"%d",TIDDetId(detid).wheel());
60  } else if ( a.subdetId() == 5 ) {
61  append+="_TOB_L";
62  sprintf(cindex,"%d",TOBDetId(detid).layer());
63  } else if ( a.subdetId() == 6 ) {
64  if(TECDetId(detid).side()==1){
65  append+="_TEC_M";
66  }else{
67  append+="_TEC_P";
68  }
69  sprintf(cindex,"%d",TECDetId(detid).wheel());
70  }
71 
72  append+=std::string(cindex);
73  return append;
74 }
unsigned int side() const
positive or negative id
Definition: TECDetId.h:47
Detector identifier class for the strip tracker.
Definition: SiStripDetId.h:17
unsigned int side() const
positive or negative id
Definition: TIDDetId.h:45
double a
Definition: hdecay.h:121
void PrintRecoObjects::print ( std::stringstream &  ss,
const SiStripCluster clus 
)

Definition at line 9 of file PrintRecoObjects.cc.

References ecalMGPA::adc(), SiStripCluster::amplitudes(), SiStripCluster::barycenter(), DeDxDiscriminatorTools::charge(), and SiStripCluster::firstStrip().

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

9  {
10  ss << "\n\t"
11  << " firstStrip " << clus.firstStrip()
12  << " size " << clus.amplitudes().size();
13  float charge=0;
14  size_t idx=0;
15  BOOST_FOREACH(const uint8_t& adc,clus.amplitudes()){
16  charge+=adc;
17  ss << "\n\t\t strip " << ++idx << " adc " << (size_t) adc;
18  }
19  ss << "\n\t\t charge " << charge
20  << " barycenter " << clus.barycenter()
21  << std::endl;
22 }
int adc(sample_type sample)
get the ADC sample (12 bits)
uint16_t firstStrip() const
double charge(const std::vector< uint8_t > &Ampls)
float barycenter() const
const std::vector< uint8_t > & amplitudes() const
void PrintRecoObjects::print ( std::stringstream &  ss,
const TrajectorySeed tjS 
)

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

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

Definition at line 41 of file PrintRecoObjects.cc.

References getString().

41  {
42  ss<< getString(detid);
43 }
std::string getString(uint32_t detid) const
void PrintRecoObjects::print ( std::stringstream &  ss,
const reco::Track track,
const math::XYZPoint vx 
)

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

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