CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
GroupedCkfTrajectoryBuilder.cc File Reference
#include "RecoTracker/CkfPattern/interface/GroupedCkfTrajectoryBuilder.h"
#include "RecoTracker/CkfPattern/interface/TrajectorySegmentBuilder.h"
#include "TrackingTools/DetLayers/interface/DetLayer.h"
#include "TrackingTools/PatternTools/interface/TrajMeasLessEstim.h"
#include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
#include "TrackingTools/KalmanUpdators/interface/Chi2MeasurementEstimator.h"
#include "TrackingTools/TrackFitters/interface/KFTrajectoryFitter.h"
#include "RecoTracker/CkfPattern/interface/GroupedTrajCandLess.h"
#include "TrackingTools/TrajectoryFiltering/interface/RegionalTrajectoryFilter.h"
#include "TrackingTools/PatternTools/interface/TempTrajectory.h"
#include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
#include "TrackingTools/MeasurementDet/interface/LayerMeasurements.h"
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
#include "TrackingTools/DetLayers/interface/DetGroup.h"
#include "RecoTracker/TkDetLayers/interface/GeometricSearchTracker.h"
#include "TrackingTools/Records/interface/TransientRecHitRecord.h"
#include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
#include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
#include "TrackingTools/PatternTools/interface/TrajectoryStateUpdator.h"
#include "TrackingTools/PatternTools/interface/Trajectory.h"
#include "TrackingTools/TrajectoryState/interface/BasicSingleTrajectoryState.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "TrackingTools/PatternTools/interface/TransverseImpactPointExtrapolator.h"
#include "TrackingTools/TrajectoryCleaning/interface/TrajectoryCleanerBySharedHits.h"
#include <algorithm>
#include "TrackingTools/DetLayers/interface/BarrelDetLayer.h"
#include "TrackingTools/DetLayers/interface/ForwardDetLayer.h"

Go to the source code of this file.

Functions

std::string whatIsTheNextStep (TempTrajectory &traj, std::pair< TrajectoryStateOnSurface, std::vector< const DetLayer * > > &stateAndLayers)
 
std::string whatIsTheStateToUse (TrajectoryStateOnSurface &initial, TrajectoryStateOnSurface &stateToUse, const DetLayer *l)
 

Function Documentation

std::string whatIsTheNextStep ( TempTrajectory traj,
std::pair< TrajectoryStateOnSurface, std::vector< const DetLayer * > > &  stateAndLayers 
)

Definition at line 277 of file GroupedCkfTrajectoryBuilder.cc.

References TempTrajectory::lastLayer(), GloballyPositioned< T >::phi(), GloballyPositioned< T >::position(), Cylinder::radius(), ForwardDetLayer::specificSurface(), BarrelDetLayer::specificSurface(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

277  {
278  std::stringstream buffer;
279  vector<const DetLayer*> & nl = stateAndLayers.second;
282  //B.M. TkLayerName layerName;
283  //B.M. buffer << "Started from " << layerName(traj.lastLayer())
284  const BarrelDetLayer* sbdl = dynamic_cast<const BarrelDetLayer*>(traj.lastLayer());
285  const ForwardDetLayer* sfdl = dynamic_cast<const ForwardDetLayer*>(traj.lastLayer());
286  if (sbdl) {
287  buffer << "Started from " << traj.lastLayer() << " r=" << sbdl->specificSurface().radius()
288  << " phi=" << sbdl->specificSurface().phi() << endl;
289  } else if (sfdl) {
290  buffer << "Started from " << traj.lastLayer() << " z " << sfdl->specificSurface().position().z()
291  << " phi " << sfdl->specificSurface().phi() << endl;
292  }
293  buffer << "Trying to go to";
294  for ( vector<const DetLayer*>::iterator il=nl.begin();
295  il!=nl.end(); il++){
296  //B.M. buffer << " " << layerName(*il) << " " << *il << endl;
297  const BarrelDetLayer* bdl = dynamic_cast<const BarrelDetLayer*>(*il);
298  const ForwardDetLayer* fdl = dynamic_cast<const ForwardDetLayer*>(*il);
299 
300  if (bdl) buffer << " r " << bdl->specificSurface().radius() << endl;
301  if (fdl) buffer << " z " << fdl->specificSurface().position().z() << endl;
302  //buffer << " " << *il << endl;
303  }
304  return buffer.str();
305 }
Scalar radius() const
Radius of the cylinder.
Definition: Cylinder.h:55
T z() const
Definition: PV3DBase.h:58
virtual const BoundDisk & specificSurface() const
virtual const BoundCylinder & specificSurface() const
Extension of the interface.
const DetLayer * lastLayer() const
Redundant method, returns the layer of lastMeasurement() .
const PositionType & position() const
std::string whatIsTheStateToUse ( TrajectoryStateOnSurface initial,
TrajectoryStateOnSurface stateToUse,
const DetLayer l 
)

Definition at line 307 of file GroupedCkfTrajectoryBuilder.cc.

References TrajectoryStateOnSurface::charge(), TrajectoryStateOnSurface::curvilinearError(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), i, CurvilinearTrajectoryError::matrix(), PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), mathSSE::sqrt(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by GroupedCkfTrajectoryBuilder::advanceOneLayer().

307  {
308  std::stringstream buffer;
309  buffer << "GCTB: starting from "
310  << " r / phi / z = " << stateToUse.globalPosition().perp()
311  << " / " << stateToUse.globalPosition().phi()
312  << " / " << stateToUse.globalPosition().z()
313  << " , pt / phi / pz /charge = "
314  << stateToUse.globalMomentum().perp() << " / "
315  << stateToUse.globalMomentum().phi() << " / "
316  << stateToUse.globalMomentum().z() << " / "
317  << stateToUse.charge()
318  << " for layer at "<< l << endl;
319  buffer << " errors:";
320  for ( int i=0; i<5; i++ ) buffer << " " << sqrt(stateToUse.curvilinearError().matrix()(i,i));
321  buffer << endl;
322 
323  //buffer << "GCTB: starting from r / phi / z = " << initial.globalPosition().perp()
324  //<< " / " << initial.globalPosition().phi()
325  //<< " / " << initial.globalPosition().z() << " , pt / pz = "
326  //<< initial.globalMomentum().perp() << " / "
327  //<< initial.globalMomentum().z() << " for layer at "
328  //<< l << endl;
329  //buffer << " errors:";
330  //for ( int i=0; i<5; i++ ) buffer << " " << sqrt(initial.curvilinearError().matrix()(i,i));
331  //buffer << endl;
332  return buffer.str();
333 }
int i
Definition: DBlmapReader.cc:9
T perp() const
Definition: PV3DBase.h:66
const CurvilinearTrajectoryError & curvilinearError() const
Geom::Phi< T > phi() const
Definition: PV3DBase.h:63
GlobalPoint globalPosition() const
T sqrt(T t)
Definition: SSEVec.h:28
T z() const
Definition: PV3DBase.h:58
const AlgebraicSymMatrix55 & matrix() const
GlobalVector globalMomentum() const