CMS 3D CMS Logo

PFBlockElementBrem.cc
Go to the documentation of this file.
6 
7 #include <iomanip>
8 
9 using namespace reco;
10 using namespace std;
11 
13  const double DeltaP,
14  const double SigmaDeltaP,
15  const unsigned int indTrajPoint)
16  : PFBlockElement(BREM),
17  GsftrackRefPF_(gsfref),
18  GsftrackRef_(gsfref->gsfTrackRef()),
19  deltaP_(DeltaP),
20  sigmadeltaP_(SigmaDeltaP),
21  indPoint_(indTrajPoint) {
22  const reco::PFTrajectoryPoint& atECAL =
23  ((*GsftrackRefPF()).PFRecBrem()[(indPoint_ - 2)]).extrapolatedPoint(reco::PFTrajectoryPoint::ECALEntrance);
24  if (atECAL.isValid())
25  positionAtECALEntrance_.SetCoordinates(atECAL.position().x(), atECAL.position().y(), atECAL.position().z());
26 }
27 
28 void PFBlockElementBrem::Dump(ostream& out, const char* tab) const {
29  if (!out)
30  return;
31 
32  if (!GsftrackRefPF_.isNull()) {
33  double charge = 0.;
34  double dp = deltaP_;
35  double sigmadp = sigmadeltaP_;
36  int indextrj = (indPoint_ - 2);
37  out << setprecision(0);
38  out << tab << setw(7) << "charge=" << setw(3) << charge;
39  out << setprecision(3);
40  out << setiosflags(ios::right);
41  out << setiosflags(ios::fixed);
42  out << ", DeltaP= " << dp;
43  out << ", SigmaDeltaP= " << sigmadp;
44  out << ", Traj Point= " << indextrj;
45  out << resetiosflags(ios::right | ios::fixed);
46  }
47 }
Abstract base class for a PFBlock element (track, cluster...)
math::XYZPointF positionAtECALEntrance_
const math::XYZPoint & position() const
cartesian position (x, y, z)
bool isNull() const
Checks for null.
Definition: Ref.h:235
const GsfPFRecTrackRef & GsftrackRefPF() const
bool isValid() const
is this point valid ?
fixed size matrix
void Dump(std::ostream &out=std::cout, const char *tab=" ") const override
print the object inside the element
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
GsfPFRecTrackRef GsftrackRefPF_
reference to the corresponding track (transient)