72 std::unique_ptr<std::vector<anab::CosmicTag>> cosmicTagClusterVector(
73 new std::vector<anab::CosmicTag>);
74 std::unique_ptr<art::Assns<recob::Cluster, anab::CosmicTag>> assnOutCosmicTagCluster(
75 new art::Assns<recob::Cluster, anab::CosmicTag>);
77 art::Handle<std::vector<recob::Cluster>> Cluster_h;
79 std::vector<art::Ptr<recob::Cluster>> ClusterVec;
80 art::fill_ptr_vector(ClusterVec, Cluster_h);
86 for (
unsigned int iCluster = 0; iCluster < Cluster_h->size(); iCluster++) {
88 float cosmicScore = 0;
91 art::Ptr<recob::Cluster> tCluster = ClusterVec.at(iCluster);
94 std::vector<float> endPt1;
95 std::vector<float> endPt2;
98 bool failClusterTickCheck =
false;
100 auto const [
t0, t1] =
std::minmax(tCluster->StartTick(), tCluster->EndTick());
102 failClusterTickCheck =
true;
105 failClusterTickCheck =
true;
108 if (failClusterTickCheck) {
113 if (endPt1.size() < 1) {
114 for (
int s = 0;
s < 3;
s++) {
115 endPt1.push_back(-999);
116 endPt2.push_back(-999);
121 cosmicTagClusterVector->emplace_back(endPt1, endPt2, cosmicScore, tag_id);
123 util::CreateAssn(
e, *cosmicTagClusterVector, tCluster, *assnOutCosmicTagCluster);
130 e.put(std::move(cosmicTagClusterVector));
131 e.put(std::move(assnOutCosmicTagCluster));
std::string fClusterModuleLabel
std::pair< float, float > minmax(const float a, const float b)
minmax
enum anab::cosmic_tag_id CosmicTagID_t
bool CreateAssn(art::Event &evt, std::vector< T > const &a, art::Ptr< U > const &b, art::Assns< U, T > &assn, std::string a_instance, size_t index=UINT_MAX)
Creates a single one-to-one association.
then echo File list $list not found else cat $list while read file do echo $file sed s