Plugin to load the Stub finding algorithm and produce the collection of Stubs that goes in the event content. More...
#include <TTStubBuilder.h>
Public Member Functions | |
TTStubBuilder (const edm::ParameterSet &iConfig) | |
Constructor. More... | |
~TTStubBuilder () override | |
Destructor;. More... | |
Public Member Functions inherited from edm::EDProducer | |
EDProducer () | |
ModuleDescription const & | moduleDescription () const |
~EDProducer () override | |
Public Member Functions inherited from edm::ProducerBase | |
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
std::vector< edm::ProductResolverIndex > const & | indiciesForPutProducts (BranchType iBranchType) const |
ProducerBase () | |
std::vector< edm::ProductResolverIndex > const & | putTokenIndexToProductResolverIndex () const |
void | registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &) |
std::function< void(BranchDescription const &)> | registrationCallback () const |
used by the fwk to register list of products More... | |
void | resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel) |
virtual | ~ProducerBase () noexcept(false) |
Public Member Functions inherited from edm::EDConsumerBase | |
std::vector< ConsumesInfo > | consumesInfo () const |
void | convertCurrentProcessAlias (std::string const &processName) |
Convert "@currentProcess" in InputTag process names to the actual current process name. More... | |
EDConsumerBase () | |
EDConsumerBase (EDConsumerBase const &)=delete | |
EDConsumerBase (EDConsumerBase &&)=default | |
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
virtual | ~EDConsumerBase () noexcept(false) |
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) |
Implementation of methods of TTClusterBuilder.h. More... | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override |
template<> | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
Implement the producer. More... | |
Static Private Member Functions | |
static bool | SortStubBendPairs (const std::pair< unsigned int, double > &left, const std::pair< unsigned int, double > &right) |
Sort routine for stub ordering. More... | |
static bool | SortStubsBend (const TTStub< T > &left, const TTStub< T > &right) |
Analogous sorting routine directly from stubs. More... | |
Private Attributes | |
edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > | clustersToken |
bool | ForbidMultipleStubs |
edm::ESHandle< TTStubAlgorithm< T > > | theStubFindingAlgoHandle |
Data members. More... | |
Additional Inherited Members | |
Public Types inherited from edm::EDProducer | |
typedef EDProducer | ModuleType |
Public Types inherited from edm::ProducerBase | |
using | ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >> |
typedef ProductRegistryHelper::TypeLabelList | TypeLabelList |
Public Types inherited from edm::EDConsumerBase | |
typedef ProductLabels | Labels |
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::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) |
Plugin to load the Stub finding algorithm and produce the collection of Stubs that goes in the event content.
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 43 of file TTStubBuilder.h.
|
explicit |
Constructor.
Close class.
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 78 of file TTStubBuilder.h.
References TTStubBuilder< T >::clustersToken, TTStubBuilder< T >::ForbidMultipleStubs, and edm::ParameterSet::getParameter().
|
override |
|
overrideprivate |
Mandatory methods.
Begin run.
Get the stub finding algorithm
Definition at line 93 of file TTStubBuilder.h.
References edm::EventSetup::get(), and TTStubBuilder< T >::theStubFindingAlgoHandle.
|
overrideprivate |
|
private |
Implementation of methods of TTClusterBuilder.h.
Here, in the source file, the methods which do depend on the specific type <T> that can fit the template.
Prepare output
Get the Clusters already stored away
Get the maximum number of stubs per ROC (CBC3-style)
Go on only if both detectors have Clusters
Get the DetSets of the Clusters
If there are Clusters in both sensors you can try and make a Stub This is ~redundant
Create the vectors of objects to be passed to the FastFillers
Get chip size information
Need to find ASIC size in half-strip units
Temporary storage for stubs before max check
Loop over pairs of Clusters
Temporary storage to allow only one stub per inner cluster if requested in cfi
Build a temporary Stub
Check for compatibility
If the Stub is above threshold
Stub accepted
End of loop over outer clusters
Here tempOutput stores all the stubs from this inner cluster Check if there is need to store only one (if only one already, skip this step)
If so, sort the stubs by bend and keep only the first one (smallest bend)
Get to the second element (the switch above ensures there are min 2)
tempIter points now to the second element
Delete all-but-the first one from tempOutput
Here, tempOutput is either of size 1 (if entering the switch) either of size N with all the valid combinations ...
Now loop over the accepted stubs (1 or N) for this inner cluster
Get the stub
Put in the output
This means that ALL stubs go into the output
This means that only some of them do Put in the temporary output
Find out which ASIC
Already a stub for this ASIC?
No, so new entry
Already existing entry
End of check on max number of stubs per module
End of nested loop
End of loop over pairs of Clusters
If we are working with max no. stub/ROC, then clean the temporary output and store only the selected stubs
Loop over ROC's the ROC ID is not important
Put the stubs into the output
Sort them and pick up only the first N.
Put the highest momenta (lowest bend) stubs into the event
End of loop over temp output
End store only the selected stubs if max no. stub/ROC is set
Create the FastFillers
End of loop over detector elements
Put output in the event (1) Get also the OrphanHandle of the accepted clusters
Now, correctly reset the output
Get the DetId and prepare the FastFiller
detid of the two components. This should be done via a TrackerTopology method that is not yet available.
Get the DetSets of the clusters
Get the DetSet of the stubs
Prepare the new DetSet to replace the current one Loop over the stubs
Create a temporary stub
Compare the clusters stored in the stub with the ones of this module
If no compatible clusters were found, skip to the next one
getter is in FULL-strip units, setter is in HALF-strip units
getter is in FULL-strip units, setter is in HALF-strip units
End of loop over stubs of this module
End of loop over stub DetSetVector
Put output in the event (2)
Definition at line 16 of file TTStubBuilder.cc.
References TTStub< T >::addClusterRef(), edmNew::DetSet< T >::begin(), edmNew::DetSetVector< T >::begin(), TrackerGeometry::dets(), edmNew::DetSet< T >::empty(), edmNew::DetSetVector< T >::empty(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), funct::false, edm::EventSetup::get(), edm::Event::getByToken(), TTStub< T >::getClusterRef(), TTStub< T >::getTriggerPosition(), mps_fire::i, edmNew::DetSetVector< T >::id(), TrackerGeometry::idToDetUnit(), TrackerTopology::isLower(), funct::m, edmNew::makeRefTo(), eostools::move(), TrackerTopology::partnerDetId(), edm::ESHandle< T >::product(), edmNew::DetSetVector< T >::push_back(), edm::Event::put(), PixelTopology::rowsperroc(), TTStub< T >::setTriggerDisplacement(), TTStub< T >::setTriggerOffset(), PixelGeomDetUnit::specificTopology(), TrackerTopology::stack(), DetId::subdetId(), StripSubdetector::TID, and StripSubdetector::TOB.
|
overrideprivate |
Referenced by TTStubBuilder< T >::SortStubsBend().
|
private |
Implement the producer.
|
staticprivate |
Sort routine for stub ordering.
Sorting method for stubs NOTE: this must be static!
Definition at line 105 of file TTStubBuilder.h.
|
staticprivate |
Analogous sorting routine directly from stubs.
Definition at line 112 of file TTStubBuilder.h.
References TTStub< T >::getTriggerBend(), iEvent, and TTStubBuilder< T >::produce().
|
private |
Definition at line 55 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 56 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Data members.
Definition at line 54 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::beginRun().