CMS 3D CMS Logo

Public Member Functions

PrintRecoObjects Class Reference

#include <PrintRecoObjects.h>

List of all members.

Public Member Functions

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

{};
PrintRecoObjects::~PrintRecoObjects ( ) [inline]

Definition at line 24 of file PrintRecoObjects.h.

{};

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().

                               {
  std::string append=" ";
  char cindex[128];
  SiStripDetId a(detid);
  if ( a.subdetId() == 3 ){
    append+="_TIB_L";
    sprintf(cindex,"%d",TIBDetId(detid).layer()); 
  } else if ( a.subdetId() == 4 ) {
    if(TIDDetId(detid).side()==1){
      append+="_M_D";
    }else{
      append+="_M_P";
    }
    sprintf(cindex,"%d",TIDDetId(detid).wheel());
  } else if ( a.subdetId() == 5 ) {
    append+="_TOB_L";
    sprintf(cindex,"%d",TOBDetId(detid).layer());
  } else if ( a.subdetId() == 6 ) {
    if(TECDetId(detid).side()==1){
      append+="_TEC_M";
    }else{
      append+="_TEC_P";
    }
    sprintf(cindex,"%d",TECDetId(detid).wheel());
  } 

  append+=std::string(cindex);
  return append;  
}
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().

                                                                     {

  ss << "\n\t nHits "<< tjS.nHits() 
     << "\n\t PTrajectoryStateOnDet: detid " << tjS.startingState().detId()
     << " tsos momentum" << tjS.startingState().parameters().momentum()
     << " pt " << sqrt(tjS.startingState().parameters().momentum().mag2()-tjS.startingState().parameters().momentum().y()*tjS.startingState().parameters().momentum().y())
     << " charge " << tjS.startingState().parameters().charge()
     << "\n\t error ";
  for(size_t ie=0;ie<15;++ie)
    ss << "\t " << tjS.startingState().error(ie);
  for(TrajectorySeed::const_iterator iter=tjS.recHits().first;iter!=tjS.recHits().second;++iter)
    ss << "\n\t TrackingRecHit on detid " << iter->geographicalId().rawId() << " \t localPos " << iter->localPosition();
  
}
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().

                                                                          {
  
  ss
    << "[PrintObject] " 
    << "\n\tcharge \t"          << track->charge()
    << "\talgo \t"              << track->algo() 
    << "\n\treferencePoint \t"  << track->referencePoint() << " \t r: " << track->referencePoint().rho()
    << "\n\tinnerpos \t"          << track->innerPosition() << " \t r: " << track->innerPosition().rho();

 
  ss
    << "\n\tmomentum \t"         << track->momentum()       << " pt " << track->momentum().rho()
    << "\n\tinnerMom \t"        << track->innerMomentum()  << " pt " << track->innerMomentum().rho();
  

  ss
    << "\n\tinnerok \t"         << track->innerOk()
    << "\n\tinnerdetid \t"      << track->innerDetId()
    << "\n\tdxy    \t"             << track->dxy() 
    << "\n\tdxy(vx) \t"         << track->dxy(vx)
    << "\t where vx \t"         << vx
    << std::endl;

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

Definition at line 41 of file PrintRecoObjects.cc.

References getString().

                                                       {
  ss<< getString(detid);
}
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(), SiStripCluster::firstStrip(), and UserOptions_cff::idx.

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

                                                      {
  ss << "\n\t"
     << " firstStrip " <<  clus.firstStrip()
     << " size " <<  clus.amplitudes().size();
  float charge=0;
  size_t idx=0;
  BOOST_FOREACH(const uint8_t& adc,clus.amplitudes()){
    charge+=adc;
    ss << "\n\t\t strip " << ++idx << " adc " << (size_t) adc;
  }
  ss << "\n\t\t charge " << charge
     << " barycenter " << clus.barycenter()
     << std::endl;
}