CMS 3D CMS Logo

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