62 HepMC::GenVertex::particles_in_const_iterator,
63 HepMC::GenVertex::particles_in_const_iterator,
64 HepMC::GenVertex::particles_out_const_iterator,
65 HepMC::GenVertex::particles_out_const_iterator
91 std::cout << std::endl <<
"History for vertex #" <<
index <<
" : " << std::endl;
100 for (std::size_t hindex=0; hindex<simParticles.size(); hindex++)
102 std::cout <<
" simParticles [" << hindex <<
"] : "
111 if ( !simVertexes.empty() )
113 for (std::size_t hindex=0; hindex<simVertexes.size(); hindex++)
115 std::cout <<
" simVertex [" << hindex <<
"] : "
117 simVertexes[hindex]->sourceTracks(),
118 simVertexes[hindex]->daughterTracks()
124 std::cout <<
" simVertex no found" << std::endl;
130 for (std::size_t hindex=0; hindex<
genParticles.size(); hindex++)
132 std::cout <<
" genParticles [" << hindex <<
"] : "
141 if ( !genVertexes.empty() )
143 for (std::size_t hindex=0; hindex<genVertexes.size(); hindex++)
145 std::cout <<
" genVertex [" << hindex <<
"] : "
147 genVertexes[hindex]->particles_in_const_begin(),
148 genVertexes[hindex]->particles_in_const_end(),
149 genVertexes[hindex]->particles_out_const_begin(),
150 genVertexes[hindex]->particles_out_const_end()
156 std::cout <<
" genVertex no found" << std::endl;
159 std::cout <<
" fake vertex" << std::endl;
185 std::ostringstream vDescription;
189 if (particleType.isValid())
191 pid =
pdt_->particle(particleType);
193 vDescription << pid->name();
195 vDescription <<
pdgId;
198 vDescription <<
pdgId;
200 return vDescription.str();
211 std::ostringstream vDescription;
213 for (std::size_t
j = 0;
j < in.
size();
j++)
215 if (!
j) vDescription <<
"(";
219 if (particleType.isValid())
221 pid =
pdt_->particle(particleType);
223 vDescription << pid->name();
225 vDescription << in[
j]->pdgId();
228 vDescription << in[
j]->pdgId();
230 if (
j == in.
size() - 1) vDescription <<
")";
231 else vDescription <<
",";
234 vDescription <<
"->";
236 for (std::size_t
j = 0;
j < out.
size();
j++)
238 if (!
j) vDescription <<
"(";
242 if (particleType.isValid())
244 pid =
pdt_->particle(particleType);
246 vDescription << pid->name();
248 vDescription << out[
j]->pdgId();
251 vDescription << out[
j]->pdgId();
253 if (
j == out.
size() - 1) vDescription <<
")";
254 else vDescription <<
",";
257 return vDescription.str();
262 HepMC::GenVertex::particles_in_const_iterator in_begin,
263 HepMC::GenVertex::particles_in_const_iterator in_end,
264 HepMC::GenVertex::particles_out_const_iterator out_begin,
265 HepMC::GenVertex::particles_out_const_iterator out_end
270 std::ostringstream vDescription;
274 HepMC::GenVertex::particles_in_const_iterator
in, itmp;
276 for (in = in_begin; in != in_end; in++, j++)
278 if (!j) vDescription <<
"(";
282 if (particleType.isValid())
284 pid =
pdt_->particle(particleType);
286 vDescription << pid->name();
288 vDescription << (*in)->pdg_id();
291 vDescription << (*in)->pdg_id();
295 if (++itmp == in_end) vDescription <<
")";
296 else vDescription <<
",";
299 vDescription <<
"->";
302 HepMC::GenVertex::particles_out_const_iterator
out, otmp;
304 for (out = out_begin; out != out_end; out++, j++)
306 if (!j) vDescription <<
"(";
310 if (particleType.isValid())
312 pid =
pdt_->particle(particleType);
314 vDescription << pid->name();
316 vDescription << (*out)->pdg_id();
319 vDescription << (*out)->pdg_id();
323 if (++otmp == out_end) vDescription <<
")";
324 else vDescription <<
",";
327 return vDescription.str();
This class traces the simulated and generated history of a given track.
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag vertexProducer_
VertexHistory const & history() const
Returns a reference to the vertex history used in the classification.
#define DEFINE_FWK_MODULE(type)
SimVertexTrail const & simVertexTrail() const
Return all the simulated vertices in the history.
std::string vertexString(TrackingParticleRefVector, TrackingParticleRefVector) const
Get track history and classify it in function of their .
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
void getData(T &iHolder) const
std::vector< const HepMC::GenParticle * > GenParticleTrail
GenParticle trail type.
VertexClassifier classifier_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
edm::ESHandle< ParticleDataTable > pdt_
std::string particleString(int) const
bool is(Category category) const
Returns track flag for a given category.
std::vector< const HepMC::GenVertex * > GenVertexTrail
GenVertex trail type.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
HepPDT::ParticleData ParticleData
VertexHistoryAnalyzer(const edm::ParameterSet &)
SimParticleTrail const & simParticleTrail() const
Return all the simulated particle in the history.
VertexClassifier const & evaluate(reco::VertexBaseRef const &)
Classify the RecoVertex in categories.
size_type size() const
Size of the RefVector.
virtual void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
GenVertexTrail const & genVertexTrail() const
Return all generated vertex in the history.
std::vector< TrackingVertexRef > SimVertexTrail
SimVertex trail type.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
GenParticleTrail const & genParticleTrail() const
Return all generated particle in the history.
std::vector< TrackingParticleRef > SimParticleTrail
SimParticle trail type.