CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
MuonPatternRecoDumper Class Reference

#include <MuonPatternRecoDumper.h>

Public Member Functions

std::string dumpFTS (const FreeTrajectoryState &fts) const
 
std::string dumpLayer (const DetLayer *layer) const
 
std::string dumpMuonId (const DetId &id) const
 
std::string dumpTSOS (const TrajectoryStateOnSurface &tsos) const
 
 MuonPatternRecoDumper ()
 Constructor. More...
 
virtual ~MuonPatternRecoDumper ()
 Destructor. More...
 

Detailed Description

A class to print information used for debugging

Author
S. Lacaprara - INFN Legnaro stefa.nosp@m.no.l.nosp@m.acapr.nosp@m.ara@.nosp@m.pd.in.nosp@m.fn.i.nosp@m.t
R. Bellan - INFN Torino ricca.nosp@m.rdo..nosp@m.bella.nosp@m.n@ce.nosp@m.rn.ch

Definition at line 18 of file MuonPatternRecoDumper.h.

Constructor & Destructor Documentation

MuonPatternRecoDumper::MuonPatternRecoDumper ( )

Constructor.

Definition at line 21 of file MuonPatternRecoDumper.cc.

21  {
22 }
MuonPatternRecoDumper::~MuonPatternRecoDumper ( )
virtual

Destructor.

Definition at line 25 of file MuonPatternRecoDumper.cc.

25  {
26 }

Member Function Documentation

string MuonPatternRecoDumper::dumpFTS ( const FreeTrajectoryState fts) const

Definition at line 47 of file MuonPatternRecoDumper.cc.

References GlobalTrajectoryParameters::charge(), PV3DBase< T, PVType, FrameType >::eta(), FreeTrajectoryState::momentum(), convertSQLitetoXML_cfg::output, FreeTrajectoryState::parameters(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), and FreeTrajectoryState::position().

Referenced by PhysicsObjectsMonitor::analyze(), MuonSeedTrack::buildTrackAtPCA(), MuonTrackLoader::buildTrackAtPCA(), MuonTrackLoader::buildTrackUpdatedAtPCA(), MuonTrackAnalyzer::fillPlots(), CSCEfficiency::filter(), and L2MuonSeedGenerator::produce().

47  {
48  stringstream output;
49 
50  output <<
51  " pos: " << fts.position() <<
52  " radius: " << fts.position().perp() << endl <<
53  " charge*pt: " << fts.momentum().perp()*fts.parameters().charge() <<
54  " eta: " << fts.momentum().eta() <<
55  " phi: " << fts.momentum().phi() << endl;
56 
57  return output.str();
58 }
T perp() const
Definition: PV3DBase.h:72
const GlobalTrajectoryParameters & parameters() const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:69
GlobalVector momentum() const
GlobalPoint position() const
T eta() const
Definition: PV3DBase.h:76
string MuonPatternRecoDumper::dumpLayer ( const DetLayer layer) const

Definition at line 30 of file MuonPatternRecoDumper.cc.

References convertSQLitetoXML_cfg::output, and GeometricSearchDet::surface().

Referenced by SETMuonSeedProducer::produce(), L2MuonSeedGenerator::produce(), StandAloneMuonTrajectoryBuilder::propagateTheSeedTSOS(), StandAloneMuonFilter::refit(), and StandAloneMuonTrajectoryBuilder::trajectories().

30  {
31  stringstream output;
32 
33  const BoundSurface* sur=0;
34  const BoundCylinder* bc=0;
35  const BoundDisk* bd=0;
36 
37  sur = &(layer->surface());
38  if ( (bc = dynamic_cast<const BoundCylinder*>(sur)) ) {
39  output << " Cylinder of radius: " << bc->radius() << endl;
40  }
41  else if ( (bd = dynamic_cast<const BoundDisk*>(sur)) ) {
42  output << " Disk at: " << bd->position().z() << endl;
43  }
44  return output.str();
45 }
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
string MuonPatternRecoDumper::dumpMuonId ( const DetId id) const

Definition at line 70 of file MuonPatternRecoDumper.cc.

References MuonSubdetId::CSC, MuonSubdetId::DT, convertSQLitetoXML_cfg::output, and MuonSubdetId::RPC.

Referenced by L2MuonSeedGenerator::associateOfflineSeedToL1(), RPCSeedPattern::createSeed(), CosmicMuonSeedGenerator::createSeed(), MuonSeedOrcaPatternRecognition::dumpLayer(), CSCEfficiency::filter(), MuonSeedOrcaPatternRecognition::filterOverlappingChambers(), MuonSeedOrcaPatternRecognition::filterSegments(), MuonTrackResidualAnalyzer::mapMuSimHitsPerId(), L2MuonSeedGenerator::produce(), StandAloneMuonTrajectoryBuilder::propagateTheSeedTSOS(), and StandAloneMuonTrajectoryBuilder::trajectories().

70  {
71  stringstream output;
72 
73  if(id.subdetId() == MuonSubdetId::DT ){
74  DTWireId wireId(id.rawId());
75 
76  output<<"(DT): "<<wireId<<endl;
77  }
78  else if(id.subdetId() == MuonSubdetId::CSC){
79  CSCDetId chamberId(id.rawId());
80  output<<"(CSC): "<<chamberId<<endl;
81  }
82  else if(id.subdetId() == MuonSubdetId::RPC){
83  RPCDetId chamberId(id.rawId());
84  output<<"(RPC): "<<chamberId<<endl;
85  }
86  else output<<"The DetLayer is not a valid Muon DetLayer. ";
87 
88  return output.str();
89 }
static const int CSC
Definition: MuonSubdetId.h:13
static const int RPC
Definition: MuonSubdetId.h:14
static const int DT
Definition: MuonSubdetId.h:12
string MuonPatternRecoDumper::dumpTSOS ( const TrajectoryStateOnSurface tsos) const

Definition at line 60 of file MuonPatternRecoDumper.cc.

References TrajectoryStateOnSurface::freeTrajectoryState(), TrajectoryStateOnSurface::globalDirection(), and convertSQLitetoXML_cfg::output.

Referenced by RPCSeedPattern::createSeed(), MuonTrackAnalyzer::fillPlots(), StandAloneMuonTrajectoryBuilder::propagateTheSeedTSOS(), StandAloneMuonTrajectoryBuilder::trajectories(), MuonTrajectoryUpdator::update(), and StandAloneMuonFilter::update().

60  {
61  stringstream output;
62 
63  output<<tsos<<endl;
64  output<<"dir: "<<tsos.globalDirection()<<endl;
65  output<<dumpFTS(*tsos.freeTrajectoryState());
66 
67  return output.str();
68 }
std::string dumpFTS(const FreeTrajectoryState &fts) const
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
GlobalVector globalDirection() const