test
CMS 3D CMS Logo

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

Replacement for TrackingTruthProducer in the new pileup mixing setup. More...

#include <TrackingTruthAccumulator.h>

Inheritance diagram for TrackingTruthAccumulator:
DigiAccumulatorMixMod

Classes

struct  OutputCollections
 

Public Member Functions

 TrackingTruthAccumulator (const edm::ParameterSet &config, edm::one::EDProducerBase &mixMod, edm::ConsumesCollector &iC)
 
- Public Member Functions inherited from DigiAccumulatorMixMod
virtual void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void beginRun (edm::Run const &run, edm::EventSetup const &setup)
 
 DigiAccumulatorMixMod ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup)
 
virtual void endRun (edm::Run const &run, edm::EventSetup const &setup)
 
virtual void finalizeBunchCrossing (edm::Event &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual PileupMixingContentgetEventPileupInfo ()
 
virtual void initializeBunchCrossing (edm::Event const &event, edm::EventSetup const &setup, int bunchCrossing)
 
virtual void StorePileupInformation (std::vector< int > &numInteractionList, std::vector< int > &bunchCrossingList, std::vector< float > &TrueInteractionList)
 
virtual ~DigiAccumulatorMixMod ()
 

Private Member Functions

virtual void accumulate (const edm::Event &event, const edm::EventSetup &setup)
 
virtual void accumulate (const PileUpEventPrincipal &event, const edm::EventSetup &setup, edm::StreamID const &)
 
template<class T >
void accumulateEvent (const T &event, const edm::EventSetup &setup)
 Both forms of accumulate() delegate to this templated method. More...
 
template<class T >
void fillSimHits (std::vector< const PSimHit * > &returnValue, const T &event, const edm::EventSetup &setup)
 Fills the supplied vector with pointers to the SimHits, checking for bad modules if required. More...
 
virtual void finalizeEvent (edm::Event &event, const edm::EventSetup &setup)
 
virtual void initializeEvent (const edm::Event &event, const edm::EventSetup &setup)
 

Private Attributes

const bool addAncestors_
 Whether or not to add the full parentage of any TrackingParticle that is inserted in the collection. More...
 
bool allowDifferentProcessTypeForDifferentDetectors_
 When counting hits, allows hits in different detectors to have a different process type. More...
 
bool chargedOnly_
 Uses the same config as selector_, but can be used to drop out early since selector_ requires the TrackingParticle to be created first. More...
 
std::vector< edm::InputTagcollectionTags_
 
const bool createMergedCollection_
 
const bool createUnmergedCollection_
 If bremsstrahlung merging, whether to also add the unmerged collection to the event or not. More...
 
edm::InputTag genParticleLabel_
 
const bool ignoreTracksOutsideVolume_
 
const unsigned int maximumPreviousBunchCrossing_
 
const unsigned int maximumSubsequentBunchCrossing_
 
OutputCollections mergedOutput_
 
const std::string messageCategory_
 The message category used to send messages to MessageLogger. More...
 
const bool removeDeadModules_
 As of 11/Feb/2013 this option hasn't been implemented yet. More...
 
TrackingParticleSelector selector_
 
bool selectorFlag_
 
bool signalOnly_
 Uses the same config as selector_, but can be used to drop out early since selector_ requires the TrackingParticle to be created first. More...
 
const edm::InputTag simTrackLabel_
 
const edm::InputTag simVertexLabel_
 
OutputCollections unmergedOutput_
 
const double volumeRadius_
 
const double volumeZ_
 

Detailed Description

Replacement for TrackingTruthProducer in the new pileup mixing setup.

The configuration parameters are:

Parameter name Type Description
volumeRadius double The volume radius in cm used if ignoreTracksOutsideVolume is true.
volumeZ double The volume z in cm used if ignoreTracksOutsideVolume is true.
ignoreTracksOutsideVolume bool If true, sim tracks that have a production vertex outside the volume specified by volumeRadius and volumeZ won't be turned into TrackingParticles. Doesn't make much difference to be honest, over a huge range of volume sizes so there must be a cut earlier in the simulation.
maximumPreviousBunchCrossing unsigned int Bunch crossings before this number (inclusive; use positive integer) won't be included. Setting to zero means only in-time.
maximumSubsequentBunchCrossing unsigned int Bunch crossings after this won't create any TrackingParticles.
createUnmergedCollection bool Whether to create the TrackingParticle collection without bremsstrahlung merged.
createMergedBremsstrahlung bool Whether to create the TrackingParticle collection with bremsstrahlung merged. At least one of createUnmergedCollection or createMergedBremsstrahlung should be true otherwise nothing will be produced.
alwaysAddAncestors bool If a sim track passes selection and is turned into a TrackingParticle, all of it's parents will also be created even if they fail the selection. This was the default behaviour for the old TrackingParticleProducer.
removeDeadModules bool Hasn't been implemented yet (as of 22/May/2013).
simTrackCollection edm::InputTag The input SimTrack collection
simVertexCollection edm::InputTag The input SimVerted collection
simHitCollections edm::ParameterSet A ParameterSet of vectors of InputTags that are the input PSimHits
genParticleCollection edm::InputTag The input reco::GenParticle collection. Note that there's a difference between reco::GenParticle and HepMC::GenParticle; the old TrackingTruthProducer used to use HepMC::GenParticle.
allowDifferentSimHitProcesses bool Should be false for FullSim and true for FastSim. There's more documentation in the code if you're really interested.
select edm::ParameterSet A ParameterSet used to configure a TrackingParticleSelector. If the TrackingParticle doesn't pass this selector then it's not added to the output.
Author
Mark Grimes (mark..nosp@m.grim.nosp@m.es@br.nosp@m.isto.nosp@m.l.ac..nosp@m.uk)
Date
11/Oct/2012

Definition at line 68 of file TrackingTruthAccumulator.h.

Constructor & Destructor Documentation

TrackingTruthAccumulator::TrackingTruthAccumulator ( const edm::ParameterSet config,
edm::one::EDProducerBase mixMod,
edm::ConsumesCollector iC 
)
explicit

Definition at line 217 of file TrackingTruthAccumulator.cc.

References chargedOnly_, collectionTags_, edm::ConsumesCollector::consumes(), createMergedCollection_, createUnmergedCollection_, edm::ParameterSet::exists(), genParticleLabel_, edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), edm::ParameterSet::getParameterSet(), messageCategory_, selector_, selectorFlag_, signalOnly_, simTrackLabel_, simVertexLabel_, and o2o::tags.

217  :
218  messageCategory_("TrackingTruthAccumulator"),
219  volumeRadius_( config.getParameter<double>("volumeRadius") ),
220  volumeZ_( config.getParameter<double>("volumeZ") ),
221  ignoreTracksOutsideVolume_( config.getParameter<bool>("ignoreTracksOutsideVolume") ),
222  maximumPreviousBunchCrossing_( config.getParameter<unsigned int>("maximumPreviousBunchCrossing") ),
223  maximumSubsequentBunchCrossing_( config.getParameter<unsigned int>("maximumSubsequentBunchCrossing") ),
224  createUnmergedCollection_( config.getParameter<bool>("createUnmergedCollection") ),
225  createMergedCollection_(config.getParameter<bool>("createMergedBremsstrahlung") ),
226  addAncestors_( config.getParameter<bool>("alwaysAddAncestors") ),
227  removeDeadModules_( config.getParameter<bool>("removeDeadModules") ),
228  simTrackLabel_( config.getParameter<edm::InputTag>("simTrackCollection") ),
229  simVertexLabel_( config.getParameter<edm::InputTag>("simVertexCollection") ),
230  collectionTags_( ),
231  genParticleLabel_( config.getParameter<edm::InputTag>("genParticleCollection") ),
232  allowDifferentProcessTypeForDifferentDetectors_( config.getParameter<bool>("allowDifferentSimHitProcesses") )
233 {
234  //
235  // Make sure at least one of the merged and unmerged collections have been set
236  // to be created.
237  //
239  edm::LogError(messageCategory_) << "Both \"createUnmergedCollection\" and \"createMergedBremsstrahlung\" have been"
240  << "set to false, which means no collections will be created";
241 
242  // Initialize selection for building TrackingParticles
243  //
244  if( config.exists( "select" ) )
245  {
246  edm::ParameterSet param=config.getParameter<edm::ParameterSet>("select");
247  selector_=TrackingParticleSelector( param.getParameter<double>( "ptMinTP" ),
248  param.getParameter<double>( "minRapidityTP" ),
249  param.getParameter<double>( "maxRapidityTP" ),
250  param.getParameter<double>( "tipTP" ),
251  param.getParameter<double>( "lipTP" ),
252  param.getParameter<int>( "minHitTP" ),
253  param.getParameter<bool>( "signalOnlyTP" ),
254  param.getParameter<bool>( "chargedOnlyTP" ),
255  param.getParameter<bool>( "stableOnlyTP" ),
256  param.getParameter<std::vector<int> >("pdgIdTP") );
257  selectorFlag_=true;
258 
259  // Also set these two variables, which are used to drop out early if the SimTrack doesn't conform.
260  // The selector_ requires a full TrackingParticle object, but these two variables can veto things early.
261  chargedOnly_=param.getParameter<bool>( "chargedOnlyTP" );
262  signalOnly_=param.getParameter<bool>( "signalOnlyTP" );
263  }
264  else
265  {
266  selectorFlag_=false;
267  chargedOnly_=false;
268  signalOnly_=false;
269  }
270 
271  //
272  // Need to state what collections are going to be added to the event. This
273  // depends on which of the merged and unmerged collections have been configured
274  // to be created.
275  //
277  {
278  mixMod.produces<TrackingVertexCollection>();
279  mixMod.produces<TrackingParticleCollection>();
280  }
281 
283  {
284  mixMod.produces<TrackingParticleCollection>("MergedTrackTruth");
285  mixMod.produces<TrackingVertexCollection>("MergedTrackTruth");
286  }
287 
288  iC.consumes<std::vector<SimTrack> >(simTrackLabel_);
289  iC.consumes<std::vector<SimVertex> >(simVertexLabel_);
290  iC.consumes<std::vector<reco::GenParticle> >(genParticleLabel_);
291  iC.consumes<std::vector<int> >(genParticleLabel_);
292 
293  // Fill the collection tags
294  const edm::ParameterSet& simHitCollectionConfig=config.getParameterSet("simHitCollections");
295  std::vector<std::string> parameterNames=simHitCollectionConfig.getParameterNames();
296 
297  for( const auto& parameterName : parameterNames )
298  {
299  std::vector<edm::InputTag> tags=simHitCollectionConfig.getParameter<std::vector<edm::InputTag> >(parameterName);
300  collectionTags_.insert(collectionTags_.end(), tags.begin(), tags.end());
301  }
302 
303  for( const auto& collectionTag : collectionTags_ ) {
304  iC.consumes<std::vector<PSimHit> >(collectionTag);
305  }
306 
307 }
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getParameter(std::string const &) const
std::vector< TrackingParticle > TrackingParticleCollection
const bool removeDeadModules_
As of 11/Feb/2013 this option hasn&#39;t been implemented yet.
const bool addAncestors_
Whether or not to add the full parentage of any TrackingParticle that is inserted in the collection...
bool exists(std::string const &parameterName) const
checks if a parameter exists
bool signalOnly_
Uses the same config as selector_, but can be used to drop out early since selector_ requires the Tra...
const unsigned int maximumSubsequentBunchCrossing_
SingleObjectSelector< TrackingParticleCollection,::TrackingParticleSelector > TrackingParticleSelector
const std::string messageCategory_
The message category used to send messages to MessageLogger.
std::vector< std::string > getParameterNames() const
bool allowDifferentProcessTypeForDifferentDetectors_
When counting hits, allows hits in different detectors to have a different process type...
tuple tags
Definition: o2o.py:248
ParameterSet const & getParameterSet(std::string const &) const
std::vector< TrackingVertex > TrackingVertexCollection
const unsigned int maximumPreviousBunchCrossing_
bool chargedOnly_
Uses the same config as selector_, but can be used to drop out early since selector_ requires the Tra...
const bool createUnmergedCollection_
If bremsstrahlung merging, whether to also add the unmerged collection to the event or not...
TrackingParticleSelector selector_
std::vector< edm::InputTag > collectionTags_

Member Function Documentation

void TrackingTruthAccumulator::accumulate ( const edm::Event event,
const edm::EventSetup setup 
)
privatevirtual

Implements DigiAccumulatorMixMod.

Definition at line 328 of file TrackingTruthAccumulator.cc.

References accumulateEvent().

329 {
330  // Call the templated version that does the same for both signal and pileup events
331  accumulateEvent( event, setup );
332 }
void accumulateEvent(const T &event, const edm::EventSetup &setup)
Both forms of accumulate() delegate to this templated method.
void TrackingTruthAccumulator::accumulate ( const PileUpEventPrincipal event,
const edm::EventSetup setup,
edm::StreamID const &   
)
privatevirtual

Implements DigiAccumulatorMixMod.

Definition at line 334 of file TrackingTruthAccumulator.cc.

References accumulateEvent(), PileUpEventPrincipal::bunchCrossing(), maximumPreviousBunchCrossing_, maximumSubsequentBunchCrossing_, and messageCategory_.

335 {
336  // If this bunch crossing is outside the user configured limit, don't do anything.
337  if( event.bunchCrossing()>=-static_cast<int>(maximumPreviousBunchCrossing_) && event.bunchCrossing()<=static_cast<int>(maximumSubsequentBunchCrossing_) )
338  {
339  //edm::LogInfo(messageCategory_) << "Analysing pileup event for bunch crossing " << event.bunchCrossing();
340  accumulateEvent( event, setup );
341  }
342  else edm::LogInfo(messageCategory_) << "Skipping pileup event for bunch crossing " << event.bunchCrossing();
343 }
void accumulateEvent(const T &event, const edm::EventSetup &setup)
Both forms of accumulate() delegate to this templated method.
const unsigned int maximumSubsequentBunchCrossing_
const std::string messageCategory_
The message category used to send messages to MessageLogger.
const unsigned int maximumPreviousBunchCrossing_
template<class T >
void TrackingTruthAccumulator::accumulateEvent ( const T event,
const edm::EventSetup setup 
)
private

Both forms of accumulate() delegate to this templated method.

Definition at line 368 of file TrackingTruthAccumulator.cc.

References addAncestors_, allowDifferentProcessTypeForDifferentDetectors_, EncodedEventId::bunchCrossing(), CoreSimTrack::charge(), chargedOnly_, createMergedCollection_, createUnmergedCollection_, EncodedEventId::event(), CoreSimTrack::eventId(), cppFunctionSkipper::exception, fillSimHits(), genParticleLabel_, ignoreTracksOutsideVolume_, cmsHarvester::index, mergedOutput_, NULL, CoreSimVertex::position(), selector_, selectorFlag_, signalOnly_, simTrackLabel_, simVertexLabel_, unmergedOutput_, volumeRadius_, and volumeZ_.

Referenced by accumulate().

369 {
370  //
371  // Get the collections
372  //
374  edm::Handle<std::vector<SimVertex> > hSimVertices;
376  edm::Handle< std::vector<int> > hGenParticleIndices;
377 
378  event.getByLabel( simTrackLabel_, hSimTracks );
379  event.getByLabel( simVertexLabel_, hSimVertices );
380 
381  try
382  {
383  event.getByLabel( genParticleLabel_, hGenParticles );
384  event.getByLabel( genParticleLabel_, hGenParticleIndices );
385  }
386  catch( cms::Exception& exception )
387  {
388  //
389  // The Monte Carlo is not always available, e.g. for pileup events. The information
390  // is only used if it's available, but for some reason the PileUpEventPrincipal
391  // wrapper throws an exception here rather than waiting to see if the handle is
392  // used (as is the case for edm::Event). So I just want to catch this exception
393  // and use the normal handle checking later on.
394  //
395  }
396 
397  // Run through the collections and work out the decay chain of each track/vertex. The
398  // information in SimTrack and SimVertex only allows traversing upwards, but this will
399  // allow traversal in both directions. This is required for things like grouping electrons
400  // that bremsstrahlung as one TrackingParticle if "mergedBremsstrahlung" is set in the
401  // config file.
402  DecayChain decayChain( *hSimTracks, *hSimVertices );
403 
404  // I only want to create these collections if they're actually required
405  std::auto_ptr< ::OutputCollectionWrapper> pUnmergedCollectionWrapper;
406  std::auto_ptr< ::OutputCollectionWrapper> pMergedCollectionWrapper;
407  if( createUnmergedCollection_ ) pUnmergedCollectionWrapper.reset( new ::OutputCollectionWrapper( decayChain, unmergedOutput_ ) );
408  if( createMergedCollection_ ) pMergedCollectionWrapper.reset( new ::OutputCollectionWrapper( decayChain, mergedOutput_ ) );
409 
410  std::vector<const PSimHit*> simHitPointers;
411  fillSimHits( simHitPointers, event, setup );
412  TrackingParticleFactory objectFactory( decayChain, hGenParticles, hGenParticleIndices, simHitPointers, volumeRadius_, volumeZ_, allowDifferentProcessTypeForDifferentDetectors_ );
413 
414  // While I'm testing, perform some checks.
415  // TODO - drop this call once I'm happy it works in all situations.
416  //decayChain.integrityCheck();
417 
418  TrackingParticleSelector* pSelector=NULL;
419  if( selectorFlag_ ) pSelector=&selector_;
420 
421  // Run over all of the SimTracks, but because I'm interested in the decay hierarchy
422  // do it through the DecayChainTrack objects. These are looped over in sequence here
423  // but they have the hierarchy information for the functions called to traverse the
424  // decay chain.
425 
426  for( size_t index=0; index<decayChain.decayTracksSize; ++index )
427  {
428  ::DecayChainTrack* pDecayTrack=&decayChain.decayTracks[index];
429  const SimTrack& simTrack=hSimTracks->at(pDecayTrack->simTrackIndex);
430 
431 
432  // Perform some quick checks to see if we can drop out early. Note that these are
433  // a subset of the cuts in the selector_ so the created TrackingParticle could still
434  // fail. The selector_ requires the full TrackingParticle to be made however, which
435  // can be computationally expensive.
436  if( chargedOnly_ && simTrack.charge()==0 ) continue;
437  if( signalOnly_ && (simTrack.eventId().bunchCrossing()!=0 || simTrack.eventId().event()!=0) ) continue;
438 
439  // Also perform a check to see if the production vertex is inside the tracker volume (if required).
441  {
442  const SimVertex& simVertex=hSimVertices->at( pDecayTrack->pParentVertex->simVertexIndex );
443  if( !objectFactory.vectorIsInsideVolume( simVertex.position() ) ) continue;
444  }
445 
446 
447  // This function creates the TrackinParticle and adds it to the collection if it
448  // passes the selection criteria specified in the configuration. If the config
449  // specifies adding ancestors, the function is called recursively to do that.
450  ::addTrack( pDecayTrack, pSelector, pUnmergedCollectionWrapper.get(), pMergedCollectionWrapper.get(), objectFactory, addAncestors_ );
451  }
452 }
EncodedEventId eventId() const
Definition: CoreSimTrack.h:31
int event() const
get the contents of the subdetector field (should be protected?)
const bool addAncestors_
Whether or not to add the full parentage of any TrackingParticle that is inserted in the collection...
#define NULL
Definition: scimark2.h:8
float charge() const
charge
Definition: CoreSimTrack.cc:18
bool signalOnly_
Uses the same config as selector_, but can be used to drop out early since selector_ requires the Tra...
void fillSimHits(std::vector< const PSimHit * > &returnValue, const T &event, const edm::EventSetup &setup)
Fills the supplied vector with pointers to the SimHits, checking for bad modules if required...
int bunchCrossing() const
get the detector field from this detid
const math::XYZTLorentzVectorD & position() const
Definition: CoreSimVertex.h:26
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
bool allowDifferentProcessTypeForDifferentDetectors_
When counting hits, allows hits in different detectors to have a different process type...
bool chargedOnly_
Uses the same config as selector_, but can be used to drop out early since selector_ requires the Tra...
const bool createUnmergedCollection_
If bremsstrahlung merging, whether to also add the unmerged collection to the event or not...
TrackingParticleSelector selector_
template<class T >
void TrackingTruthAccumulator::fillSimHits ( std::vector< const PSimHit * > &  returnValue,
const T event,
const edm::EventSetup setup 
)
private

Fills the supplied vector with pointers to the SimHits, checking for bad modules if required.

Definition at line 454 of file TrackingTruthAccumulator.cc.

References collectionTags_.

Referenced by accumulateEvent().

455 {
456  // loop over the collections
457  for( const auto& collectionTag : collectionTags_ )
458  {
460  event.getByLabel( collectionTag, hSimHits );
461 
462  // TODO - implement removing the dead modules
463  for( const auto& simHit : *hSimHits )
464  {
465  returnValue.push_back( &simHit );
466  }
467 
468  } // end of loop over InputTags
469 }
std::vector< edm::InputTag > collectionTags_
void TrackingTruthAccumulator::finalizeEvent ( edm::Event event,
const edm::EventSetup setup 
)
privatevirtual

Implements DigiAccumulatorMixMod.

Definition at line 345 of file TrackingTruthAccumulator.cc.

References createMergedCollection_, createUnmergedCollection_, mergedOutput_, TrackingTruthAccumulator::OutputCollections::pTrackingParticles, TrackingTruthAccumulator::OutputCollections::pTrackingVertices, and unmergedOutput_.

346 {
347 
349  {
350  edm::LogInfo("TrackingTruthAccumulator") << "Adding " << unmergedOutput_.pTrackingParticles->size() << " TrackingParticles and " << unmergedOutput_.pTrackingVertices->size()
351  << " TrackingVertexs to the event.";
352 
353  event.put( unmergedOutput_.pTrackingParticles );
354  event.put( unmergedOutput_.pTrackingVertices );
355  }
356 
358  {
359  edm::LogInfo("TrackingTruthAccumulator") << "Adding " << mergedOutput_.pTrackingParticles->size() << " merged TrackingParticles and " << mergedOutput_.pTrackingVertices->size()
360  << " merged TrackingVertexs to the event.";
361 
362  event.put( mergedOutput_.pTrackingParticles, "MergedTrackTruth" );
363  event.put( mergedOutput_.pTrackingVertices, "MergedTrackTruth" );
364  }
365 
366 }
std::auto_ptr< TrackingParticleCollection > pTrackingParticles
std::auto_ptr< TrackingVertexCollection > pTrackingVertices
const bool createUnmergedCollection_
If bremsstrahlung merging, whether to also add the unmerged collection to the event or not...
void TrackingTruthAccumulator::initializeEvent ( const edm::Event event,
const edm::EventSetup setup 
)
privatevirtual

Implements DigiAccumulatorMixMod.

Definition at line 309 of file TrackingTruthAccumulator.cc.

References createMergedCollection_, createUnmergedCollection_, event(), mergedOutput_, TrackingTruthAccumulator::OutputCollections::pTrackingParticles, TrackingTruthAccumulator::OutputCollections::pTrackingVertices, TrackingTruthAccumulator::OutputCollections::refTrackingParticles, TrackingTruthAccumulator::OutputCollections::refTrackingVertexes, and unmergedOutput_.

310 {
312  {
315  unmergedOutput_.refTrackingParticles=const_cast<edm::Event&>( event ).getRefBeforePut<TrackingParticleCollection>();
316  unmergedOutput_.refTrackingVertexes=const_cast<edm::Event&>( event ).getRefBeforePut<TrackingVertexCollection>();
317  }
318 
320  {
323  mergedOutput_.refTrackingParticles=const_cast<edm::Event&>( event ).getRefBeforePut<TrackingParticleCollection>("MergedTrackTruth");
324  mergedOutput_.refTrackingVertexes=const_cast<edm::Event&>( event ).getRefBeforePut<TrackingVertexCollection>("MergedTrackTruth");
325  }
326 }
std::vector< TrackingParticle > TrackingParticleCollection
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
std::auto_ptr< TrackingParticleCollection > pTrackingParticles
std::auto_ptr< TrackingVertexCollection > pTrackingVertices
std::vector< TrackingVertex > TrackingVertexCollection
const bool createUnmergedCollection_
If bremsstrahlung merging, whether to also add the unmerged collection to the event or not...

Member Data Documentation

const bool TrackingTruthAccumulator::addAncestors_
private

Whether or not to add the full parentage of any TrackingParticle that is inserted in the collection.

Definition at line 100 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent().

bool TrackingTruthAccumulator::allowDifferentProcessTypeForDifferentDetectors_
private

When counting hits, allows hits in different detectors to have a different process type.

Fast sim PSimHits seem to have a peculiarity where the process type (as reported by PSimHit::processType()) is different for the tracker than the muons. When counting how many hits there are, the code usually only counts the number of hits that have the same process type as the first hit. Setting this to true will also count hits that have the same process type as the first hit in the second detector.

Definition at line 123 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent().

bool TrackingTruthAccumulator::chargedOnly_
private

Uses the same config as selector_, but can be used to drop out early since selector_ requires the TrackingParticle to be created first.

Definition at line 112 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), and TrackingTruthAccumulator().

std::vector<edm::InputTag> TrackingTruthAccumulator::collectionTags_
private

Definition at line 106 of file TrackingTruthAccumulator.h.

Referenced by fillSimHits(), and TrackingTruthAccumulator().

const bool TrackingTruthAccumulator::createMergedCollection_
private
const bool TrackingTruthAccumulator::createUnmergedCollection_
private

If bremsstrahlung merging, whether to also add the unmerged collection to the event or not.

Definition at line 97 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), finalizeEvent(), initializeEvent(), and TrackingTruthAccumulator().

edm::InputTag TrackingTruthAccumulator::genParticleLabel_
private

Definition at line 107 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), and TrackingTruthAccumulator().

const bool TrackingTruthAccumulator::ignoreTracksOutsideVolume_
private

Definition at line 88 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent().

const unsigned int TrackingTruthAccumulator::maximumPreviousBunchCrossing_
private

The maximum bunch crossing BEFORE the signal crossing to create TrackinParticles for. Use positive values. If set to zero no previous bunches are added and only in-time, signal and after bunches (defined by maximumSubsequentBunchCrossing_) are used.

Definition at line 92 of file TrackingTruthAccumulator.h.

Referenced by accumulate().

const unsigned int TrackingTruthAccumulator::maximumSubsequentBunchCrossing_
private

The maximum bunch crossing AFTER the signal crossing to create TrackinParticles for. E.g. if set to zero only uses the signal and in time pileup (and previous bunches defined by the maximumPreviousBunchCrossing_ parameter).

Definition at line 95 of file TrackingTruthAccumulator.h.

Referenced by accumulate().

OutputCollections TrackingTruthAccumulator::mergedOutput_
private

Definition at line 136 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().

const std::string TrackingTruthAccumulator::messageCategory_
private

The message category used to send messages to MessageLogger.

Definition at line 84 of file TrackingTruthAccumulator.h.

Referenced by accumulate(), and TrackingTruthAccumulator().

const bool TrackingTruthAccumulator::removeDeadModules_
private

As of 11/Feb/2013 this option hasn't been implemented yet.

Definition at line 103 of file TrackingTruthAccumulator.h.

TrackingParticleSelector TrackingTruthAccumulator::selector_
private

Definition at line 110 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), and TrackingTruthAccumulator().

bool TrackingTruthAccumulator::selectorFlag_
private

Definition at line 109 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), and TrackingTruthAccumulator().

bool TrackingTruthAccumulator::signalOnly_
private

Uses the same config as selector_, but can be used to drop out early since selector_ requires the TrackingParticle to be created first.

Definition at line 114 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), and TrackingTruthAccumulator().

const edm::InputTag TrackingTruthAccumulator::simTrackLabel_
private

Definition at line 104 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), and TrackingTruthAccumulator().

const edm::InputTag TrackingTruthAccumulator::simVertexLabel_
private

Definition at line 105 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), and TrackingTruthAccumulator().

OutputCollections TrackingTruthAccumulator::unmergedOutput_
private

Definition at line 135 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent(), finalizeEvent(), and initializeEvent().

const double TrackingTruthAccumulator::volumeRadius_
private

Definition at line 86 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent().

const double TrackingTruthAccumulator::volumeZ_
private

Definition at line 87 of file TrackingTruthAccumulator.h.

Referenced by accumulateEvent().