CMS 3D CMS Logo

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::MuonPatternRecoDumper ( )

Constructor.

Definition at line 23 of file MuonPatternRecoDumper.cc.

23 {}

◆ ~MuonPatternRecoDumper()

MuonPatternRecoDumper::~MuonPatternRecoDumper ( )
virtual

Destructor.

Definition at line 26 of file MuonPatternRecoDumper.cc.

26 {}

Member Function Documentation

◆ dumpFTS()

string MuonPatternRecoDumper::dumpFTS ( const FreeTrajectoryState fts) const

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

46  {
47  stringstream output;
48 
49  output << " pos: " << fts.position() << " radius: " << fts.position().perp() << endl
50  << " charge*pt: " << fts.momentum().perp() * fts.parameters().charge() << " eta: " << fts.momentum().eta()
51  << " phi: " << fts.momentum().phi() << endl;
52 
53  return output.str();
54 }
T perp() const
Definition: PV3DBase.h:69
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T eta() const
Definition: PV3DBase.h:73
const GlobalTrajectoryParameters & parameters() const
GlobalPoint position() const
GlobalVector momentum() const

◆ dumpLayer()

string MuonPatternRecoDumper::dumpLayer ( const DetLayer layer) const

Definition at line 30 of file MuonPatternRecoDumper.cc.

References convertSQLitetoXML_cfg::output.

30  {
31  stringstream output;
32 
33  const BoundSurface* sur = nullptr;
34  const BoundCylinder* bc = nullptr;
35  const BoundDisk* bd = nullptr;
36 
37  sur = &(layer->surface());
38  if ((bc = dynamic_cast<const BoundCylinder*>(sur))) {
39  output << " Cylinder of radius: " << bc->radius() << endl;
40  } else if ((bd = dynamic_cast<const BoundDisk*>(sur))) {
41  output << " Disk at: " << bd->position().z() << endl;
42  }
43  return output.str();
44 }
constexpr std::array< uint8_t, layerIndexSize > layer

◆ dumpMuonId()

string MuonPatternRecoDumper::dumpMuonId ( const DetId id) const

Definition at line 66 of file MuonPatternRecoDumper.cc.

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

Referenced by L2MuonSeedGenerator::associateOfflineSeedToL1(), L2MuonSeedGeneratorFromL1T::associateOfflineSeedToL1(), L2MuonSeedGeneratorFromL1TkMu::associateOfflineSeedToL1(), CosmicMuonSeedGenerator::createSeed(), MuonSeedOrcaPatternRecognition::dumpLayer(), MuonSeedOrcaPatternRecognition::filterOverlappingChambers(), MuonSeedOrcaPatternRecognition::filterSegments(), and L2MuonSeedGeneratorFromL1T::isAssociateOfflineSeedToL1().

66  {
67  stringstream output;
68 
69  if (id.subdetId() == MuonSubdetId::DT) {
70  DTWireId wireId(id.rawId());
71 
72  output << "(DT): " << wireId << endl;
73  } else if (id.subdetId() == MuonSubdetId::CSC) {
74  CSCDetId chamberId(id.rawId());
75  output << "(CSC): " << chamberId << endl;
76  } else if (id.subdetId() == MuonSubdetId::GEM) {
77  GEMDetId chamberId(id.rawId());
78  output << "(GEM): " << chamberId << endl;
79  } else if (id.subdetId() == MuonSubdetId::ME0) {
80  ME0DetId chamberId(id.rawId());
81  output << "(ME0): " << chamberId << endl;
82  } else if (id.subdetId() == MuonSubdetId::RPC) {
83  RPCDetId chamberId(id.rawId());
84  output << "(RPC): " << chamberId << endl;
85  } else
86  output << "The DetLayer is not a valid Muon DetLayer. ";
87 
88  return output.str();
89 }
static constexpr int GEM
Definition: MuonSubdetId.h:14
static constexpr int ME0
Definition: MuonSubdetId.h:15
static constexpr int RPC
Definition: MuonSubdetId.h:13
static constexpr int DT
Definition: MuonSubdetId.h:11
static constexpr int CSC
Definition: MuonSubdetId.h:12

◆ dumpTSOS()

string MuonPatternRecoDumper::dumpTSOS ( const TrajectoryStateOnSurface tsos) const

Definition at line 56 of file MuonPatternRecoDumper.cc.

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

Referenced by MuonTrajectoryUpdator::update().

56  {
57  stringstream output;
58 
59  output << tsos << endl;
60  output << "dir: " << tsos.globalDirection() << endl;
62 
63  return output.str();
64 }
std::string dumpFTS(const FreeTrajectoryState &fts) const
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
GlobalVector globalDirection() const