Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AnalysisDataFormats/TrackInfo/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
<class name="edm::Wrapper<edm::AssociationMap<edm::OneToOne<std::vector<reco::Track>,std::vector<reco::TrackInfo>,unsigned int> > >" />

<class name="TPtoRecoTrack" ClassVersion="3">
<version ClassVersion="3" checksum="2952712808"/>
<version ClassVersion="3" checksum="1673086488"/>
</class>
<class name="edm::Wrapper<TPtoRecoTrack>"/>

<class name="std::vector<TPtoRecoTrack>"/>
<class name="edm::Wrapper<std::vector<TPtoRecoTrack> >"/>

<class name="RecoTracktoTP" ClassVersion="3">
<version ClassVersion="3" checksum="2837854068"/>
<version ClassVersion="3" checksum="3098877748"/>
</class>
<class name="edm::Wrapper<RecoTracktoTP>"/>

Expand Down
5 changes: 2 additions & 3 deletions FastSimDataFormats/NuclearInteractions/src/classes_def.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
<class name="edm::Wrapper< std::vector<FSimVertexType> >"/>
<class name="edm::Ref< std::vector<FSimVertexType>, FSimVertexType, edm::refhelper::FindUsingAdvance< std::vector<FSimVertexType>, FSimVertexType> >"/>

<class name="FSimDisplacedVertex" ClassVersion="11">
<version ClassVersion="11" checksum="2164432722"/>
<version ClassVersion="10" checksum="251560649"/>
<class name="FSimDisplacedVertex" ClassVersion="3">
<version ClassVersion="3" checksum="4095934988"/>
</class>
<class name="std::vector<FSimDisplacedVertex>"/>
<class name="edm::Wrapper< std::vector<FSimDisplacedVertex> >"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,48 +10,51 @@
#include <utility>
#include <algorithm>

/**
namespace io_v1 {
/**
* Maps FTLCluserRef to SimLayerClusterRef
*
*/
class MtdRecoClusterToSimLayerClusterAssociationMap {
public:
using key_type = FTLClusterRef;
using mapped_type = MtdSimLayerClusterRef;
using value_type = std::pair<key_type, std::vector<mapped_type>>;
using map_type = std::vector<value_type>;
using const_iterator = typename map_type::const_iterator;
using range = std::pair<const_iterator, const_iterator>;

/// Constructor
MtdRecoClusterToSimLayerClusterAssociationMap();
/// Destructor
~MtdRecoClusterToSimLayerClusterAssociationMap();

void emplace_back(const FTLClusterRef& recoClus, std::vector<MtdSimLayerClusterRef>& simClusVect) {
map_.emplace_back(recoClus, simClusVect);
}

void post_insert() { std::sort(map_.begin(), map_.end(), compare); }

bool empty() const { return map_.empty(); }
size_t size() const { return map_.size(); }

const_iterator begin() const { return map_.begin(); }
const_iterator cbegin() const { return map_.cbegin(); }
const_iterator end() const { return map_.end(); }
const_iterator cend() const { return map_.cend(); }

range equal_range(const FTLClusterRef& key) const {
return std::equal_range(map_.begin(), map_.end(), value_type(key, std::vector<MtdSimLayerClusterRef>()), compare);
}

const map_type& map() const { return map_; }

private:
static bool compare(const value_type& i, const value_type& j) { return (i.first < j.first); }

map_type map_;
};
class MtdRecoClusterToSimLayerClusterAssociationMap {
public:
using key_type = FTLClusterRef;
using mapped_type = MtdSimLayerClusterRef;
using value_type = std::pair<key_type, std::vector<mapped_type>>;
using map_type = std::vector<value_type>;
using const_iterator = typename map_type::const_iterator;
using range = std::pair<const_iterator, const_iterator>;

/// Constructor
MtdRecoClusterToSimLayerClusterAssociationMap();
/// Destructor
~MtdRecoClusterToSimLayerClusterAssociationMap();

void emplace_back(const FTLClusterRef& recoClus, std::vector<MtdSimLayerClusterRef>& simClusVect) {
map_.emplace_back(recoClus, simClusVect);
}

void post_insert() { std::sort(map_.begin(), map_.end(), compare); }

bool empty() const { return map_.empty(); }
size_t size() const { return map_.size(); }

const_iterator begin() const { return map_.begin(); }
const_iterator cbegin() const { return map_.cbegin(); }
const_iterator end() const { return map_.end(); }
const_iterator cend() const { return map_.cend(); }

range equal_range(const FTLClusterRef& key) const {
return std::equal_range(map_.begin(), map_.end(), value_type(key, std::vector<MtdSimLayerClusterRef>()), compare);
}

const map_type& map() const { return map_; }

private:
static bool compare(const value_type& i, const value_type& j) { return (i.first < j.first); }

map_type map_;
};
} // namespace io_v1
using MtdRecoClusterToSimLayerClusterAssociationMap = io_v1::MtdRecoClusterToSimLayerClusterAssociationMap;

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -10,61 +10,64 @@
#include <utility>
#include <algorithm>

/**
namespace io_v1 {
/**
* Maps MtdSimLayerCluserRef to FTLClusterRef
*
*/
class MtdSimLayerClusterToRecoClusterAssociationMap {
public:
using key_type = MtdSimLayerClusterRef;
using mapped_type = FTLClusterRef;
using value_type = std::pair<key_type, std::vector<mapped_type>>;
using map_type = std::vector<value_type>;
using const_iterator = typename map_type::const_iterator;
using range = std::pair<const_iterator, const_iterator>;

/// Constructor
MtdSimLayerClusterToRecoClusterAssociationMap();
/// Destructor
~MtdSimLayerClusterToRecoClusterAssociationMap();

void emplace_back(const MtdSimLayerClusterRef& simClus, std::vector<FTLClusterRef>& recoClusVect) {
map_.emplace_back(simClus, recoClusVect);
}

void post_insert() { std::sort(map_.begin(), map_.end(), compare); }

bool empty() const { return map_.empty(); }
size_t size() const { return map_.size(); }

const_iterator begin() const { return map_.begin(); }
const_iterator cbegin() const { return map_.cbegin(); }
const_iterator end() const { return map_.end(); }
const_iterator cend() const { return map_.cend(); }

range equal_range(const MtdSimLayerClusterRef& key) const {
return std::equal_range(map_.begin(), map_.end(), value_type(key, std::vector<FTLClusterRef>()), compare);
}

const map_type& map() const { return map_; }

private:
static bool compare(const value_type& i, const value_type& j) {
const auto& i_hAndE = (i.first)->hits_and_energies();
const auto& j_hAndE = (j.first)->hits_and_energies();

auto imin = std::min_element(i_hAndE.begin(),
i_hAndE.end(),
[](std::pair<uint64_t, float> a, std::pair<uint64_t, float> b) { return a < b; });

auto jmin = std::min_element(j_hAndE.begin(),
j_hAndE.end(),
[](std::pair<uint64_t, float> a, std::pair<uint64_t, float> b) { return a < b; });

return (*imin < *jmin);
}

map_type map_;
};
class MtdSimLayerClusterToRecoClusterAssociationMap {
public:
using key_type = MtdSimLayerClusterRef;
using mapped_type = FTLClusterRef;
using value_type = std::pair<key_type, std::vector<mapped_type>>;
using map_type = std::vector<value_type>;
using const_iterator = typename map_type::const_iterator;
using range = std::pair<const_iterator, const_iterator>;

/// Constructor
MtdSimLayerClusterToRecoClusterAssociationMap();
/// Destructor
~MtdSimLayerClusterToRecoClusterAssociationMap();

void emplace_back(const MtdSimLayerClusterRef& simClus, std::vector<FTLClusterRef>& recoClusVect) {
map_.emplace_back(simClus, recoClusVect);
}

void post_insert() { std::sort(map_.begin(), map_.end(), compare); }

bool empty() const { return map_.empty(); }
size_t size() const { return map_.size(); }

const_iterator begin() const { return map_.begin(); }
const_iterator cbegin() const { return map_.cbegin(); }
const_iterator end() const { return map_.end(); }
const_iterator cend() const { return map_.cend(); }

range equal_range(const MtdSimLayerClusterRef& key) const {
return std::equal_range(map_.begin(), map_.end(), value_type(key, std::vector<FTLClusterRef>()), compare);
}

const map_type& map() const { return map_; }

private:
static bool compare(const value_type& i, const value_type& j) {
const auto& i_hAndE = (i.first)->hits_and_energies();
const auto& j_hAndE = (j.first)->hits_and_energies();

auto imin = std::min_element(i_hAndE.begin(),
i_hAndE.end(),
[](std::pair<uint64_t, float> a, std::pair<uint64_t, float> b) { return a < b; });

auto jmin = std::min_element(j_hAndE.begin(),
j_hAndE.end(),
[](std::pair<uint64_t, float> a, std::pair<uint64_t, float> b) { return a < b; });

return (*imin < *jmin);
}

map_type map_;
};
} // namespace io_v1
using MtdSimLayerClusterToRecoClusterAssociationMap = io_v1::MtdSimLayerClusterToRecoClusterAssociationMap;

#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "SimDataFormats/Associations/interface/MtdRecoClusterToSimLayerClusterAssociationMap.h"

MtdRecoClusterToSimLayerClusterAssociationMap::MtdRecoClusterToSimLayerClusterAssociationMap() {}
namespace io_v1 {
MtdRecoClusterToSimLayerClusterAssociationMap::MtdRecoClusterToSimLayerClusterAssociationMap() {}

MtdRecoClusterToSimLayerClusterAssociationMap::~MtdRecoClusterToSimLayerClusterAssociationMap() {}
MtdRecoClusterToSimLayerClusterAssociationMap::~MtdRecoClusterToSimLayerClusterAssociationMap() {}
} // namespace io_v1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "SimDataFormats/Associations/interface/MtdSimLayerClusterToRecoClusterAssociationMap.h"

MtdSimLayerClusterToRecoClusterAssociationMap::MtdSimLayerClusterToRecoClusterAssociationMap() {}
namespace io_v1 {
MtdSimLayerClusterToRecoClusterAssociationMap::MtdSimLayerClusterToRecoClusterAssociationMap() {}

MtdSimLayerClusterToRecoClusterAssociationMap::~MtdSimLayerClusterToRecoClusterAssociationMap() {}
MtdSimLayerClusterToRecoClusterAssociationMap::~MtdSimLayerClusterToRecoClusterAssociationMap() {}
} // namespace io_v1
Loading