CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_1/src/DataFormats/ParticleFlowReco/src/PFBlockElementBrem.cc

Go to the documentation of this file.
00001 #include "DataFormats/ParticleFlowReco/interface/PFBlockElementBrem.h"
00002 #include "DataFormats/ParticleFlowReco/interface/PFRecTrack.h"
00003 #include "DataFormats/Common/interface/Ref.h" 
00004 #include "DataFormats/TrackReco/interface/Track.h"
00005 #include "DataFormats/ParticleFlowReco/interface/PFTrajectoryPoint.h"
00006 
00007 #include <iomanip>
00008 
00009 using namespace reco;
00010 using namespace std;
00011 
00012 
00013 PFBlockElementBrem::PFBlockElementBrem(const GsfPFRecTrackRef& gsfref, const double DeltaP, 
00014                                        const double SigmaDeltaP, const unsigned int indTrajPoint):
00015   PFBlockElement( BREM ),
00016   GsftrackRefPF_( gsfref ), 
00017   GsftrackRef_( gsfref->gsfTrackRef() ),
00018   deltaP_(DeltaP),
00019   sigmadeltaP_(SigmaDeltaP),
00020   indPoint_(indTrajPoint){
00021 
00022   const reco::PFTrajectoryPoint& atECAL 
00023     = ((*GsftrackRefPF()).PFRecBrem()[(indPoint_-2)]).extrapolatedPoint( reco::PFTrajectoryPoint::ECALEntrance );
00024   if( atECAL.isValid() ) 
00025     positionAtECALEntrance_.SetCoordinates( atECAL.position().x(),
00026                                             atECAL.position().y(),
00027                                             atECAL.position().z() );
00028    
00029 }
00030 
00031 
00032 void PFBlockElementBrem::Dump(ostream& out, 
00033                                const char* tab ) const {
00034   
00035   if(! out ) return;
00036  
00037   if( !GsftrackRefPF_.isNull() ) {
00038 
00039     double charge = 0.;
00040     double dp =  deltaP_;
00041     double sigmadp = sigmadeltaP_;
00042     int indextrj = (indPoint_-2);
00043     out<<setprecision(0);
00044     out<<tab<<setw(7)<<"charge="<<setw(3)<<charge;
00045     out<<setprecision(3);
00046     out<<setiosflags(ios::right);
00047     out<<setiosflags(ios::fixed);
00048     out<<", DeltaP=  "<< dp;
00049     out<<", SigmaDeltaP=  " << sigmadp;
00050     out<<", Traj Point=  " << indextrj;
00051     out<<resetiosflags(ios::right|ios::fixed); }
00052 
00053 }
00054