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 #34286 from CMSTrackerDPG/cpefast_wo_track_angle_3…
…0_06_2021 make CPEFast to better reproduce Generic (w/o track angle)
- Loading branch information
Showing
14 changed files
with
360 additions
and
116 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
CUDADataFormats/TrackingRecHit/interface/SiPixelHitStatus.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,15 @@ | ||
#ifndef CUDADataFormats_TrackingRecHit_interface_SiPixelHitStatus_H | ||
#define CUDADataFormats_TrackingRecHit_interface_SiPixelHitStatus_H | ||
|
||
#include <cstdint> | ||
|
||
// more information on bit fields : https://en.cppreference.com/w/cpp/language/bit_field | ||
struct SiPixelHitStatus { | ||
bool isBigX : 1; // ∈[0,1] | ||
bool isOneX : 1; // ∈[0,1] | ||
bool isBigY : 1; // ∈[0,1] | ||
bool isOneY : 1; // ∈[0,1] | ||
uint8_t qBin : 3; // ∈[0,1,...,7] | ||
}; | ||
|
||
#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
53 changes: 53 additions & 0 deletions
53
CUDADataFormats/TrackingRecHit/interface/TrackingRecHit2DReduced.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,53 @@ | ||
#ifndef CUDADataFormats_TrackingRecHit_interface_TrackingRecHit2DReduced_h | ||
#define CUDADataFormats_TrackingRecHit_interface_TrackingRecHit2DReduced_h | ||
|
||
#include "CUDADataFormats/TrackingRecHit/interface/TrackingRecHit2DSOAView.h" | ||
#include "CUDADataFormats/Common/interface/HostProduct.h" | ||
|
||
// a reduced (in content and therefore in size) version to be used on CPU for Legacy reconstruction | ||
class TrackingRecHit2DReduced { | ||
public: | ||
using HLPstorage = HostProduct<float[]>; | ||
using HIDstorage = HostProduct<uint16_t[]>; | ||
|
||
template <typename UP32, typename UP16> | ||
TrackingRecHit2DReduced(UP32&& istore32, UP16&& istore16, int nhits) | ||
: m_store32(std::move(istore32)), m_store16(std::move(istore16)), m_nHits(nhits) { | ||
auto get32 = [&](int i) { return const_cast<float*>(m_store32.get()) + i * nhits; }; | ||
|
||
// copy all the pointers (better be in sync with the producer store) | ||
|
||
m_view.m_xl = get32(0); | ||
m_view.m_yl = get32(1); | ||
m_view.m_xerr = get32(2); | ||
m_view.m_yerr = get32(3); | ||
m_view.m_chargeAndStatus = reinterpret_cast<uint32_t*>(get32(4)); | ||
m_view.m_detInd = const_cast<uint16_t*>(m_store16.get()); | ||
} | ||
|
||
// view only! | ||
TrackingRecHit2DReduced(TrackingRecHit2DSOAView const& iview, int nhits) : m_view(iview), m_nHits(nhits) {} | ||
|
||
TrackingRecHit2DReduced() = default; | ||
~TrackingRecHit2DReduced() = default; | ||
|
||
TrackingRecHit2DReduced(const TrackingRecHit2DReduced&) = delete; | ||
TrackingRecHit2DReduced& operator=(const TrackingRecHit2DReduced&) = delete; | ||
TrackingRecHit2DReduced(TrackingRecHit2DReduced&&) = default; | ||
TrackingRecHit2DReduced& operator=(TrackingRecHit2DReduced&&) = default; | ||
|
||
TrackingRecHit2DSOAView& view() { return m_view; } | ||
TrackingRecHit2DSOAView const& view() const { return m_view; } | ||
|
||
auto nHits() const { return m_nHits; } | ||
|
||
private: | ||
TrackingRecHit2DSOAView m_view; | ||
|
||
HLPstorage m_store32; | ||
HIDstorage m_store16; | ||
|
||
int m_nHits; | ||
}; | ||
|
||
#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
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 |
---|---|---|
@@ -1,8 +1,10 @@ | ||
<lcgdict> | ||
<class name="TrackingRecHit2DCPU" persistent="false"/> | ||
<class name="TrackingRecHit2DHost" persistent="false"/> | ||
<class name="cms::cuda::Product<TrackingRecHit2DGPU>" persistent="false"/> | ||
<class name="edm::Wrapper<TrackingRecHit2DCPU>" persistent="false"/> | ||
<class name="TrackingRecHit2DHost" persistent="false"/> | ||
<class name="edm::Wrapper<TrackingRecHit2DHost>" persistent="false"/> | ||
<class name="cms::cuda::Product<TrackingRecHit2DGPU>" persistent="false"/> | ||
<class name="edm::Wrapper<cms::cuda::Product<TrackingRecHit2DGPU>>" persistent="false"/> | ||
<class name="TrackingRecHit2DReduced" persistent="false"/> | ||
<class name="edm::Wrapper<TrackingRecHit2DReduced>" persistent="false"/> | ||
</lcgdict> |
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
Oops, something went wrong.