CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Attributes
PFSimParticleProducer Class Reference

Producer for PFRecTracks and PFSimParticles. More...

#include <PFSimParticleProducer.h>

Inheritance diagram for PFSimParticleProducer:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Types

typedef edm::Handle
< reco::PFRecTrackCollection
TrackHandle
 
- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 

Public Member Functions

virtual void beginRun (const edm::Run &r, const edm::EventSetup &c) override
 
void getSimIDs (const TrackHandle &trackh, std::vector< unsigned > &recTrackSimID)
 
 PFSimParticleProducer (const edm::ParameterSet &)
 
virtual void produce (edm::Event &, const edm::EventSetup &) override
 
 ~PFSimParticleProducer ()
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Attributes

edm::InputTag inputTagEcalRecHitsEB_
 
edm::InputTag inputTagEcalRecHitsEE_
 
edm::InputTag inputTagFamosSimHits_
 
edm::InputTag inputTagRecTracks_
 
edm::InputTag inputTagSim_
 module label for retrieving input simtrack and simvertex More...
 
bool mctruthMatchingInfo_
 
FSimEventmySimEvent
 
edm::ParameterSet particleFilter_
 
bool processParticles_
 process particles on/off More...
 
bool verbose_
 verbose ? More...
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Producer for PFRecTracks and PFSimParticles.

Author
Colin Bernet
Date
April 2007

Definition at line 38 of file PFSimParticleProducer.h.

Member Typedef Documentation

Definition at line 49 of file PFSimParticleProducer.h.

Constructor & Destructor Documentation

PFSimParticleProducer::PFSimParticleProducer ( const edm::ParameterSet iConfig)
explicit

Definition at line 67 of file PFSimParticleProducer.cc.

References edm::ParameterSet::getParameter(), and edm::ParameterSet::getUntrackedParameter().

68 {
69 
70 
72  iConfig.getUntrackedParameter<bool>("process_Particles",true);
73 
74 
76  = iConfig.getParameter<InputTag>("sim");
77 
78  //retrieving collections for MC Truth Matching
79 
80  //modif-beg
82  = iConfig.getUntrackedParameter<InputTag>("famosSimHits");
84  iConfig.getUntrackedParameter<bool>("MCTruthMatchingInfo",false);
85  //modif-end
86 
88  = iConfig.getParameter<InputTag>("RecTracks");
90  = iConfig.getParameter<InputTag>("ecalRecHitsEB");
92  = iConfig.getParameter<InputTag>("ecalRecHitsEE");
93 
94  verbose_ =
95  iConfig.getUntrackedParameter<bool>("verbose",false);
96 
97 
98  // register products
99  produces<reco::PFSimParticleCollection>();
100 
102  ( "ParticleFilter" );
103 
104  mySimEvent = new FSimEvent( particleFilter_ );
105 }
bool processParticles_
process particles on/off
edm::InputTag inputTagEcalRecHitsEE_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet particleFilter_
edm::InputTag inputTagEcalRecHitsEB_
edm::InputTag inputTagSim_
module label for retrieving input simtrack and simvertex
edm::InputTag inputTagFamosSimHits_
PFSimParticleProducer::~PFSimParticleProducer ( )

Definition at line 109 of file PFSimParticleProducer.cc.

110 {
111  delete mySimEvent;
112 }

Member Function Documentation

void PFSimParticleProducer::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
overridevirtual

Reimplemented from edm::EDProducer.

Definition at line 116 of file PFSimParticleProducer.cc.

References edm::EventSetup::getData().

118 {
119  // init Particle data table (from Pythia)
121  // edm::ESHandle < DefaultConfig::ParticleDataTable > pdt;
122  es.getData(pdt);
123  mySimEvent->initializePdt(&(*pdt));
124 }
void initializePdt(const HepPDT::ParticleDataTable *aPdt)
Initialize the particle data table.
void PFSimParticleProducer::getSimIDs ( const TrackHandle trackh,
std::vector< unsigned > &  recTrackSimID 
)

Definition at line 533 of file PFSimParticleProducer.cc.

References i, edm::HandleBase::isValid(), SiTrackerGSMatchedRecHit2D::simtrackId(), and reco::PFRecTrack::trackRef().

535 {
536 
537  if( trackh.isValid() ) {
538 // cout << "Size=" << trackh->size() << endl;
539 
540  for(unsigned i=0;i<trackh->size(); i++) {
541 
542  reco::PFRecTrackRef ref( trackh,i );
543  const reco::PFRecTrack& PFT = *ref;
544  const reco::TrackRef trackref = PFT.trackRef();
545 
546 // double Pt = trackref->pt();
547 // double DPt = trackref->ptError();
548 // cout << " PFBlockProducer: PFrecTrack->Track Pt= "
549 // << Pt << " DPt = " << DPt << endl;
550 
551  trackingRecHit_iterator rhitbeg
552  = trackref->recHitsBegin();
553  trackingRecHit_iterator rhitend
554  = trackref->recHitsEnd();
555  for (trackingRecHit_iterator it = rhitbeg;
556  it != rhitend; it++){
557 
558  if( (*it)->isValid() ){
559 
560  const SiTrackerGSMatchedRecHit2D * rechit
561  = (const SiTrackerGSMatchedRecHit2D*) (*it);
562 
563 // cout << "rechit"
564 // << " corresponding simId "
565 // << rechit->simtrackId()
566 // << endl;
567 
568  recTrackSimID.push_back( rechit->simtrackId() );
569  break;
570  }
571  }//loop track rechit
572  }//loop recTracks
573  }//track handle valid
574 }
reconstructed track used as an input to particle flow
Definition: PFRecTrack.h:22
int i
Definition: DBlmapReader.cc:9
const reco::TrackRef & trackRef() const
Definition: PFRecTrack.h:54
TrackingRecHitCollection::base::const_iterator trackingRecHit_iterator
iterator over a vector of reference to TrackingRecHit in the same collection
void PFSimParticleProducer::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Implements edm::EDProducer.

Definition at line 127 of file PFSimParticleProducer.cc.

References assert(), reco::PFTrajectoryPoint::BeamPipeOrEndVertex, FSimTrack::charge(), reco::PFTrajectoryPoint::ClosestApproach, FSimTrack::daughters(), cond::rpcobgas::detid, reco::PFTrajectoryPoint::ECALEntrance, FSimTrack::ecalEntrance(), FSimTrack::endVertex(), edm::EventID::event(), edm::hlt::Exception, newFWLiteAna::found, edm::Event::getByLabel(), ecalpyutils::hashedIndex(), reco::PFTrajectoryPoint::HCALEntrance, FSimTrack::hcalEntrance(), reco::PFTrajectoryPoint::HCALExit, FSimTrack::hcalExit(), FSimTrack::hoEntrance(), reco::PFTrajectoryPoint::HOLayer, i, edm::EventBase::id(), FSimTrack::id(), edm::HandleBase::isValid(), FSimTrack::layer1Entrance(), FSimTrack::layer2Entrance(), LogDebug, FSimTrack::momentum(), FSimTrack::mother(), FSimTrack::noEndVertex(), FSimTrack::noMother(), FSimTrack::onEcal(), FSimTrack::onHcal(), FSimTrack::onLayer1(), FSimTrack::onLayer2(), FSimVertex::position(), edm::Handle< T >::product(), reco::PFTrajectoryPoint::PS1, reco::PFTrajectoryPoint::PS2, edm::Event::put(), edm::EventID::run(), CoreSimTrack::type(), FSimTrack::vertex(), RawParticle::x(), RawParticle::y(), and RawParticle::z().

129 {
131  LogDebug("PFSimParticleProducer")<<"START event: "<<iEvent.id().event()
132  <<" in run "<<iEvent.id().run()<<endl;
133 
134  //MC Truth Matching only with Famos and UnFoldedMode option to true!!
135 
136  //vector to store the trackIDs of rectracks corresponding
137  //to the simulated particle.
138  std::vector<unsigned> recTrackSimID;
139 
140  //In order to know which simparticule contribute to
141  //a given Ecal RecHit energy, we need to access
142  //the PCAloHit from FastSim.
143 
144  typedef std::pair<double, unsigned> hitSimID;
145  typedef std::list< std::pair<double, unsigned> >::iterator ITM;
146  std::vector< std::list <hitSimID> > caloHitsEBID(62000);
147  std::vector<double> caloHitsEBTotE(62000,0.0);
148 
150 
151  //getting the PCAloHit
153  // bool found_phit
154  // = iEvent.getByLabel("famosSimHits","EcalHitsEB",
155  // pcalohits);
156  //modif-beg
157  bool found_phit
158  = iEvent.getByLabel(inputTagFamosSimHits_,pcalohits);
159  //modif-end
160 
161  if(!found_phit) {
162  ostringstream err;
163  err<<"could not find pcaloHit "<<"famosSimHits:EcalHitsEB";
164  LogError("PFSimParticleProducer")<<err.str()<<endl;
165 
166  throw cms::Exception( "MissingProduct", err.str());
167  }
168  else {
169  assert( pcalohits.isValid() );
170 
171  // cout << "PFSimParticleProducer: number of pcalohits="
172  // << pcalohits->size() << endl;
173 
174  edm::PCaloHitContainer::const_iterator it
175  = pcalohits.product()->begin();
176  edm::PCaloHitContainer::const_iterator itend
177  = pcalohits.product()->end();
178 
179  //loop on the PCaloHit from FastSim Calorimetry
180  for(;it!=itend;++it)
181  {
182  EBDetId detid(it->id());
183 
184  // cout << detid << " " << detid.rawId()
185  // << " " << detid.hashedIndex()
186  // << " " << it->energy()
187  // << " " << it->id()
188  // << " trackId="
189  // << it->geantTrackId()
190  // << endl;
191 
192  if(it->energy() > 0.0) {
193  std::pair<double, unsigned> phitsimid
194  = make_pair(it->energy(),it->geantTrackId());
195  caloHitsEBID[detid.hashedIndex()].push_back(phitsimid);
196  caloHitsEBTotE[detid.hashedIndex()]
197  += it->energy(); //summing pcalhit energy
198  }//energy > 0
199 
200  }//loop PcaloHits
201  }//pcalohit handle access
202 
203  //Retrieving the PFRecTrack collection for
204  //Monte Carlo Truth Matching tool
206  try{
207  LogDebug("PFSimParticleProducer")<<"getting PFRecTracks"<<endl;
208  iEvent.getByLabel(inputTagRecTracks_, recTracks);
209 
210  } catch (cms::Exception& err) {
211  LogError("PFSimParticleProducer")<<err
212  <<" cannot get collection "
213  <<"particleFlowBlock"<<":"
214  <<""
215  <<endl;
216  }//pfrectrack handle access
217 
218  //getting the simID corresponding to
219  //each of the PFRecTracks
220  getSimIDs( recTracks, recTrackSimID );
221 
222  }//mctruthMatchingInfo_ //modif
223 
224  // deal with true particles
225  if( processParticles_) {
226 
227  auto_ptr< reco::PFSimParticleCollection >
228  pOutputPFSimParticleCollection(new reco::PFSimParticleCollection );
229 
230  Handle<vector<SimTrack> > simTracks;
231  bool found = iEvent.getByLabel(inputTagSim_,simTracks);
232  if(!found) {
233 
234  ostringstream err;
235  err<<"cannot find sim tracks: "<<inputTagSim_;
236  LogError("PFSimParticleProducer")<<err.str()<<endl;
237 
238  throw cms::Exception( "MissingProduct", err.str());
239  }
240 
241 
242 
243  Handle<vector<SimVertex> > simVertices;
244  found = iEvent.getByLabel(inputTagSim_,simVertices);
245  if(!found) {
246  LogError("PFSimParticleProducer")
247  <<"cannot find sim vertices: "<<inputTagSim_<<endl;
248  return;
249  }
250 
251 
252 
253  // for(unsigned it = 0; it<simTracks->size(); it++ ) {
254  // cout<<"\t track "<< (*simTracks)[it]<<" "
255  // <<(*simTracks)[it].momentum().vect().perp()<<" "
256  // <<(*simTracks)[it].momentum().e()<<endl;
257  // }
258 
259  mySimEvent->fill( *simTracks, *simVertices );
260 
261  if(verbose_)
262  mySimEvent->print();
263 
264  // const std::vector<FSimTrack>& fsimTracks = *(mySimEvent->tracks() );
265  for(unsigned i=0; i<mySimEvent->nTracks(); i++) {
266 
267  const FSimTrack& fst = mySimEvent->track(i);
268 
269  int motherId = -1;
270  if( ! fst.noMother() ) // a mother exist
271  motherId = fst.mother().id();
272 
273  //This is finding out the simID corresponding
274  //to the recTrack
275 // cout << "Particle " << i
276 // << " " << fst.genpartIndex()
277 // << " -------------------------------------" << endl;
278 
279  //GETTING THE TRACK ID
280  unsigned recTrackID = 99999;
281  vector<unsigned> recHitContrib; //modif
282  vector<double> recHitContribFrac; //modif
283 
284  if(mctruthMatchingInfo_){ //modif
285 
286  for(unsigned lo=0; lo<recTrackSimID.size();
287  lo++) {
288  if( i == recTrackSimID[lo] ) {
289 // cout << "Corresponding Rec Track "
290 // << lo << endl;
291  recTrackID = lo;
292  }//match track
293  }//loop rectrack
294 // if( recTrackID == 99999 )
295 // cout << "Sim Track not reconstructed pT=" <<
296 // fst.momentum().pt() << endl;
297 
298  // get the ecalBarrel rechits for MC truth matching tool
300  bool found = iEvent.getByLabel(inputTagEcalRecHitsEB_,
301  rhcHandle);
302  if(!found) {
303  ostringstream err;
304  err<<"could not find rechits "<< inputTagEcalRecHitsEB_;
305  LogError("PFSimParticleProducer")<<err.str()<<endl;
306 
307  throw cms::Exception( "MissingProduct", err.str());
308  }
309  else {
310  assert( rhcHandle.isValid() );
311 // cout << "PFSimParticleProducer: number of rechits="
312 // << rhcHandle->size() << endl;
313 
315  = rhcHandle.product()->begin();
317  = rhcHandle.product()->end();
318 
319  for(;it_rh!=itend_rh;++it_rh)
320  {
321  unsigned rhit_hi
322  = EBDetId(it_rh->id()).hashedIndex();
323  EBDetId detid(it_rh->id());
324 // cout << detid << " " << detid.rawId()
325 // << " " << detid.hashedIndex()
326 // << " " << it_rh->energy() << endl;
327 
328  ITM it_phit = caloHitsEBID[rhit_hi].begin();
329  ITM itend_phit = caloHitsEBID[rhit_hi].end();
330  for(;it_phit!=itend_phit;++it_phit)
331  {
332  if(i == it_phit->second)
333  {
334  //Alex (08/10/08) TO BE REMOVED, eliminating
335  //duplicated rechits
336  bool alreadyin = false;
337  for( unsigned ihit = 0; ihit < recHitContrib.size();
338  ++ihit )
339  if(detid.rawId() == recHitContrib[ihit])
340  alreadyin = true;
341 
342  if(!alreadyin){
343  double pcalofraction = 0.0;
344  if(caloHitsEBTotE[rhit_hi] != 0.0)
345  pcalofraction
346  = (it_phit->first/caloHitsEBTotE[rhit_hi])*100.0;
347 
348  //store info
349  recHitContrib.push_back(it_rh->id());
350  recHitContribFrac.push_back(pcalofraction);
351  }//selected rechits
352  }//matching
353  }//loop pcalohit
354 
355  }//loop rechits
356 
357  }//getting the rechits
358 
359  }//mctruthMatchingInfo_ //modif
360 
361 // cout << "This particule has " << recHitContrib.size()
362 // << " rechit contribution" << endl;
363 // for( unsigned ih = 0; ih < recHitContrib.size(); ++ih )
364 // cout << recHitContrib[ih]
365 // << " f=" << recHitContribFrac[ih] << " ";
366 // cout << endl;
367 
368  reco::PFSimParticle particle( fst.charge(),
369  fst.type(),
370  fst.id(),
371  motherId,
372  fst.daughters(),
373  recTrackID,
374  recHitContrib,
375  recHitContribFrac);
376 
377 
378  const FSimVertex& originVtx = fst.vertex();
379 
380  math::XYZPoint posOrig( originVtx.position().x(),
381  originVtx.position().y(),
382  originVtx.position().z() );
383 
384  math::XYZTLorentzVector momOrig( fst.momentum().px(),
385  fst.momentum().py(),
386  fst.momentum().pz(),
387  fst.momentum().e() );
389  pointOrig(-1,
391  posOrig, momOrig);
392 
393  // point 0 is origin vertex
394  particle.addPoint(pointOrig);
395 
396 
397  if( ! fst.noEndVertex() ) {
398  const FSimVertex& endVtx = fst.endVertex();
399 
400  math::XYZPoint posEnd( endVtx.position().x(),
401  endVtx.position().y(),
402  endVtx.position().z() );
403  // cout<<"end vertex : "
404  // <<endVtx.position().x()<<" "
405  // <<endVtx.position().y()<<endl;
406 
408 
410  pointEnd( -1,
412  posEnd, momEnd);
413 
414  particle.addPoint(pointEnd);
415  }
416  else { // add a dummy point
418  particle.addPoint(dummy);
419  }
420 
421 
422  if( fst.onLayer1() ) { // PS layer1
423  const RawParticle& rp = fst.layer1Entrance();
424 
425  math::XYZPoint posLayer1( rp.x(), rp.y(), rp.z() );
426  math::XYZTLorentzVector momLayer1( rp.px(), rp.py(), rp.pz(), rp.e() );
428  posLayer1, momLayer1);
429 
430  particle.addPoint( layer1Pt );
431 
432  // extrapolate to cluster depth
433  }
434  else { // add a dummy point
436  particle.addPoint(dummy);
437  }
438 
439  if( fst.onLayer2() ) { // PS layer2
440  const RawParticle& rp = fst.layer2Entrance();
441 
442  math::XYZPoint posLayer2( rp.x(), rp.y(), rp.z() );
443  math::XYZTLorentzVector momLayer2( rp.px(), rp.py(), rp.pz(), rp.e() );
445  posLayer2, momLayer2);
446 
447  particle.addPoint( layer2Pt );
448 
449  // extrapolate to cluster depth
450  }
451  else { // add a dummy point
453  particle.addPoint(dummy);
454  }
455 
456  if( fst.onEcal() ) {
457  const RawParticle& rp = fst.ecalEntrance();
458 
459  math::XYZPoint posECAL( rp.x(), rp.y(), rp.z() );
460  math::XYZTLorentzVector momECAL( rp.px(), rp.py(), rp.pz(), rp.e() );
461  reco::PFTrajectoryPoint ecalPt(-1,
463  posECAL, momECAL);
464 
465  particle.addPoint( ecalPt );
466 
467  // extrapolate to cluster depth
468  }
469  else { // add a dummy point
471  particle.addPoint(dummy);
472  }
473 
474  // add a dummy point for ECAL Shower max
476  particle.addPoint(dummy);
477 
478  if( fst.onHcal() ) {
479 
480  const RawParticle& rpin = fst.hcalEntrance();
481 
482  math::XYZPoint posHCALin( rpin.x(), rpin.y(), rpin.z() );
483  math::XYZTLorentzVector momHCALin( rpin.px(), rpin.py(), rpin.pz(),
484  rpin.e() );
485  reco::PFTrajectoryPoint hcalPtin(-1,
487  posHCALin, momHCALin);
488 
489  particle.addPoint( hcalPtin );
490 
491  const RawParticle& rpout = fst.hcalExit();
492 
493  math::XYZPoint posHCALout( rpout.x(), rpout.y(), rpout.z() );
494  math::XYZTLorentzVector momHCALout( rpout.px(), rpout.py(), rpout.pz(),
495  rpout.e() );
497  hcalPtout(-1, reco::PFTrajectoryPoint::HCALExit,
498  posHCALout, momHCALout);
499 
500  particle.addPoint( hcalPtout );
501 
502  const RawParticle& rpho = fst.hoEntrance();
503 
504  math::XYZPoint posHOEntrance( rpho.x(), rpho.y(), rpho.z() );
505  math::XYZTLorentzVector momHOEntrance( rpho.px(), rpho.py(), rpho.pz(),
506  rpho.e() );
509  posHOEntrance, momHOEntrance);
510 
511  particle.addPoint( hoPtin );
512 
513 
514 
515 
516  }
517  else { // add a dummy point
519  particle.addPoint(dummy);
520  }
521 
522  pOutputPFSimParticleCollection->push_back( particle );
523  }
524 
525  iEvent.put(pOutputPFSimParticleCollection);
526  }
527 
528 
529  LogDebug("PFSimParticleProducer")<<"STOP event: "<<iEvent.id().event()
530  <<" in run "<<iEvent.id().run()<<endl;
531 }
#define LogDebug(id)
RunNumber_t run() const
Definition: EventID.h:39
bool processParticles_
process particles on/off
EventNumber_t event() const
Definition: EventID.h:41
int i
Definition: DBlmapReader.cc:9
bool noEndVertex() const
no end vertex
float charge() const
charge
Definition: FSimTrack.h:47
const RawParticle & hoEntrance() const
The particle at HCAL exir.
Definition: FSimTrack.h:145
int onLayer2() const
Definition: FSimTrack.h:96
const FSimVertex & endVertex() const
end vertex
const RawParticle & hcalExit() const
The particle at HCAL exir.
Definition: FSimTrack.h:142
double y() const
y of vertex
Definition: RawParticle.h:271
double z() const
z of vertex
Definition: RawParticle.h:272
const XYZTLorentzVector & momentum() const
Temporary (until move of SimTrack to Mathcore) - No! Actually very useful.
Definition: FSimTrack.h:190
void fill(const HepMC::GenEvent &hev, edm::EventID &Id)
fill the FBaseSimEvent from the current HepMC::GenEvent
Definition: FSimEvent.cc:20
assert(m_qm.get())
const HepPDT::ParticleDataTable * theTable() const
Get the pointer to the particle data table.
Definition: FBaseSimEvent.h:57
const RawParticle & layer1Entrance() const
The particle at Preshower Layer 1.
Definition: FSimTrack.h:127
std::vector< EcalRecHit >::const_iterator const_iterator
edm::InputTag inputTagEcalRecHitsEB_
std::vector< PFSimParticle > PFSimParticleCollection
collection of PFSimParticle objects
const std::vector< int > & daughters() const
Vector of daughter indices.
double x() const
x of vertex
Definition: RawParticle.h:270
int onEcal() const
Definition: FSimTrack.h:101
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
int hashedIndex(int ieta, int iphi)
Definition: EcalPyUtils.cc:42
edm::InputTag inputTagSim_
module label for retrieving input simtrack and simvertex
edm::InputTag inputTagFamosSimHits_
Point of closest approach from beam axis (initial point in the case of PFSimParticle) ...
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:113
const math::XYZTLorentzVector & position() const
Temporary (until CMSSW moves to Mathcore) - No ! Actually very useful.
Definition: FSimVertex.h:49
const RawParticle & ecalEntrance() const
The particle at ECAL entrance.
Definition: FSimTrack.h:133
const FSimVertex & vertex() const
Origin vertex.
bool isValid() const
Definition: HandleBase.h:75
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:405
true particle for particle flow
Definition: PFSimParticle.h:19
unsigned int nTracks() const
Number of tracks.
Definition: FSimEvent.cc:42
T const * product() const
Definition: Handle.h:81
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
edm::EventID id() const
Definition: EventBase.h:60
int type() const
particle type (HEP PDT convension)
Definition: CoreSimTrack.h:25
int id() const
the index in FBaseSimEvent and other vectors
Definition: FSimTrack.h:86
const RawParticle & layer2Entrance() const
The particle at Preshower Layer 2.
Definition: FSimTrack.h:130
int onLayer1() const
Definition: FSimTrack.h:91
int onHcal() const
Definition: FSimTrack.h:106
bool noMother() const
no mother particle
const RawParticle & hcalEntrance() const
The particle at HCAL entrance.
Definition: FSimTrack.h:136
A PFTrack holds several trajectory points, which basically contain the position and momentum of a tra...
void getSimIDs(const TrackHandle &trackh, std::vector< unsigned > &recTrackSimID)
const FSimTrack & mother() const
mother
void print() const
print the FBaseSimEvent in an intelligible way
FSimTrack & track(int id) const
Return track with given Id.

Member Data Documentation

edm::InputTag PFSimParticleProducer::inputTagEcalRecHitsEB_
private

Definition at line 66 of file PFSimParticleProducer.h.

edm::InputTag PFSimParticleProducer::inputTagEcalRecHitsEE_
private

Definition at line 67 of file PFSimParticleProducer.h.

edm::InputTag PFSimParticleProducer::inputTagFamosSimHits_
private

Definition at line 62 of file PFSimParticleProducer.h.

edm::InputTag PFSimParticleProducer::inputTagRecTracks_
private

Definition at line 65 of file PFSimParticleProducer.h.

edm::InputTag PFSimParticleProducer::inputTagSim_
private

module label for retrieving input simtrack and simvertex

Definition at line 57 of file PFSimParticleProducer.h.

bool PFSimParticleProducer::mctruthMatchingInfo_
private

Definition at line 61 of file PFSimParticleProducer.h.

FSimEvent* PFSimParticleProducer::mySimEvent
private

Definition at line 72 of file PFSimParticleProducer.h.

edm::ParameterSet PFSimParticleProducer::particleFilter_
private

Definition at line 71 of file PFSimParticleProducer.h.

bool PFSimParticleProducer::processParticles_
private

process particles on/off

Definition at line 77 of file PFSimParticleProducer.h.

bool PFSimParticleProducer::verbose_
private

verbose ?

Definition at line 80 of file PFSimParticleProducer.h.