Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions DataFormats/HGCalReco/BuildFile.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<use name="eigen"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/GeometryVector"/>
<use name="DataFormats/Math"/>
<use name="DataFormats/Provenance"/>
<use name="DataFormats/Portable"/>
<use name="DataFormats/Provenance"/>
<use name="DataFormats/SoATemplate"/>
<use name="DataFormats/Candidate"/>
<use name="DataFormats/Common"/>
<use name="DataFormats/TrackReco"/>
<use name="DataFormats/GeometryVector"/>
<use name="eigen"/>
<use name="HeterogeneousCore/AlpakaInterface"/>
<flags ALPAKA_BACKENDS="!serial"/>
<export>
<lib name="1"/>
</export>
20 changes: 20 additions & 0 deletions DataFormats/HGCalReco/interface/HGCalSoAClusters.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef DataFormats_HGCalReco_interface_HGCalSoAClusters_h
#define DataFormats_HGCalReco_interface_HGCalSoAClusters_h

#include "DataFormats/SoATemplate/interface/SoACommon.h"
#include "DataFormats/SoATemplate/interface/SoALayout.h"
#include "DataFormats/SoATemplate/interface/SoAView.h"

GENERATE_SOA_LAYOUT(HGCalSoAClustersLayout,
// columns: one value per element
SOA_COLUMN(float, x),
SOA_COLUMN(float, y),
SOA_COLUMN(float, z),
SOA_COLUMN(float, energy),
SOA_COLUMN(int, cells), // number of hits in the cluster
SOA_COLUMN(int, seed) // This is the index of the seed of each cluster inside the RecHit SoA
)

using HGCalSoAClusters = HGCalSoAClustersLayout<>;

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#ifndef DataFormats_HGCalReco_interface_HGCalSoAClustersHostCollection_h
#define DataFormats_HGCalReco_interface_HGCalSoAClustersHostCollection_h

#include "DataFormats/Portable/interface/PortableHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoAClusters.h"

using HGCalSoAClustersHostCollection = PortableHostCollection<HGCalSoAClusters>;

#endif // DataFormats_HGCalReco_interface_HGCalSoAClustersHostCollection_h
27 changes: 27 additions & 0 deletions DataFormats/HGCalReco/interface/HGCalSoARecHits.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#ifndef DataFormats_HGCalReco_interface_HGCalSoARecHits_h
#define DataFormats_HGCalReco_interface_HGCalSoARecHits_h

#include <Eigen/Core>
#include <Eigen/Dense>

#include "DataFormats/SoATemplate/interface/SoACommon.h"
#include "DataFormats/SoATemplate/interface/SoALayout.h"
#include "DataFormats/SoATemplate/interface/SoAView.h"

// SoA layout with dim1, dim2, weight, sigmaNoise, recHitsIndex layer and cellsCount fields
GENERATE_SOA_LAYOUT(HGCalSoARecHitsLayout,
// columns: one value per element
SOA_COLUMN(float, dim1),
SOA_COLUMN(float, dim2),
SOA_COLUMN(float, dim3),
SOA_COLUMN(int, layer),
SOA_COLUMN(float, weight),
SOA_COLUMN(float, sigmaNoise),
SOA_COLUMN(unsigned int, recHitIndex),
SOA_COLUMN(uint32_t, detid),
SOA_COLUMN(float, time),
SOA_COLUMN(float, timeError))

using HGCalSoARecHits = HGCalSoARecHitsLayout<>;

#endif // DataFormats_PortableTestObjects_interface_TestSoA_h
20 changes: 20 additions & 0 deletions DataFormats/HGCalReco/interface/HGCalSoARecHitsExtra.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef DataFormats_HGCalReco_interface_HGCalSoARecHitsExtra_h
#define DataFormats_HGCalReco_interface_HGCalSoARecHitsExtra_h

#include "DataFormats/SoATemplate/interface/SoACommon.h"
#include "DataFormats/SoATemplate/interface/SoALayout.h"
#include "DataFormats/SoATemplate/interface/SoAView.h"

// SoA layout with delta, rho, weight, nearestHigher, clusterIndex, layer, isSeed, and cellsCount fields
GENERATE_SOA_LAYOUT(HGCalSoARecHitsExtraLayout,
// columns: one value per element
SOA_COLUMN(float, delta),
SOA_COLUMN(float, rho),
SOA_COLUMN(unsigned int, nearestHigher),
SOA_COLUMN(int, clusterIndex),
SOA_COLUMN(uint8_t, isSeed),
SOA_SCALAR(unsigned int, numberOfClustersScalar))

using HGCalSoARecHitsExtra = HGCalSoARecHitsExtraLayout<>;

#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef DataFormats_HGCalReco_interface_HGCalSoARecHitsExtraHostCollection_h
#define DataFormats_HGCalReco_interface_HGCalSoARecHitsExtraHostCollection_h

#include "DataFormats/Portable/interface/PortableHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsExtra.h"

// SoA with delta, rho, weight, nearestHigher, clusterIndex, layer, isSeed, and cellsCount fields in host memory
using HGCalSoARecHitsExtraHostCollection = PortableHostCollection<HGCalSoARecHitsExtra>;

#endif // DataFormats_HGCalReco_interface_HGCalSoARecHitsExtraHostCollection_h
10 changes: 10 additions & 0 deletions DataFormats/HGCalReco/interface/HGCalSoARecHitsHostCollection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef DataFormats_HGCalReco_interface_HGCalSoARecHitsHostCollection_h
#define DataFormats_HGCalReco_interface_HGCalSoARecHitsHostCollection_h

#include "DataFormats/Portable/interface/PortableHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHits.h"

// SoA with x, y, z, id fields in host memory
using HGCalSoARecHitsHostCollection = PortableHostCollection<HGCalSoARecHits>;

#endif // DataFormats_HGCalReco_interface_HGCalSoARecHitsHostCollection_h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef DataFormats_PortableTestObjects_interface_alpaka_HGCalSoAClustersDeviceCollection_h
#define DataFormats_PortableTestObjects_interface_alpaka_HGCalSoAClustersDeviceCollection_h

#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoAClusters.h"
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE {

using HGCalSoAClustersDeviceCollection = PortableCollection<HGCalSoAClusters>;

} // namespace ALPAKA_ACCELERATOR_NAMESPACE

#endif // DataFormats_PortableTestObjects_interface_alpaka_HGCalSoAClustersDeviceCollection_h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef DataFormats_PortableTestObjects_interface_alpaka_HGCalSoARecHitsDeviceCollection_h
#define DataFormats_PortableTestObjects_interface_alpaka_HGCalSoARecHitsDeviceCollection_h

#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHits.h"
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE {

// SoA with x, y, z, id fields in device global memory
using HGCalSoARecHitsDeviceCollection = PortableCollection<HGCalSoARecHits>;

} // namespace ALPAKA_ACCELERATOR_NAMESPACE

#endif // DataFormats_PortableTestObjects_interface_alpaka_HGCalSoARecHitsDeviceCollection_h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#ifndef DataFormats_PortableTestObjects_interface_alpaka_HGCalSoARecHitsExtraDeviceCollection_h
#define DataFormats_PortableTestObjects_interface_alpaka_HGCalSoARecHitsExtraDeviceCollection_h

#include "DataFormats/Portable/interface/alpaka/PortableCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsExtra.h"
#include "HeterogeneousCore/AlpakaInterface/interface/config.h"

namespace ALPAKA_ACCELERATOR_NAMESPACE {

// SoA with delta, rho, weight, nearestHigher, clusterIndex, layer, isSeed, and cellsCount fields in device global memory
using HGCalSoARecHitsExtraDeviceCollection = PortableCollection<HGCalSoARecHitsExtra>;

} // namespace ALPAKA_ACCELERATOR_NAMESPACE

#endif // DataFormats_PortableTestObjects_interface_alpaka_HGCalSoARecHitsExtraDeviceCollection_h
7 changes: 7 additions & 0 deletions DataFormats/HGCalReco/src/alpaka/classes_cuda.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "DataFormats/Common/interface/DeviceProduct.h"
#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHits.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsExtra.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoARecHitsDeviceCollection.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoARecHitsExtraDeviceCollection.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoAClustersDeviceCollection.h"
13 changes: 13 additions & 0 deletions DataFormats/HGCalReco/src/alpaka/classes_cuda_def.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<lcgdict>
<class name="alpaka_cuda_async::HGCalSoARecHitsDeviceCollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_cuda_async::HGCalSoARecHitsDeviceCollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::HGCalSoARecHitsDeviceCollection>>" persistent="false"/>

<class name="alpaka_cuda_async::HGCalSoARecHitsExtraDeviceCollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_cuda_async::HGCalSoARecHitsExtraDeviceCollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::HGCalSoARecHitsExtraDeviceCollection>>" persistent="false"/>

<class name="alpaka_cuda_async::HGCalSoAClustersDeviceCollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_cuda_async::HGCalSoAClustersDeviceCollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_cuda_async::HGCalSoAClustersDeviceCollection>>" persistent="false"/>
</lcgdict>
7 changes: 7 additions & 0 deletions DataFormats/HGCalReco/src/alpaka/classes_rocm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "DataFormats/Common/interface/DeviceProduct.h"
#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHits.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsExtra.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoARecHitsDeviceCollection.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoARecHitsExtraDeviceCollection.h"
#include "DataFormats/HGCalReco/interface/alpaka/HGCalSoAClustersDeviceCollection.h"
13 changes: 13 additions & 0 deletions DataFormats/HGCalReco/src/alpaka/classes_rocm_def.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<lcgdict>
<class name="alpaka_rocm_async::HGCalSoARecHitsDeviceCollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_rocm_async::HGCalSoARecHitsDeviceCollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_rocm_async::HGCalSoARecHitsDeviceCollection>>" persistent="false"/>

<class name="alpaka_rocm_async::HGCalSoARecHitsExtraDeviceCollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_rocm_async::HGCalSoARecHitsExtraDeviceCollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_rocm_async::HGCalSoARecHitsExtraDeviceCollection>>" persistent="false"/>

<class name="alpaka_rocm_async::HGCalSoAClustersDeviceCollection" persistent="false"/>
<class name="edm::DeviceProduct<alpaka_rocm_async::HGCalSoAClustersDeviceCollection>" persistent="false"/>
<class name="edm::Wrapper<edm::DeviceProduct<alpaka_rocm_async::HGCalSoAClustersDeviceCollection>>" persistent="false"/>
</lcgdict>
7 changes: 7 additions & 0 deletions DataFormats/HGCalReco/src/classes.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#include "DataFormats/Portable/interface/PortableHostCollectionReadRules.h"
#include "DataFormats/Portable/interface/PortableHostObjectReadRules.h"
#include "DataFormats/HGCalReco/interface/MtdHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsExtraHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoAClustersHostCollection.h"

SET_PORTABLEHOSTCOLLECTION_READ_RULES(MtdHostCollection);
SET_PORTABLEHOSTCOLLECTION_READ_RULES(HGCalSoARecHitsHostCollection);
SET_PORTABLEHOSTCOLLECTION_READ_RULES(HGCalSoARecHitsExtraHostCollection);
SET_PORTABLEHOSTCOLLECTION_READ_RULES(HGCalSoAClustersHostCollection);
6 changes: 6 additions & 0 deletions DataFormats/HGCalReco/src/classes.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@
#include "DataFormats/HGCalReco/interface/TICLSeedingRegion.h"
#include "DataFormats/HGCalReco/interface/TICLCandidate.h"
#include "DataFormats/Common/interface/Wrapper.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHits.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsExtra.h"
#include "DataFormats/HGCalReco/interface/HGCalSoARecHitsExtraHostCollection.h"
#include "DataFormats/HGCalReco/interface/HGCalSoAClusters.h"
#include "DataFormats/HGCalReco/interface/HGCalSoAClustersHostCollection.h"
14 changes: 14 additions & 0 deletions DataFormats/HGCalReco/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,18 @@
<class name="MtdHostCollection"/>
<class name="edm::Wrapper<MtdHostCollection>" splitLevel="0"/>

<class name="HGCalSoARecHits"/>
<class name="HGCalSoARecHitsHostCollection" ClassVersion="3">
<version ClassVersion="3" checksum="1452864040"/>
</class>
<class name="edm::Wrapper<HGCalSoARecHitsHostCollection>" splitLevel="0"/>

<class name="HGCalSoARecHitsExtra"/>
<class name="HGCalSoARecHitsExtraHostCollection"/>
<class name="edm::Wrapper<HGCalSoARecHitsExtraHostCollection>" splitLevel="0"/>

<class name="HGCalSoAClusters"/>
<class name="HGCalSoAClustersHostCollection"/>
<class name="edm::Wrapper<HGCalSoAClustersHostCollection>" splitLevel="0"/>

</lcgdict>
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import FWCore.ParameterSet.Config as cms

hltHgCalLayerClustersFromSoAProducer = cms.EDProducer("HGCalLayerClustersFromSoAProducer",
detector = cms.string('EE'),
hgcalRecHitsLayerClustersSoA = cms.InputTag("hltHgcalSoARecHitsLayerClustersProducer"),
hgcalRecHitsSoA = cms.InputTag("hltHgcalSoARecHitsProducer"),
nHitsTime = cms.uint32(3),
src = cms.InputTag("hltHgcalSoALayerClustersProducer"),
timeClname = cms.string('timeLayerCluster')
)


Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import FWCore.ParameterSet.Config as cms

hltHgcalSoALayerClustersProducer = cms.EDProducer("HGCalSoALayerClustersProducer@alpaka",
alpaka = cms.untracked.PSet(
backend = cms.untracked.string('')
),
hgcalRecHitsLayerClustersSoA = cms.InputTag("hltHgcalSoARecHitsLayerClustersProducer"),
hgcalRecHitsSoA = cms.InputTag("hltHgcalSoARecHitsProducer"),
positionDeltaRho2 = cms.double(1.69),
thresholdW0 = cms.double(2.9)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the above import of HGCAL_reco_constants which are then not used in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess a cut&paste left over. Thanks for spotting this.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import FWCore.ParameterSet.Config as cms

hltHgcalSoARecHitsLayerClustersProducer = cms.EDProducer("HGCalSoARecHitsLayerClustersProducer@alpaka",
alpaka = cms.untracked.PSet(
backend = cms.untracked.string('')
),
hgcalRecHitsSoA = cms.InputTag("hltHgcalSoARecHitsProducer"),
deltac = cms.double(1.3),
kappa = cms.double(9),
outlierDeltaFactor = cms.double(2.0)
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the above import of HGCAL_reco_constants which are then not used in this file?

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import FWCore.ParameterSet.Config as cms
from ..psets.hgcal_reco_constants_cfi import HGCAL_reco_constants as HGCAL_reco_constants

hltHgcalSoARecHitsProducer = cms.EDProducer("HGCalSoARecHitsProducer@alpaka",
alpaka = cms.untracked.PSet(
backend = cms.untracked.string('')
),
dEdXweights = HGCAL_reco_constants.dEdXweights,
Copy link
Contributor

Choose a reason for hiding this comment

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

They are use (only) here!

detector = cms.string('EE'),
ecut = cms.double(3),
fcPerEle = HGCAL_reco_constants.fcPerEle,
fcPerMip = HGCAL_reco_constants.fcPerMip,
Copy link
Contributor

Choose a reason for hiding this comment

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

...here

maxNumberOfThickIndices = HGCAL_reco_constants.maxNumberOfThickIndices,
noises = HGCAL_reco_constants.noises,
recHits = cms.InputTag("HGCalRecHit","HGCEERecHits"),
thicknessCorrection = HGCAL_reco_constants.thicknessCorrection,
Copy link
Contributor

Choose a reason for hiding this comment

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

and here!!!

)

Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,33 @@
from ..modules.hgcalMergeLayerClusters_cfi import *
from ..modules.HGCalRecHit_cfi import *
from ..modules.HGCalUncalibRecHit_cfi import *
# Heterogeneous HGCAL EE layer clusters
from ..modules.hltHgcalSoARecHitsProducer_cfi import *
from ..modules.hltHgcalSoARecHitsLayerClustersProducer_cfi import *
from ..modules.hltHgcalSoALayerClustersProducer_cfi import *
from ..modules.hltHgcalLayerClustersFromSoAProducer_cfi import *

hgcalLocalRecoSequence = cms.Sequence(HGCalUncalibRecHit+HGCalRecHit+hgcalLayerClustersEE+hgcalLayerClustersHSci+hgcalLayerClustersHSi+hgcalMergeLayerClusters)
hgcalLocalRecoSequence = cms.Sequence(
HGCalUncalibRecHit+
HGCalRecHit+
hgcalLayerClustersEE+
hgcalLayerClustersHSci+
hgcalLayerClustersHSi+
hgcalMergeLayerClusters)

_hgcalLocalRecoSequence_heterogeneous = cms.Sequence(
HGCalUncalibRecHit+
HGCalRecHit+
hltHgcalSoARecHitsProducer+
hltHgcalSoARecHitsLayerClustersProducer+
hltHgcalSoALayerClustersProducer+
hltHgCalLayerClustersFromSoAProducer+
hgcalLayerClustersHSci+
hgcalLayerClustersHSi+
hgcalMergeLayerClusters)

from Configuration.ProcessModifiers.alpaka_cff import alpaka
alpaka.toReplaceWith(hgcalLocalRecoSequence, _hgcalLocalRecoSequence_heterogeneous)
alpaka.toModify(hgcalMergeLayerClusters,
layerClustersEE = cms.InputTag("hltHgCalLayerClustersFromSoAProducer"),
time_layerclustersEE = cms.InputTag("hltHgCalLayerClustersFromSoAProducer", "timeLayerCluster"))
6 changes: 6 additions & 0 deletions HLTrigger/Configuration/python/HLT_75e33_timing_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

fragment = cms.ProcessFragment("HLT")

### ACCELERATORS, in case they are needed
## Load explicitly
# One ProcessAccelerator for each accelerator technology
fragment.load("Configuration.StandardSequences.Accelerators_cff")


### Non HLT-specific event-setups
fragment.load("CalibMuon/CSCCalibration/CSCChannelMapper_cfi")
fragment.load("CalibMuon/CSCCalibration/CSCIndexer_cfi")
Expand Down
Loading