Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25100 from PFCal-dev/hgc-tpg-integration-180913-2
[HGCAL trigger] Update of the general code architecture - 2
- Loading branch information
Showing
94 changed files
with
1,659 additions
and
3,348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#ifndef DataFormats_L1TCalorimeter_HGCalTriggerSums_h | ||
#define DataFormats_L1TCalorimeter_HGCalTriggerSums_h | ||
|
||
|
||
#include "DataFormats/GeometryVector/interface/GlobalPoint.h" | ||
#include "DataFormats/L1Trigger/interface/L1Candidate.h" | ||
#include "DataFormats/L1Trigger/interface/BXVector.h" | ||
#include "DataFormats/ForwardDetId/interface/HGCalDetId.h" | ||
|
||
namespace l1t | ||
{ | ||
|
||
class HGCalTriggerSums; | ||
typedef BXVector<HGCalTriggerSums> HGCalTriggerSumsBxCollection; | ||
|
||
class HGCalTriggerSums : public L1Candidate | ||
{ | ||
|
||
public: | ||
|
||
HGCalTriggerSums() {} | ||
|
||
HGCalTriggerSums( const LorentzVector& p4, | ||
int pt=0, | ||
int eta=0, | ||
int phi=0, | ||
int qual=0, | ||
uint32_t detid=0); | ||
|
||
~HGCalTriggerSums() override; | ||
|
||
void setDetId(uint32_t detid) {detid_ = HGCalDetId(detid);} | ||
void setPosition(const GlobalPoint& position) {position_ = position;} | ||
|
||
uint32_t detId() const {return detid_.rawId();} | ||
const GlobalPoint& position() const {return position_;} | ||
|
||
int zside() const { | ||
return detid_.zside(); | ||
} | ||
int layer() const { | ||
return detid_.layer(); | ||
} | ||
|
||
void setMipPt( double value ) { mipPt_ = value; } | ||
double mipPt() const { return mipPt_; } | ||
|
||
private: | ||
|
||
HGCalDetId detid_; | ||
GlobalPoint position_; | ||
|
||
double mipPt_; | ||
|
||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "DataFormats/L1THGCal/interface/HGCalTriggerSums.h" | ||
|
||
using namespace l1t; | ||
|
||
HGCalTriggerSums:: | ||
HGCalTriggerSums( const LorentzVector& p4, | ||
int pt, | ||
int eta, | ||
int phi, | ||
int qual, | ||
uint32_t detid): | ||
L1Candidate(p4, pt, eta, phi, qual), | ||
detid_(detid) | ||
{ | ||
} | ||
|
||
HGCalTriggerSums:: | ||
~HGCalTriggerSums() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef __L1Trigger_L1THGCal_HGCalProcessorBase_h__ | ||
#define __L1Trigger_L1THGCal_HGCalProcessorBase_h__ | ||
|
||
#include "L1Trigger/L1THGCal/interface/HGCalProcessorBaseT.h" | ||
|
||
#include "DataFormats/HGCDigi/interface/HGCDigiCollections.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTriggerCell.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTriggerSums.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalCluster.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalMulticluster.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTowerMap.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTower.h" | ||
|
||
typedef HGCalProcessorBaseT<HGCalDigiCollection, l1t::HGCalTriggerCellBxCollection> HGCalVFEProcessorBase; | ||
typedef HGCalProcessorBaseT<edm::Handle<l1t::HGCalTriggerCellBxCollection>, l1t::HGCalTriggerCellBxCollection> HGCalConcentratorProcessorBase; | ||
typedef HGCalProcessorBaseT<edm::Handle<l1t::HGCalTriggerCellBxCollection>, l1t::HGCalClusterBxCollection> HGCalBackendLayer1ProcessorBase; | ||
typedef HGCalProcessorBaseT<edm::Handle<l1t::HGCalClusterBxCollection>, l1t::HGCalMulticlusterBxCollection> HGCalBackendLayer2ProcessorBase; | ||
typedef HGCalProcessorBaseT<edm::Handle<l1t::HGCalTriggerCellBxCollection>, l1t::HGCalTowerMapBxCollection> HGCalTowerMapProcessorBase; | ||
typedef HGCalProcessorBaseT<edm::Handle<l1t::HGCalTowerMapBxCollection>, l1t::HGCalTowerBxCollection> HGCalTowerProcessorBase; | ||
|
||
#include "FWCore/PluginManager/interface/PluginFactory.h" | ||
typedef edmplugin::PluginFactory< HGCalVFEProcessorBase* (const edm::ParameterSet&) > HGCalVFEProcessorBaseFactory; | ||
typedef edmplugin::PluginFactory< HGCalConcentratorProcessorBase* (const edm::ParameterSet&) > HGCalConcentratorFactory; | ||
typedef edmplugin::PluginFactory< HGCalBackendLayer1ProcessorBase* (const edm::ParameterSet&) > HGCalBackendLayer1Factory; | ||
typedef edmplugin::PluginFactory< HGCalBackendLayer2ProcessorBase* (const edm::ParameterSet&) > HGCalBackendLayer2Factory; | ||
typedef edmplugin::PluginFactory< HGCalTowerMapProcessorBase* (const edm::ParameterSet&) > HGCalTowerMapFactory; | ||
typedef edmplugin::PluginFactory< HGCalTowerProcessorBase* (const edm::ParameterSet&) > HGCalTowerFactory; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#ifndef __L1Trigger_L1THGCal_HGCalProcessorBaseT_h__ | ||
#define __L1Trigger_L1THGCal_HGCalProcessorBaseT_h__ | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "DataFormats/Common/interface/Handle.h" | ||
|
||
#include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h" | ||
|
||
|
||
template<typename InputCollection, typename OutputCollection> class HGCalProcessorBaseT { | ||
|
||
public: | ||
HGCalProcessorBaseT(const edm::ParameterSet& conf) : | ||
geometry_(nullptr), | ||
name_(conf.getParameter<std::string>("ProcessorName")) | ||
{} | ||
|
||
virtual ~HGCalProcessorBaseT() {} | ||
|
||
const std::string& name() const { return name_; } | ||
|
||
void setGeometry(const HGCalTriggerGeometryBase* const geom) { geometry_ = geom;} | ||
|
||
virtual void run(const InputCollection& inputColl, | ||
OutputCollection& outColl, | ||
const edm::EventSetup& es) = 0; | ||
|
||
protected: | ||
const HGCalTriggerGeometryBase* geometry_; | ||
|
||
private: | ||
const std::string name_; | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions
28
L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorProcessorSelection.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef __L1Trigger_L1THGCal_HGCalConcentratorProcessorSelection_h__ | ||
#define __L1Trigger_L1THGCal_HGCalConcentratorProcessorSelection_h__ | ||
|
||
#include "L1Trigger/L1THGCal/interface/HGCalProcessorBase.h" | ||
#include "L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSelectionImpl.h" | ||
|
||
#include "L1Trigger/L1THGCal/interface/HGCalTriggerTools.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTriggerCell.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTriggerSums.h" | ||
|
||
class HGCalConcentratorProcessorSelection : public HGCalConcentratorProcessorBase | ||
{ | ||
|
||
public: | ||
HGCalConcentratorProcessorSelection(const edm::ParameterSet& conf); | ||
|
||
void run(const edm::Handle<l1t::HGCalTriggerCellBxCollection>& triggerCellCollInput, l1t::HGCalTriggerCellBxCollection& triggerCellCollOutput, const edm::EventSetup& es) override; | ||
|
||
private: | ||
std::string choice_; | ||
|
||
HGCalConcentratorSelectionImpl concentratorProcImpl_; | ||
|
||
HGCalTriggerTools triggerTools_; | ||
|
||
}; | ||
|
||
#endif |
52 changes: 52 additions & 0 deletions
52
L1Trigger/L1THGCal/interface/concentrator/HGCalConcentratorSelectionImpl.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#ifndef __L1Trigger_L1THGCal_HGCalConcentratorSelectionImpl_h__ | ||
#define __L1Trigger_L1THGCal_HGCalConcentratorSelectionImpl_h__ | ||
|
||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h" | ||
|
||
#include "DataFormats/L1THGCal/interface/HGCalTriggerCell.h" | ||
#include "DataFormats/L1THGCal/interface/HGCalTriggerSums.h" | ||
|
||
#include "L1Trigger/L1THGCal/interface/HGCalTriggerTools.h" | ||
|
||
#include <array> | ||
#include <vector> | ||
|
||
class HGCalConcentratorSelectionImpl | ||
{ | ||
|
||
public: | ||
HGCalConcentratorSelectionImpl(const edm::ParameterSet& conf); | ||
|
||
void bestChoiceSelectImpl(const std::vector<l1t::HGCalTriggerCell>& trigCellVecInput, std::vector<l1t::HGCalTriggerCell>& trigCellVecOutput); | ||
void thresholdSelectImpl(const std::vector<l1t::HGCalTriggerCell>& trigCellVecInput, std::vector<l1t::HGCalTriggerCell>& trigCellVecOutput); | ||
|
||
// Retrieve parameters | ||
size_t nCellsInModule() const {return nCellsInModule_;} | ||
double linLSB() const {return linLSB_;} | ||
size_t nData() const {return nData_;} | ||
double adcsaturationBH() const {return adcsaturationBH_;} | ||
uint32_t adcnBitsBH() const {return adcnBitsBH_;} | ||
int TCThreshold_ADC() const {return TCThreshold_ADC_;} | ||
double TCThreshold_fC() const {return TCThreshold_fC_;} | ||
int TCThresholdBH_ADC() const {return TCThresholdBH_ADC_;} | ||
double TCThresholdBH_MIP() const {return TCThresholdBH_MIP_;} | ||
|
||
private: | ||
size_t nData_; | ||
size_t nCellsInModule_; | ||
double linLSB_; | ||
double adcsaturationBH_; | ||
uint32_t adcnBitsBH_; | ||
double adcLSBBH_; | ||
int TCThreshold_ADC_; | ||
double TCThreshold_fC_; | ||
int TCThresholdBH_ADC_; | ||
double TCThresholdBH_MIP_; | ||
double triggercell_threshold_silicon_; | ||
double triggercell_threshold_scintillator_; | ||
|
||
HGCalTriggerTools triggerTools_; | ||
}; | ||
|
||
#endif |
Oops, something went wrong.