CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
ElectronSeedGenerator.cc File Reference
#include "RecoEgamma/EgammaElectronAlgos/interface/ElectronSeedGenerator.h"
#include "RecoEgamma/EgammaElectronAlgos/interface/ElectronUtilities.h"
#include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h"
#include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
#include "RecoTracker/TkSeedGenerator/interface/FastHelix.h"
#include "RecoTracker/Record/interface/CkfComponentsRecord.h"
#include "RecoTracker/Record/interface/NavigationSchoolRecord.h"
#include "DataFormats/EgammaReco/interface/SuperCluster.h"
#include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
#include "Geometry/Records/interface/TrackerTopologyRcd.h"
#include "TrackingTools/KalmanUpdators/interface/KFUpdator.h"
#include "TrackingTools/Records/interface/TrackingComponentsRecord.h"
#include "TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h"
#include "RecoTracker/MeasurementDet/interface/MeasurementTrackerEvent.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include <vector>
#include <utility>

Go to the source code of this file.

Functions

void display_seed (const std::string &title1, const std::string &title2, const reco::ElectronSeed &seed, edm::ESHandle< TrackerGeometry > trackerGeometry)
 
bool equivalent (const TrajectorySeed &s1, const TrajectorySeed &s2)
 

Function Documentation

void display_seed ( const std::string &  title1,
const std::string &  title2,
const reco::ElectronSeed seed,
edm::ESHandle< TrackerGeometry trackerGeometry 
)

Definition at line 178 of file ElectronSeedGenerator.cc.

References LocalTrajectoryParameters::charge(), gather_cfg::cout, PTrajectoryStateOnDet::detId(), TrajectorySeed::direction(), reco::ElectronSeed::dPhi2(), reco::ElectronSeed::dRz2(), LocalTrajectoryParameters::momentum(), PTrajectoryStateOnDet::parameters(), HLT_25ns10e33_v2_cff::parameters, LocalTrajectoryParameters::position(), TrajectorySeed::startingState(), reco::ElectronSeed::subDet2(), and PTrajectoryStateOnDet::surfaceSide().

179  {
180  const PTrajectoryStateOnDet & startingState = seed.startingState() ;
181  const LocalTrajectoryParameters & parameters = startingState.parameters() ;
182  std::cout<<title1
183  <<" ("<<seed.subDet2()<<"/"<<seed.dRz2()<<"/"<<seed.dPhi2()<<")"
184  <<" ("<<seed.direction()<<"/"<<startingState.detId()<<"/"<<startingState.surfaceSide()<<"/"<<parameters.charge()<<"/"<<parameters.position()<<"/"<<parameters.momentum()<<")"
185  <<std::endl ;
186  }
PropagationDirection direction() const
LocalPoint position() const
Local x and y position coordinates.
float dPhi2() const
Definition: ElectronSeed.h:74
unsigned int detId() const
LocalVector momentum() const
Momentum vector in the local frame.
float dRz2() const
Definition: ElectronSeed.h:73
PTrajectoryStateOnDet const & startingState() const
TrackCharge charge() const
Charge (-1, 0 or 1)
int subDet2() const
Definition: ElectronSeed.h:72
tuple cout
Definition: gather_cfg.py:145
const LocalTrajectoryParameters & parameters() const
bool equivalent ( const TrajectorySeed s1,
const TrajectorySeed s2 
)

Definition at line 188 of file ElectronSeedGenerator.cc.

References edm::false, TrajectorySeed::nHits(), diffTwoXMLs::r1, diffTwoXMLs::r2, TrajectorySeed::recHits(), and funct::true.

Referenced by ElectronSeedGenerator::addSeed().

189  {
190  if (s1.nHits()!=s2.nHits()) return false ;
191 
192  unsigned int nHits ;
193  TrajectorySeed::range r1 = s1.recHits(), r2 = s2.recHits() ;
195  for ( i1=r1.first, i2=r2.first, nHits=0 ; i1!=r1.second ; ++i1, ++i2, ++nHits )
196  {
197  if ( !i1->isValid() || !i2->isValid() ) return false ;
198  if ( i1->geographicalId()!=i2->geographicalId() ) return false ;
199  if ( ! ( i1->localPosition()==i2->localPosition() ) ) return false ;
200  }
201 
202  return true ;
203  }
recHitContainer::const_iterator const_iterator
std::pair< const_iterator, const_iterator > range
range recHits() const
unsigned int nHits() const
volatile std::atomic< bool > shutdown_flag false