test
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 23 of file MuonPatternRecoDumper.cc.

23  {
24 }
MuonPatternRecoDumper::~MuonPatternRecoDumper ( )
virtual

Destructor.

Definition at line 27 of file MuonPatternRecoDumper.cc.

27  {
28 }

Member Function Documentation

string MuonPatternRecoDumper::dumpFTS ( const FreeTrajectoryState fts) const

Definition at line 49 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(), L2MuonSeedGeneratorFromL1T::produce(), and L2MuonSeedGenerator::produce().

49  {
50  stringstream output;
51 
52  output <<
53  " pos: " << fts.position() <<
54  " radius: " << fts.position().perp() << endl <<
55  " charge*pt: " << fts.momentum().perp()*fts.parameters().charge() <<
56  " eta: " << fts.momentum().eta() <<
57  " phi: " << fts.momentum().phi() << endl;
58 
59  return output.str();
60 }
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 32 of file MuonPatternRecoDumper.cc.

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

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

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

Definition at line 72 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(), RPCSeedPattern::createSeed(), CosmicMuonSeedGenerator::createSeed(), MuonSeedOrcaPatternRecognition::dumpLayer(), CSCEfficiency::filter(), MuonSeedOrcaPatternRecognition::filterOverlappingChambers(), MuonSeedOrcaPatternRecognition::filterSegments(), MuonTrackResidualAnalyzer::mapMuSimHitsPerId(), L2MuonSeedGeneratorFromL1T::produce(), L2MuonSeedGenerator::produce(), StandAloneMuonTrajectoryBuilder::propagateTheSeedTSOS(), and StandAloneMuonTrajectoryBuilder::trajectories().

72  {
73  stringstream output;
74 
75  if(id.subdetId() == MuonSubdetId::DT ){
76  DTWireId wireId(id.rawId());
77 
78  output<<"(DT): "<<wireId<<endl;
79  }
80  else if(id.subdetId() == MuonSubdetId::CSC){
81  CSCDetId chamberId(id.rawId());
82  output<<"(CSC): "<<chamberId<<endl;
83  }
84  else if(id.subdetId() == MuonSubdetId::GEM){
85  GEMDetId chamberId(id.rawId());
86  output<<"(GEM): "<<chamberId<<endl;
87  }
88  else if(id.subdetId() == MuonSubdetId::ME0){
89  ME0DetId chamberId(id.rawId());
90  output<<"(ME0): "<<chamberId<<endl;
91  }
92  else if(id.subdetId() == MuonSubdetId::RPC){
93  RPCDetId chamberId(id.rawId());
94  output<<"(RPC): "<<chamberId<<endl;
95  }
96  else output<<"The DetLayer is not a valid Muon DetLayer. ";
97 
98  return output.str();
99 }
static const int GEM
Definition: MuonSubdetId.h:15
static const int ME0
Definition: MuonSubdetId.h:16
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 62 of file MuonPatternRecoDumper.cc.

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

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

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