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 updates #21728

Merged
merged 89 commits into from Jan 27, 2018
Merged
Show file tree
Hide file tree
Changes from 83 commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
0e6fef9
Merged hgc-tpg-devel-CMSSW_9_3_0_pre2 from repository PFCal-dev
jbsauvan Aug 4, 2017
7701c3e
Increase TC nbits to 20
jbsauvan Aug 4, 2017
dfec795
Merge pull request #132 from jbsauvan/increase-tc-saturation
jbsauvan Aug 4, 2017
a6b93d8
Merged hgc-tpg-devel-CMSSW_9_3_0_pre2 from repository PFCal-dev with …
jbsauvan Aug 28, 2017
291432e
Update relval test file for 930pre4
jbsauvan Aug 28, 2017
d413a0b
first try
Jul 10, 2017
e9c3287
simplify and clean HGCalShowerShape
Jul 13, 2017
392d586
First working version for Electron ID
Jul 17, 2017
69915df
dont use 2D shower shape for the moment
Jul 17, 2017
c4c7992
new structure for HGCalShowerShape
Jul 21, 2017
37463b2
clean version
Jul 24, 2017
548c709
Adress PR comments
Aug 1, 2017
8dd2512
Adress PR comments Part II
Aug 2, 2017
c4e1890
Adress PR comments Part III
Aug 11, 2017
e0d092a
Address PR comments Part IV
Aug 29, 2017
b89fdcd
Remove useless comments
jbsauvan Aug 30, 2017
342a410
Revert empty changes
jbsauvan Aug 30, 2017
f1d2669
Merge pull request #137 from jbsauvan/ElectronID
jbsauvan Aug 30, 2017
d8dc0d5
The DBSCAN algorithm is implemented for the 3D clusters
osahin Aug 31, 2017
ad183c8
fixing minor bugs and correcting the parameters
osahin Aug 31, 2017
f803e7a
Minor fixes (see comments to the PR)
osahin Sep 1, 2017
974eef1
Minor fixes (see comments to the PR)
osahin Sep 1, 2017
4e5c729
tabs are replaced with spaces
osahin Sep 1, 2017
6e1994e
tabs are replaced with spaces
osahin Sep 1, 2017
b5cb13b
tabs are replaced with spaces
osahin Sep 1, 2017
7947a82
Merge pull request #139 from osahin/DBSCAN-3DCluster
jbsauvan Sep 1, 2017
b9be92d
Merged hgc-tpg-devel-CMSSW_9_3_0_pre4 from repository PFCal-dev with …
jbsauvan Sep 19, 2017
c61cbbc
DBSCAN with 1D sorting is implemented. The sorted-DBSCAN performs up …
osahin Sep 20, 2017
e0dfea5
OutOfBound excaption for the clustersPtrs is included
osahin Sep 21, 2017
3131221
exceptions for the clusterPtrs' range are included in the findNeighbo…
osahin Sep 25, 2017
ee456ee
indexes are changed to unsinged
osahin Sep 25, 2017
5e8c913
Merge pull request #141 from osahin/DBSCAN-sorted
jbsauvan Sep 25, 2017
555a966
Optimized + extended HGC shower shape variables
tstreble Oct 6, 2017
547cda1
Adressed style comments + fixed eMax computation
tstreble Oct 7, 2017
8f53fb1
Adressed style comments
tstreble Oct 8, 2017
b2ccbbe
Merge pull request #142 from tstreble/ShowerShape_HGC
jbsauvan Oct 8, 2017
a58b412
Modified See, Spp and Szz computations
tstreble Oct 8, 2017
f915247
Typo fix
tstreble Oct 8, 2017
052a859
Added SigmaRR computation to shower shape variables
tstreble Oct 9, 2017
598e9c2
Stored sigmaRR for C3d objects + HGC ntuples
tstreble Oct 9, 2017
2cd2cfb
Merge branch 'ShowerShape_HGC' of https://github.com/tstreble/cmssw i…
tstreble Oct 9, 2017
b3fe6ba
Changed tab
tstreble Oct 9, 2017
7d67ea3
Merge pull request #143 from tstreble/ShowerShape_HGC
jbsauvan Oct 9, 2017
c30af6a
Fixed Spp variables
tstreble Oct 10, 2017
100fe46
Merge pull request #144 from tstreble/ShowerShape_HGC
jbsauvan Oct 10, 2017
332e614
Merged hgc-tpg-devel-CMSSW_9_4_0_pre1 from repository PFCal-dev with …
jbsauvan Oct 11, 2017
beebddb
Update relval file in test file
jbsauvan Oct 11, 2017
fa90bc9
Add possibility to disconnect layers for the trigger
jbsauvan Aug 29, 2017
fc9e25e
Remove default disconnected layers
jbsauvan Oct 11, 2017
ed87015
Merge pull request #145 from jbsauvan/disconnected-layer-940pre2
jbsauvan Oct 11, 2017
27be0f6
Add sim energy in TC ntuple
jbsauvan Oct 12, 2017
77202c1
added calibration coefficient from matrix inversion
mastrolorenzo Oct 12, 2017
48966a8
fix in coefficient param file
mastrolorenzo Oct 12, 2017
a88dfc0
cleaning in coefficients config file
mastrolorenzo Oct 12, 2017
fec3b72
rearranging constants and parameters
mastrolorenzo Oct 13, 2017
3788c15
coded back 50 evt as default number of processed events in testHGCalL…
mastrolorenzo Oct 13, 2017
0c7346c
update of GenTau ntuplizer to properly identify tau decays for event …
mastrolorenzo Oct 14, 2017
85bb2b6
Added variables in HGC ntuples
tstreble Oct 21, 2017
7bd4831
Aligned lines
tstreble Oct 21, 2017
dca81c9
update calibration coefficients (estimated in pT range 10-150 GeV for…
mastrolorenzo Oct 22, 2017
19bfef7
minor fixing
mastrolorenzo Oct 22, 2017
9aad5af
Minor fixes
tstreble Oct 22, 2017
bfeeaed
update in HGCalMulticlusteringImpl.cc to get eta,phi directly from ce…
mastrolorenzo Oct 22, 2017
a0a50f5
Merge pull request #149 from mastrolorenzo/clustering_withBH_940pre2
jbsauvan Oct 22, 2017
23ba449
Merge pull request #151 from tstreble/HGC_L1Ntuple_update
jbsauvan Oct 22, 2017
fe3113b
Add links between trigger cells and clusters
jbsauvan Oct 13, 2017
8c0b2cc
Add variables in ntuples
jbsauvan Oct 30, 2017
25650cd
Change parameter names
jbsauvan Oct 30, 2017
fa10501
Merge branch 'hgc-tpg-devel-CMSSW_9_4_0_pre2' into ntuples-updates
jbsauvan Oct 30, 2017
e696e7a
Fix ntuple variable clear
jbsauvan Oct 30, 2017
481009f
Merge pull request #148 from jbsauvan/ntuples-updates
jbsauvan Oct 30, 2017
d361463
Add new shower shape variables for e/g id
jbsauvan Oct 30, 2017
1db2895
Merge pull request #154 from jbsauvan/shower-shapes-updates
jbsauvan Oct 31, 2017
30aa251
Fix variable names conflict
jbsauvan Oct 31, 2017
edb5262
Merge pull request #156 from jbsauvan/fix-variable-name
jbsauvan Oct 31, 2017
5eb1a6c
Separate trigger cell threshold and clustering threshold
jbsauvan Nov 3, 2017
118cd2e
Merge pull request #160 from jbsauvan/tc-threshold
jbsauvan Nov 3, 2017
fa56bdc
Add trigger layer index in geometry
jbsauvan Nov 17, 2017
88f5e7c
Switch to half layers in EE by default
jbsauvan Nov 17, 2017
b23167d
Merge pull request #161 from jbsauvan/activate-halflayers
jbsauvan Nov 17, 2017
35bb0f6
Merge hgc-tpg-devel-CMSSW_9_4_0_pre2
jbsauvan Dec 14, 2017
8c67144
Drop incompatible input branches
jbsauvan Dec 14, 2017
4479044
Cleaning
jbsauvan Dec 15, 2017
41c05be
Add trigger tools with layer number utility
jbsauvan Dec 20, 2017
76dcdb9
Cleaning
jbsauvan Dec 20, 2017
c87a8d9
Use functor for sigmaXX
jbsauvan Dec 20, 2017
ca6c0a1
Add zero division checks
jbsauvan Dec 20, 2017
56b783f
Add zero division checks
jbsauvan Dec 20, 2017
f1f0db6
DBSCAN modification: \!merged condition encapsulates \!visited
osahin Jan 15, 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
49 changes: 48 additions & 1 deletion DataFormats/L1THGCal/interface/HGCalClusterT.h
Expand Up @@ -95,6 +95,7 @@ namespace l1t
double seedMipPt() const { return seedMipPt_; }
uint32_t detId() const { return detId_.rawId(); }


/* distance in 'cm' */
double distance( const l1t::HGCalTriggerCell &tc ) const
{
Expand Down Expand Up @@ -139,8 +140,38 @@ namespace l1t
uint32_t subdetId() const {return detId_.subdetId();}
uint32_t layer() const {return detId_.layer();}
int32_t zside() const {return detId_.zside();}



//shower shape

int showerLength() const { return showerLength_; }
int coreShowerLength() const { return coreShowerLength_; }
int firstLayer() const { return firstLayer_; }
int maxLayer() const { return maxLayer_; }
float eMax() const { return eMax_; }
float sigmaEtaEtaMax() const { return sigmaEtaEtaMax_; }
float sigmaPhiPhiMax() const { return sigmaPhiPhiMax_; }
float sigmaEtaEtaTot() const { return sigmaEtaEtaTot_; }
float sigmaPhiPhiTot() const { return sigmaPhiPhiTot_; }
float sigmaZZ() const { return sigmaZZ_; }
float sigmaRRTot() const { return sigmaRRTot_; }
float sigmaRRMax() const { return sigmaRRMax_; }
float sigmaRRMean() const { return sigmaRRMean_; }

void set_showerLength(int showerLength) { showerLength_ = showerLength;}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the getters aren't prepended with "get_", the setters can omit the "set_" as well (not too important, but just for consistency)

void set_coreShowerLength(int coreShowerLength) { coreShowerLength_ = coreShowerLength;}
void set_firstLayer(int firstLayer) { firstLayer_ = firstLayer;}
void set_maxLayer(int maxLayer) { maxLayer_ = maxLayer;}
void set_eMax(float eMax) { eMax_ = eMax;}
void set_sigmaEtaEtaMax(float sigmaEtaEtaMax) { sigmaEtaEtaMax_ = sigmaEtaEtaMax;}
void set_sigmaEtaEtaTot(float sigmaEtaEtaTot) { sigmaEtaEtaTot_ = sigmaEtaEtaTot;}
void set_sigmaPhiPhiMax(float sigmaPhiPhiMax) { sigmaPhiPhiMax_ = sigmaPhiPhiMax;}
void set_sigmaPhiPhiTot(float sigmaPhiPhiTot) { sigmaPhiPhiTot_ = sigmaPhiPhiTot;}
void set_sigmaRRMax(float sigmaRRMax) { sigmaRRMax_ = sigmaRRMax;}
void set_sigmaRRTot(float sigmaRRTot) { sigmaRRTot_ = sigmaRRTot;}
void set_sigmaRRMean(float sigmaRRMean) { sigmaRRMean_ = sigmaRRMean;}
void set_sigmaZZ(float sigmaZZ) { sigmaZZ_ = sigmaZZ;}

/* operators */
bool operator<(const HGCalClusterT<C>& cl) const {return mipPt() < cl.mipPt();}
bool operator>(const HGCalClusterT<C>& cl) const { return cl<*this; }
Expand All @@ -158,6 +189,22 @@ namespace l1t
double mipPt_;
double seedMipPt_;

//shower shape

int showerLength_;
int coreShowerLength_;
int firstLayer_;
int maxLayer_;
float eMax_;
float sigmaEtaEtaMax_;
float sigmaPhiPhiMax_;
float sigmaRRMax_;
float sigmaEtaEtaTot_;
float sigmaPhiPhiTot_;
float sigmaRRTot_;
float sigmaRRMean_;
float sigmaZZ_;

ClusterShapes shapes_;

};
Expand Down
15 changes: 10 additions & 5 deletions DataFormats/L1THGCal/src/classes_def.xml
@@ -1,4 +1,3 @@

<lcgdict>
<class name="l1t::HGCFETriggerDigi" ClassVersion="10">
<version ClassVersion="10" checksum="3197268020"/>
Expand All @@ -21,16 +20,22 @@
<class name="edm::Wrapper<l1t::HGCalTowerBxCollection>"/>

<class name="l1t::HGCalClusterT<l1t::HGCalTriggerCell>" />
<class name="l1t::HGCalCluster" ClassVersion="10">
<version ClassVersion="10" checksum="607544984"/>
<class name="l1t::HGCalCluster" ClassVersion="13">
<version ClassVersion="13" checksum="3397489079"/>
<version ClassVersion="12" checksum="623703096"/>
<version ClassVersion="11" checksum="354623225"/>
<version ClassVersion="10" checksum="607544984"/>
</class>
<class name="std::vector<l1t::HGCalCluster>" />
<class name="l1t::HGCalClusterBxCollection"/>
<class name="edm::Wrapper<l1t::HGCalClusterBxCollection>"/>

<class name="l1t::HGCalClusterT<l1t::HGCalCluster>" />
<class name="l1t::HGCalMulticluster" ClassVersion="10">
<version ClassVersion="10" checksum="1878482802"/>
<class name="l1t::HGCalMulticluster" ClassVersion="13">
<version ClassVersion="13" checksum="816077951"/>
<version ClassVersion="12" checksum="4221677522"/>
<version ClassVersion="11" checksum="1508179045"/>
<version ClassVersion="10" checksum="1878482802"/>
</class>
<class name="std::vector<l1t::HGCalMulticluster>" />
<class name="l1t::HGCalMulticlusterBxCollection"/>
Expand Down
1 change: 1 addition & 0 deletions L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h
Expand Up @@ -62,6 +62,7 @@ class HGCalTriggerGeometryBase

virtual bool validTriggerCell( const unsigned trigger_cell_id) const = 0;
virtual bool disconnectedModule(const unsigned module_id) const = 0;
virtual unsigned triggerLayer(const unsigned id) const = 0;

protected:
void setCaloGeometry(const edm::ESHandle<CaloGeometry>& geom) {calo_geometry_=geom;}
Expand Down
Expand Up @@ -139,6 +139,7 @@ class HGCalTriggerGeometryGenericMapping : public HGCalTriggerGeometryBase {

bool validTriggerCell( const unsigned trigger_cell_det_id ) const final;
bool disconnectedModule(const unsigned module_id) const final;
unsigned triggerLayer(const unsigned id) const final;

protected:
geom_map cells_to_trigger_cells_;
Expand Down
Expand Up @@ -6,6 +6,9 @@
#include "DataFormats/L1THGCal/interface/HGCalMulticluster.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

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

class HGCalMulticlusteringImpl{

public:
Expand All @@ -16,14 +19,38 @@ class HGCalMulticlusteringImpl{
const l1t::HGCalMulticluster & mclu,
double dR ) const;

void clusterize( const edm::PtrVector<l1t::HGCalCluster> & clustersPtr,
l1t::HGCalMulticlusterBxCollection & multiclusters);
void clusterizeDR( const edm::PtrVector<l1t::HGCalCluster> & clustersPtr,
l1t::HGCalMulticlusterBxCollection & multiclusters,
const HGCalTriggerGeometryBase & triggerGeometry
);

void clusterizeDBSCAN( const edm::PtrVector<l1t::HGCalCluster> & clustersPtr,
l1t::HGCalMulticlusterBxCollection & multiclusters,
const HGCalTriggerGeometryBase & triggerGeometry
);

private:

void findNeighbor( const std::vector<std::pair<unsigned int,double>>& rankedList,
unsigned int searchInd,
const edm::PtrVector<l1t::HGCalCluster> & clustersPtr,
std::vector<unsigned int>& neigbors);

double dr_;
double ptC3dThreshold_;
double calibSF_;
std::string multiclusterAlgoType_;
double distDbscan_ = 0.005;
unsigned minNDbscan_ = 3;
std::vector<double> layerWeights_;
bool applyLayerWeights_;

HGCalShowerShape shape_;

static const int kLayersEE_=28;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the reco algorithms, we prefer to get these values from the geometry/topology classes (rather than hardcoding them). Are those or something similar available for L1T classes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A class HGCalTriggerTools has been added. Now the values are extracted from the geometry and there is no more replicated hardcoding.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks!

static const int kLayersFH_=12;
static const int kLayersBH_=12;

};

#endif
58 changes: 58 additions & 0 deletions L1Trigger/L1THGCal/interface/be_algorithms/HGCalShowerShape.h
@@ -0,0 +1,58 @@
#ifndef __L1Trigger_L1THGCal_HGCalShowerShape_h__
#define __L1Trigger_L1THGCal_HGCalShowerShape_h__
#include <vector>
#include <cmath>
#include "DataFormats/L1THGCal/interface/HGCalMulticluster.h"
#include "DataFormats/Math/interface/LorentzVector.h"
#include "L1Trigger/L1THGCal/interface/HGCalTriggerGeometryBase.h"

class HGCalShowerShape{

public:
typedef math::XYZTLorentzVector LorentzVector;

HGCalShowerShape(){}

~HGCalShowerShape(){}

int firstLayer(const l1t::HGCalMulticluster& c3d) const;
int lastLayer(const l1t::HGCalMulticluster& c3d) const;
int maxLayer(const l1t::HGCalMulticluster& c3d) const;
int showerLength(const l1t::HGCalMulticluster& c3d) const {return lastLayer(c3d)-firstLayer(c3d)+1; }//in number of layers
// Maximum number of consecutive layers in the cluster
int coreShowerLength(const l1t::HGCalMulticluster& c3d, const HGCalTriggerGeometryBase& triggerGeometry) const;

float eMax(const l1t::HGCalMulticluster& c3d) const;

float sigmaZZ(const l1t::HGCalMulticluster& c3d) const;

float sigmaEtaEtaTot(const l1t::HGCalMulticluster& c3d) const;
float sigmaEtaEtaTot(const l1t::HGCalCluster& c2d) const;
float sigmaEtaEtaMax(const l1t::HGCalMulticluster& c3d) const;

float sigmaPhiPhiTot(const l1t::HGCalMulticluster& c3d) const;
float sigmaPhiPhiTot(const l1t::HGCalCluster& c2d) const;
float sigmaPhiPhiMax(const l1t::HGCalMulticluster& c3d) const;

float sigmaRRTot(const l1t::HGCalMulticluster& c3d) const;
float sigmaRRTot(const l1t::HGCalCluster& c2d) const;
float sigmaRRMax(const l1t::HGCalMulticluster& c3d) const;
float sigmaRRMean(const l1t::HGCalMulticluster& c3d, float radius=5.) const;

private:

float meanX(const std::vector<pair<float,float> >& energy_X_tc) const;
float sigmaXX(const std::vector<pair<float,float> >& energy_X_tc, const float X_cluster) const;
float sigmaPhiPhi(const std::vector<pair<float,float> >& energy_phi_tc, const float phi_cluster) const;

static const int kLayersEE_=28;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeated hardcoding should definitely be avoided

static const int kLayersFH_=12;
static const int kLayersBH_=12;
int HGC_layer(const uint32_t subdet, const uint32_t layer) const;


};


#endif

1 change: 1 addition & 0 deletions L1Trigger/L1THGCal/plugins/BuildFile.xml
Expand Up @@ -32,5 +32,6 @@
<use name="SimDataFormats/CaloTest"/>
<use name="DataFormats/JetReco"/>
<use name="Geometry/HcalTowerAlgo"/>
<use name="SimDataFormats/PileupSummaryInfo"/>
<flags EDM_PLUGIN="1"/>
</library>
45 changes: 36 additions & 9 deletions L1Trigger/L1THGCal/plugins/be_algorithms/HGCClusterAlgo.cc
Expand Up @@ -28,6 +28,10 @@ class HGCClusterAlgo : public Algorithm<FECODEC>
dRC2d,
NNC2d
};
enum MulticlusterType{
dRC3d,
DBSCANC3d
};

public:

Expand All @@ -38,10 +42,10 @@ class HGCClusterAlgo : public Algorithm<FECODEC>
multicluster_product_( new l1t::HGCalMulticlusterBxCollection ),
calibration_( conf.getParameterSet("calib_parameters") ),
clustering_( conf.getParameterSet("C2d_parameters") ),
multiclustering_( conf.getParameterSet("C3d_parameters" ) )
multiclustering_( conf.getParameterSet("C3d_parameters" ) ),
triggercell_threshold_silicon_( conf.getParameter<double>("triggercell_threshold_silicon") ),
triggercell_threshold_scintillator_( conf.getParameter<double>("triggercell_threshold_scintillator") )
{
clustering_threshold_silicon_ = conf.getParameterSet("C2d_parameters").getParameter<double>("clustering_threshold_silicon");
clustering_threshold_scintillator_ = conf.getParameterSet("C2d_parameters").getParameter<double>("clustering_threshold_scintillator");
std::string type(conf.getParameterSet("C2d_parameters").getParameter<std::string>("clusterType"));
if(type=="dRC2d"){
clusteringAlgorithmType_ = dRC2d;
Expand All @@ -52,6 +56,16 @@ class HGCClusterAlgo : public Algorithm<FECODEC>
<< "'. Using nearest neighbor NNC2d instead.\n";
clusteringAlgorithmType_ = NNC2d;
}
std::string typeMulticluster(conf.getParameterSet("C3d_parameters").getParameter<std::string>("type_multicluster"));
if(typeMulticluster=="dRC3d"){
multiclusteringAlgoType_ = dRC3d;
}else if(typeMulticluster=="DBSCANC3d"){
multiclusteringAlgoType_ = DBSCANC3d;
}else {
edm::LogWarning("ParameterError") << "Unknown Multiclustering type '" << typeMulticluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it would be better to throw an exception in this case?

<< "'. Using Cone Algorithm instead.\n";
multiclusteringAlgoType_ = dRC3d;
}

}

Expand Down Expand Up @@ -95,8 +109,9 @@ class HGCClusterAlgo : public Algorithm<FECODEC>

/* algorithm type */
ClusterType clusteringAlgorithmType_;
double clustering_threshold_silicon_;
double clustering_threshold_scintillator_;
double triggercell_threshold_silicon_;
double triggercell_threshold_scintillator_;
MulticlusterType multiclusteringAlgoType_;
};


Expand All @@ -122,8 +137,8 @@ void HGCClusterAlgo<FECODEC,DATA>::run(const l1t::HGCFETriggerDigiCollection & c
{
l1t::HGCalTriggerCell calibratedtriggercell( triggercell );
calibration_.calibrateInGeV( calibratedtriggercell);
double clustering_threshold = (triggercell.subdetId()==HGCHEB ? clustering_threshold_scintillator_ : clustering_threshold_silicon_);
if(calibratedtriggercell.mipPt()<clustering_threshold) continue;
double triggercell_threshold = (triggercell.subdetId()==HGCHEB ? triggercell_threshold_scintillator_ : triggercell_threshold_silicon_);
if(calibratedtriggercell.mipPt()<triggercell_threshold) continue;
trgcell_product_->push_back( 0, calibratedtriggercell );
}

Expand Down Expand Up @@ -169,12 +184,24 @@ void HGCClusterAlgo<FECODEC,DATA>::run(const l1t::HGCFETriggerDigiCollection & c
clustersPtrs.push_back(ptr);
}

/* call to multiclustering */
multiclustering_.clusterize( clustersPtrs, *multicluster_product_ );
/* call to multiclustering and compute shower shape*/
switch(multiclusteringAlgoType_){
case dRC3d :
multiclustering_.clusterizeDR( clustersPtrs, *multicluster_product_, *triggerGeometry_);
break;
case DBSCANC3d:
multiclustering_.clusterizeDBSCAN( clustersPtrs, *multicluster_product_, *triggerGeometry_);
break;
default:
// Should not happen, clustering type checked in constructor
break;
}

/* retrieve the orphan handle to the multiclusters collection and put the collection in the event */
multiclustersHandle = evt.put( std::move( multicluster_product_ ), "cluster3D");



}

typedef HGCClusterAlgo<HGCalTriggerCellBestChoiceCodec, HGCalTriggerCellBestChoiceCodec::data_type> HGCClusterAlgoBestChoice;
Expand Down
Expand Up @@ -36,6 +36,7 @@ class HGCalTriggerGeometryHexImp2 : public HGCalTriggerGeometryBase

bool validTriggerCell( const unsigned ) const final;
bool disconnectedModule(const unsigned) const final;
unsigned triggerLayer(const unsigned) const final;

private:
edm::FileInPath l1tCellsMapping_;
Expand Down Expand Up @@ -773,6 +774,14 @@ disconnectedModule(const unsigned module_id) const
return false;
}


unsigned
HGCalTriggerGeometryHexImp2::
triggerLayer(const unsigned id) const
{
return HGCalDetId(id).layer();
}

bool
HGCalTriggerGeometryHexImp2::
validTriggerCellFromCells(const unsigned trigger_cell_id) const
Expand Down