Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HGCAL trigger] Update of the general code architecture - 2 #25100

Merged
merged 99 commits into from Nov 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
5fd8097
Added new classe HGCalTriggerSums
ebecheva Mar 8, 2018
3a15ec5
Added new classe HGCalTriggerSums
ebecheva Mar 8, 2018
0d303d5
Added new directories
ebecheva Mar 8, 2018
de3552d
New producer which takes VFE part of HGCalTriggerDigiReproducer.cc
ebecheva Mar 9, 2018
54088d0
New producer which takes VFE part of HGCalTriggerDigiReproducer.cc
ebecheva Mar 9, 2018
ba4c319
Processor of the VFE part : linearize, triggerCellSums, calibration
ebecheva Mar 9, 2018
590cf20
New producer calling bestChoiceSelect and thresholdSelect methods
ebecheva Mar 9, 2018
f653831
New producer for 2D clustering backendlayer1
ebecheva Mar 9, 2018
fcb7dbe
New producer for 3D clustering backendlayer2
ebecheva Mar 9, 2018
286b38f
New ProcessorBase (for VFE+Concentrator+BackendLayer1&2) classes
ebecheva Mar 9, 2018
1c0c823
New ProcessorBase (for VFE+Concentrator+BackendLayer1&2) classes
ebecheva Mar 9, 2018
b177b42
first commit of HGCalVFEProcessor.h
ebecheva Mar 16, 2018
01b17dd
new class HGCalVFECompressionImpl
ebecheva Mar 16, 2018
fab5f92
new class for Concentrator part => HGCalConcentratorProcessor
ebecheva Mar 16, 2018
6be13e2
move TrigCellCalibration, Clustering and Multiclustering algos from /…
ebecheva Mar 16, 2018
5ebb922
remove files from /be_algorithms, these files have been moved into /b…
ebecheva Mar 16, 2018
73d5eca
mv HGCalTriggerCellThresholdCodecImpl.cc HGCalVFELinearizationImpl.cc
ebecheva Mar 19, 2018
eecc7ab
mv HGCalTriggerCellThresholdCodecImpl.h HGCalVFELinearizationImpl.h
ebecheva Mar 19, 2018
3263945
modify HGCalTriggerCellThresholdCodecImpl for having only linearize m…
ebecheva Mar 19, 2018
33803b9
move HGCalTriggerCellThresholdCodecImpl to HGCalVFESummationImpl
ebecheva Mar 19, 2018
fcc32e0
move HGCalTriggerCellThresholdCodecImpl to HGCalConcentratorSelection…
ebecheva Mar 19, 2018
84c81a6
new class HGCalConcentratorSelectionImpl, thresholdSelectImpl method …
ebecheva Mar 20, 2018
4e821c6
Special class for linearization in the VFE part, taken from previous …
ebecheva Mar 20, 2018
cc5767c
new class HGCalConcentratorSelectionImpl, thresholdSelectImpl method …
ebecheva Mar 20, 2018
93d701c
move HGCClusterAlgo.cc to HGCalBackendLayer1Processor.cc
ebecheva Mar 20, 2018
36979e6
move HGCClusterAlgo.cc to HGCalBackendLayer1Processor.cc
ebecheva Mar 20, 2018
d16ad24
move HGCClusterAlgo.cc to HGCalBackendLayer2Processor.cc
ebecheva Mar 22, 2018
abb2320
new class HGCalConcentratorSelectionImpl, thresholdSelectImpl method …
ebecheva Mar 22, 2018
b7a23d4
commit
ebecheva Mar 22, 2018
b2918e1
commit merged files HGCalConcentratorSelectionImpl.cc HGCalVFESummati…
ebecheva Mar 23, 2018
e4b5657
implement the new class keeping the clustering 3D part
ebecheva Mar 23, 2018
02a0957
implement the new class keeping the clustering 2D part
ebecheva Mar 23, 2018
3784934
implement the new class keeping the clustering 3D part
ebecheva Mar 23, 2018
f70aadc
fixes
ebecheva Mar 23, 2018
e8f4377
commit after merging branches
ebecheva Mar 23, 2018
b883b29
move HGCalShowerShape.h and HGCalShowerShape.cc from be_algorithms to…
ebecheva Mar 27, 2018
19df437
move HGCalTriggerCellCalibration class from backend to veryfrontend d…
ebecheva Mar 30, 2018
f874651
transfering the code into the CMSSW_10_1_0_pre1 release, last fixes
ebecheva Apr 23, 2018
550c6f5
Small fixes preparing for the integration into the main branch
ebecheva Apr 26, 2018
6e5f5ef
in addition to previous small fixes
ebecheva Apr 26, 2018
620f06c
Rename processor files, move threshold selection from VFE to Concentr…
ebecheva May 24, 2018
dceae81
Move HGCTowerAlgo.cc to new file HGCalTowerProcessor.cc where we will…
ebecheva May 28, 2018
e8621fc
Move HGCTowerAlgo.cc to new file HGCalTowerProcessor.cc where we will…
ebecheva May 28, 2018
0a61a51
rename files
ebecheva Jun 28, 2018
e0d60dc
New processors
ebecheva Jun 28, 2018
7c58fc6
Somes fixes
ebecheva Jun 28, 2018
faf9c06
adding Tower part
ebecheva Jun 28, 2018
1f17348
clean producers, improve products name
ebecheva Jul 10, 2018
488e8ea
some improvements
ebecheva Jul 10, 2018
361d956
clean python files
ebecheva Jul 10, 2018
bd8a894
add HGCalTriggerSums
ebecheva Jul 10, 2018
3f0be46
adapt to the new products name
ebecheva Jul 10, 2018
4ee3cf0
adding/improving MapTower and Tower parts
ebecheva Jul 10, 2018
0174828
clean print messages
ebecheva Jul 10, 2018
4894824
update configuration files
ebecheva Jul 10, 2018
b00e4d8
fix path to HGCalShowerShape.h file
ebecheva Jul 16, 2018
822bf3c
fixes needed in order to merge new code from CMSSW_10_1_0_pre1 into C…
ebecheva Jul 19, 2018
e924c49
fixes after merging new code into the release CMSSW_10_2_0_pre5
ebecheva Jul 27, 2018
0292d6e
Merge new code infrastructure from ebecheva
jbsauvan Aug 31, 2018
faa0b6c
Move identification to backend directory
jbsauvan Aug 31, 2018
b500c17
Apply code checks
jbsauvan Sep 3, 2018
5360fc1
Remove commented code
jbsauvan Sep 3, 2018
19df8a2
Revert null changes
jbsauvan Sep 3, 2018
8587242
Revert null changes
jbsauvan Sep 3, 2018
0affd3f
Merge pull request #215 from jbsauvan/new-infrastructure-1030pre1
jbsauvan Sep 3, 2018
4f209ec
Merged hgc-tpg-tmp-1030pre1-180912 from repository PFCal-dev with cms…
jbsauvan Sep 13, 2018
320e3b7
Update event content
jbsauvan Sep 14, 2018
76c3ac0
Fix VFE inputs
jbsauvan Sep 14, 2018
2a9784c
Fix producer name for premixing
jbsauvan Sep 17, 2018
37f83de
Remove old files
jbsauvan Sep 17, 2018
6eea003
delete commented-out code and use std::sort instead of sort
ebecheva Sep 21, 2018
8042e00
Use std::sort instead of sort and range-based loop
ebecheva Sep 21, 2018
6f9c0bc
range-based loop
ebecheva Sep 21, 2018
46240d1
remove extra space
ebecheva Sep 21, 2018
f0d9ab7
use emplace() instead of insert
ebecheva Sep 21, 2018
0e6296f
change function name to start with lower case
ebecheva Sep 21, 2018
3271e0e
Use unordered_map instead of map
ebecheva Sep 21, 2018
295aa53
une make-unique and remove unnecessary include file <sstream>
ebecheva Sep 21, 2018
cf4f2cf
remove files
ebecheva Sep 21, 2018
9fe3747
Fix detid checks for v9 geometry by Jean-Baptiste
jbsauvan Sep 21, 2018
c2bc076
Simplify run(..) method keeping only one entry collection
ebecheva Oct 1, 2018
187a94b
Simplify the way of filling unordered_map
ebecheva Oct 1, 2018
200d0f4
delete commented lines
ebecheva Oct 1, 2018
efe19a4
delete classes that have been replaced by one template class HGCalPro…
ebecheva Oct 8, 2018
a240cd7
delete classes that have been replaced by one template class HGCalPro…
ebecheva Oct 8, 2018
4181f78
new template class
ebecheva Oct 8, 2018
c2c9750
correct the name of the include files according to the new template b…
ebecheva Oct 8, 2018
0f8698f
remoe unnecessary include files
ebecheva Oct 9, 2018
2b55958
change auto& to const auto&
ebecheva Oct 9, 2018
568307e
add removed by error include file
ebecheva Oct 9, 2018
f5b228e
Fix indentation
ebecheva Oct 9, 2018
651c25a
Merge pull request #225 from ebecheva/corrMergeToMastergit
jbsauvan Oct 9, 2018
f5809be
remove commented-out code
ebecheva Oct 9, 2018
e362b51
remove make_pair
ebecheva Oct 9, 2018
bfb8837
Merge pull request #226 from ebecheva/corrMergeToMastergit
jbsauvan Oct 10, 2018
afe7d73
simplify the way of filling outputVector
ebecheva Oct 10, 2018
d305d85
Merge pull request #227 from ebecheva/corrMergeToMastergit
jbsauvan Oct 11, 2018
c299bbb
Remove deprecated producer cfi
jbsauvan Oct 31, 2018
ae55a94
Merged hgc-tpg-integration-180913 from repository jbsauvan with cms-m…
jbsauvan Nov 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions Configuration/StandardSequences/python/SimL1EmulatorDM_cff.py
Expand Up @@ -15,9 +15,9 @@
#
simHcalTechTrigDigis.ttpDigiCollection = "DMHcalTTPDigis"
#
hgcalTriggerPrimitiveDigiProducer.eeDigis = "mixData:HGCDigisEE"
hgcalTriggerPrimitiveDigiProducer.fhDigis = "mixData:HGCDigisHEfront"
hgcalTriggerPrimitiveDigiProducer.bhDigis = "mixData:HGCDigisHEback"
hgcalVFEProducer.eeDigis = "mixData:HGCDigisEE"
hgcalVFEProducer.fhDigis = "mixData:HGCDigisHEfront"
hgcalVFEProducer.bhDigis = "mixData:HGCDigisHEback"

from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
if not stage2L1Trigger.isChosen():
Expand Down
59 changes: 59 additions & 0 deletions DataFormats/L1THGCal/interface/HGCalTriggerSums.h
@@ -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
20 changes: 20 additions & 0 deletions DataFormats/L1THGCal/src/HGCalTriggerSums.cc
@@ -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()
{
}
9 changes: 9 additions & 0 deletions DataFormats/L1THGCal/src/classes.h
Expand Up @@ -8,6 +8,7 @@
#include "DataFormats/L1THGCal/interface/HGCalTower.h"
#include "DataFormats/L1THGCal/interface/HGCalTowerMap.h"
#include "DataFormats/L1THGCal/interface/HGCalTriggerCell.h"
#include "DataFormats/L1THGCal/interface/HGCalTriggerSums.h"

#include "DataFormats/L1THGCal/interface/ClusterShapes.h"

Expand All @@ -29,17 +30,22 @@ namespace DataFormats {
l1t::HGCalTowerBxCollection hgcalTowerBxColl;
l1t::HGCalTowerMapBxCollection hgcalTowerMapBxColl;
l1t::HGCalTriggerCellBxCollection hgcalTriggerCellBxColl;
l1t::HGCalTriggerSumsBxCollection hgcalTriggerSumsBxColl;
l1t::HGCalClusterBxCollection hgcalClusterBxColl;
l1t::HGCalMulticlusterBxCollection hgcalMulticlusterBxColl;
l1t::HGCalTowerID towerId;

edm::Ptr<l1t::HGCalTriggerCell> hgcalTriggerCellPtr;
edm::Ptr<l1t::HGCalTriggerSums> hgcalTriggerSumsPtr;
edm::Ptr<l1t::HGCalCluster> hgcalClusterPtr;
edm::Ptr<l1t::HGCalTowerMap> hgcalTowerMapPtr;

std::vector<edm::Ptr<l1t::HGCalTriggerCell>> hgcalTriggerCellList;
std::vector<edm::Ptr<l1t::HGCalCluster>> hgcalClusterList;
std::vector<edm::PtrVector<l1t::HGCalTriggerSums>> hgcalTriggerSumsList;
std::unordered_map<uint32_t, edm::Ptr<l1t::HGCalTriggerCell>> hgcalTriggerCellMap;
std::unordered_map<uint32_t, edm::Ptr<l1t::HGCalCluster>> hgcalClusterMap;

edm::PtrVector<l1t::HGCalTowerMap> hgcalTowerMapList;
std::unordered_map<unsigned short,l1t::HGCalTower> towermap;

Expand All @@ -48,9 +54,12 @@ namespace DataFormats {
edm::Wrapper<l1t::HGCalClusterBxCollection> w_hgcalClusterBxColl;
edm::Wrapper<l1t::HGCalMulticlusterBxCollection> w_hgcalMulticlusterBxColl;
edm::Wrapper<l1t::HGCalTriggerCellBxCollection> w_hgcalTriggerCellBxColl;
edm::Wrapper<l1t::HGCalTriggerSumsBxCollection> w_hgcalTriggerSumsBxColl;

edm::Wrapper<edm::Ptr<l1t::HGCalTriggerCell>> w_hgcalTriggerCellPtr;
edm::Wrapper<edm::Ptr<l1t::HGCalTriggerSums>> w_hgcalTriggerSumsPtr;
edm::Wrapper<edm::PtrVector<l1t::HGCalTriggerCell>> w_hgcalTriggerCellList;
edm::Wrapper<edm::PtrVector<l1t::HGCalTriggerSums>> w_hgcalTriggerSumsList;
edm::Wrapper<edm::Ptr<l1t::HGCalCluster>> w_hgcalClusterPtr;
edm::Wrapper<edm::PtrVector<l1t::HGCalCluster>> w_hgcalClusterList;

Expand Down
15 changes: 15 additions & 0 deletions DataFormats/L1THGCal/src/classes_def.xml
Expand Up @@ -19,6 +19,7 @@
<class name="std::unordered_map<int,l1t::HGCalTower>" />
<class name="l1t::HGCalTowerBxCollection"/>
<class name="edm::Wrapper<l1t::HGCalTowerBxCollection>"/>
<class name="unordered_map<int,l1t::HGCalTower>"/>


<class name="l1t::HGCalTowerMap" />
Expand All @@ -28,6 +29,7 @@
<class name="edm::Wrapper<l1t::HGCalTowerMapBxCollection>"/>

<class name="l1t::HGCalClusterT<l1t::HGCalTriggerCell>" />
<class name="l1t::HGCalClusterT<l1t::HGCalTriggerSums>" />
<class name="l1t::HGCalCluster" ClassVersion="14">
<version ClassVersion="14" checksum="3289642235"/>
<version ClassVersion="13" checksum="3397489079"/>
Expand Down Expand Up @@ -57,19 +59,32 @@
<class name="std::vector<l1t::HGCalTriggerCell>" />
<class name="l1t::HGCalTriggerCellBxCollection"/>
<class name="edm::Wrapper<l1t::HGCalTriggerCellBxCollection>"/>

<class name="l1t::HGCalTriggerSums" ClassVersion="11">
<version ClassVersion="11" checksum="4058188392"/>
</class>
<class name="std::vector<l1t::HGCalTriggerSums>" />
<class name="l1t::HGCalTriggerSumsBxCollection"/>
<class name="edm::Wrapper<l1t::HGCalTriggerSumsBxCollection>"/>


<class name="std::vector<edm::Ptr<l1t::HGCalTriggerCell>>" />
<class name="std::vector<edm::Ptr<l1t::HGCalCluster>>" />
<class name="std::vector<edm::PtrVector<l1t::HGCalTriggerSums>>" />
<class name="std::unordered_map<uint32_t, edm::Ptr<l1t::HGCalTriggerCell>>" />
<class name="std::unordered_map<uint32_t, edm::Ptr<l1t::HGCalCluster>>" />
<class name="std::unordered_map<uint32_t, double>" />
<class name="unordered_map<unsigned short,l1t::HGCalTower>" />

<class name="edm::PtrVector<l1t::HGCalTowerMap>" />
<class name="edm::Ptr<l1t::HGCalTriggerCell>" />
<class name="edm::Ptr<l1t::HGCalTriggerSums>" />
<class name="edm::Ptr<l1t::HGCalCluster>" />
<class name="edm::Ptr<l1t::HGCalTowerMap>" />
<class name="edm::Wrapper<edm::Ptr<l1t::HGCalTriggerCell>>"/>
<class name="edm::Wrapper<edm::PtrVector<l1t::HGCalTriggerCell>>"/>
<class name="edm::Wrapper<edm::Ptr<l1t::HGCalTriggerSums>>"/>
<class name="edm::Wrapper<edm::PtrVector<l1t::HGCalTriggerSums>>"/>
<class name="edm::Wrapper<edm::Ptr<l1t::HGCalCluster>>"/>
<class name="edm::Wrapper<edm::PtrVector<l1t::HGCalCluster>>"/>
<class name="edm::Wrapper<edm::Ptr<l1t::HGCalTowerMap>>"/>
Expand Down
10 changes: 5 additions & 5 deletions L1Trigger/Configuration/python/L1Trigger_EventContent_cff.py
Expand Up @@ -117,11 +117,11 @@ def _appendStage2Digis(obj):
# adding HGCal L1 trigger digis
def _appendHGCalDigis(obj):
l1HGCalDigis = [
'keep *_hgcalTriggerPrimitiveDigiProducer_calibratedTriggerCells_*',
'keep *_hgcalTriggerPrimitiveDigiProducer_cluster2D_*',
'keep *_hgcalTriggerPrimitiveDigiProducer_cluster3D_*',
'keep *_hgcalTriggerPrimitiveDigiProducer_towerMap_*',
'keep *_hgcalTriggerPrimitiveDigiProducer_tower_*',
'keep l1tHGCalTriggerCellBXVector_hgcalVFEProducer_*_*',
'keep l1tHGCalTriggerCellBXVector_hgcalConcentratorProducer_*_*',
'keep l1tHGCalTowerBXVector_hgcalTowerProducer_*_*',
'keep l1tHGCalClusterBXVector_hgcalBackEndLayer1Producer_*_*',
'keep l1tHGCalMulticlusterBXVector_hgcalBackEndLayer2Producer_*_*'
]
obj.outputCommands += l1HGCalDigis

Expand Down
29 changes: 29 additions & 0 deletions L1Trigger/L1THGCal/interface/HGCalProcessorBase.h
@@ -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
36 changes: 36 additions & 0 deletions L1Trigger/L1THGCal/interface/HGCalProcessorBaseT.h
@@ -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
13 changes: 11 additions & 2 deletions L1Trigger/L1THGCal/interface/HGCalTriggerTools.h
Expand Up @@ -15,6 +15,9 @@

#include <array>
#include <cmath>
#include <vector>
#include "DataFormats/L1Trigger/interface/BXVector.h"

#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "DataFormats/ForwardDetId/interface/ForwardSubdetector.h"

Expand All @@ -30,7 +33,7 @@ namespace edm {
class HGCalTriggerTools {
public:
HGCalTriggerTools() : geom_(nullptr),
eeLayers_(0), fhLayers_(0), bhLayers_(0), totalLayers_(0){}
eeLayers_(0), fhLayers_(0), bhLayers_(0), totalLayers_(0){}
~HGCalTriggerTools() {}

void eventSetup(const edm::EventSetup&);
Expand Down Expand Up @@ -58,7 +61,13 @@ class HGCalTriggerTools {
float getLayerZ(const unsigned& layerWithOffset) const;
float getLayerZ(const int& subdet, const unsigned& layer) const;


template<typename T>
std::vector<T> bxVectorToVector(const BXVector<T>& inputBXVector){
std::vector<T> outputVector;
//loop over collection for a given bx and put the objects into a std::vector
outputVector.insert(outputVector.end(), inputBXVector.begin(0), inputBXVector.end(0));
return outputVector;
}

private:
const HGCalTriggerGeometryBase* geom_;
Expand Down
Expand Up @@ -7,9 +7,9 @@
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h"
#include "L1Trigger/L1THGCal/interface/be_algorithms/HGCalShowerShape.h"
#include "L1Trigger/L1THGCal/interface/backend/HGCalShowerShape.h"
#include "L1Trigger/L1THGCal/interface/HGCalTriggerTools.h"
#include "L1Trigger/L1THGCal/interface/be_algorithms/HGCalTriggerClusterIdentificationBase.h"
#include "L1Trigger/L1THGCal/interface/backend/HGCalTriggerClusterIdentificationBase.h"


class HGCalMulticlusteringImpl{
Expand Down
@@ -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
@@ -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