17 primaryProducer_(iConfig.getParameter<std::string>(
"primaryProducer")),
18 seedsProducer_(iConfig.getParameter<std::string>(
"seedsProducer")),
19 secondaryProducer_(iConfig.getParameter<std::string>(
"secondaryProducer")),
20 additionalSecondaryProducer_(iConfig.getParameter<std::string>(
"additionalSecondaryProducer"))
22 produces<reco::NuclearInteractionCollection>();
81 for(
unsigned int i = 0;
i < primaryTrajectoryCollection->size() ;
i++) {
83 TrajectoryRef trajRef( primaryTrajectoryCollection,
i );
87 if( itPrimTrack == refMap.
end() || (itPrimTrack->
val).isNull() )
continue;
92 if( itSeeds == nuclMap.
end() || (itSeeds->
val).isNull())
continue;
96 std::vector<reco::TrackRef> secondary_tracks;
97 for(
unsigned int k=0;
k < secondaryTrackCollection->size();
k++) {
99 if(
isInside( currentTrk, seeds ) ) secondary_tracks.push_back(currentTrk);
111 if( additionalSecTracks.
isValid() )
114 theNuclearInteractions->push_back( nuclInter );
116 std::ostringstream str;
123 LogDebug(
"NuclearInteractionMaker") <<
"End of NuclearInteractionMaker - Number of nuclear interactions found :" << theNuclearInteractions->size();
124 iEvent.
put(theNuclearInteractions);
137 unsigned int seedKey = track->seedRef().
key();
138 for (
unsigned int i=0;
i< seeds.
size();
i++) {
if( seeds[
i].
key() == seedKey )
return true; }
145 LogDebug(
"NuclearInteractionMaker") <<
"Check if one of the " << additionalSecTracks->size()
146 <<
" additional secondary track is compatible";
148 for(
unsigned int i=0;
i< additionalSecTracks->size();
i++) {
163 out<<
"Nuclear Interaction with vertex position : (";
168 out<<
"\tLikelihood : " << nucl.
likelihood() << std::endl;
169 out<<
"\tPrimary Track : Pt = " << primTrack->pt() <<
" - Nhits = "
170 << primTrack->numberOfValidHits() << std::endl;
171 out <<
"\tNumber of seeds : " << nucl.
seedsSize() << std::endl;
177 out <<
"\t\t Secondary track " << it <<
" : Pt = " << (*itr_)->pt()
178 <<
" - Nhits = " << (*itr_)->numberOfValidHits()
179 <<
" - Dist = " << theApproach->
distance()
180 <<
" - chi2 = " << (*itr_)->normalizedChi2() << std::endl;
183 out <<
"----------------" << std::endl;
std::string primaryProducer_
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 &)
std::string seedsProducer_
const_iterator end() const
last iterator over the map (read only)
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
const Point & position() const
position
int secondaryTracksSize() const
return the number of secondary tracks
const TrajectorySeedRefVector & seeds()
return the seeds
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
int seedsSize() const
return the number of seeds
double likelihood() const
return the likelihood ~ probability that the vertex is a real nuclear interaction ...
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void findAdditionalSecondaryTracks(reco::NuclearInteraction &nucl, const edm::Handle< reco::TrackCollection > &additionalSecTracks)
std::string secondaryProducer_
key_type key() const
Accessor for product key.
T const * product() const
T const * product() const
~NuclearInteractionEDProducer()
edm::ESWatcher< IdealMagneticFieldRecord > magFieldWatcher_
bool check(const edm::EventSetup &iSetup)
const reco::Vertex & vertex() const
return the vertex
std::auto_ptr< NuclearLikelihood > likelihoodCalculator
size_type size() const
Size of the RefVector.
std::string additionalSecondaryProducer_
virtual float distance() const
trackRef_iterator secondaryTracks_end() const
last iterator over secondary tracks
std::auto_ptr< NuclearVertexBuilder > vertexBuilder