CMS 3D CMS Logo

List of all members | Public Member Functions
ticl::SuperclusteringDNNInputV1 Class Reference

#include <SuperclusteringDNNInputs.h>

Inheritance diagram for ticl::SuperclusteringDNNInputV1:
ticl::AbstractSuperclusteringDNNInput

Public Member Functions

std::vector< float > computeVector (ticl::Trackster const &ts_base, ticl::Trackster const &ts_toCluster) override
 
unsigned int featureCount () const override
 
std::vector< std::string > featureNames () const override
 
- Public Member Functions inherited from ticl::AbstractSuperclusteringDNNInput
virtual ~AbstractSuperclusteringDNNInput ()=default
 

Detailed Description

Definition at line 41 of file SuperclusteringDNNInputs.h.

Member Function Documentation

◆ computeVector()

std::vector< float > ticl::SuperclusteringDNNInputV1::computeVector ( ticl::Trackster const &  ts_base,
ticl::Trackster const &  ts_toCluster 
)
overridevirtual

Compute feature for seed and candidate pair

Implements ticl::AbstractSuperclusteringDNNInput.

Definition at line 20 of file SuperclusteringDNNInputs.cc.

References funct::abs(), ticl::Trackster::barycenter(), ticl::Trackster::raw_energy(), and funct::sin().

20  {
21  /* We use the barycenter for most of the variables below as that is what seems to have been used by Alessandro Tarabini,
22  but using PCA might be better.
23  (It would need retraining of the DNN)
24  */
25  return {{
26  std::abs(ts_toCluster.barycenter().Eta()) - std::abs(ts_base.barycenter().Eta()), //DeltaEtaBaryc
27  ts_toCluster.barycenter().Phi() - ts_base.barycenter().phi(), //DeltaPhiBaryc
28  ts_toCluster.raw_energy(), //multi_en
29  ts_toCluster.barycenter().Eta(), //multi_eta
30  (ts_toCluster.raw_energy() * std::sin(ts_toCluster.barycenter().Theta())), //multi_pt
31  ts_base.barycenter().Eta(), //seedEta
32  ts_base.barycenter().Phi(), //seedPhi
33  ts_base.raw_energy(), //seedEn
34  (ts_base.raw_energy() * std::sin(ts_toCluster.barycenter().Theta())), //seedPt
35  }};
36  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22

◆ featureCount()

unsigned int ticl::SuperclusteringDNNInputV1::featureCount ( ) const
inlineoverridevirtual

Reimplemented from ticl::AbstractSuperclusteringDNNInput.

Definition at line 43 of file SuperclusteringDNNInputs.h.

43 { return 9; }

◆ featureNames()

std::vector<std::string> ticl::SuperclusteringDNNInputV1::featureNames ( ) const
inlineoverridevirtual

Get name of features. Used for SuperclusteringSampleDumper branch names (inference does not use the names, only the indices) The default implementation is meant to be overriden by inheriting classes

Reimplemented from ticl::AbstractSuperclusteringDNNInput.

Definition at line 47 of file SuperclusteringDNNInputs.h.

47  {
48  return {"DeltaEtaBaryc",
49  "DeltaPhiBaryc",
50  "multi_en",
51  "multi_eta",
52  "multi_pt",
53  "seedEta",
54  "seedPhi",
55  "seedEn",
56  "seedPt"};
57  }