Plugin to create the MC truth for TTTracks. More...
#include <TTTrackAssociator.h>
Public Member Functions | |
TTTrackAssociator (const edm::ParameterSet &iConfig) | |
Constructors. More... | |
~TTTrackAssociator () override | |
Destructor. More... | |
Public Member Functions inherited from edm::stream::EDProducer<> | |
EDProducer ()=default | |
bool | hasAbilityToProduceInBeginLumis () const final |
bool | hasAbilityToProduceInBeginRuns () const final |
bool | hasAbilityToProduceInEndLumis () const final |
bool | hasAbilityToProduceInEndRuns () const final |
Private Member Functions | |
void | beginRun (const edm::Run &run, const edm::EventSetup &iSetup) override |
Mandatory methods. More... | |
void | endRun (const edm::Run &run, const edm::EventSetup &iSetup) override |
End run. More... | |
template<> | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
More... | |
template<> | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
Implement the producer. More... | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override |
Private Attributes | |
edm::EDGetTokenT< TTClusterAssociationMap< T > > | TTClusterTruthToken |
edm::EDGetTokenT< TTStubAssociationMap< T > > | TTStubTruthToken |
bool | TTTrackAllowOneFalse2SStub |
std::vector< edm::InputTag > | TTTracksInputTags |
Data members. More... | |
std::vector< edm::EDGetTokenT< std::vector< TTTrack< T > > > > | TTTracksTokens |
Additional Inherited Members | |
Public Types inherited from edm::stream::EDProducer<> | |
typedef CacheContexts< T... > | CacheTypes |
typedef CacheTypes::GlobalCache | GlobalCache |
typedef AbilityChecker< T... > | HasAbility |
typedef CacheTypes::LuminosityBlockCache | LuminosityBlockCache |
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > | LuminosityBlockContext |
typedef CacheTypes::LuminosityBlockSummaryCache | LuminosityBlockSummaryCache |
typedef CacheTypes::RunCache | RunCache |
typedef RunContextT< RunCache, GlobalCache > | RunContext |
typedef CacheTypes::RunSummaryCache | RunSummaryCache |
Plugin to create the MC truth for TTTracks.
After moving from SimDataFormats to DataFormats, the template structure of the class was maintained in order to accomodate any types other than PixelDigis in case there is such a need in the future.
Definition at line 40 of file TTTrackAssociator.h.
|
explicit |
Constructors.
Close class.
NOTE since pattern hit correlation must be performed within a stacked module, one must store Clusters in a proper way, providing easy access to them in a detector/member-wise way
Implementation of methods
Here, in the header file, the methods which do not depend on the specific type <T> that can fit the template. Other methods, with type-specific features, are implemented in the source file. Constructors
Definition at line 77 of file TTTrackAssociator.h.
References edm::ParameterSet::getParameter(), and TTTrackAssociation_cfi::TTTrackAllowOneFalse2SStub.
|
override |
|
overrideprivate |
Mandatory methods.
Begin run.
Print some information when loaded
Definition at line 101 of file TTTrackAssociator.h.
|
overrideprivate |
|
private |
Here, in the source file, the methods which do depend on the specific type <T> that can fit the template.
Exit if real data
Get the Stub and Cluster MC truth
Loop over InputTags to handle multiple collections
Prepare output
Get the Tracks already stored away
Prepare the necessary maps
Counter needed to build the edm::Ptr to the TTTrack
Make the pointer to be put in the map
Get the stubs of the TTTrack (theseStubs)
Auxiliary map to store TP addresses and TP edm::Ptr
Fill the inclusive map which is careless of the stub classification
Prepare the maps wrt TrackingParticle
Fill the auxiliary map
Fill the other auxiliary map
End of loop over the clusters
Check if the stub is unknown
End of loop over the stubs
If there more than 2 unknown stubs, go to the next track as this track may be COMBINATORIC or UNKNOWN
If we are here, all the stubs are either combinatoric or genuine and there is no more than one fake stub in the track Loop over all the TrackingParticle which have been found in the track at some point (stored in auxMap)
Get all the stubs from this TrackingParticle
Loop over the stubs
We want that all the stubs of the track are included in the container of all the stubs produced by this particular TrackingParticle which we already know is one of the TrackingParticles that released hits in this track we are evaluating right now
If the TrackingParticle does not appear in all stubs but one then go to the next track
If we are here, it means that the TrackingParticle generates hits in all stubs but one of the current track so put it into the vector
Count how many TrackingParticles we do have
If only one TrackingParticle, GENUINE if different than one, COMBINATORIC
Here, the track may only be GENUINE Fill the map
End of loop over Tracks
Clean the only map that needs cleaning Prepare the output map wrt TrackingParticle
Get the vector of edm::Ptr< TTTrack >
Sort and remove duplicates
Also, create the pointer to the TTClusterAssociationMap
Put the maps in the association object
Put output in the event
End of loop over InputTags
Definition at line 14 of file TTTrackAssociator.cc.
References spr::find(), edm::Ptr< T >::get(), iEvent, edm::Ptr< T >::isNull(), dqmiolumiharvest::j, eostools::move(), edm::second(), TTTrackAssociation_cfi::TTTrackAllowOneFalse2SStub, and tier0::unique().
|
private |
Implement the producer.
|
overrideprivate |
|
private |
Definition at line 57 of file TTTrackAssociator.h.
|
private |
Definition at line 56 of file TTTrackAssociator.h.
|
private |
Definition at line 59 of file TTTrackAssociator.h.
|
private |
Data members.
Definition at line 52 of file TTTrackAssociator.h.
|
private |
Definition at line 54 of file TTTrackAssociator.h.