Skip to content

Commit a311943

Browse files
committed
feat: deprecate simID and recID accessors
1 parent 55e3e9b commit a311943

File tree

1 file changed

+44
-8
lines changed

1 file changed

+44
-8
lines changed

edm4eic.yaml

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -513,45 +513,81 @@ datatypes:
513513
Description: "Used to keep track of the correspondence between MC and reconstructed particles"
514514
Author: "S. Joosten"
515515
Members:
516-
- uint32_t simID // Index of corresponding MCParticle (position in MCParticles array)
517-
- uint32_t recID // Index of corresponding ReconstructedParticle (position in ReconstructedParticles array)
518516
- float weight // weight of this association
519517
OneToOneRelations :
520518
- edm4eic::ReconstructedParticle rec // reference to the reconstructed particle
521519
- edm4hep::MCParticle sim // reference to the Monte-Carlo particle
520+
ExtraCode:
521+
includes: "
522+
#include <edm4eic/ReconstructedParticle.h>\n
523+
#include <edm4hep/MCParticle.h>\n
524+
"
525+
declaration: "
526+
[[deprecated(\"use getSim().getObjectID().index instead\")]]
527+
int getSimID() const { return getSim().getObjectID().index; }\n
528+
[[deprecated(\"use getRec().getObjectID().index instead\")]]
529+
int getRecID() const { return getRec().getObjectID().index; }\n
530+
"
522531

523532
edm4eic::MCRecoClusterParticleAssociation:
524533
Description: "Association between a Cluster and a MCParticle"
525534
Author : "S. Joosten"
526535
Members:
527-
- uint32_t simID // Index of corresponding MCParticle (position in MCParticles array)
528-
- uint32_t recID // Index of corresponding Cluster (position in Clusters array)
529536
- float weight // weight of this association
530537
OneToOneRelations:
531538
- edm4eic::Cluster rec // reference to the cluster
532539
- edm4hep::MCParticle sim // reference to the Monte-Carlo particle
540+
ExtraCode:
541+
includes: "
542+
#include <edm4eic/Cluster.h>\n
543+
#include <edm4hep/MCParticle.h>\n
544+
"
545+
declaration: "
546+
[[deprecated(\"use getSim().getObjectID().index instead\")]]
547+
int getSimID() const { return getSim().getObjectID().index; }\n
548+
[[deprecated(\"use getRec().getObjectID().index instead\")]]
549+
int getRecID() const { return getRec().getObjectID().index; }\n
550+
"
533551

534552
edm4eic::MCRecoTrackParticleAssociation:
535553
Description: "Association between a Track and a MCParticle"
536554
Author : "S. Joosten"
537555
Members:
538-
- uint32_t simID // Index of corresponding MCParticle (position in MCParticles array)
539-
- uint32_t recID // Index of corresponding Track (position in Tracks array)
540556
- float weight // weight of this association
541557
OneToOneRelations:
542558
- edm4eic::Track rec // reference to the track
543559
- edm4hep::MCParticle sim // reference to the Monte-Carlo particle
560+
ExtraCode:
561+
includes: "
562+
#include <edm4eic/Track.h>\n
563+
#include <edm4hep/MCParticle.h>\n
564+
"
565+
declaration: "
566+
[[deprecated(\"use getSim().getObjectID().index instead\")]]
567+
int getSimID() const { return getSim().getObjectID().index; }\n
568+
[[deprecated(\"use getRec().getObjectID().index instead\")]]
569+
int getRecID() const { return getRec().getObjectID().index; }\n
570+
"
544571

545572
edm4eic::MCRecoVertexParticleAssociation:
546573
Description: "Association between a Vertex and a MCParticle"
547574
Author : "S. Joosten"
548575
Members:
549-
- uint32_t simID // Index of corresponding MCParticle (position in MCParticles array)
550-
- uint32_t recID // Index of corresponding Vertex (position in Vertices array)
551576
- float weight // weight of this association
552577
OneToOneRelations:
553578
- edm4eic::Vertex rec // reference to the vertex
554579
- edm4hep::MCParticle sim // reference to the Monte-Carlo particle
580+
ExtraCode:
581+
includes: "
582+
#include <edm4eic/Vertex.h>\n
583+
#include <edm4hep/MCParticle.h>\n
584+
"
585+
declaration: "
586+
[[deprecated(\"use getSim().getObjectID().index instead\")]]
587+
int getSimID() const { return getSim().getObjectID().index; }\n
588+
[[deprecated(\"use getRec().getObjectID().index instead\")]]
589+
int getRecID() const { return getRec().getObjectID().index; }\n
590+
"
555591

556592
edm4eic::MCRecoTrackerHitAssociation:
557593
Description: "Association between a RawTrackerHit and a SimTrackerHit"

0 commit comments

Comments
 (0)