23 produces<reco::NuclearInteractionCollection>();
82 for(
unsigned int i = 0;
i < primaryTrajectoryCollection->size() ;
i++) {
84 TrajectoryRef trajRef( primaryTrajectoryCollection,
i );
88 if( itPrimTrack == refMap.
end() || (itPrimTrack->val).isNull() )
continue;
93 if( itSeeds == nuclMap.
end() || (itSeeds->
val).isNull())
continue;
97 std::vector<reco::TrackRef> secondary_tracks;
98 for(
unsigned int k=0;
k < secondaryTrackCollection->size();
k++) {
100 if(
isInside( currentTrk, seeds ) ) secondary_tracks.push_back(currentTrk);
112 if( additionalSecTracks.
isValid() )
115 theNuclearInteractions->push_back( nuclInter );
117 std::ostringstream str;
124 LogDebug(
"NuclearInteractionMaker") <<
"End of NuclearInteractionMaker - Number of nuclear interactions found :" << theNuclearInteractions->size();
125 iEvent.
put(theNuclearInteractions);
138 unsigned int seedKey = track->seedRef().
key();
139 for (
unsigned int i=0;
i< seeds.
size();
i++) {
if( seeds[
i].
key() == seedKey )
return true; }
146 LogDebug(
"NuclearInteractionMaker") <<
"Check if one of the " << additionalSecTracks->size()
147 <<
" additional secondary track is compatible";
149 for(
unsigned int i=0;
i< additionalSecTracks->size();
i++) {
164 out<<
"Nuclear Interaction with vertex position : (";
169 out<<
"\tLikelihood : " << nucl.
likelihood() << std::endl;
170 out<<
"\tPrimary Track : Pt = " << primTrack->pt() <<
" - Nhits = "
171 << primTrack->numberOfValidHits() << std::endl;
172 out <<
"\tNumber of seeds : " << nucl.
seedsSize() << std::endl;
178 out <<
"\t\t Secondary track " << it <<
" : Pt = " << (*itr_)->pt()
179 <<
" - Nhits = " << (*itr_)->numberOfValidHits()
180 <<
" - Dist = " << theApproach->
distance()
181 <<
" - chi2 = " << (*itr_)->normalizedChi2() << std::endl;
184 out <<
"----------------" << std::endl;
T getParameter(std::string const &) const
virtual void produce(edm::Event &, const edm::EventSetup &)
bool isInside(const reco::TrackRef &track, const TrajectorySeedRefVector &seeds)
trackRef_iterator secondaryTracks_begin() const
first iterator over secondary tracks
edm::ESWatcher< TransientTrackRecord > transientTrackWatcher_
NuclearInteractionEDProducer(const edm::ParameterSet &)
edm::EDGetTokenT< reco::TrackCollection > token_additionalSecTracks
friend struct const_iterator
const_iterator end() const
last iterator over the map (read only)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const edm::RefToBase< reco::Track > & primaryTrack() const
return the base reference to the primary track
std::string print(const Track &, edm::Verbosity=edm::Concise)
Track print utility.
const_iterator find(const key_type &k) const
find element with specified reference key
key_type key() const
Accessor for product key.
const Point & position() const
position
int secondaryTracksSize() const
return the number of secondary tracks
const TrajectorySeedRefVector & seeds()
return the seeds
edm::EDGetTokenT< TrajTrackAssociationCollection > token_refMapH
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
std::vector< NuclearInteraction > NuclearInteractionCollection
collection of NuclearInteractions
reco::Vertex::trackRef_iterator trackRef_iterator
edm::EDGetTokenT< TrajectoryCollection > token_primaryTrajectory
int seedsSize() const
return the number of seeds
double likelihood() const
return the likelihood ~ probability that the vertex is a real nuclear interaction ...
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
void findAdditionalSecondaryTracks(reco::NuclearInteraction &nucl, const edm::Handle< reco::TrackCollection > &additionalSecTracks)
T const * product() const
T const * product() const
~NuclearInteractionEDProducer()
edm::ESWatcher< IdealMagneticFieldRecord > magFieldWatcher_
bool check(const edm::EventSetup &iSetup)
edm::EDGetTokenT< reco::TrackCollection > token_secondaryTrack
const reco::Vertex & vertex() const
return the vertex
std::auto_ptr< NuclearLikelihood > likelihoodCalculator
size_type size() const
Size of the RefVector.
edm::EDGetTokenT< reco::TrackCollection > token_primaryTrack
edm::EDGetTokenT< TrajectoryToSeedsMap > token_nuclMapH
virtual float distance() const
trackRef_iterator secondaryTracks_end() const
last iterator over secondary tracks
std::auto_ptr< NuclearVertexBuilder > vertexBuilder