|
|
Go to the documentation of this file.
33 auto coeff =
pset.getParameter<std::vector<double>>(
"chi2Coeff");
34 auto ptMax =
pset.getParameter<
double>(
"chi2MaxPt");
35 if (coeff.size() != 2) {
37 "CAHitNtupletGeneratorOnGPU.trackQualityCuts.chi2Coeff must have 2 elements");
39 coeff[1] = (coeff[1] - coeff[0]) / log2(
ptMax);
41 {(
float)coeff[0], (
float)coeff[1], 0.f, 0.f},
45 (
float)
pset.getParameter<
double>(
"chi2Scale"),
47 {(
float)
pset.getParameter<
double>(
"tripletMaxTip"),
48 (
float)
pset.getParameter<
double>(
"tripletMinPt"),
49 (
float)
pset.getParameter<
double>(
"tripletMaxZip")},
51 {(
float)
pset.getParameter<
double>(
"quadrupletMaxTip"),
52 (
float)
pset.getParameter<
double>(
"quadrupletMinPt"),
53 (
float)
pset.getParameter<
double>(
"quadrupletMaxZip")}};
61 : m_params(
cfg.getParameter<
bool>(
"onGPU"),
62 cfg.getParameter<unsigned
int>(
"minHitsPerNtuplet"),
63 cfg.getParameter<unsigned
int>(
"maxNumberOfDoublets"),
64 cfg.getParameter<unsigned
int>(
"minHitsForSharingCut"),
65 cfg.getParameter<
bool>(
"useRiemannFit"),
66 cfg.getParameter<
bool>(
"fit5as4"),
67 cfg.getParameter<
bool>(
"includeJumpingForwardDoublets"),
68 cfg.getParameter<
bool>(
"earlyFishbone"),
69 cfg.getParameter<
bool>(
"lateFishbone"),
70 cfg.getParameter<
bool>(
"idealConditions"),
71 cfg.getParameter<
bool>(
"fillStatistics"),
72 cfg.getParameter<
bool>(
"doClusterCut"),
73 cfg.getParameter<
bool>(
"doZ0Cut"),
74 cfg.getParameter<
bool>(
"doPtCut"),
75 cfg.getParameter<
bool>(
"doSharedHitCut"),
76 cfg.getParameter<
bool>(
"dupPassThrough"),
77 cfg.getParameter<
bool>(
"useSimpleTripletCleaner"),
78 cfg.getParameter<double>(
"ptmin"),
79 cfg.getParameter<double>(
"CAThetaCutBarrel"),
80 cfg.getParameter<double>(
"CAThetaCutForward"),
81 cfg.getParameter<double>(
"hardCurvCut"),
82 cfg.getParameter<double>(
"dcaCutInnerTriplet"),
83 cfg.getParameter<double>(
"dcaCutOuterTriplet"),
85 #ifdef DUMP_GPU_TK_TUPLES
86 printf(
"TK: %s %s % %s %s %s %s %s %s %s %s %s %s %s %s %s\n",
107 if (
cs and
cs->enabled()) {
121 if (
cs and
cs->enabled()) {
140 desc.add<
double>(
"ptmin", 0.9f)->setComment(
"Cut on minimum pt");
141 desc.add<
double>(
"CAThetaCutBarrel", 0.002f)->setComment(
"Cut on RZ alignement for Barrel");
142 desc.add<
double>(
"CAThetaCutForward", 0.003f)->setComment(
"Cut on RZ alignment for Forward");
143 desc.add<
double>(
"hardCurvCut", 1.f / (0.35 * 87.f))->setComment(
"Cut on minimum curvature");
144 desc.add<
double>(
"dcaCutInnerTriplet", 0.15f)->setComment(
"Cut on origin radius when the inner hit is on BPix1");
145 desc.add<
double>(
"dcaCutOuterTriplet", 0.25f)->setComment(
"Cut on origin radius when the outer hit is on BPix1");
146 desc.add<
bool>(
"earlyFishbone",
true);
147 desc.add<
bool>(
"lateFishbone",
false);
148 desc.add<
bool>(
"idealConditions",
true);
149 desc.add<
bool>(
"fillStatistics",
false);
150 desc.add<
unsigned int>(
"minHitsPerNtuplet", 4);
152 desc.add<
unsigned int>(
"minHitsForSharingCut", 5)
153 ->setComment(
"Maximum number of hits in a tuple to clean also if the shared hit is on bpx1");
154 desc.add<
bool>(
"includeJumpingForwardDoublets",
false);
155 desc.add<
bool>(
"fit5as4",
true);
156 desc.add<
bool>(
"doClusterCut",
true);
157 desc.add<
bool>(
"doZ0Cut",
true);
158 desc.add<
bool>(
"doPtCut",
true);
159 desc.add<
bool>(
"useRiemannFit",
false)->setComment(
"true for Riemann, false for BrokenLine");
160 desc.add<
bool>(
"doSharedHitCut",
true)->setComment(
"Sharing hit nTuples cleaning");
161 desc.add<
bool>(
"dupPassThrough",
false)->setComment(
"Do not reject duplicate");
162 desc.add<
bool>(
"useSimpleTripletCleaner",
false)->setComment(
"use alternate implementation");
165 trackQualityCuts.
add<
double>(
"chi2MaxPt", 10.)->
setComment(
"max pT used to determine the pT-dependent chi2 cut");
166 trackQualityCuts.
add<std::vector<double>>(
"chi2Coeff", {0.9, 1.8})->setComment(
"chi2 at 1GeV and at ptMax above");
167 trackQualityCuts.
add<
double>(
"chi2Scale", 8.)
169 "Factor to multiply the pT-dependent chi2 cut (currently: 8 for the broken line fit, ?? for the Riemann "
171 trackQualityCuts.
add<
double>(
"tripletMinPt", 0.5)->
setComment(
"Min pT for triplets, in GeV");
172 trackQualityCuts.
add<
double>(
"tripletMaxTip", 0.3)->
setComment(
"Max |Tip| for triplets, in cm");
173 trackQualityCuts.
add<
double>(
"tripletMaxZip", 12.)->
setComment(
"Max |Zip| for triplets, in cm");
174 trackQualityCuts.
add<
double>(
"quadrupletMinPt", 0.3)->
setComment(
"Min pT for quadruplets, in GeV");
175 trackQualityCuts.
add<
double>(
"quadrupletMaxTip", 0.5)->
setComment(
"Max |Tip| for quadruplets, in cm");
176 trackQualityCuts.
add<
double>(
"quadrupletMaxZip", 12.)->
setComment(
"Max |Zip| for quadruplets, in cm");
179 "Quality cuts based on the results of the track fit:\n - apply a pT-dependent chi2 cut;\n - apply \"region "
180 "cuts\" based on the fit results (pT, Tip, Zip).");
185 cudaStream_t
stream)
const {
209 cudaDeviceSynchronize();
211 std::cout <<
"finished building pixel tracks on GPU" << std::endl;
231 if (0 == hits_d.
nHits())
247 std::cout <<
"finished building pixel tracks on CPU" << std::endl;
~CAHitNtupletGeneratorOnGPU()
TrackingRecHit2DSOAView * view()
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void allocateOnGPU(Tuples const *tuples, TupleMultiplicity const *tupleMultiplicity, OutputSoA *outputSoA)
void allocateOnGPU(int32_t nHits, cudaStream_t stream)
unique_ptr< ClusterSequence > cs
void setCounters(Counters *counters)
constexpr uint32_t maxNumberOfDoublets
uint32_t const T *__restrict__ const uint32_t *__restrict__ int32_t int Histo::index_type cudaStream_t stream
constexpr uint32_t maxNumberOfQuadruplets
void launchKernels(HitsOnCPU const &hh, TkSoA *tuples_d, cudaStream_t cudaStream)
void launchRiemannKernelsOnCPU(HitsView const *hv, uint32_t nhits, uint32_t maxNumberOfTuples)
void classifyTuples(HitsOnCPU const &hh, TkSoA *tuples_d, cudaStream_t cudaStream)
static void fillDescriptions(edm::ParameterSetDescription &desc)
void launchRiemannKernels(HitsView const *hv, uint32_t nhits, uint32_t maxNumberOfTuples, cudaStream_t cudaStream)
const uint32_t *__restrict__ const HitContainer *__restrict__ TkSoA *__restrict__ tracks
void launchBrokenLineKernels(HitsView const *hv, uint32_t nhits, uint32_t maxNumberOfTuples, cudaStream_t cudaStream)
void fillHitDetIndices(HitsView const *hv, TkSoA *tuples_d, cudaStream_t cudaStream)
cAHitNtupletGenerator::Counters Counters
PixelTrackHeterogeneous makeTuplesAsync(TrackingRecHit2DGPU const &hits_d, float bfield, cudaStream_t stream) const
static void printCounters(Counters const *counters)
CAHitNtupletGeneratorOnGPU(const edm::ParameterSet &cfg, edm::ConsumesCollector &&iC)
PixelTrackHeterogeneous makeTuples(TrackingRecHit2DCPU const &hits_d, float bfield) const
ParameterSet const & getParameterSet(ParameterSetID const &id)
TupleMultiplicity const * tupleMultiplicity() const
void launchBrokenLineKernelsOnCPU(HitsView const *hv, uint32_t nhits, uint32_t maxNumberOfTuples)
#define cudaCheck(ARG,...)
const bool useRiemannFit_
void buildDoublets(HitsOnCPU const &hh, cudaStream_t stream)
void setComment(std::string const &value)