ral 0.0.1
Loading...
Searching...
No Matches
Cluster.h
Go to the documentation of this file.
1#include <Math/Vector3D.h>
2#include <cmath>
3#include <edm4hep/CalorimeterHitCollection.h>
4#include <edm4hep/ClusterCollection.h>
5#include <iostream>
7namespace k4::ral {
8namespace Cluster {
15ROOT::VecOps::RVec<int>
16getType(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
23ROOT::VecOps::RVec<float>
24getEnergy(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
31ROOT::VecOps::RVec<float>
32getITheta(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
39ROOT::VecOps::RVec<float>
40getPhi(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
47ROOT::VecOps::RVec<float>
48getR(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
55ROOT::VecOps::RVec<float>
56getX(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
63ROOT::VecOps::RVec<float>
64getY(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
71ROOT::VecOps::RVec<float>
72getZ(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
79ROOT::VecOps::RVec<int> getType(const edm4hep::ClusterCollection &collection);
86ROOT::VecOps::RVec<float>
87getEnergy(const edm4hep::ClusterCollection &collection);
94ROOT::VecOps::RVec<float>
95getITheta(const edm4hep::ClusterCollection &collection);
102ROOT::VecOps::RVec<float> getPhi(const edm4hep::ClusterCollection &collection);
109ROOT::VecOps::RVec<float> getR(const edm4hep::ClusterCollection &collection);
116ROOT::VecOps::RVec<float> getX(const edm4hep::ClusterCollection &collection);
123ROOT::VecOps::RVec<float> getY(const edm4hep::ClusterCollection &collection);
130ROOT::VecOps::RVec<float> getZ(const edm4hep::ClusterCollection &collection);
137int printType(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
144int printEnergy(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
151int printITheta(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
158int printPhi(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
165int printR(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
172int printX(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
179int printY(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
186int printZ(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
193int printType(const edm4hep::ClusterCollection &collection);
200int printEnergy(const edm4hep::ClusterCollection &collection);
207int printITheta(const edm4hep::ClusterCollection &collection);
214int printPhi(const edm4hep::ClusterCollection &collection);
221int printR(const edm4hep::ClusterCollection &collection);
228int printX(const edm4hep::ClusterCollection &collection);
235int printY(const edm4hep::ClusterCollection &collection);
242int printZ(const edm4hep::ClusterCollection &collection);
252ROOT::VecOps::RVec<bool>
254 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
264ROOT::VecOps::RVec<bool>
266 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
276ROOT::VecOps::RVec<bool>
278 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
288ROOT::VecOps::RVec<bool>
290 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
300ROOT::VecOps::RVec<bool>
302 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
312ROOT::VecOps::RVec<bool>
314 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
324ROOT::VecOps::RVec<bool>
326 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
336ROOT::VecOps::RVec<bool>
338 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
348ROOT::VecOps::RVec<bool> maskType(LogicalOperators::ComparisonOperator op,
349 int val,
350 const edm4hep::ClusterCollection &collection);
360ROOT::VecOps::RVec<bool>
362 const edm4hep::ClusterCollection &collection);
372ROOT::VecOps::RVec<bool>
374 const edm4hep::ClusterCollection &collection);
384ROOT::VecOps::RVec<bool> maskPhi(LogicalOperators::ComparisonOperator op,
385 float val,
386 const edm4hep::ClusterCollection &collection);
396ROOT::VecOps::RVec<bool> maskR(LogicalOperators::ComparisonOperator op,
397 float val,
398 const edm4hep::ClusterCollection &collection);
408ROOT::VecOps::RVec<bool> maskX(LogicalOperators::ComparisonOperator op,
409 float val,
410 const edm4hep::ClusterCollection &collection);
420ROOT::VecOps::RVec<bool> maskY(LogicalOperators::ComparisonOperator op,
421 float val,
422 const edm4hep::ClusterCollection &collection);
432ROOT::VecOps::RVec<bool> maskZ(LogicalOperators::ComparisonOperator op,
433 float val,
434 const edm4hep::ClusterCollection &collection);
443ROOT::VecOps::RVec<edm4hep::ClusterData>
445 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
454ROOT::VecOps::RVec<edm4hep::ClusterData>
456 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
465ROOT::VecOps::RVec<edm4hep::ClusterData>
467 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
476ROOT::VecOps::RVec<edm4hep::ClusterData>
478 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
487ROOT::VecOps::RVec<edm4hep::ClusterData>
489 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
498ROOT::VecOps::RVec<edm4hep::ClusterData>
500 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
509ROOT::VecOps::RVec<edm4hep::ClusterData>
511 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
520ROOT::VecOps::RVec<edm4hep::ClusterData>
522 ROOT::VecOps::RVec<edm4hep::ClusterData> &collection);
531edm4hep::ClusterCollection
533 const edm4hep::ClusterCollection &collection);
542edm4hep::ClusterCollection
544 const edm4hep::ClusterCollection &collection);
553edm4hep::ClusterCollection
555 const edm4hep::ClusterCollection &collection);
564edm4hep::ClusterCollection selPhi(LogicalOperators::ComparisonOperator op,
565 float val,
566 const edm4hep::ClusterCollection &collection);
575edm4hep::ClusterCollection selR(LogicalOperators::ComparisonOperator op,
576 float val,
577 const edm4hep::ClusterCollection &collection);
586edm4hep::ClusterCollection selX(LogicalOperators::ComparisonOperator op,
587 float val,
588 const edm4hep::ClusterCollection &collection);
597edm4hep::ClusterCollection selY(LogicalOperators::ComparisonOperator op,
598 float val,
599 const edm4hep::ClusterCollection &collection);
608edm4hep::ClusterCollection selZ(LogicalOperators::ComparisonOperator op,
609 float val,
610 const edm4hep::ClusterCollection &collection);
618ROOT::VecOps::RVec<edm4hep::ClusterData>
619sortType(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection,
620 bool reverse = false);
628ROOT::VecOps::RVec<edm4hep::ClusterData>
629sortEnergy(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection,
630 bool reverse = false);
638ROOT::VecOps::RVec<edm4hep::ClusterData>
639sortITheta(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection,
640 bool reverse = false);
648ROOT::VecOps::RVec<edm4hep::ClusterData>
649sortPhi(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection,
650 bool reverse = false);
658ROOT::VecOps::RVec<edm4hep::ClusterData>
659sortR(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection,
660 bool reverse = false);
668ROOT::VecOps::RVec<edm4hep::ClusterData>
669sortX(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection,
670 bool reverse = false);
678ROOT::VecOps::RVec<edm4hep::ClusterData>
679sortY(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection,
680 bool reverse = false);
688ROOT::VecOps::RVec<edm4hep::ClusterData>
689sortZ(ROOT::VecOps::RVec<edm4hep::ClusterData> &collection,
690 bool reverse = false);
698edm4hep::ClusterCollection sortType(edm4hep::ClusterCollection &collection,
699 bool reverse = false);
707edm4hep::ClusterCollection sortEnergy(edm4hep::ClusterCollection &collection,
708 bool reverse = false);
716edm4hep::ClusterCollection sortITheta(edm4hep::ClusterCollection &collection,
717 bool reverse = false);
725edm4hep::ClusterCollection sortPhi(edm4hep::ClusterCollection &collection,
726 bool reverse = false);
734edm4hep::ClusterCollection sortR(edm4hep::ClusterCollection &collection,
735 bool reverse = false);
743edm4hep::ClusterCollection sortX(edm4hep::ClusterCollection &collection,
744 bool reverse = false);
752edm4hep::ClusterCollection sortY(edm4hep::ClusterCollection &collection,
753 bool reverse = false);
761edm4hep::ClusterCollection sortZ(edm4hep::ClusterCollection &collection,
762 bool reverse = false);
770ROOT::VecOps::RVec<edm4hep::ClusterData>
771getClusters(edm4hep::ClusterData &item,
772 ROOT::VecOps::RVec<edm4hep::ClusterData> &relatedCollection);
780ROOT::VecOps::RVec<edm4hep::CalorimeterHitData>
781getHits(edm4hep::ClusterData &item,
782 ROOT::VecOps::RVec<edm4hep::CalorimeterHitData> &relatedCollection);
789edm4hep::ClusterCollection getClusters(const edm4hep::Cluster &item);
796edm4hep::CalorimeterHitCollection getHits(const edm4hep::Cluster &item);
797} // namespace Cluster
798} // namespace k4::ral
ROOT::VecOps::RVec< edm4hep::ClusterData > sortPhi(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection, bool reverse)
Sort a collection of Cluster based on the value of intrinsic phi angle.
Definition Cluster.cc:896
ROOT::VecOps::RVec< edm4hep::ClusterData > sortType(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection, bool reverse)
Sort a collection of Cluster based on the value of type.
Definition Cluster.cc:863
ROOT::VecOps::RVec< float > getX(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Get x coordinate from each item in a collection of Cluster.
Definition Cluster.cc:62
ROOT::VecOps::RVec< bool > maskPhi(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Create boolean mask based on the value of intrinsic phi angle from each item in a collection of Clust...
Definition Cluster.cc:416
ROOT::VecOps::RVec< edm4hep::ClusterData > getClusters(edm4hep::ClusterData &item, ROOT::VecOps::RVec< edm4hep::ClusterData > &relatedCollection)
Get the collection of Cluster related to a Cluster.
Definition Cluster.cc:1143
ROOT::VecOps::RVec< bool > maskZ(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Create boolean mask based on the value of z coordinate from each item in a collection of Cluster.
Definition Cluster.cc:524
ROOT::VecOps::RVec< edm4hep::ClusterData > selEnergy(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Select a subgroup of Cluster based on the value of energy.
Definition Cluster.cc:773
ROOT::VecOps::RVec< bool > maskR(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Create boolean mask based on the value of distance to origin from each item in a collection of Cluste...
Definition Cluster.cc:443
ROOT::VecOps::RVec< edm4hep::ClusterData > selR(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Select a subgroup of Cluster based on the value of distance to origin.
Definition Cluster.cc:791
int printY(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Print y coordinate from each item in a collection of Cluster.
Definition Cluster.cc:244
int printR(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Print distance to origin from each item in a collection of Cluster.
Definition Cluster.cc:226
ROOT::VecOps::RVec< edm4hep::ClusterData > sortY(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection, bool reverse)
Sort a collection of Cluster based on the value of y coordinate.
Definition Cluster.cc:933
ROOT::VecOps::RVec< int > getType(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Get type from each item in a collection of Cluster.
Definition Cluster.cc:5
ROOT::VecOps::RVec< edm4hep::ClusterData > selITheta(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Select a subgroup of Cluster based on the value of intrinsic theta angle.
Definition Cluster.cc:779
ROOT::VecOps::RVec< float > getPhi(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Get intrinsic phi angle from each item in a collection of Cluster.
Definition Cluster.cc:38
ROOT::VecOps::RVec< bool > maskX(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Create boolean mask based on the value of x coordinate from each item in a collection of Cluster.
Definition Cluster.cc:470
ROOT::VecOps::RVec< edm4hep::ClusterData > sortITheta(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection, bool reverse)
Sort a collection of Cluster based on the value of intrinsic theta angle.
Definition Cluster.cc:885
ROOT::VecOps::RVec< float > getR(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Get distance to origin from each item in a collection of Cluster.
Definition Cluster.cc:49
int printType(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Print type from each item in a collection of Cluster.
Definition Cluster.cc:190
ROOT::VecOps::RVec< float > getITheta(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Get intrinsic theta angle from each item in a collection of Cluster.
Definition Cluster.cc:27
ROOT::VecOps::RVec< edm4hep::ClusterData > selX(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Select a subgroup of Cluster based on the value of x coordinate.
Definition Cluster.cc:797
ROOT::VecOps::RVec< edm4hep::ClusterData > sortEnergy(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection, bool reverse)
Sort a collection of Cluster based on the value of energy.
Definition Cluster.cc:874
ROOT::VecOps::RVec< float > getEnergy(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Get energy from each item in a collection of Cluster.
Definition Cluster.cc:16
ROOT::VecOps::RVec< bool > maskType(LogicalOperators::ComparisonOperator op, int val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Create boolean mask based on the value of type from each item in a collection of Cluster.
Definition Cluster.cc:335
int printZ(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Print z coordinate from each item in a collection of Cluster.
Definition Cluster.cc:253
int printX(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Print x coordinate from each item in a collection of Cluster.
Definition Cluster.cc:235
int printEnergy(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Print energy from each item in a collection of Cluster.
Definition Cluster.cc:199
ROOT::VecOps::RVec< edm4hep::ClusterData > sortZ(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection, bool reverse)
Sort a collection of Cluster based on the value of z coordinate.
Definition Cluster.cc:946
ROOT::VecOps::RVec< bool > maskY(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Create boolean mask based on the value of y coordinate from each item in a collection of Cluster.
Definition Cluster.cc:497
ROOT::VecOps::RVec< edm4hep::ClusterData > selType(LogicalOperators::ComparisonOperator op, int val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Select a subgroup of Cluster based on the value of type.
Definition Cluster.cc:767
ROOT::VecOps::RVec< edm4hep::ClusterData > selY(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Select a subgroup of Cluster based on the value of y coordinate.
Definition Cluster.cc:803
ROOT::VecOps::RVec< edm4hep::ClusterData > selZ(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Select a subgroup of Cluster based on the value of z coordinate.
Definition Cluster.cc:809
ROOT::VecOps::RVec< bool > maskEnergy(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Create boolean mask based on the value of energy from each item in a collection of Cluster.
Definition Cluster.cc:362
ROOT::VecOps::RVec< float > getZ(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Get z coordinate from each item in a collection of Cluster.
Definition Cluster.cc:88
ROOT::VecOps::RVec< edm4hep::ClusterData > sortR(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection, bool reverse)
Sort a collection of Cluster based on the value of distance to origin.
Definition Cluster.cc:907
ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > getHits(edm4hep::ClusterData &item, ROOT::VecOps::RVec< edm4hep::CalorimeterHitData > &relatedCollection)
Get the collection of CalorimeterHit related to a Cluster.
Definition Cluster.cc:1154
ROOT::VecOps::RVec< float > getY(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Get y coordinate from each item in a collection of Cluster.
Definition Cluster.cc:75
int printITheta(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Print intrinsic theta angle from each item in a collection of Cluster.
Definition Cluster.cc:208
ROOT::VecOps::RVec< bool > maskITheta(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Create boolean mask based on the value of intrinsic theta angle from each item in a collection of Clu...
Definition Cluster.cc:389
ROOT::VecOps::RVec< edm4hep::ClusterData > selPhi(LogicalOperators::ComparisonOperator op, float val, ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Select a subgroup of Cluster based on the value of intrinsic phi angle.
Definition Cluster.cc:785
int printPhi(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection)
Print intrinsic phi angle from each item in a collection of Cluster.
Definition Cluster.cc:217
ROOT::VecOps::RVec< edm4hep::ClusterData > sortX(ROOT::VecOps::RVec< edm4hep::ClusterData > &collection, bool reverse)
Sort a collection of Cluster based on the value of x coordinate.
Definition Cluster.cc:920
ComparisonOperator
Definition LogicalOperators.h:17
Definition CalorimeterHit.cc:2