1 #ifndef L1GCTJETFINDERBASE_H_ 2 #define L1GCTJETFINDERBASE_H_ 51 typedef unsigned long int ULong;
82 hfTowerSumsType() : etSum0(0), etSum1(0), nOverThreshold0(0), nOverThreshold1(0) {}
84 : etSum0(e0), etSum1(e1), nOverThreshold0(n0), nOverThreshold1(n1) {}
89 : etSum0(e0), etSum1(e1), nOverThreshold0(n0), nOverThreshold1(n1) {}
94 nOverThreshold0.
reset();
95 nOverThreshold1.
reset();
100 (this->etSum1 + rhs.
etSum1),
114 static const unsigned int 135 void setupTauAlgo(
const bool useImprovedAlgo,
const bool ignoreVetoBitsForIsolation) {
378 template <
int kBitsInput,
int kBitsOutput>
380 const unsigned& fact0,
382 const unsigned& fact1);
bool m_idInRange
Remember whether range check on the input ID was ok.
bool m_ignoreTauVetoBitsForIsolation
etTotalType m_outputEtSum
output Et strip sums and Ht - refactored
static const unsigned int MAX_JETS_OUT
Max of 6 jets found per jetfinder in a 2*11 search area.
std::vector< L1GctJetCand > JetVector
void doEtSums()
Calculates scalar and vector sum of Et over input regions.
L1GctJetCount< kHfCountBits > nOverThreshold1
RegionsVector m_sentProtoJets
List of pre-clustered jets to be sent to neighbour after the first stage of clustering.
htCompInternJfType m_outputHySum
unsigned getHtmSumJetThreshold() const
L1GctTwosComplement< L1GctInternEtSum::kJetMissEtNBits > etCompInternJfType
hfTowerSumsType calcHfSums() const
Calculates Et sum and number of towers over threshold in Hf.
~L1GctJetFinderBase() override
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
bool m_gotChannelMask
Remember whether channel mask have been stored.
L1GctJetCount< kHfEtSumBits > etSum1
etCompInternJfType getEySum() const
Get the y component of vector Et summed over the input regions.
Pipeline< L1GctJet > RawJetPipeline
RegionsVector getRcvdProtoJets() const
get protoJets received from neighbour
bool setupOk() const
Check setup is Ok.
L1 GCT internal jet candidate.
void setNeighbourJetFinders(const std::vector< L1GctJetFinderBase * > &neighbours)
Set pointers to neighbours - needed to complete the setup.
RegionsVector getKeptProtoJets() const
get protoJets kept
fetchType
different ways of getting the neighbour data
htCompInternJfType m_outputHxSum
Pipeline< etTotalType > m_outputEtSumPipe
"Pipeline memories" for energy sums
L1GctJetFinderBase(int id)
id is 0-8 for -ve Eta jetfinders, 9-17 for +ve Eta, for increasing Phi.
hfTowerSumsType operator+(const hfTowerSumsType &rhs) const
std::vector< L1GctJet > RawJetVector
virtual unsigned centralCol0() const
Base class to allow implementation of jetFinder algorithms.
ABC for a GCT trigger data processing unit.
etCompInternJfType getExSum() const
Get the x component of vector Et summed over the input regions.
unsigned getTauJetSeed() const
L1GctTwosComplement< kBitsOutput > etComponentForJetFinder(const L1GctUnsignedInt< kBitsInput > &etStrip0, const unsigned &fact0, const L1GctUnsignedInt< kBitsInput > &etStrip1, const unsigned &fact1)
Private method for calculating MEt and MHt components.
void process() override=0
process the data, fill output buffers; to be filled in by derived jetFinders
friend std::ostream & operator<<(std::ostream &os, const L1GctJetFinderBase &algo)
Overload << operator.
bool m_gotNeighbourPointers
Remember whether the neighbour pointers have been stored.
Pipeline< etHadType > m_outputHtSumPipe
std::vector< L1GctInternJetData > getInternalJets() const
get output jets in raw format - to be stored in the event
void doHtSums()
Calculates scalar and vector sum of Ht over calibrated jets.
const lutPtrVector getJetEtCalLuts() const
Return pointers to calibration LUTs.
JetVector getJets() const
Get the located jets.
etTotalType getEtSum() const
Get the scalar sum of Et summed over the input regions.
unsigned getEtaBoundry() const
void sortJets()
Sort the found jets. All jetFinders should call this in process().
std::vector< L1GctInternEtSum > getInternalEtSums() const
get et sums in raw format - to be stored in the event
unsigned m_tauIsolationThreshold
etHadType getHtSum() const
Get the scalar sum of Ht summed over jets above threshold.
void setJetEtCalibrationLuts(const lutPtrVector &jfluts)
Set pointer to calibration Lut - needed to complete the setup.
lutPtrVector m_jetEtCalLuts
Jet Et Conversion LUT pointer.
std::vector< L1GctJetFinderBase * > m_neighbourJetFinders
Store neighbour pointers.
static const unsigned int N_EXTRA_REGIONS_ETA00
Number of additional regions to process on the "wrong" side of eta=0 (determines COL_OFFSET) ...
void setupObjects() override
Initialise inputs with null objects for the correct bunch crossing if required.
L1GctJetCount< kHfCountBits > nOverThreshold0
unsigned short int UShort
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etHadType
static const unsigned int CENTRAL_COL0
unsigned getHttSumJetThreshold() const
RegionsVector m_keptProtoJets
List of pre-clustered jets retained locally as input to the final clustering.
etTotalType calcEtStrip(const UShort strip) const
Calculates total (raw) energy in a phi strip.
hfTowerSumsType(L1GctJetCount< kHfEtSumBits > e0, L1GctJetCount< kHfEtSumBits > e1, L1GctJetCount< kHfCountBits > n0, L1GctJetCount< kHfCountBits > n1)
static const unsigned int MAX_REGIONS_IN
The real jetFinders must define these constants.
void resetProcessor() override
Separate reset methods for the processor itself and any data stored in pipelines. ...
static const unsigned int COL_OFFSET
The index offset between columns.
RawJetVector m_outputJets
output jets
void setJetFinderParams(const L1GctJetFinderParams *jfpars)
Set pointer to parameters - needed to complete the setup.
htCompInternJfType getHySum() const
Get the y component of vector Ht summed over jets above threshold.
RegionsVector m_inputRegions
unsigned getCenJetSeed() const
RawJetPipeline m_outputJetsPipe
Output jets "pipeline memory" for checking.
htCompInternJfType getHxSum() const
Get the x component of vector Ht summed over jets above threshold.
unsigned m_HtmSumJetThreshold
RegionsVector getSentProtoJets() const
get protoJets sent to neighbour
L1GctJetCount< kHfEtSumBits > etSum0
void setupTauAlgo(const bool useImprovedAlgo, const bool ignoreVetoBitsForIsolation)
Setup the tau algorithm parameters.
void setInputRegion(const L1CaloRegion ®ion)
Set input data.
void fetchInput() override=0
get input data from sources; to be filled in by derived jetFinders
virtual unsigned nCols() const
RegionsVector getInputRegions() const
Return input data.
void resetPipelines() override
void setEnergySumMasks(const L1GctChannelMask *chmask)
Set masks for energy summing.
hfTowerSumsType getHfSums() const
Get the Hf tower Et sums and tower-over-threshold counts.
etTotalType calcHtStrip(const UShort strip) const
Calculates total calibrated energy in jets (Ht) sum.
L1GctUnsignedInt< L1GctInternEtSum::kTotEtOrHtNBits > etTotalType
std::vector< lutPtr > lutPtrVector
void fetchProtoJetsFromNeighbour(const fetchType ft)
fetch the protoJets from neighbour jetFinder
void reset()
reset value and overflow to zero
etCompInternJfType m_outputEySum
Pipeline< etCompInternJfType > m_outputExSumPipe
RawJetVector getRawJets() const
get output jets in raw format
bool m_gotJetFinderParams
Remember whether jetfinder parameters have been stored.
A calorimeter trigger region (sum of 4x4 trigger towers)
hfTowerSumsType(unsigned e0, unsigned e1, unsigned n0, unsigned n1)
virtual unsigned maxRegionsIn() const
L1GctTwosComplement< L1GctInternHtMiss::kJetMissHtNBits > htCompInternJfType
Pipeline< htCompInternJfType > m_outputHySumPipe
unsigned getTauIsolationThreshold() const
unsigned m_minColThisJf
parameter to determine which Regions belong in our acceptance
RegionsVector m_rcvdProtoJets
List of pre-clustered jets received from neighbour before the final stage of clustering.
static const unsigned int N_COLS
std::vector< T > contents
std::vector< L1GctRegion > RegionsVector
etCompInternJfType m_outputExSum
unsigned getFwdJetSeed() const
bool m_gotJetEtCalLuts
Remember whether jet Et calibration Lut pointers have been stored.
bool m_useImprovedTauAlgo
Setup parameters for the tau jet algorithm.
Pipeline< etCompInternJfType > m_outputEySumPipe
void doEnergySums()
Fill the Et strip sums and Ht sum. All jetFinders should call this in process().
hfTowerSumsType m_outputHfSums
static const unsigned int N_JF_PER_WHEEL
No of jetFinders per Wheel.
Pipeline< htCompInternJfType > m_outputHxSumPipe
std::shared_ptr< L1GctJetEtCalibrationLut > lutPtr
unsigned m_HttSumJetThreshold