CMS 3D CMS Logo

PFBlockElement.cc
Go to the documentation of this file.
7 
15 
16 using namespace reco;
17 
18 // int PFBlockElement::instanceCounter_ = 0;
19 
20 // int PFBlockElement::instanceCounter() {
21 // return instanceCounter_;
22 // }
23 
24 void PFBlockElement::Dump(std::ostream& out, const char* pad) const {
25  if (!out)
26  return;
27  out << pad << "base element";
28 }
29 
30 std::ostream& reco::operator<<(std::ostream& out, const PFBlockElement& element) {
31  if (!out)
32  return out;
33 
34  out << "element " << element.index() << "- type " << element.type() << " ";
35 
36  try {
37  switch (element.type()) {
38  case PFBlockElement::TRACK: {
39  const reco::PFBlockElementTrack& et = dynamic_cast<const reco::PFBlockElementTrack&>(element);
40  et.Dump(out);
41  if (et.trackType(PFBlockElement::T_FROM_DISP))
42  out << " from displaced;";
43  if (et.trackType(PFBlockElement::T_TO_DISP))
44  out << " to displaced;";
45  if (et.trackType(PFBlockElement::T_FROM_GAMMACONV))
46  out << " from gammaconv;";
47  if (et.trackType(PFBlockElement::T_FROM_V0))
48  out << " from v0 decay;";
49  break;
50  }
54  case PFBlockElement::HO:
58  case PFBlockElement::PS2: {
59  const reco::PFBlockElementCluster& ec = dynamic_cast<const reco::PFBlockElementCluster&>(element);
60  ec.Dump(out);
61  break;
62  }
63  case PFBlockElement::GSF: {
64  const reco::PFBlockElementGsfTrack& eg = dynamic_cast<const reco::PFBlockElementGsfTrack&>(element);
65  eg.Dump(out);
66  out << " from gsf;";
67  break;
68  }
69  case PFBlockElement::BREM: {
70  const reco::PFBlockElementBrem& em = dynamic_cast<const reco::PFBlockElementBrem&>(element);
71  em.Dump(out);
72  out << " from brem;";
73  break;
74  }
75  case PFBlockElement::SC: {
76  const reco::PFBlockElementSuperCluster& sc = dynamic_cast<const reco::PFBlockElementSuperCluster&>(element);
77  sc.Dump(out);
78  out << " from SuperCluster;";
79  break;
80  }
81  default:
82  out << " unknown type" << std::endl;
83  break;
84  }
85  } catch (std::exception& err) {
86  out << err.what() << std::endl;
87  }
88 
89  return out;
90 }
reco::PFBlockElement::nullConv_
const static ConversionRefVector nullConv_
Definition: PFBlockElement.h:160
reco::PFBlockElement::HO
Definition: PFBlockElement.h:42
reco::PFBlockElement::nullTrack_
const static reco::TrackRef nullTrack_
Definition: PFBlockElement.h:156
PFBlockElementCluster.h
reco::PFBlockElementSuperCluster
Cluster Element.
Definition: PFBlockElementSuperCluster.h:15
reco::PFBlockElement::T_TO_DISP
Definition: PFBlockElement.h:47
reco::PFBlockElement::SC
Definition: PFBlockElement.h:41
reco::PFBlockElement::nullVertex_
const static VertexCompositeCandidateRef nullVertex_
Definition: PFBlockElement.h:162
reco::ConversionRefVector
edm::RefVector< ConversionCollection > ConversionRefVector
vector of objects in the same collection of Conversion objects
Definition: ConversionFwd.h:21
reco::PFBlockElement::HCAL
Definition: PFBlockElement.h:36
edm::RefVector< ConversionCollection >
reco::PFBlockElement::HGCAL
Definition: PFBlockElement.h:43
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
PFBlockElementBrem.h
reco::PFBlockElement::nullPFCluster_
const static PFClusterRef nullPFCluster_
Definition: PFBlockElement.h:158
reco::PFBlockElementSuperCluster::Dump
void Dump(std::ostream &out=std::cout, const char *tab=" ") const override
print the object inside the element
Definition: PFBlockElementSuperCluster.cc:11
edm::Ref< TrackCollection >
reco::PFClusterRef
edm::Ref< PFClusterCollection > PFClusterRef
persistent reference to PFCluster objects
Definition: PFClusterFwd.h:15
reco::PFBlockElement::Dump
virtual void Dump(std::ostream &out=std::cout, const char *tab=" ") const
print the object inside the element
Definition: PFBlockElement.cc:24
reco::PFBlockElement::TRACK
Definition: PFBlockElement.h:32
reco::MuonRef
edm::Ref< MuonCollection > MuonRef
presistent reference to a Muon
Definition: MuonFwd.h:13
PFBlockElement.h
reco::PFBlockElementBrem
Track Element.
Definition: PFBlockElementBrem.h:17
reco::PFRecTrackRef
edm::Ref< PFRecTrackCollection > PFRecTrackRef
persistent reference to PFRecTrack objects
Definition: PFRecTrackFwd.h:15
reco::TrackRef
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
Definition: TrackFwd.h:20
reco::PFBlockElement::T_FROM_V0
Definition: PFBlockElement.h:47
reco::PFBlockElement::T_FROM_DISP
Definition: PFBlockElement.h:47
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
reco::PFBlockElement::HFEM
Definition: PFBlockElement.h:39
reco::PFBlockElement::GSF
Definition: PFBlockElement.h:37
runTheMatrix.err
err
Definition: runTheMatrix.py:288
reco::PFBlockElement::ECAL
Definition: PFBlockElement.h:35
reco::PFBlockElement::BREM
Definition: PFBlockElement.h:38
PFBlockElementSuperCluster.h
reco::PFBlockElement::T_FROM_GAMMACONV
Definition: PFBlockElement.h:47
reco::operator<<
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
EgHLTOffHistBins_cfi.et
et
Definition: EgHLTOffHistBins_cfi.py:8
reco::PFBlockElement::HFHAD
Definition: PFBlockElement.h:40
reco::PFBlockElement
Abstract base class for a PFBlock element (track, cluster...)
Definition: PFBlockElement.h:26
reco::PFBlockElement::nullPFRecTrack_
const static PFRecTrackRef nullPFRecTrack_
Definition: PFBlockElement.h:157
reco::PFBlockElementGsfTrack
Track Element.
Definition: PFBlockElementGsfTrack.h:18
reco::VertexCompositeCandidateRef
edm::Ref< VertexCompositeCandidateCollection > VertexCompositeCandidateRef
persistent reference to an object in a collection of Candidate objects
Definition: VertexCompositeCandidateFwd.h:23
reco::PFBlockElement::nullMuon_
const static MuonRef nullMuon_
Definition: PFBlockElement.h:161
reco::PFBlockElementCluster
Cluster Element.
Definition: PFBlockElementCluster.h:16
reco::PFBlockElementTrack
Track Element.
Definition: PFBlockElementTrack.h:17
reco::PFBlockElement::type
Type type() const
Definition: PFBlockElement.h:69
reco::PFBlockElementBrem::Dump
void Dump(std::ostream &out=std::cout, const char *tab=" ") const override
print the object inside the element
Definition: PFBlockElementBrem.cc:28
MillePedeFileConverter_cfg.out
out
Definition: MillePedeFileConverter_cfg.py:31
reco::PFBlockElementGsfTrack::Dump
void Dump(std::ostream &out=std::cout, const char *tab=" ") const override
print the object inside the element
Definition: PFBlockElementGsfTrack.cc:30
reco::PFDisplacedTrackerVertexRef
edm::Ref< PFDisplacedTrackerVertexCollection > PFDisplacedTrackerVertexRef
persistent reference to a DisplacedTrackerVertex
Definition: PFDisplacedTrackerVertex.h:46
reco::PFBlockElement::PS1
Definition: PFBlockElement.h:33
reco::PFBlockElement::index
unsigned index() const
Definition: PFBlockElement.h:86
reco::PFBlockElement::nullPFDispVertex_
const static PFDisplacedTrackerVertexRef nullPFDispVertex_
Definition: PFBlockElement.h:159
PFBlockElementGsfTrack.h
PFBlockElementTrack.h
reco::PFBlockElementCluster::Dump
void Dump(std::ostream &out=std::cout, const char *tab=" ") const override
print the object inside the element
Definition: PFBlockElementCluster.cc:11
reco::PFBlockElement::PS2
Definition: PFBlockElement.h:34