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 | |
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 | |
bool | applyFE |
edm::EDGetTokenT< edmNew::DetSetVector< TTCluster< T > > > | clustersToken |
bool | ForbidMultipleStubs |
unsigned int | high_rate_max_ring [5] |
int | ievt |
unsigned int | maxStubs_2S |
unsigned int | maxStubs_2S_CIC_5 |
unsigned int | maxStubs_PS |
unsigned int | maxStubs_PS_CIC_10 |
unsigned int | maxStubs_PS_CIC_5 |
std::unordered_map< int, int > | moduleStubs_CBC |
std::unordered_map< int, std::vector< TTStub< Ref_Phase2TrackerDigi_ > > > | moduleStubs_CIC |
Temporary storage for stubs before max check. More... | |
std::unordered_map< int, int > | moduleStubs_MPA |
unsigned int | tedd1_maxring |
unsigned int | tedd2_maxring |
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) |
static bool | wantsGlobalLuminosityBlocks () |
static bool | wantsGlobalRuns () |
static bool | wantsStreamLuminosityBlocks () |
static bool | wantsStreamRuns () |
Protected Member Functions inherited from edm::ProducerBase | |
ProducesCollector | producesCollector () |
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes () |
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> | |
auto | esConsumes (ESInputTag const &tag) |
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 109 of file TTStubBuilder.h.
References TTStubBuilder< T >::applyFE, TTStubBuilder< T >::clustersToken, TTStubBuilder< T >::ForbidMultipleStubs, edm::ParameterSet::getParameter(), TTStubBuilder< T >::high_rate_max_ring, TTStubBuilder< T >::maxStubs_2S, TTStubBuilder< T >::maxStubs_2S_CIC_5, TTStubBuilder< T >::maxStubs_PS, TTStubBuilder< T >::maxStubs_PS_CIC_10, TTStubBuilder< T >::maxStubs_PS_CIC_5, TTStubBuilder< T >::tedd1_maxring, and TTStubBuilder< T >::tedd2_maxring.
|
override |
|
overrideprivate |
Mandatory methods.
Begin run.
Get the stub finding algorithm
Definition at line 137 of file TTStubBuilder.h.
References edm::EventSetup::get(), TTStubBuilder< T >::ievt, TTStubBuilder< T >::moduleStubs_CBC, TTStubBuilder< T >::moduleStubs_CIC, TTStubBuilder< T >::moduleStubs_MPA, 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
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
SV 21/11/17: tracker topology method should be updated, currently provide wrong nums
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 MPA/CBC ASIC
Find out which CIC ASIC
Already a stub for this ASIC?
No, so new entry
Already a stub for this ASIC?
No, so new entry
Already a stub for this ASIC?
Already a stub for this ASIC?
No, so new entry
Already a stub for this ASIC?
No, so new entry
Already a stub for this ASIC?
Sort them by |bend| and pick up only the first N.
End of check on max number of stubs per module
End of nested loop
End of loop over pairs of Clusters
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(), TTStub< T >::bendBE(), TTStub< T >::bendOffset(), TTStub< T >::clusterRef(), constexpr, TrackerGeometry::dets(), edmNew::DetSet< T >::empty(), edmNew::DetSetVector< T >::empty(), edmNew::DetSet< T >::end(), edmNew::DetSetVector< T >::end(), dqmdumpme::first, edm::EventSetup::get(), edm::Event::getByToken(), TrackerGeometry::getDetectorType(), TTStub< T >::getDetId(), mps_fire::i, edmNew::DetSetVector< T >::id(), TTStub< T >::innerClusterPosition(), createfilelist::int, TrackerTopology::isLower(), TrackerTopology::layer(), visualization-live-secondInstance_cfg::m, edmNew::makeRefTo(), TTStub< T >::moduleTypePS(), eostools::move(), TrackerTopology::partnerDetId(), TrackerGeometry::Ph2PSP, edm::ESHandle< T >::product(), edmNew::DetSetVector< T >::push_back(), edm::Event::put(), TTStub< T >::rawBend(), TTStub< T >::setBendBE(), TTStub< T >::setBendOffset(), TTStub< T >::setModuleTypePS(), TTStub< T >::setRawBend(), findQualityFiles::size, TrackerTopology::stack(), DetId::subdetId(), StripSubdetector::TID, TrackerTopology::tidRing(), TrackerTopology::tidWheel(), StripSubdetector::TOB, and PV2DBase< T, PVType, FrameType >::y().
|
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 152 of file TTStubBuilder.h.
References funct::abs().
|
staticprivate |
Analogous sorting routine directly from stubs.
Definition at line 159 of file TTStubBuilder.h.
References funct::abs(), TTStub< T >::bendFE(), iEvent, and TTStubBuilder< T >::produce().
|
private |
Definition at line 70 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 54 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 55 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 96 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 82 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::beginRun().
|
private |
Definition at line 73 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 75 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 74 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 77 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 76 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 88 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::beginRun().
|
private |
Temporary storage for stubs before max check.
Definition at line 86 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::beginRun().
|
private |
Definition at line 87 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::beginRun().
|
private |
Definition at line 79 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Definition at line 80 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::TTStubBuilder().
|
private |
Data members.
Definition at line 53 of file TTStubBuilder.h.
Referenced by TTStubBuilder< T >::beginRun().