Plugin to load the Stub finding algorithm and produce the collection of Stubs that goes in the event content. More...
#include <TTStubBuilder.h>
Private Member Functions | |
virtual void | beginRun (const edm::Run &run, const edm::EventSetup &iSetup) |
Mandatory methods. More... | |
virtual void | endRun (const edm::Run &run, const edm::EventSetup &iSetup) |
End run. More... | |
template<> | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
virtual void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
template<> | |
void | produce (edm::Event &iEvent, const edm::EventSetup &iSetup) |
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 | |
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 edm::ParameterSet::getParameter().
TTStubBuilder< T >::~TTStubBuilder | ( | ) |
|
privatevirtual |
Mandatory methods.
Begin run.
Get the stub finding algorithm
Reimplemented from edm::EDProducer.
Definition at line 93 of file TTStubBuilder.h.
References edm::EventSetup::get().
|
privatevirtual |
|
privatevirtual |
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)
Implements edm::EDProducer.
Definition at line 16 of file TTStubBuilder.cc.
References TTStub< T >::addClusterRef(), edmNew::DetSet< T >::begin(), edmNew::DetSetVector< T >::begin(), TrackerGeometry::dets(), edmNew::DetSetVector< T >::empty(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), edm::false, edm::EventSetup::get(), edm::Event::getByToken(), TTStub< T >::getClusterRef(), TTStub< T >::getTriggerPosition(), i, edmNew::DetSetVector< T >::id(), TrackerGeometry::idToDetUnit(), TrackerTopology::isLower(), visualization-live-secondInstance_cfg::m, edmNew::makeRefTo(), eostools::move(), TrackerTopology::partnerDetId(), edm::ESHandle< class >::product(), edmNew::DetSetVector< T >::push_back(), edm::Event::put(), PixelTopology::rowsperroc(), TTStub< T >::setTriggerDisplacement(), TTStub< T >::setTriggerOffset(), edmNew::DetSet< T >::size(), PixelGeomDetUnit::specificTopology(), TrackerTopology::stack(), DetId::subdetId(), StripSubdetector::TID, and StripSubdetector::TOB.
|
privatevirtual |
Implements edm::EDProducer.
|
privatevirtual |
Implements edm::EDProducer.
|
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().
|
private |
Definition at line 55 of file TTStubBuilder.h.
|
private |
Definition at line 56 of file TTStubBuilder.h.
|
private |
Data members.
Definition at line 54 of file TTStubBuilder.h.