|
|
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) {
176 if (stateNeg.second) {
182 if (statePos.second) {
189 std::pair<FreeTrajectoryState, bool>
result;
199 HepGeom::Point3D<double> radiusBc(gvBcRadius.x(), gvBcRadius.y(), gvBcRadius.z());
200 HepGeom::Point3D<double> momentumWithoutCurvature = radiusBc.unit() *
theBCEnergy_;
208 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState gpOrigine " << gpOrigine.x()
209 <<
" " << gpOrigine.y() <<
" " << gpOrigine.z() <<
" momentumWithoutCurvature "
210 << momentumWithoutCurvature.mag() <<
" curvature " <<
curvature <<
"\n";
214 float r = gpOrigine.perp();
227 double sinAlpha = 0.5 * u /
R;
228 if (sinAlpha > (1. - 10 * DBL_EPSILON))
229 sinAlpha = 1. - 10 * DBL_EPSILON;
230 else if (sinAlpha < -(1. - 10 * DBL_EPSILON))
231 sinAlpha = -(1. - 10 * DBL_EPSILON);
233 double newdphi =
charge * asin(sinAlpha);
235 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState charge " <<
charge <<
" R " <<
R
236 <<
" u/R " << u /
R <<
" asin(0.5*u/R) " << asin(sinAlpha) <<
"\n";
238 HepGeom::Transform3D
rotation = HepGeom::Rotate3D(newdphi, HepGeom::Vector3D<double>(0., 0., 1.));
240 HepGeom::Point3D<double> momentumInTracker = momentumWithoutCurvature.transform(
rotation);
241 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState R " <<
R <<
" r " <<
r <<
" rho "
242 <<
rho <<
" d " <<
d <<
" u " << u <<
" newdphi " << newdphi
243 <<
" momentumInTracker " << momentumInTracker <<
"\n";
245 HepGeom::Point3D<double> hepStartingPoint(gpOrigine.x(), gpOrigine.y(), gpOrigine.z());
247 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState hepStartingPoint "
248 << hepStartingPoint <<
"\n";
250 hepStartingPoint.transform(
rotation);
252 GlobalPoint startingPoint(hepStartingPoint.x(), hepStartingPoint.y(), hepStartingPoint.z());
254 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::makeTrackState startingPoint " << startingPoint
256 GlobalVector gvTracker(momentumInTracker.x(), momentumInTracker.y(), momentumInTracker.z());
276 std::vector<const DetLayer*> myLayers =
layerList();
277 if (myLayers.size() > 3) {
278 for (
unsigned int ilayer = myLayers.size() - 1; ilayer >= myLayers.size() - 2; --ilayer) {
292 LogDebug(
"OutInConversionSeedFinder") <<
"OutInSeedFinder::startSeed after TSOS tsos(fts, layer->surface() ) "
307 LogDebug(
"OutInConversionSeedFinder") <<
"OutInSeedFinder::startSeed Layer " << ilayer
312 if (m1.
recHit()->isValid()) {
316 LogDebug(
"OutInConversionSeedFinder")
317 <<
" Valid hit at R " << m1.
recHit()->globalPosition().perp() <<
" Z "
318 << m1.
recHit()->globalPosition().z() <<
" eta " << m1.
recHit()->globalPosition().eta() <<
" phi "
319 << m1.
recHit()->globalPosition().phi() <<
" xyz " << m1.
recHit()->globalPosition() <<
"\n";
323 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::startSeed newfts " << newfts <<
"\n";
324 LogDebug(
"OutInConversionSeedFinder")
325 <<
"OutInConversionSeedFinder::startSeed propagationDirection after switching "
331 if (ilayer == myLayers.size() - 1) {
348 LogDebug(
"OutInConversionSeedFinder")
349 <<
"OutInConversionSeedFinder::makeEstimator Barrel r = " << barrelLayer->
specificSurface().radius() <<
" "
358 LogDebug(
"OutInConversionSeedFinder")
359 <<
"OutInConversionSeedFinder::makeEstimator Endcap r = " << forwardLayer->
specificSurface().innerRadius()
394 float m1dr =
sqrt(m1.
recHit()->localPositionError().yy());
400 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::completeSeed ilayer " << ilayer <<
"\n";
404 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::completeSeed propagationDirection "
406 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::completeSeed pointer to estimator "
407 << newEstimator <<
"\n";
410 std::vector<TrajectoryMeasurement> measurements =
415 for (
unsigned int i = 0;
i < measurements.size(); ++
i) {
416 if (measurements[
i].
recHit()->isValid()) {
431 LogDebug(
"OutInConversionSeedFinder") <<
"OutInConversionSeedFinder::createSeed First point errors "
432 << m1.
recHit()->parametersError() <<
"\n";
433 LogDebug(
"OutInConversionSeedFinder") <<
"original cluster FTS " << fts <<
"\n";
456 myHits.
push_back(meas1.recHit()->hit()->clone());
457 myHits.push_back(meas2.recHit()->hit()->clone());
465 LogDebug(
"OutInConversionSeedFinder")
466 <<
"OutInConversionSeedFinder::createSeed new seed from state " << state2.
globalPosition() <<
"\n";
467 LogDebug(
"OutInConversionSeedFinder")
468 <<
"OutInConversionSeedFinder::createSeed new seed ptsod " << ptsod.
parameters().
position() <<
" R "
498 double RadCurv = 100 *
pt / (BInTesla * 0.29979);
499 double alpha = asin(0.5 * xdiff.
perp() / RadCurv);
502 double pxNew = ca * pxOld + sa * pyOld;
503 double pyNew = -sa * pxOld + ca * pyOld;
525 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)
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
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
constexpr std::array< uint8_t, layerIndexSize > layer
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
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)
std::vector< const DetLayer * > theLayerList_
T getParameter(std::string const &) const
~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_