29 if ( iConfig.
exists(
"clusterRemovalInfo") ) {
43 produces<reco::TrackCollection>().setBranchAlias(
alias_ +
"Tracks" );
44 produces<reco::TrackExtraCollection>().setBranchAlias(
alias_ +
"TrackExtras" );
45 produces<TrackingRecHitCollection>().setBranchAlias(
alias_ +
"RecHits" );
46 produces<std::vector<Trajectory> >() ;
47 produces<TrajTrackAssociationCollection>();
68 std::auto_ptr<std::vector<Trajectory> > outputTrajectoryColl(
new std::vector<Trajectory>);
81 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
92 if ( !trkCandidateSCAssocHandle.
isValid() ) {
101 std::vector<int> tccLocations;
109 edm::LogError(
"TrackProducerWithSCAssociation") <<
"TrackProducerWithSCAssociation could not get the TrackCandidateCollection.";}
126 for (TrackCandidateCollection::const_iterator
i=theTCCollection->begin();
i!=theTCCollection->end();
i++)
139 &(theG.
product()->idToDet(detId)->surface()),
151 i!=recHitVec.second;
i++){
152 hits.push_back(theBuilder.
product()->build(&(*
i) ));
162 tccLocations.push_back(tcc);
166 edm::LogInfo(
"TrackProducerWithSCAssociation") <<
"Number of Tracks found: " << cont <<
"\n";
175 outputRHColl, outputTColl, outputTEColl, outputTrajectoryColl, algoResults);
180 std::vector<edm::Ptr<reco::CaloCluster> > caloPtrVec;
181 for(AlgoProductCollection::iterator
i=algoResults.begin();
i!=algoResults.end();
i++){
184 caloPtrVec.push_back( aClus );
202 edm::LogInfo(
"TrackProducerWithSCAssociation") <<
"Analyzing event number: " << theEvent.
id() <<
"\n";
206 std::vector<reco::TransientTrack> ttks;
217 getFromES(setup,theG,theMF,theFitter,thePropagator,theMeasTk,theBuilder);
239 for (AlgoProductCollection::iterator
prod=algoResults.begin();
prod!=algoResults.end();
prod++){
254 std::auto_ptr<TrackingRecHitCollection>& selHits,
255 std::auto_ptr<reco::TrackCollection>& selTracks,
256 std::auto_ptr<reco::TrackExtraCollection>& selTrackExtras,
257 std::auto_ptr<std::vector<Trajectory> >& selTrajectories,
268 std::map<unsigned int, unsigned int> tjTkMap;
270 for(AlgoProductCollection::iterator
i=algoResults.begin();
i!=algoResults.end();
i++){
273 selTrajectories->push_back(*theTraj);
284 selTracks->push_back( t );
294 unsigned int innerId, outerId;
333 selTrackExtras->push_back(
reco::TrackExtra (outpos, outmom,
true, inpos, inmom,
true,
344 for( TrajectoryFitter::RecHitContainer::const_iterator
j = transHits.begin();
345 j != transHits.end();
j ++ ) {
349 selHits->push_back( hit );
354 for( TrajectoryFitter::RecHitContainer::const_iterator
j = transHits.end()-1;
355 j != transHits.begin()-1; --
j ) {
359 selHits->push_back( hit );
385 evt.
put( selTrackExtras );
393 for ( std::map<unsigned int, unsigned int>::iterator
i = tjTkMap.begin();
394 i != tjTkMap.end();
i++ ) {
397 trajTrackMap->insert(
edm::Ref<std::vector<Trajectory> >( rTrajs, (*i).first ),
400 evt.
put( trajTrackMap );
T getParameter(std::string const &) const
virtual void getFromEvt(edm::Event &, edm::Handle< TrackCandidateCollection > &, reco::BeamSpot &)
Get TrackCandidateCollection from the Event (needed by TrackProducer)
edm::OrphanHandle< reco::TrackCollection > rTracks_
std::vector< reco::TransientTrack > getTransient(edm::Event &, const edm::EventSetup &)
void setSecondHitPattern(Trajectory *traj, reco::Track &track, const Propagator *prop, const MeasurementTracker *measTk)
const CurvilinearTrajectoryError & curvilinearError() const
TrajectorySeed const & seed() const
void insert(const H &h, I begin, I end)
std::vector< Track > TrackCollection
collection of Tracks
bool exists(std::string const ¶meterName) const
checks if a parameter exists
void setClusterRemovalInfo(const edm::InputTag &clusterRemovalInfo)
Sets the information on cluster removal, and turns it on.
ConstRecHitPointer recHit() const
std::string trackSuperClusterAssociationCollection_
edm::Ref< TrackExtraCollection > TrackExtraRef
persistent reference to a TrackExtra
std::pair< const_iterator, const_iterator > range
void setAlias(std::string alias)
set the aliases of produced collections
bool validTrackCandidateSCAssociationInput_
std::vector< ConstRecHitPointer > RecHitContainer
bool buildTrack(const TrajectoryFitter *, const Propagator *, AlgoProductCollection &, TransientTrackingRecHit::RecHitContainer &, TrajectoryStateOnSurface &, const TrajectorySeed &, float, const reco::BeamSpot &, SeedRef seedRef=SeedRef(), int qualityMask=0, signed char nLoops=0)
Construct Tracks to be put in the event.
std::string trackCSuperClusterAssociationCollection_
ConstRecHitContainer recHits(bool splitting=false) const
void putInEvt(edm::Event &evt, const Propagator *thePropagator, const MeasurementTracker *theMeasTk, std::auto_ptr< TrackingRecHitCollection > &selHits, std::auto_ptr< reco::TrackCollection > &selTracks, std::auto_ptr< reco::TrackExtraCollection > &selTrackExtras, std::auto_ptr< std::vector< Trajectory > > &selTrajectories, AlgoProductCollection &algoResults)
PropagationDirection const & direction() const
PTrajectoryStateOnDet const & trajectoryStateOnDet() const
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
TrajectoryMeasurement const & lastMeasurement() const
GlobalVector momentum() const
void setConf(edm::ParameterSet conf)
Set parameter set.
unsigned int detId() const
TrajectoryStateOnSurface updatedState() const
edm::RefToBase< TrajectorySeed > seedRef(void) const
std::vector< AlgoProduct > AlgoProductCollection
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > > TrajTrackAssociationCollection
virtual void produce(edm::Event &, const edm::EventSetup &)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void setSrc(edm::InputTag src, edm::InputTag bsSrc)
set label of source collection
RefProd< PROD > getRefBeforePut()
GlobalPoint position() const
TrackProducerAlgorithm< reco::Track > theAlgo
void setHitPattern(const C &c)
set hit patterns from vector of hit references
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
void setExtra(const TrackExtraRef &ref)
set reference to "extra" object
TrajectoryMeasurement const & firstMeasurement() const
const GlobalTrajectoryParameters & globalParameters() const
XYZVectorD XYZVector
spatial vector with cartesian internal representation
XYZPointD XYZPoint
point in space with cartesian internal representation
T const * product() const
T const * product() const
TrackProducerWithSCAssociation(const edm::ParameterSet &iConfig)
std::string conversionTrackCandidateProducer_
edm::ESHandle< NavigationSchool > theSchool
void runWithCandidate(const TrackingGeometry *, const MagneticField *, const TrackCandidateCollection &, const TrajectoryFitter *, const Propagator *, const TransientTrackingRecHitBuilder *, const reco::BeamSpot &, AlgoProductCollection &)
Run the Final Fit taking TrackCandidates as input.
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
bool myTrajectoryInEvent_
Trajectory::RecHitContainer RecHitContainer
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
edm::RefToBase< TrajectorySeed > seedRef() const
virtual void getFromES(const edm::EventSetup &, edm::ESHandle< TrackerGeometry > &, edm::ESHandle< MagneticField > &, edm::ESHandle< TrajectoryFitter > &, edm::ESHandle< Propagator > &, edm::ESHandle< MeasurementTracker > &, edm::ESHandle< TransientTrackingRecHitBuilder > &)
Get needed services from the Event Setup.