1 #ifndef L1GCTJETFINDERBASE_H_
2 #define L1GCTJETFINDERBASE_H_
15 #include <boost/cstdint.hpp>
54 typedef unsigned long int ULong;
102 (this->etSum1+rhs.
etSum1),
137 void setupTauAlgo(
const bool useImprovedAlgo,
const bool ignoreVetoBitsForIsolation) {
375 template <
int kBitsInput,
int kBitsOutput>
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.
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
hfTowerSumsType calcHfSums() const
Calculates Et sum and number of towers over threshold in Hf.
std::vector< L1GctInternHtMiss > getInternalHtMiss() const
bool m_gotChannelMask
Remember whether channel mask have been stored.
L1GctTwosComplement< L1GctInternHtMiss::kJetMissHtNBits > htCompInternJfType
etCompInternJfType getEySum() const
Get the y component of vector Et summed over the input regions.
Pipeline< L1GctJet > RawJetPipeline
Pipeline< etCompInternJfType > m_outputExSumPipe
RegionsVector getRcvdProtoJets() const
get protoJets received from neighbour
bool setupOk() const
Check setup is Ok.
virtual void resetPipelines()
L1 GCT internal jet candidate.
RegionsVector getKeptProtoJets() const
get protoJets kept
fetchType
different ways of getting the neighbour data
htCompInternJfType m_outputHxSum
std::ostream & operator<<(std::ostream &out, const ALILine &li)
virtual void setupObjects()
Initialise inputs with null objects for the correct bunch crossing if required.
Pipeline< htCompInternJfType > m_outputHySumPipe
Pipeline< htCompInternJfType > m_outputHxSumPipe
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
void setNeighbourJetFinders(std::vector< L1GctJetFinderBase * > neighbours)
Set pointers to neighbours - needed to complete the setup.
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.
friend std::ostream & operator<<(std::ostream &os, const L1GctJetFinderBase &algo)
Overload << operator.
bool m_gotNeighbourPointers
Remember whether the neighbour pointers have been stored.
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().
L1GctJetCount< kHfEtSumBits > etSum0
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.
Pipeline< etHadType > m_outputHtSumPipe
static const unsigned int N_EXTRA_REGIONS_ETA00
Number of additional regions to process on the "wrong" side of eta=0 (determines COL_OFFSET) ...
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.
virtual void process()=0
process the data, fill output buffers; to be filled in by derived jetFinders
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.
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
Pipeline< etCompInternJfType > m_outputEySumPipe
L1GctJetCount< kHfCountBits > nOverThreshold1
RawJetPipeline m_outputJetsPipe
Output jets "pipeline memory" for checking.
htCompInternJfType getHxSum() const
Get the x component of vector Ht summed over jets above threshold.
virtual void resetProcessor()
Separate reset methods for the processor itself and any data stored in pipelines. ...
unsigned m_HtmSumJetThreshold
RegionsVector getSentProtoJets() const
get protoJets sent to neighbour
L1GctJetCount< kHfEtSumBits > etSum1
void setupTauAlgo(const bool useImprovedAlgo, const bool ignoreVetoBitsForIsolation)
Setup the tau algorithm parameters.
L1GctTwosComplement< L1GctInternEtSum::kJetMissEtNBits > etCompInternJfType
void setInputRegion(const L1CaloRegion ®ion)
Set input data.
virtual unsigned nCols() const
RegionsVector getInputRegions() const
Return input data.
boost::shared_ptr< L1GctJetEtCalibrationLut > lutPtr
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
RawJetVector getRawJets() const
get output jets in raw format
Pipeline< etTotalType > m_outputEtSumPipe
"Pipeline memories" for energy sums
virtual void fetchInput()=0
get input data from sources; to be filled in by derived jetFinders
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
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.
L1GctJetCount< kHfCountBits > nOverThreshold0
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.
unsigned m_HttSumJetThreshold