Plugin to create the MC truth for TTStubs. More...
#include <TTStubAssociator.h>
Public Member Functions | |
TTStubAssociator (const edm::ParameterSet &iConfig) | |
Constructors. More... | |
Public Member Functions inherited from edm::stream::EDProducer<> | |
EDProducer ()=default | |
EDProducer (const EDProducer &)=delete | |
bool | hasAbilityToProduceInBeginLumis () const final |
bool | hasAbilityToProduceInBeginProcessBlocks () const final |
bool | hasAbilityToProduceInBeginRuns () const final |
bool | hasAbilityToProduceInEndLumis () const final |
bool | hasAbilityToProduceInEndProcessBlocks () const final |
bool | hasAbilityToProduceInEndRuns () const final |
const EDProducer & | operator= (const EDProducer &)=delete |
Private Member Functions | |
template<> | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override |
Mandatory methods. More... | |
template<> | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
Implement the producer. More... | |
Private Attributes | |
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > | theTrackerGeometryToken_ |
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > | theTrackerTopologyToken_ |
std::vector< edm::InputTag > | ttClusterTruthInputTags_ |
std::vector< edm::EDGetTokenT< TTClusterAssociationMap< T > > > | ttClusterTruthTokens_ |
std::vector< edm::InputTag > | ttStubsInputTags_ |
Data members. More... | |
std::vector< edm::EDGetTokenT< edmNew::DetSetVector< TTStub< T > > > > | ttStubsTokens_ |
Additional Inherited Members | |
Public Types inherited from edm::stream::EDProducer<> | |
using | CacheTypes = CacheContexts< T... > |
using | GlobalCache = typename CacheTypes::GlobalCache |
using | HasAbility = AbilityChecker< T... > |
using | InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache |
using | LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache |
using | LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache > |
using | LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache |
using | RunCache = typename CacheTypes::RunCache |
using | RunContext = RunContextT< RunCache, GlobalCache > |
using | RunSummaryCache = typename CacheTypes::RunSummaryCache |
Plugin to create the MC truth for TTStubs.
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 44 of file TTStubAssociator.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
Print some information when loaded
Definition at line 76 of file TTStubAssociator.h.
References deDxTools::esConsumes(), and edm::ParameterSet::getParameter().
|
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
Exit if the vectors are uncorrectly dimensioned
Loop over the InputTags to handle multiple collections
Prepare output
Get the Stubs already stored away
Get the Cluster MC truth
Prepare the necessary maps
Loop over the input Stubs
Get the DetSets of the Clusters
Make the reference to be put in the map
Fill the inclusive map which is careless of the stub classification
Prepare the maps wrt TrackingParticle
Fill the auxiliary map
GENUINE for clusters means not combinatoric and not unknown: same MC truth content MUST be found in both clusters composing the stub
If at least one cluster is unknown, it means either unknown, either combinatoric Do nothing, and go to the next Stub
Here both are clusters are genuine/combinatoric If both clusters have some known SimTrack content they must be compared to each other
If both clusters are genuine, they must be associated to the same TrackingParticle in order to return a genuine stub. Period. Note we can perform safely this comparison because, if both clusters are genuine, their TrackingParticle shall NEVER be NULL
Two genuine clusters with same SimTrack content mean genuine
Fill the map: by construction, this will always be the first time the stub is inserted into the map: no need for "find"
At this point, go to the next Stub
It means combinatoric
End of two genuine clusters
Here, at least one cluster is combinatoric
Skip NULL pointers
Skip NULL pointers
Same SimTrack is present in both clusters
If two different SimTracks are found in both clusters, then the stub is for sure combinatoric
End of double loop over SimTracks of both clusters
If two different SimTracks are found in both clusters, go to the next stub
No SimTracks were found to be in both clusters
Only one SimTrack was found to be present in both clusters even if one of the clusters (or both) are combinatoric: this means there is only one track that participates in both clusters, hence the stub is genuine
Fill the map: by construction, this will always be the first time the stub is inserted into the map: no need for "find"
At this point, go to the next Stub
End of one single SimTrack in both clusters
End of "at least one cluster is combinatoric"
End of "both clusters are known, somehow..."
End of loop over Stubs
Clean the only map that needs cleaning Prepare the output map wrt TrackingParticle
Get the vector of references to TTStub
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 TTStubAssociator.cc.
References edmNew::DetSet< T >::begin(), TrackerGeometry::dets(), edmNew::DetSet< T >::end(), edm::EventSetup::getData(), mps_fire::i, iEvent, TrackerTopology::isLower(), dqmdumpme::k, edmNew::makeRefTo(), eostools::move(), AlCaHLTBitMon_ParallelJobs::p, jetUpdater_cfi::sort, TrackerTopology::stack(), DetId::subdetId(), StripSubdetector::TID, StripSubdetector::TOB, and tier0::unique().
|
overrideprivate |
Mandatory methods.
|
private |
Implement the producer.
|
private |
Definition at line 59 of file TTStubAssociator.h.
|
private |
Definition at line 60 of file TTStubAssociator.h.
|
private |
Definition at line 54 of file TTStubAssociator.h.
|
private |
Definition at line 57 of file TTStubAssociator.h.
|
private |
Data members.
Definition at line 53 of file TTStubAssociator.h.
|
private |
Definition at line 56 of file TTStubAssociator.h.