Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RecHit map and CaloParticle-LayerCluster associator #29844

Merged
merged 48 commits into from May 26, 2020
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1e5eaff
First Skeleton
rovere Sep 23, 2019
52c4dbd
Implement one association. It compiles.
rovere Sep 23, 2019
0e8864e
Code restructuring.
rovere Sep 24, 2019
bc9aca8
Implement both Associations.
rovere Sep 24, 2019
38f74b9
Initialize the AssociationMap with EDProductGetter.
rovere Sep 24, 2019
9c0eb23
Add skeleton of configuration.
rovere Sep 24, 2019
ac5b114
Add HGCalRecHitMapProducer
rovere Sep 24, 2019
d48b117
Merge branch rovere/HGCalAssociators into HGCalAssociators-merge
lecriste Apr 22, 2020
137ad0a
Add Associator producer in ValidationHGCal sequence
lecriste Apr 22, 2020
1338319
LCAssocByEnergyScoreProducer not found
lecriste Apr 23, 2020
a79f6cd
Reorganize HGCAL Associator validation sequences
rovere Apr 24, 2020
c7e1dcd
Restore import in the right place
lecriste Apr 24, 2020
368b73f
Put Associator product into the event
lecriste Apr 25, 2020
af1fe47
Both producers implemented
lecriste Apr 27, 2020
a8d5ea8
Working code
lecriste Apr 28, 2020
41236cd
Matching score
lecriste May 1, 2020
68d1c1e
layerClusters_to_CaloParticles
lecriste May 3, 2020
09f0197
Fix LC index
lecriste May 4, 2020
296c547
Fix CP score normalisation
lecriste May 4, 2020
8e6ada4
Use correct pair element
lecriste May 4, 2020
1c2f483
Back to cPOnLayer vector
lecriste May 4, 2020
1b51dac
Put back multiClusters
lecriste May 4, 2020
d5ade06
Back to cPOnLayer vector completed
lecriste May 4, 2020
00bab1d
Comment out multiClusters_to_CaloParticles
lecriste May 5, 2020
77557a9
Fill only when LC E > 0
lecriste May 6, 2020
5313d3d
Add energy to SimToReco AssociationMap
lecriste May 7, 2020
0d8711a
cPEnergyOnLayer
lecriste May 11, 2020
5ad24dd
layerId filter
lecriste May 11, 2020
70f2ec8
Fix spurious added line
lecriste May 11, 2020
117529f
Skip zero-energy CP on layer
lecriste May 11, 2020
5e7d00d
Remove cPOnLayer
lecriste May 12, 2020
e284b25
Remove cpsInLayerCluster
lecriste May 12, 2020
90c6504
Prevent access to non-existing refs in AssociationMap
lecriste May 14, 2020
613be35
Set more conservative default value for layers number
lecriste May 14, 2020
64e9a77
Polish code - first
lecriste May 14, 2020
d9efe28
Do not expose layers parameter
lecriste May 14, 2020
a896aff
Remove code which is already in the Producer
lecriste May 14, 2020
3e3fdb8
Add const when possible
lecriste May 14, 2020
f12af7c
code-format patch
lecriste May 14, 2020
c54086b
First batch of comments
lecriste May 15, 2020
867c3d7
code-format patch 2
lecriste May 15, 2020
29e6718
Move dictionary definition
lecriste May 18, 2020
28e696b
Polish code
lecriste May 19, 2020
423d404
Added constHGCRecHit dict mapping
lecriste May 19, 2020
3a69473
make_unique
lecriste May 19, 2020
585fe4d
Polish code 2
lecriste May 21, 2020
d61c84c
code-format patch 3
lecriste May 21, 2020
fc6c8aa
Lowercase module instances
lecriste May 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
71 changes: 71 additions & 0 deletions RecoLocalCalo/HGCalRecProducers/plugins/HGCalRecHitMapProducer.cc
@@ -0,0 +1,71 @@
#define __RecoLocalCalo_HGCRecProducers_HGCalRecHitMapProducer_H__
Copy link
Contributor

@slava77 slava77 May 18, 2020

Choose a reason for hiding this comment

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

this is not a header; please remove the include guard remnant


// user include files
#include <map>

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "FWCore/ParameterSet/interface/ParameterSetDescription.h"

#include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"

class HGCalRecHitMapProducer : public edm::global::EDProducer<> {
public:
HGCalRecHitMapProducer(const edm::ParameterSet&);
~HGCalRecHitMapProducer() override {}
Copy link
Contributor

Choose a reason for hiding this comment

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

is this empty impl really needed here?

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;

private:
edm::EDGetTokenT<HGCRecHitCollection> hits_ee_token;
edm::EDGetTokenT<HGCRecHitCollection> hits_fh_token;
edm::EDGetTokenT<HGCRecHitCollection> hits_bh_token;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
edm::EDGetTokenT<HGCRecHitCollection> hits_ee_token;
edm::EDGetTokenT<HGCRecHitCollection> hits_fh_token;
edm::EDGetTokenT<HGCRecHitCollection> hits_bh_token;
const edm::EDGetTokenT<HGCRecHitCollection> hits_ee_token_;
const edm::EDGetTokenT<HGCRecHitCollection> hits_fh_token_;
const edm::EDGetTokenT<HGCRecHitCollection> hits_bh_token_;

};

DEFINE_FWK_MODULE(HGCalRecHitMapProducer);

HGCalRecHitMapProducer::HGCalRecHitMapProducer(const edm::ParameterSet& ps) {
hits_ee_token = consumes<HGCRecHitCollection>(ps.getParameter<edm::InputTag>("HGCEEInput"));
hits_fh_token = consumes<HGCRecHitCollection>(ps.getParameter<edm::InputTag>("HGCFHInput"));
hits_bh_token = consumes<HGCRecHitCollection>(ps.getParameter<edm::InputTag>("HGCBHInput"));
produces<std::map<DetId, const HGCRecHit*>>();
Copy link
Contributor

Choose a reason for hiding this comment

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

#include <map> at the top

}

void HGCalRecHitMapProducer::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;

desc.add<edm::InputTag>("HGCEEInput", edm::InputTag("HGCalRecHit", "HGCEERecHits"));
desc.add<edm::InputTag>("HGCFHInput", edm::InputTag("HGCalRecHit", "HGCHEFRecHits"));
desc.add<edm::InputTag>("HGCBHInput", edm::InputTag("HGCalRecHit", "HGCHEBRecHits"));
Copy link
Contributor

Choose a reason for hiding this comment

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

is "HGC" prefix needed? can this be confused with something else?
If not ->

Suggested change
desc.add<edm::InputTag>("HGCEEInput", edm::InputTag("HGCalRecHit", "HGCEERecHits"));
desc.add<edm::InputTag>("HGCFHInput", edm::InputTag("HGCalRecHit", "HGCHEFRecHits"));
desc.add<edm::InputTag>("HGCBHInput", edm::InputTag("HGCalRecHit", "HGCHEBRecHits"));
desc.add<edm::InputTag>("EEInput", {"HGCalRecHit", "HGCEERecHits"});
desc.add<edm::InputTag>("FHInput", {"HGCalRecHit", "HGCHEFRecHits"});
desc.add<edm::InputTag>("BHInput", {"HGCalRecHit", "HGCHEBRecHits"});

descriptions.add("hgcalRecHitMapProducer", desc);
}

void HGCalRecHitMapProducer::produce(edm::StreamID, edm::Event& evt, const edm::EventSetup& es) const {
std::unique_ptr<std::map<DetId, const HGCRecHit*>> hitMap(new std::map<DetId, const HGCRecHit*>);
Copy link
Contributor

Choose a reason for hiding this comment

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

use auto ... = make_unique<...>(...) pattern

edm::Handle<HGCRecHitCollection> ee_hits;
edm::Handle<HGCRecHitCollection> fh_hits;
edm::Handle<HGCRecHitCollection> bh_hits;

evt.getByToken(hits_ee_token, ee_hits);
evt.getByToken(hits_fh_token, fh_hits);
evt.getByToken(hits_bh_token, bh_hits);
Copy link
Contributor

Choose a reason for hiding this comment

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

a shorter variant:

Suggested change
edm::Handle<HGCRecHitCollection> ee_hits;
edm::Handle<HGCRecHitCollection> fh_hits;
edm::Handle<HGCRecHitCollection> bh_hits;
evt.getByToken(hits_ee_token, ee_hits);
evt.getByToken(hits_fh_token, fh_hits);
evt.getByToken(hits_bh_token, bh_hits);
const auto& ee_hits = evt.get(hits_ee_token);
const auto& fh_hits = evt.get(hits_fh_token);
const auto& bh_hits = evt.get(hits_bh_token);

for (const auto& hit : *ee_hits.product()) {
hitMap->emplace(hit.detid(), &hit);
}

for (const auto& hit : *fh_hits.product()) {
hitMap->emplace(hit.detid(), &hit);
}

for (const auto& hit : *bh_hits.product()) {
hitMap->emplace(hit.detid(), &hit);
}
evt.put(std::move(hitMap));
}
4 changes: 4 additions & 0 deletions RecoLocalCalo/HGCalRecProducers/src/classes.h
@@ -0,0 +1,4 @@
#include "DataFormats/Common/interface/Wrapper.h"

// Add includes for your classes here
#include "DataFormats/HGCRecHit/interface/HGCRecHitCollections.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be removed?
This is already included in DataFormats/HGCRecHit/src/classes.h together with the dictionaries

5 changes: 5 additions & 0 deletions RecoLocalCalo/HGCalRecProducers/src/classes_def.xml
@@ -0,0 +1,5 @@
<lcgdict>
<class name="std::map<DetId,const HGCRecHit*>" persistent="false"/>
<class name="edm::Wrapper<std::map<DetId,const HGCRecHit*>>" persistent="false"/>
<class name="std::pair<const DetId,const HGCRecHit*>" />
</lcgdict>
Copy link
Contributor

Choose a reason for hiding this comment

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

If I understand (well, guess actually) the meaning of the lostDefs complaing, these dictionaries should be defined in the package where HGCRecHit is defined, i.e. in DataFormats/HGCRecHit.

7 changes: 7 additions & 0 deletions SimCalorimetry/HGCalAssociatorProducers/plugins/BuildFile.xml
@@ -0,0 +1,7 @@
<use name="FWCore/Framework"/>
<use name="FWCore/PluginManager"/>
<use name="FWCore/ParameterSet"/>
<use name="SimDataFormats/Associations"/>
<use name="RecoLocalCalo/HGCalRecAlgos"/>
Copy link
Contributor

Choose a reason for hiding this comment

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

@civanch @slava77 is Reco dependence in a Sim package allowed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

A producer/plugin is an end-point in dependencies.
So, there's likely not much harm.
Some reduction in dependencies may be possible, but for now this isn't changing what's already done elsewhere (there was a dependence of Validation on HGCalRecAlgos)

<flags EDM_PLUGIN="1"/>

Large diffs are not rendered by default.

@@ -0,0 +1,68 @@
// Original Author: Marco Rovere

#include <vector>
#include <map>
#include <unordered_map>
#include <memory> // shared_ptr

#include "DataFormats/ForwardDetId/interface/HGCalDetId.h"
#include "DataFormats/HGCRecHit/interface/HGCRecHit.h"
#include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociator.h"
#include "RecoLocalCalo/HGCalRecAlgos/interface/RecHitTools.h"

namespace edm {
class EDProductGetter;
}

namespace hgcal {
struct detIdInfoInCluster {
bool operator==(const detIdInfoInCluster &o) const { return clusterId == o.clusterId; };
long unsigned int clusterId;
float fraction;
detIdInfoInCluster(long unsigned int cId, float fr) {
clusterId = cId;
fraction = fr;
}
};

struct detIdInfoInMultiCluster {
bool operator==(const detIdInfoInMultiCluster &o) const { return multiclusterId == o.multiclusterId; };
unsigned int multiclusterId;
long unsigned int clusterId;
float fraction;
};

struct caloParticleOnLayer {
unsigned int caloParticleId;
float energy = 0;
std::vector<std::pair<DetId, float>> hits_and_fractions;
std::unordered_map<int, std::pair<float, float>> layerClusterIdToEnergyAndScore;
};

typedef std::vector<std::vector<std::pair<unsigned int, float>>> layerClusterToCaloParticle;
typedef std::vector<std::vector<hgcal::caloParticleOnLayer>> caloParticleToLayerCluster;
typedef std::tuple<layerClusterToCaloParticle, caloParticleToLayerCluster> association;
} // namespace hgcal

class LayerClusterAssociatorByEnergyScoreImpl : public hgcal::LayerClusterToCaloParticleAssociatorBaseImpl {
public:
explicit LayerClusterAssociatorByEnergyScoreImpl(edm::EDProductGetter const &,
bool,
std::shared_ptr<hgcal::RecHitTools>,
const std::map<DetId, const HGCRecHit *> *&);

hgcal::RecoToSimCollection associateRecoToSim(const edm::Handle<reco::CaloClusterCollection> &cCH,
const edm::Handle<CaloParticleCollection> &cPCH) const override;

hgcal::SimToRecoCollection associateSimToReco(const edm::Handle<reco::CaloClusterCollection> &cCH,
const edm::Handle<CaloParticleCollection> &cPCH) const override;

private:
const bool hardScatterOnly_;
std::shared_ptr<hgcal::RecHitTools> recHitTools_;
const std::map<DetId, const HGCRecHit *> *hitMap_;
unsigned layers_;
edm::EDProductGetter const *productGetter_;
hgcal::association makeConnections(const edm::Handle<reco::CaloClusterCollection> &cCH,
const edm::Handle<CaloParticleCollection> &cPCH) const;
};
@@ -0,0 +1,66 @@
// Original author: Marco Rovere

// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/global/EDProducer.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/EDGetToken.h"

#include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociator.h"
#include "LayerClusterAssociatorByEnergyScoreImpl.h"

class LayerClusterAssociatorByEnergyScoreProducer : public edm::global::EDProducer<> {
public:
explicit LayerClusterAssociatorByEnergyScoreProducer(const edm::ParameterSet &);
~LayerClusterAssociatorByEnergyScoreProducer() override;

static void fillDescriptions(edm::ConfigurationDescriptions &descriptions);

private:
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
edm::EDGetTokenT<std::map<DetId, const HGCRecHit *>> hitMapToken_;
const bool hardScatterOnly_;
std::shared_ptr<hgcal::RecHitTools> rhtools_;
};

LayerClusterAssociatorByEnergyScoreProducer::LayerClusterAssociatorByEnergyScoreProducer(const edm::ParameterSet &ps)
: hitMapToken_(consumes<std::map<DetId, const HGCRecHit *>>(ps.getParameter<edm::InputTag>("hitMapTag"))),
hardScatterOnly_(ps.getParameter<bool>("hardScatterOnly")) {
rhtools_.reset(new hgcal::RecHitTools());

// Register the product
produces<hgcal::LayerClusterToCaloParticleAssociator>();
}

LayerClusterAssociatorByEnergyScoreProducer::~LayerClusterAssociatorByEnergyScoreProducer() {}

void LayerClusterAssociatorByEnergyScoreProducer::produce(edm::StreamID,
edm::Event &iEvent,
const edm::EventSetup &es) const {
rhtools_->getEventSetup(es);
edm::Handle<std::map<DetId, const HGCRecHit *>> hitMapHandle;
iEvent.getByToken(hitMapToken_, hitMapHandle);
const std::map<DetId, const HGCRecHit *> *hitMap = &*hitMapHandle;

std::unique_ptr<hgcal::LayerClusterToCaloParticleAssociatorBaseImpl> impl(
Copy link
Contributor

Choose a reason for hiding this comment

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

use make_unique (avoid "new ")

Copy link
Contributor

Choose a reason for hiding this comment

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

to reduce verbosity, the code can be further simplified like this:

auto impl = std::make_unique<LayerClusterAssociatorByEnergyScoreImpl>(iEvent.productGetter(), hardScatterOnly_, rhtools_, hitMap);

std::make_unique<LayerClusterAssociatorByEnergyScoreImpl>(
iEvent.productGetter(), hardScatterOnly_, rhtools_, hitMap));
std::unique_ptr<hgcal::LayerClusterToCaloParticleAssociator> toPut(
Copy link
Contributor

Choose a reason for hiding this comment

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

use auto ... = make_unique<...>(...) pattern

std::make_unique<hgcal::LayerClusterToCaloParticleAssociator>(std::move(impl)));
iEvent.put(std::move(toPut));
}

void LayerClusterAssociatorByEnergyScoreProducer::fillDescriptions(edm::ConfigurationDescriptions &cfg) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("hitMapTag", edm::InputTag("HGCRecHitMapProducer"));
desc.add<bool>("hardScatterOnly", true);

cfg.add("layerClusterAssociatorByEnergyScore", desc);
}

//define this as a plug-in
DEFINE_FWK_MODULE(LayerClusterAssociatorByEnergyScoreProducer);
@@ -0,0 +1,3 @@
from SimCalorimetry.HGCalAssociatorProducers.layerClusterAssociatorByEnergyScore_cfi import layerClusterAssociatorByEnergyScore as LCAssocByEnergyScoreProducer

from RecoLocalCalo.HGCalRecProducers.hgcalRecHitMapProducer_cfi import hgcalRecHitMapProducer as HGCRecHitMapProducer
Copy link
Contributor

Choose a reason for hiding this comment

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

this is a bit outside of reco, but still: the module instance names are expected to be start with lower case (same as the default module labels), unless there are some good reasons

2 changes: 2 additions & 0 deletions SimDataFormats/Associations/BuildFile.xml
@@ -1,5 +1,7 @@
<use name="DataFormats/Common"/>
<use name="DataFormats/RecoCandidate"/>
<use name="DataFormats/CaloRecHit"/>
<use name="SimDataFormats/CaloAnalysis"/>
<use name="clhep"/>
<export>
<lib name="1"/>
Expand Down
@@ -0,0 +1,48 @@
#ifndef SimDataFormats_Associations_LayerClusterToCaloParticleAssociator_h
#define SimDataFormats_Associations_LayerClusterToCaloParticleAssociator_h
// Original Author: Marco Rovere

// system include files
#include <memory>

// user include files

#include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociatorBaseImpl.h"

// forward declarations

namespace hgcal {

class LayerClusterToCaloParticleAssociator {
public:
LayerClusterToCaloParticleAssociator(std::unique_ptr<hgcal::LayerClusterToCaloParticleAssociatorBaseImpl>);
LayerClusterToCaloParticleAssociator() = default;
LayerClusterToCaloParticleAssociator(LayerClusterToCaloParticleAssociator &&) = default;
LayerClusterToCaloParticleAssociator &operator=(LayerClusterToCaloParticleAssociator &&) = default;
~LayerClusterToCaloParticleAssociator() = default;

// ---------- const member functions ---------------------
/// Associate a LayerCluster to CaloParticles
hgcal::RecoToSimCollection associateRecoToSim(const edm::Handle<reco::CaloClusterCollection> &cCCH,
const edm::Handle<CaloParticleCollection> &cPCH) const {
return m_impl->associateRecoToSim(cCCH, cPCH);
};

/// Associate a CaloParticle to LayerClusters
hgcal::SimToRecoCollection associateSimToReco(const edm::Handle<reco::CaloClusterCollection> &cCCH,
const edm::Handle<CaloParticleCollection> &cPCH) const {
return m_impl->associateSimToReco(cCCH, cPCH);
}

private:
LayerClusterToCaloParticleAssociator(const LayerClusterToCaloParticleAssociator &) = delete; // stop default

const LayerClusterToCaloParticleAssociator &operator=(const LayerClusterToCaloParticleAssociator &) =
delete; // stop default

// ---------- member data --------------------------------
std::unique_ptr<LayerClusterToCaloParticleAssociatorBaseImpl> m_impl;
};
} // namespace hgcal

#endif
@@ -0,0 +1,45 @@
#ifndef SimDataFormats_Associations_LayerClusterToCaloParticleAssociatorBaseImpl_h
#define SimDataFormats_Associations_LayerClusterToCaloParticleAssociatorBaseImpl_h

/** \class LayerClusterToCaloParticleAssociatorBaseImpl
*
* Base class for LayerClusterToCaloParticleAssociators. Methods take as input
* the handle of LayerClusters and the CaloParticle collections and return an
* AssociationMap (oneToManyWithQuality)
*
* \author Marco Rovere
*/

#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/Common/interface/AssociationMap.h"
#include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"

#include "SimDataFormats/CaloAnalysis/interface/CaloParticleFwd.h"

namespace hgcal {

typedef edm::AssociationMap<
edm::OneToManyWithQualityGeneric<CaloParticleCollection, reco::CaloClusterCollection, std::pair<float, float>>>
SimToRecoCollection;
typedef edm::AssociationMap<
edm::OneToManyWithQualityGeneric<reco::CaloClusterCollection, CaloParticleCollection, float>>
RecoToSimCollection;

class LayerClusterToCaloParticleAssociatorBaseImpl {
public:
/// Constructor
LayerClusterToCaloParticleAssociatorBaseImpl();
/// Destructor
virtual ~LayerClusterToCaloParticleAssociatorBaseImpl();

/// Associate a LayerCluster to CaloParticles
virtual hgcal::RecoToSimCollection associateRecoToSim(const edm::Handle<reco::CaloClusterCollection> &cCH,
const edm::Handle<CaloParticleCollection> &cPCH) const;

/// Associate a CaloParticle to LayerClusters
virtual hgcal::SimToRecoCollection associateSimToReco(const edm::Handle<reco::CaloClusterCollection> &cCH,
const edm::Handle<CaloParticleCollection> &cPCH) const;
};
} // namespace hgcal

#endif
@@ -0,0 +1,7 @@
// Original Author: Marco Rovere

#include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociator.h"

hgcal::LayerClusterToCaloParticleAssociator::LayerClusterToCaloParticleAssociator(
std::unique_ptr<hgcal::LayerClusterToCaloParticleAssociatorBaseImpl> ptr)
: m_impl(std::move(ptr)) {}
@@ -0,0 +1,19 @@
// Original Author: Marco Rovere

#include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociatorBaseImpl.h"

namespace hgcal {
LayerClusterToCaloParticleAssociatorBaseImpl::LayerClusterToCaloParticleAssociatorBaseImpl(){};
LayerClusterToCaloParticleAssociatorBaseImpl::~LayerClusterToCaloParticleAssociatorBaseImpl(){};

hgcal::RecoToSimCollection LayerClusterToCaloParticleAssociatorBaseImpl::associateRecoToSim(
const edm::Handle<reco::CaloClusterCollection> &cCCH, const edm::Handle<CaloParticleCollection> &cPCH) const {
return hgcal::RecoToSimCollection();
}

hgcal::SimToRecoCollection LayerClusterToCaloParticleAssociatorBaseImpl::associateSimToReco(
const edm::Handle<reco::CaloClusterCollection> &cCCH, const edm::Handle<CaloParticleCollection> &cPCH) const {
return hgcal::SimToRecoCollection();
}

} // namespace hgcal
3 changes: 3 additions & 0 deletions SimDataFormats/Associations/src/classes.h
Expand Up @@ -6,6 +6,7 @@
#include "SimDataFormats/Associations/interface/TrackToTrackingParticleAssociator.h"
#include "SimDataFormats/Associations/interface/VertexAssociation.h"
#include "SimDataFormats/Associations/interface/VertexToTrackingVertexAssociator.h"
#include "SimDataFormats/Associations/interface/LayerClusterToCaloParticleAssociator.h"

namespace SimDataFormats_Associations {
struct SimDataFormats_Associations {
Expand All @@ -16,6 +17,8 @@ namespace SimDataFormats_Associations {

edm::Wrapper<reco::VertexToTrackingVertexAssociator> dummy4;

edm::Wrapper<hgcal::LayerClusterToCaloParticleAssociator> dummy5;

reco::VertexSimToRecoCollection vstrc;
reco::VertexSimToRecoCollection::const_iterator vstrci;
edm::Wrapper<reco::VertexSimToRecoCollection> wvstrc;
Expand Down
3 changes: 3 additions & 0 deletions SimDataFormats/Associations/src/classes_def.xml
Expand Up @@ -9,6 +9,9 @@
<class name="reco::VertexToTrackingVertexAssociator" persistent="false"/>
<class name="edm::Wrapper<reco::VertexToTrackingVertexAssociator>" persistent="false"/>

<class name="hgcal::LayerClusterToCaloParticleAssociator" persistent="false"/>
<class name="edm::Wrapper<hgcal::LayerClusterToCaloParticleAssociator>" persistent="false"/>

<class name="reco::VertexSimToRecoCollection" >
<field name="transientMap_" transient="true"/>
</class>
Expand Down
2 changes: 1 addition & 1 deletion Validation/Configuration/python/autoValidation.py
Expand Up @@ -13,7 +13,7 @@
'miniAODValidation' : ['prevalidationMiniAOD','validationMiniAOD','validationHarvestingMiniAOD'],
'standardValidation' : ['prevalidation','validation','validationHarvesting'],
'standardValidationNoHLT' : ['prevalidationNoHLT','validationNoHLT','validationHarvestingNoHLT'],
'HGCalValidation' : ['', 'globalValidationHGCal', 'hgcalValidatorPostProcessor'],
'HGCalValidation' : ['globalPrevalidationHGCal', 'globalValidationHGCal', 'hgcalValidatorPostProcessor'],
'MTDValidation' : ['', 'globalValidationMTD', 'mtdValidationPostProcessor'],
'OuterTrackerValidation' : ['', 'globalValidationOuterTracker', 'postValidationOuterTracker'],
'ecalValidation_phase2' : ['', 'validationECALPhase2', ''],
Expand Down