File indexing completed on 2023-03-17 11:22:42
0001 #ifndef SeedFromNuclearInteraction_H
0002 #define SeedFromNuclearInteraction_H
0003
0004 #include "DataFormats/TrajectorySeed/interface/TrajectorySeed.h"
0005
0006 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0007
0008 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h"
0009 #include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h"
0010 #include "TrackingTools/GeomPropagators/interface/Propagator.h"
0011 #include "TrackingTools/PatternTools/interface/TrajectoryMeasurement.h"
0012
0013 #include "RecoTracker/NuclearSeedGenerator/interface/TangentHelix.h"
0014
0015 class FreeTrajectoryState;
0016
0017 class SeedFromNuclearInteraction {
0018 private:
0019 typedef TrajectoryMeasurement TM;
0020 typedef TrajectoryStateOnSurface TSOS;
0021 typedef edm::OwnVector<TrackingRecHit> recHitContainer;
0022 typedef TransientTrackingRecHit::ConstRecHitPointer ConstRecHitPointer;
0023 typedef std::vector<ConstRecHitPointer> ConstRecHitContainer;
0024
0025 public:
0026 SeedFromNuclearInteraction(const Propagator* prop, const TrackerGeometry* geom, double ptMin);
0027
0028 virtual ~SeedFromNuclearInteraction() {}
0029
0030
0031 void setMeasurements(const TSOS& tsosAtInteractionPoint, ConstRecHitPointer ihit, ConstRecHitPointer ohit);
0032
0033
0034 void setMeasurements(TangentHelix& primHelix,
0035 const TSOS& inner_TSOS,
0036 ConstRecHitPointer ihit,
0037 ConstRecHitPointer ohit);
0038
0039 PTrajectoryStateOnDet const& trajectoryState() const { return pTraj; }
0040
0041 FreeTrajectoryState* stateWithError() const;
0042
0043 FreeTrajectoryState* stateWithError(TangentHelix& helix) const;
0044
0045 PropagationDirection direction() const { return alongMomentum; }
0046
0047 recHitContainer hits() const;
0048
0049 TrajectorySeed TrajSeed() const { return TrajectorySeed(trajectoryState(), hits(), direction()); }
0050
0051 bool isValid() const { return isValid_; }
0052
0053 const TSOS& updatedTSOS() const { return *updatedTSOS_; }
0054
0055 const TSOS& initialTSOS() const { return *initialTSOS_; }
0056
0057 GlobalPoint outerHitPosition() const {
0058 return theTrackerGeom->idToDet(outerHitDetId())->surface().toGlobal(outerHit_->localPosition());
0059 }
0060
0061 DetId outerHitDetId() const { return outerHit_->geographicalId(); }
0062
0063 ConstRecHitPointer outerHit() const { return outerHit_; }
0064
0065
0066
0067 AlgebraicMatrix33 rotationMatrix(const GlobalVector& perp) const;
0068
0069 private:
0070 bool isValid_;
0071
0072 ConstRecHitContainer theHits;
0073
0074
0075 ConstRecHitPointer innerHit_;
0076 ConstRecHitPointer outerHit_;
0077
0078 std::shared_ptr<TSOS> updatedTSOS_;
0079
0080 std::shared_ptr<TSOS> initialTSOS_;
0081
0082 std::shared_ptr<FreeTrajectoryState> freeTS_;
0083
0084 PTrajectoryStateOnDet pTraj;
0085
0086
0087
0088 double ptMin;
0089
0090 const Propagator* thePropagator;
0091 const TrackerGeometry* theTrackerGeom;
0092
0093 bool construct();
0094 };
0095 #endif