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.

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 }

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

◆ dumpLayer()

string MuonPatternRecoDumper::dumpLayer ( const DetLayer layer) const

Definition at line 30 of file MuonPatternRecoDumper.cc.

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 }

References phase1PixelTopology::layer, and convertSQLitetoXML_cfg::output.

◆ dumpMuonId()

string MuonPatternRecoDumper::dumpMuonId ( const DetId id) const

Definition at line 66 of file MuonPatternRecoDumper.cc.

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 }

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

◆ dumpTSOS()

string MuonPatternRecoDumper::dumpTSOS ( const TrajectoryStateOnSurface tsos) const

Definition at line 56 of file MuonPatternRecoDumper.cc.

56  {
57  stringstream output;
58 
59  output << tsos << endl;
60  output << "dir: " << tsos.globalDirection() << endl;
62 
63  return output.str();
64 }

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

Referenced by MuonTrajectoryUpdator::update().

MuonSubdetId::GEM
static constexpr int GEM
Definition: MuonSubdetId.h:14
TrajectoryStateOnSurface::globalDirection
GlobalVector globalDirection() const
Definition: TrajectoryStateOnSurface.h:67
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
MuonSubdetId::CSC
static constexpr int CSC
Definition: MuonSubdetId.h:12
TrajectoryStateOnSurface::freeTrajectoryState
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
Definition: TrajectoryStateOnSurface.h:60
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
deep_tau::DeepTauBase::BasicDiscriminator
BasicDiscriminator
Definition: DeepTauBase.h:115
RPCDetId
Definition: RPCDetId.h:16
GlobalTrajectoryParameters::charge
TrackCharge charge() const
Definition: GlobalTrajectoryParameters.h:72
Surface
Definition: Surface.h:36
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
BoundDisk
DTWireId
Definition: DTWireId.h:12
MuonSubdetId::DT
static constexpr int DT
Definition: MuonSubdetId.h:11
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
GEMDetId
Definition: GEMDetId.h:18
CSCDetId
Definition: CSCDetId.h:26
PV3DBase::eta
T eta() const
Definition: PV3DBase.h:73
FreeTrajectoryState::parameters
const GlobalTrajectoryParameters & parameters() const
Definition: FreeTrajectoryState.h:79
ME0DetId
Definition: ME0DetId.h:16
MuonSubdetId::ME0
static constexpr int ME0
Definition: MuonSubdetId.h:15
MuonSubdetId::RPC
static constexpr int RPC
Definition: MuonSubdetId.h:13
BoundCylinder
PV3DBase::perp
T perp() const
Definition: PV3DBase.h:69
PV3DBase::phi
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
MuonPatternRecoDumper::dumpFTS
std::string dumpFTS(const FreeTrajectoryState &fts) const
Definition: MuonPatternRecoDumper.cc:46