|
|
Go to the documentation of this file.
21 #include "CLHEP/Units/GlobalPhysicalConstants.h"
22 #include "CLHEP/Geometry/Point3D.h"
23 #include "CLHEP/Geometry/Vector3D.h"
24 #include "CLHEP/Geometry/Transform3D.h"
36 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder CTOR "
50 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder DTOR "
73 LogDebug(
"OutInConversionSeedFinder") <<
" OutInConversionSeedFinder::makeSeeds() All BC in the event "
75 for (
unsigned i = 0;
i < allBC->size(); ++
i) {
97 LogDebug(
"OutInConversionSeedFinder")
98 <<
" OutInConversionSeedFinder::makeSeeds() Passing the >=1.5 GeV cut BC eta " << theBcEta <<
" phi "
101 if (fabs(theBcEta - theSCEta) < 0.015 &&
reco::deltaPhi(theBcPhi, theSCPhi) < 0.3) {
102 LogDebug(
"OutInConversionSeedFinder")
103 <<
" OutInConversionSeedFinder::makeSeeds() in et and phi range passed to the analysis "
166 if (fabs(theBcEta - theSCEta) < 0.015 && fabs(theBcPhi - theSCPhi) < 0.25) {
190 std::pair<FreeTrajectoryState, bool>
result;
200 HepGeom::Point3D<double> radiusBc(gvBcRadius.x(), gvBcRadius.y(), gvBcRadius.z());
201 HepGeom::Point3D<double> momentumWithoutCurvature = radiusBc.unit() *
theBCEnergy_;
207 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState gpOrigine " << gpOrigine.x()
208 <<
" " << gpOrigine.y() <<
" " << gpOrigine.z() <<
" momentumWithoutCurvature "
209 << momentumWithoutCurvature.mag() <<
" curvature " <<
curvature <<
"\n";
213 float r = gpOrigine.perp();
224 double sinAlpha = 0.5 * u /
R;
225 if (sinAlpha > (1. - 10 * DBL_EPSILON))
226 sinAlpha = 1. - 10 * DBL_EPSILON;
227 else if (sinAlpha < -(1. - 10 * DBL_EPSILON))
228 sinAlpha = -(1. - 10 * DBL_EPSILON);
230 double newdphi =
charge * asin(sinAlpha);
232 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState charge " <<
charge <<
" R " <<
R
233 <<
" u/R " << u /
R <<
" asin(0.5*u/R) " << asin(sinAlpha) <<
"\n";
235 HepGeom::Transform3D
rotation = HepGeom::Rotate3D(newdphi, HepGeom::Vector3D<double>(0., 0., 1.));
237 HepGeom::Point3D<double> momentumInTracker = momentumWithoutCurvature.transform(
rotation);
238 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState R " <<
R <<
" r " <<
r <<
" rho "
239 <<
rho <<
" d " <<
d <<
" u " << u <<
" newdphi " << newdphi
240 <<
" momentumInTracker " << momentumInTracker <<
"\n";
242 HepGeom::Point3D<double> hepStartingPoint(gpOrigine.x(), gpOrigine.y(), gpOrigine.z());
244 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState hepStartingPoint "
245 << hepStartingPoint <<
"\n";
247 hepStartingPoint.transform(
rotation);
249 GlobalPoint startingPoint(hepStartingPoint.x(), hepStartingPoint.y(), hepStartingPoint.z());
251 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState startingPoint " << startingPoint
253 GlobalVector gvTracker(momentumInTracker.x(), momentumInTracker.y(), momentumInTracker.z());
273 std::vector<const DetLayer*> myLayers =
layerList();
274 if (myLayers.size() > 3) {
275 for (
unsigned int ilayer = myLayers.size() - 1; ilayer >= myLayers.size() - 2; --ilayer) {
276 const DetLayer* layer = myLayers[ilayer];
289 LogDebug(
"OutInConversionSeedFinder") <<
"OutInSeedFinder::startSeed after TSOS tsos(fts, layer->surface() ) "
304 LogDebug(
"OutInConversionSeedFinder") <<
"OutInSeedFinder::startSeed Layer " << ilayer
309 if (m1.
recHit()->isValid()) {
313 LogDebug(
"OutInConversionSeedFinder")
314 <<
" Valid hit at R " << m1.
recHit()->globalPosition().perp() <<
" Z "
315 << m1.
recHit()->globalPosition().z() <<
" eta " << m1.
recHit()->globalPosition().eta() <<
" phi "
316 << m1.
recHit()->globalPosition().phi() <<
" xyz " << m1.
recHit()->globalPosition() <<
"\n";
320 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::startSeed newfts " << newfts <<
"\n";
321 LogDebug(
"OutInConversionSeedFinder")
322 <<
"OutInConversionSeedFinder::startSeed propagationDirection after switching "
328 if (ilayer == myLayers.size() - 1) {
344 const BarrelDetLayer* barrelLayer = dynamic_cast<const BarrelDetLayer*>(layer);
345 LogDebug(
"OutInConversionSeedFinder")
346 <<
"OutInConversionSeedFinder::makeEstimator Barrel r = " << barrelLayer->
specificSurface().radius() <<
" "
354 const ForwardDetLayer* forwardLayer = dynamic_cast<const ForwardDetLayer*>(layer);
355 LogDebug(
"OutInConversionSeedFinder")
356 <<
"OutInConversionSeedFinder::makeEstimator Endcap r = " << forwardLayer->
specificSurface().innerRadius()
391 float m1dr =
sqrt(m1.
recHit()->localPositionError().yy());
397 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::completeSeed ilayer " << ilayer <<
"\n";
401 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::completeSeed propagationDirection "
403 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::completeSeed pointer to estimator "
404 << newEstimator <<
"\n";
407 std::vector<TrajectoryMeasurement> measurements =
412 for (
unsigned int i = 0;
i < measurements.size(); ++
i) {
413 if (measurements[
i].
recHit()->isValid()) {
428 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::createSeed First point errors "
429 << m1.
recHit()->parametersError() <<
"\n";
430 LogDebug(
"OutInConversionSeedFinder") <<
"original cluster FTS " << fts <<
"\n";
453 myHits.
push_back(meas1.recHit()->hit()->clone());
454 myHits.push_back(meas2.recHit()->hit()->clone());
462 LogDebug(
"OutInConversionSeedFinder")
463 <<
"OutInConversionSeedFinder::createSeed new seed from state " << state2.
globalPosition() <<
"\n";
464 LogDebug(
"OutInConversionSeedFinder")
465 <<
"OutInConversionSeedFinder::createSeed new seed ptsod " << ptsod.
parameters().
position() <<
" R "
495 double RadCurv = 100 *
pt / (BInTesla * 0.29979);
496 double alpha = asin(0.5 * xdiff.
perp() / RadCurv);
499 double pxNew = ca * pxOld + sa * pyOld;
500 double pyNew = -sa * pxOld + ca * pyOld;
522 float phi =
p1.phi();
std::vector< const DetLayer * > const & layerList() const
reco::BeamSpot theBeamSpot_
TrajectoryStateOnSurface update(const TrajectoryStateOnSurface &, const TrackingRecHit &) const override
FreeTrajectoryState const * freeTrajectoryState(bool withErrors=true) const
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
std::vector< TrajectoryMeasurement > measurements(const DetLayer &layer, const TrajectoryStateOnSurface &startingState, const Propagator &prop, const MeasurementEstimator &est) const
OutInConversionSeedFinder(const edm::ParameterSet &config, edm::ConsumesCollector &&iC)
std::pair< FreeTrajectoryState, bool > makeTrackState(int charge) const
GlobalPoint fixPointRadius(const TrajectoryMeasurement &) const
constexpr double deltaPhi(double phi1, double phi2)
alpha
zGenParticlesMatch = cms.InputTag(""),
Geom::Theta< T > theta() const
const BoundSurface & surface() const final
The surface of the GeometricSearchDet.
GlobalPoint globalPosition() const
TrackCharge charge() const
edm::Handle< MeasurementTrackerEvent > theTrackerData_
void startSeed(const FreeTrajectoryState &)
TrackCharge charge() const
U second(std::pair< T, U > const &p)
void createSeed(const TrajectoryMeasurement &m1, const TrajectoryMeasurement &m2)
std::vector< TrajectoryMeasurement > theFirstMeasurements_
T curvature(T InversePt, const edm::EventSetup &iSetup)
edm::ESHandle< MagneticField > theMF_
const Propagator * thePropagatorOppositeToMomentum_
Sin< T >::type sin(const T &t)
ROOT::Math::SMatrixIdentity AlgebraicMatrixID
virtual Location location() const =0
Which part of the detector (barrel, endcap)
void completeSeed(const TrajectoryMeasurement &m1, const FreeTrajectoryState &fts, const Propagator *, int layer)
TrajectoryStateOnSurface const & predictedState() const
Cos< T >::type cos(const T &t)
LocalPoint position() const
Local x and y position coordinates.
MeasurementEstimator * makeEstimator(const DetLayer *, float dphi) const
virtual PropagationDirection propagationDirection() const final
Geom::Theta< T > theta() const
Global3DPoint GlobalPoint
const Point & position() const
position
XYZPointD XYZPoint
point in space with cartesian internal representation
GlobalPoint theSCPosition_
static int position[264][3]
Tan< T >::type tan(const T &t)
void fillClusterSeeds(const reco::CaloClusterPtr &bc)
const Propagator * thePropagatorAlongMomentum_
const MeasurementTracker * getMeasurementTracker() const
TrajectorySeedCollection theSeeds_
TrajectoryStateOnSurface propagate(STA const &state, SUR const &surface) const
void makeSeeds(const edm::Handle< edm::View< reco::CaloCluster > > &allBc) override
const math::XYZPoint & position() const
cluster centroid position
FreeTrajectoryState createSeedFTS(const TrajectoryMeasurement &m1, const TrajectoryMeasurement &m2) const
ConstRecHitPointer const & recHit() const
T getParameter(std::string const &) const
FreeTrajectoryState trackStateFromClusters(int aCharge, const GlobalPoint &gpOrigine, PropagationDirection dir, float scaleFactor) const
const PositionType & position() const
GlobalPoint theBCPosition_
const LocalTrajectoryParameters & parameters() const
double ptFast(const double energy, const math::XYZPoint &position, const math::XYZPoint &origin)
virtual const BoundSurface & surface() const =0
The surface of the GeometricSearchDet.
std::vector< const DetLayer * > theLayerList_
~OutInConversionSeedFinder() override
const DetLayer * layer() const
ROOT::Math::SMatrix< double, 5, 5, ROOT::Math::MatRepSym< double, 5 > > AlgebraicSymMatrix55
virtual const BoundCylinder & specificSurface() const final
Extension of the interface.
double energy() const
cluster energy
Geom::Phi< T > phi() const
virtual const BoundDisk & specificSurface() const final
int maxNumberOfOutInSeedsPerBC_