76 srcTag_( iConfig.getParameter<
edm::InputTag>(
"src" ) ),
77 bsSrcTag_( iConfig.getParameter<
edm::InputTag>(
"beamSpot" ) ),
79 primaryMass_( iConfig.getParameter<double>(
"primaryMass" ) ),
80 primaryWidth_( iConfig.getParameter<double>(
"primaryWidth" ) ),
89 produces<std::vector<TrackParamConstraint> >();
90 produces<TrackParamConstraintAssociationCollection>();
115 std::unique_ptr<std::vector<TrackParamConstraint> > pairs(
new std::vector<TrackParamConstraint>);
118 if ( trackColl->size() == 2 )
124 std::vector<reco::TransientTrack> ttracks(2);
126 ttracks[0].
setES( iSetup );
128 ttracks[1].
setES( iSetup );
136 std::pair<bool, TrajectoryStateOnSurface> oldInnermostState1 =
innermostState( ttracks[0] );
137 std::pair<bool, TrajectoryStateOnSurface> oldInnermostState2 =
innermostState( ttracks[1] );
138 if ( !oldInnermostState1.second.isValid() || !oldInnermostState2.second.isValid() )
return;
143 if ( !tbdTrajState.isValid() )
return;
146 bool match1 =
match( tbdTrajState.trajectoryStates(
true).first, oldInnermostState1.second );
147 bool match2 =
match( tbdTrajState.trajectoryStates(
true).second, oldInnermostState2.second );
148 if ( !match1 || !match2 )
return;
154 pairs->push_back(tbdTrajState.trajectoryStates(
true).first);
158 pairs->push_back(tbdTrajState.trajectoryStates(
true).second);
187 std::pair<bool, TrajectoryStateOnSurface>
204 double deltaX = lp1.
x() - lp2.
x();
205 double deltaY = lp1.
y() - lp2.
y();
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const TwoBodyDecayFitter tbdFitter_
~TwoBodyDecayConstraintProducer() override=default
const double chi2CutValue_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void produce(edm::StreamID streamid, edm::Event &, const edm::EventSetup &) const override
LocalPoint localPosition() const
GlobalPoint globalPosition() const
const double secondaryMass_
const double primaryMass_
TrajectoryStateOnSurface innermostMeasurementState() const
virtual const TwoBodyDecay estimate(const std::vector< reco::TransientTrack > &tracks, const TwoBodyDecayVirtualMeasurement &vm) const
std::pair< bool, TrajectoryStateOnSurface > innermostState(const reco::TransientTrack &ttrack) const
#define DEFINE_FWK_MODULE(type)
const edm::InputTag bsSrcTag_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
TwoBodyDecayConstraintProducer(const edm::ParameterSet &)
edm::EDGetTokenT< reco::BeamSpot > bsToken_
TrajectoryStateOnSurface outermostMeasurementState() const
RefProd< PROD > getRefBeforePut()
void setES(const edm::EventSetup &es)
T const * product() const
std::pair< TrajectoryStateOnSurface, TrajectoryStateOnSurface > TsosContainer
const double primaryWidth_
edm::EDGetTokenT< reco::TrackCollection > trackCollToken_
const edm::InputTag srcTag_
const double errorRescaleValue_
const double sigmaPositionCutValue_
T const * product() const
bool match(const TrajectoryStateOnSurface &newTsos, const TrajectoryStateOnSurface &oldTsos) const
edm::AssociationMap< edm::OneToOne< reco::TrackCollection, std::vector< TrackParamConstraint > > > TrackParamConstraintAssociationCollection