66 HepMC::GenVertex::particles_in_const_iterator,
67 HepMC::GenVertex::particles_in_const_iterator,
68 HepMC::GenVertex::particles_out_const_iterator,
69 HepMC::GenVertex::particles_out_const_iterator
98 std::cout << std::endl <<
"History for track #" <<
index <<
" : " << std::endl;
107 for (std::size_t hindex=0; hindex<simParticles.size(); hindex++)
109 std::cout <<
" simParticles [" << hindex <<
"] : "
118 if ( !simVertexes.empty() )
120 for (std::size_t hindex=0; hindex<simVertexes.size(); hindex++)
122 std::cout <<
" simVertex [" << hindex <<
"] : "
124 simVertexes[hindex]->sourceTracks(),
125 simVertexes[hindex]->daughterTracks()
131 std::cout <<
" simVertex no found" << std::endl;
137 for (std::size_t hindex=0; hindex<
genParticles.size(); hindex++)
139 std::cout <<
" genParticles [" << hindex <<
"] : "
148 if ( !genVertexes.empty() )
150 for (std::size_t hindex=0; hindex<genVertexes.size(); hindex++)
152 std::cout <<
" genVertex [" << hindex <<
"] : "
154 genVertexes[hindex]->particles_in_const_begin(),
155 genVertexes[hindex]->particles_in_const_end(),
156 genVertexes[hindex]->particles_out_const_begin(),
157 genVertexes[hindex]->particles_out_const_end()
163 std::cout <<
" genVertex no found" << std::endl;
192 std::ostringstream vDescription;
196 if (particleType.isValid())
198 pid =
pdt_->particle(particleType);
200 vDescription << pid->name();
202 vDescription <<
pdgId;
205 vDescription <<
pdgId;
207 return vDescription.str();
218 std::ostringstream vDescription;
220 for (std::size_t
j = 0;
j < in.
size();
j++)
222 if (!
j) vDescription <<
"(";
226 if (particleType.isValid())
228 pid =
pdt_->particle(particleType);
230 vDescription << pid->name();
232 vDescription << in[
j]->pdgId();
235 vDescription << in[
j]->pdgId();
237 if (
j == in.
size() - 1) vDescription <<
")";
238 else vDescription <<
",";
241 vDescription <<
"->";
243 for (std::size_t
j = 0;
j < out.
size();
j++)
245 if (!
j) vDescription <<
"(";
249 if (particleType.isValid())
251 pid =
pdt_->particle(particleType);
253 vDescription << pid->name();
255 vDescription << out[
j]->pdgId();
258 vDescription << out[
j]->pdgId();
260 if (
j == out.
size() - 1) vDescription <<
")";
261 else vDescription <<
",";
264 return vDescription.str();
269 HepMC::GenVertex::particles_in_const_iterator in_begin,
270 HepMC::GenVertex::particles_in_const_iterator in_end,
271 HepMC::GenVertex::particles_out_const_iterator out_begin,
272 HepMC::GenVertex::particles_out_const_iterator out_end
277 std::ostringstream vDescription;
281 HepMC::GenVertex::particles_in_const_iterator
in, itmp;
283 for (in = in_begin; in != in_end; in++, j++)
285 if (!j) vDescription <<
"(";
289 if (particleType.isValid())
291 pid =
pdt_->particle(particleType);
293 vDescription << pid->name();
295 vDescription << (*in)->pdg_id();
298 vDescription << (*in)->pdg_id();
302 if (++itmp == in_end) vDescription <<
")";
303 else vDescription <<
",";
306 vDescription <<
"->";
309 HepMC::GenVertex::particles_out_const_iterator
out, otmp;
311 for (out = out_begin; out != out_end; out++, j++)
313 if (!j) vDescription <<
"(";
317 if (particleType.isValid())
319 pid =
pdt_->particle(particleType);
321 vDescription << pid->name();
323 vDescription << (*out)->pdg_id();
326 vDescription << (*out)->pdg_id();
330 if (++otmp == out_end) vDescription <<
")";
331 else vDescription <<
",";
334 return vDescription.str();
T getUntrackedParameter(std::string const &, T const &) const
std::string vertexString(const TrackingParticleRefVector &, const TrackingParticleRefVector &) const
#define DEFINE_FWK_MODULE(type)
SimVertexTrail const & simVertexTrail() const
Return all the simulated vertices in the history.
std::string particleString(int) const
TrackHistory const & history() const
Returns a reference to the track history used in the classification.
void getData(T &iHolder) const
std::vector< const HepMC::GenParticle * > GenParticleTrail
GenParticle trail type.
TrackClassifier const & evaluate(reco::TrackBaseRef const &)
Classify the RecoTrack in categories.
TrackHistoryAnalyzer(const edm::ParameterSet &)
This class traces the simulated and generated history of a given track.
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
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
HepPDT::ParticleData ParticleData
bool is(Category category) const
Returns track flag for a given category.
TrackClassifier classifier_
Get track history and classify it in function of their .
SimParticleTrail const & simParticleTrail() const
Return all the simulated particle in the history.
edm::InputTag trackProducer_
edm::ESHandle< ParticleDataTable > pdt_
size_type size() const
Size of the RefVector.
GenVertexTrail const & genVertexTrail() const
Return all generated vertex in the history.
virtual void analyze(const edm::Event &, const edm::EventSetup &)
std::vector< TrackingVertexRef > SimVertexTrail
SimVertex trail type.
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
GenParticleTrail const & genParticleTrail() const
Return all generated particle in the history.
std::vector< TrackingParticleRef > SimParticleTrail
SimParticle trail type.