diff --git a/include/ral/CalorimeterHit.h b/include/ral/CalorimeterHit.h index 1273be0..5292b0f 100644 --- a/include/ral/CalorimeterHit.h +++ b/include/ral/CalorimeterHit.h @@ -12,7 +12,7 @@ namespace CalorimeterHit { * */ ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection); +getType(ROOT::VecOps::RVec &collection); /** * Get detector cell ID from each item in a collection of CalorimeterHit. * @@ -20,7 +20,7 @@ getType(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getCellID(ROOT::VecOps::RVec collection); +getCellID(ROOT::VecOps::RVec &collection); /** * Get energy from each item in a collection of CalorimeterHit. * @@ -28,7 +28,7 @@ getCellID(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getEnergy(ROOT::VecOps::RVec collection); +getEnergy(ROOT::VecOps::RVec &collection); /** * Get time of the hit from each item in a collection of CalorimeterHit. * @@ -36,7 +36,7 @@ getEnergy(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getTime(ROOT::VecOps::RVec collection); +getTime(ROOT::VecOps::RVec &collection); /** * Get distance to origin from each item in a collection of CalorimeterHit. * @@ -44,7 +44,7 @@ getTime(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection); +getR(ROOT::VecOps::RVec &collection); /** * Get x coordinate from each item in a collection of CalorimeterHit. * @@ -52,7 +52,7 @@ getR(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection); +getX(ROOT::VecOps::RVec &collection); /** * Get y coordinate from each item in a collection of CalorimeterHit. * @@ -60,7 +60,7 @@ getX(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection); +getY(ROOT::VecOps::RVec &collection); /** * Get z coordinate from each item in a collection of CalorimeterHit. * @@ -68,7 +68,7 @@ getY(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection); +getZ(ROOT::VecOps::RVec &collection); /** * Get type from each item in a collection of CalorimeterHit. * @@ -139,56 +139,56 @@ getZ(const edm4hep::CalorimeterHitCollection &collection); * @param collection Collection of CalorimeterHit to look in * */ -int printType(ROOT::VecOps::RVec collection); +int printType(ROOT::VecOps::RVec &collection); /** * Print detector cell ID from each item in a collection of CalorimeterHit. * * @param collection Collection of CalorimeterHit to look in * */ -int printCellID(ROOT::VecOps::RVec collection); +int printCellID(ROOT::VecOps::RVec &collection); /** * Print energy from each item in a collection of CalorimeterHit. * * @param collection Collection of CalorimeterHit to look in * */ -int printEnergy(ROOT::VecOps::RVec collection); +int printEnergy(ROOT::VecOps::RVec &collection); /** * Print time of the hit from each item in a collection of CalorimeterHit. * * @param collection Collection of CalorimeterHit to look in * */ -int printTime(ROOT::VecOps::RVec collection); +int printTime(ROOT::VecOps::RVec &collection); /** * Print distance to origin from each item in a collection of CalorimeterHit. * * @param collection Collection of CalorimeterHit to look in * */ -int printR(ROOT::VecOps::RVec collection); +int printR(ROOT::VecOps::RVec &collection); /** * Print x coordinate from each item in a collection of CalorimeterHit. * * @param collection Collection of CalorimeterHit to look in * */ -int printX(ROOT::VecOps::RVec collection); +int printX(ROOT::VecOps::RVec &collection); /** * Print y coordinate from each item in a collection of CalorimeterHit. * * @param collection Collection of CalorimeterHit to look in * */ -int printY(ROOT::VecOps::RVec collection); +int printY(ROOT::VecOps::RVec &collection); /** * Print z coordinate from each item in a collection of CalorimeterHit. * * @param collection Collection of CalorimeterHit to look in * */ -int printZ(ROOT::VecOps::RVec collection); +int printZ(ROOT::VecOps::RVec &collection); /** * Print type from each item in a collection of CalorimeterHit. * @@ -256,7 +256,7 @@ int printZ(const edm4hep::CalorimeterHitCollection &collection); */ ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of detector cell ID from each item in * a collection of CalorimeterHit. @@ -268,7 +268,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of energy from each item in a * collection of CalorimeterHit. @@ -280,7 +280,7 @@ maskCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, */ ROOT::VecOps::RVec maskEnergy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of time of the hit from each item in a * collection of CalorimeterHit. @@ -292,7 +292,7 @@ maskEnergy(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskTime(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of distance to origin from each item * in a collection of CalorimeterHit. @@ -304,7 +304,7 @@ maskTime(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x coordinate from each item in a * collection of CalorimeterHit. @@ -316,7 +316,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y coordinate from each item in a * collection of CalorimeterHit. @@ -328,7 +328,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z coordinate from each item in a * collection of CalorimeterHit. @@ -340,7 +340,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of type from each item in a collection * of CalorimeterHit. @@ -447,7 +447,7 @@ maskZ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of CalorimeterHit based on the value of detector cell ID. * @@ -458,7 +458,7 @@ selType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of CalorimeterHit based on the value of energy. * @@ -469,7 +469,7 @@ selCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, */ ROOT::VecOps::RVec selEnergy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of CalorimeterHit based on the value of time of the hit. * @@ -480,7 +480,7 @@ selEnergy(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selTime(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of CalorimeterHit based on the value of distance to origin. * @@ -491,7 +491,7 @@ selTime(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of CalorimeterHit based on the value of x coordinate. * @@ -502,7 +502,7 @@ selR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of CalorimeterHit based on the value of y coordinate. * @@ -513,7 +513,7 @@ selX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of CalorimeterHit based on the value of z coordinate. * @@ -524,7 +524,7 @@ selY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of CalorimeterHit based on the value of type. * @@ -621,7 +621,7 @@ selZ(LogicalOperators::ComparisonOperator op, float val, * */ ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, +sortType(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of CalorimeterHit based on the value of detector cell ID. @@ -631,7 +631,7 @@ sortType(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortCellID(ROOT::VecOps::RVec collection, +sortCellID(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of CalorimeterHit based on the value of energy. @@ -641,7 +641,7 @@ sortCellID(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortEnergy(ROOT::VecOps::RVec collection, +sortEnergy(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of CalorimeterHit based on the value of time of the hit. @@ -651,7 +651,7 @@ sortEnergy(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortTime(ROOT::VecOps::RVec collection, +sortTime(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of CalorimeterHit based on the value of distance to origin. @@ -661,7 +661,7 @@ sortTime(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, +sortR(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of CalorimeterHit based on the value of x coordinate. @@ -671,7 +671,7 @@ sortR(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, +sortX(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of CalorimeterHit based on the value of y coordinate. @@ -681,7 +681,7 @@ sortX(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, +sortY(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of CalorimeterHit based on the value of z coordinate. @@ -691,7 +691,7 @@ sortY(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, +sortZ(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of CalorimeterHit based on the value of type. diff --git a/include/ral/Cluster.h b/include/ral/Cluster.h index bd7d381..7f918cf 100644 --- a/include/ral/Cluster.h +++ b/include/ral/Cluster.h @@ -13,7 +13,7 @@ namespace Cluster { * */ ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection); +getType(ROOT::VecOps::RVec &collection); /** * Get energy from each item in a collection of Cluster. * @@ -21,7 +21,7 @@ getType(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getEnergy(ROOT::VecOps::RVec collection); +getEnergy(ROOT::VecOps::RVec &collection); /** * Get intrinsic theta angle from each item in a collection of Cluster. * @@ -29,7 +29,7 @@ getEnergy(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getITheta(ROOT::VecOps::RVec collection); +getITheta(ROOT::VecOps::RVec &collection); /** * Get intrinsic phi angle from each item in a collection of Cluster. * @@ -37,7 +37,7 @@ getITheta(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPhi(ROOT::VecOps::RVec collection); +getPhi(ROOT::VecOps::RVec &collection); /** * Get distance to origin from each item in a collection of Cluster. * @@ -45,7 +45,7 @@ getPhi(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection); +getR(ROOT::VecOps::RVec &collection); /** * Get x coordinate from each item in a collection of Cluster. * @@ -53,7 +53,7 @@ getR(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection); +getX(ROOT::VecOps::RVec &collection); /** * Get y coordinate from each item in a collection of Cluster. * @@ -61,7 +61,7 @@ getX(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection); +getY(ROOT::VecOps::RVec &collection); /** * Get z coordinate from each item in a collection of Cluster. * @@ -69,7 +69,7 @@ getY(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection); +getZ(ROOT::VecOps::RVec &collection); /** * Get type from each item in a collection of Cluster. * @@ -134,56 +134,56 @@ ROOT::VecOps::RVec getZ(const edm4hep::ClusterCollection &collection); * @param collection Collection of Cluster to look in * */ -int printType(ROOT::VecOps::RVec collection); +int printType(ROOT::VecOps::RVec &collection); /** * Print energy from each item in a collection of Cluster. * * @param collection Collection of Cluster to look in * */ -int printEnergy(ROOT::VecOps::RVec collection); +int printEnergy(ROOT::VecOps::RVec &collection); /** * Print intrinsic theta angle from each item in a collection of Cluster. * * @param collection Collection of Cluster to look in * */ -int printITheta(ROOT::VecOps::RVec collection); +int printITheta(ROOT::VecOps::RVec &collection); /** * Print intrinsic phi angle from each item in a collection of Cluster. * * @param collection Collection of Cluster to look in * */ -int printPhi(ROOT::VecOps::RVec collection); +int printPhi(ROOT::VecOps::RVec &collection); /** * Print distance to origin from each item in a collection of Cluster. * * @param collection Collection of Cluster to look in * */ -int printR(ROOT::VecOps::RVec collection); +int printR(ROOT::VecOps::RVec &collection); /** * Print x coordinate from each item in a collection of Cluster. * * @param collection Collection of Cluster to look in * */ -int printX(ROOT::VecOps::RVec collection); +int printX(ROOT::VecOps::RVec &collection); /** * Print y coordinate from each item in a collection of Cluster. * * @param collection Collection of Cluster to look in * */ -int printY(ROOT::VecOps::RVec collection); +int printY(ROOT::VecOps::RVec &collection); /** * Print z coordinate from each item in a collection of Cluster. * * @param collection Collection of Cluster to look in * */ -int printZ(ROOT::VecOps::RVec collection); +int printZ(ROOT::VecOps::RVec &collection); /** * Print type from each item in a collection of Cluster. * @@ -251,7 +251,7 @@ int printZ(const edm4hep::ClusterCollection &collection); */ ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of energy from each item in a * collection of Cluster. @@ -263,7 +263,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskEnergy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of intrinsic theta angle from each * item in a collection of Cluster. @@ -275,7 +275,7 @@ maskEnergy(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskITheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of intrinsic phi angle from each item * in a collection of Cluster. @@ -287,7 +287,7 @@ maskITheta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of distance to origin from each item * in a collection of Cluster. @@ -299,7 +299,7 @@ maskPhi(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x coordinate from each item in a * collection of Cluster. @@ -311,7 +311,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y coordinate from each item in a * collection of Cluster. @@ -323,7 +323,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z coordinate from each item in a * collection of Cluster. @@ -335,7 +335,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of type from each item in a collection * of Cluster. @@ -442,7 +442,7 @@ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, */ ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Cluster based on the value of energy. * @@ -453,7 +453,7 @@ selType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selEnergy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Cluster based on the value of intrinsic theta angle. * @@ -464,7 +464,7 @@ selEnergy(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selITheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Cluster based on the value of intrinsic phi angle. * @@ -475,7 +475,7 @@ selITheta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Cluster based on the value of distance to origin. * @@ -486,7 +486,7 @@ selPhi(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Cluster based on the value of x coordinate. * @@ -497,7 +497,7 @@ selR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Cluster based on the value of y coordinate. * @@ -508,7 +508,7 @@ selX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Cluster based on the value of z coordinate. * @@ -519,7 +519,7 @@ selY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Cluster based on the value of type. * @@ -616,7 +616,7 @@ edm4hep::ClusterCollection selZ(LogicalOperators::ComparisonOperator op, * */ ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, +sortType(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Cluster based on the value of energy. @@ -626,7 +626,7 @@ sortType(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortEnergy(ROOT::VecOps::RVec collection, +sortEnergy(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Cluster based on the value of intrinsic theta angle. @@ -636,7 +636,7 @@ sortEnergy(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortITheta(ROOT::VecOps::RVec collection, +sortITheta(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Cluster based on the value of intrinsic phi angle. @@ -646,7 +646,7 @@ sortITheta(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPhi(ROOT::VecOps::RVec collection, +sortPhi(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Cluster based on the value of distance to origin. @@ -656,7 +656,7 @@ sortPhi(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, +sortR(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Cluster based on the value of x coordinate. @@ -666,7 +666,7 @@ sortR(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, +sortX(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Cluster based on the value of y coordinate. @@ -676,7 +676,7 @@ sortX(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, +sortY(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Cluster based on the value of z coordinate. @@ -686,7 +686,7 @@ sortY(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, +sortZ(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Cluster based on the value of type. @@ -768,8 +768,8 @@ edm4hep::ClusterCollection sortZ(edm4hep::ClusterCollection &collection, * */ ROOT::VecOps::RVec -getClusters(edm4hep::ClusterData item, - ROOT::VecOps::RVec relatedCollection); +getClusters(edm4hep::ClusterData &item, + ROOT::VecOps::RVec &relatedCollection); /** * Get the collection of CalorimeterHit related to a Cluster. * @@ -778,8 +778,8 @@ getClusters(edm4hep::ClusterData item, * */ ROOT::VecOps::RVec -getHits(edm4hep::ClusterData item, - ROOT::VecOps::RVec relatedCollection); +getHits(edm4hep::ClusterData &item, + ROOT::VecOps::RVec &relatedCollection); /** * Get the collection of Cluster related to a Cluster. * diff --git a/include/ral/MCParticle.h b/include/ral/MCParticle.h index 0448057..d921aaf 100644 --- a/include/ral/MCParticle.h +++ b/include/ral/MCParticle.h @@ -13,7 +13,7 @@ namespace MCParticle { * */ ROOT::VecOps::RVec -getP(ROOT::VecOps::RVec collection); +getP(ROOT::VecOps::RVec &collection); /** * Get transverse momentum from each item in a collection of MCParticle. * @@ -21,7 +21,7 @@ getP(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPt(ROOT::VecOps::RVec collection); +getPt(ROOT::VecOps::RVec &collection); /** * Get x momentum from each item in a collection of MCParticle. * @@ -29,7 +29,7 @@ getPt(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPx(ROOT::VecOps::RVec collection); +getPx(ROOT::VecOps::RVec &collection); /** * Get y momentum from each item in a collection of MCParticle. * @@ -37,7 +37,7 @@ getPx(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPy(ROOT::VecOps::RVec collection); +getPy(ROOT::VecOps::RVec &collection); /** * Get z momentum from each item in a collection of MCParticle. * @@ -45,7 +45,7 @@ getPy(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPz(ROOT::VecOps::RVec collection); +getPz(ROOT::VecOps::RVec &collection); /** * Get pseudorapidity from each item in a collection of MCParticle. * @@ -53,7 +53,7 @@ getPz(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getEta(ROOT::VecOps::RVec collection); +getEta(ROOT::VecOps::RVec &collection); /** * Get rapidity from each item in a collection of MCParticle. * @@ -61,7 +61,7 @@ getEta(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getRapidity(ROOT::VecOps::RVec collection); +getRapidity(ROOT::VecOps::RVec &collection); /** * Get polar angle from each item in a collection of MCParticle. * @@ -69,7 +69,7 @@ getRapidity(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getTheta(ROOT::VecOps::RVec collection); +getTheta(ROOT::VecOps::RVec &collection); /** * Get azimutal angle from each item in a collection of MCParticle. * @@ -77,7 +77,7 @@ getTheta(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPhi(ROOT::VecOps::RVec collection); +getPhi(ROOT::VecOps::RVec &collection); /** * Get momentum from each item in a collection of MCParticle. * @@ -85,7 +85,7 @@ getPhi(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPEnd(ROOT::VecOps::RVec collection); +getPEnd(ROOT::VecOps::RVec &collection); /** * Get transverse momentum from each item in a collection of MCParticle. * @@ -93,7 +93,7 @@ getPEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPtEnd(ROOT::VecOps::RVec collection); +getPtEnd(ROOT::VecOps::RVec &collection); /** * Get x momentum from each item in a collection of MCParticle. * @@ -101,7 +101,7 @@ getPtEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPxEnd(ROOT::VecOps::RVec collection); +getPxEnd(ROOT::VecOps::RVec &collection); /** * Get y momentum from each item in a collection of MCParticle. * @@ -109,7 +109,7 @@ getPxEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPyEnd(ROOT::VecOps::RVec collection); +getPyEnd(ROOT::VecOps::RVec &collection); /** * Get z momentum from each item in a collection of MCParticle. * @@ -117,7 +117,7 @@ getPyEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPzEnd(ROOT::VecOps::RVec collection); +getPzEnd(ROOT::VecOps::RVec &collection); /** * Get pseudorapidity from each item in a collection of MCParticle. * @@ -125,7 +125,7 @@ getPzEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getEtaEnd(ROOT::VecOps::RVec collection); +getEtaEnd(ROOT::VecOps::RVec &collection); /** * Get rapidity from each item in a collection of MCParticle. * @@ -133,7 +133,7 @@ getEtaEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getRapidityEnd(ROOT::VecOps::RVec collection); +getRapidityEnd(ROOT::VecOps::RVec &collection); /** * Get polar angle from each item in a collection of MCParticle. * @@ -141,7 +141,7 @@ getRapidityEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getThetaEnd(ROOT::VecOps::RVec collection); +getThetaEnd(ROOT::VecOps::RVec &collection); /** * Get azimutal angle from each item in a collection of MCParticle. * @@ -149,7 +149,7 @@ getThetaEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPhiEnd(ROOT::VecOps::RVec collection); +getPhiEnd(ROOT::VecOps::RVec &collection); /** * Get distance to origin from each item in a collection of MCParticle. * @@ -157,7 +157,7 @@ getPhiEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection); +getR(ROOT::VecOps::RVec &collection); /** * Get x coordinate from each item in a collection of MCParticle. * @@ -165,7 +165,7 @@ getR(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection); +getX(ROOT::VecOps::RVec &collection); /** * Get y coordinate from each item in a collection of MCParticle. * @@ -173,7 +173,7 @@ getX(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection); +getY(ROOT::VecOps::RVec &collection); /** * Get z coordinate from each item in a collection of MCParticle. * @@ -181,7 +181,7 @@ getY(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection); +getZ(ROOT::VecOps::RVec &collection); /** * Get distance to origin from each item in a collection of MCParticle. * @@ -189,7 +189,7 @@ getZ(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getREnd(ROOT::VecOps::RVec collection); +getREnd(ROOT::VecOps::RVec &collection); /** * Get x coordinate from each item in a collection of MCParticle. * @@ -197,7 +197,7 @@ getREnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getXEnd(ROOT::VecOps::RVec collection); +getXEnd(ROOT::VecOps::RVec &collection); /** * Get y coordinate from each item in a collection of MCParticle. * @@ -205,7 +205,7 @@ getXEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getYEnd(ROOT::VecOps::RVec collection); +getYEnd(ROOT::VecOps::RVec &collection); /** * Get z coordinate from each item in a collection of MCParticle. * @@ -213,7 +213,7 @@ getYEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getZEnd(ROOT::VecOps::RVec collection); +getZEnd(ROOT::VecOps::RVec &collection); /** * Get energy from each item in a collection of MCParticle. * @@ -221,7 +221,7 @@ getZEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getE(ROOT::VecOps::RVec collection); +getE(ROOT::VecOps::RVec &collection); /** * Get energy from each item in a collection of MCParticle. * @@ -229,7 +229,7 @@ getE(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getEEnd(ROOT::VecOps::RVec collection); +getEEnd(ROOT::VecOps::RVec &collection); /** * Get mass from each item in a collection of MCParticle. * @@ -237,7 +237,7 @@ getEEnd(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getM(ROOT::VecOps::RVec collection); +getM(ROOT::VecOps::RVec &collection); /** * Get charge from each item in a collection of MCParticle. * @@ -245,7 +245,7 @@ getM(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getQ(ROOT::VecOps::RVec collection); +getQ(ROOT::VecOps::RVec &collection); /** * Get absolute charge from each item in a collection of MCParticle. * @@ -253,7 +253,7 @@ getQ(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getAbsq(ROOT::VecOps::RVec collection); +getAbsq(ROOT::VecOps::RVec &collection); /** * Get pdg from each item in a collection of MCParticle. * @@ -261,7 +261,7 @@ getAbsq(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPdg(ROOT::VecOps::RVec collection); +getPdg(ROOT::VecOps::RVec &collection); /** * Get absolute pdg from each item in a collection of MCParticle. * @@ -269,7 +269,7 @@ getPdg(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getAbspdg(ROOT::VecOps::RVec collection); +getAbspdg(ROOT::VecOps::RVec &collection); /** * Get simulator status from each item in a collection of MCParticle. * @@ -277,7 +277,7 @@ getAbspdg(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getSimStat(ROOT::VecOps::RVec collection); +getSimStat(ROOT::VecOps::RVec &collection); /** * Get generator status from each item in a collection of MCParticle. * @@ -285,7 +285,7 @@ getSimStat(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getGenStat(ROOT::VecOps::RVec collection); +getGenStat(ROOT::VecOps::RVec &collection); /** * Get momentum from each item in a collection of MCParticle. * @@ -563,245 +563,245 @@ getGenStat(const edm4hep::MCParticleCollection &collection); * @param collection Collection of MCParticle to look in * */ -int printP(ROOT::VecOps::RVec collection); +int printP(ROOT::VecOps::RVec &collection); /** * Print transverse momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPt(ROOT::VecOps::RVec collection); +int printPt(ROOT::VecOps::RVec &collection); /** * Print x momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPx(ROOT::VecOps::RVec collection); +int printPx(ROOT::VecOps::RVec &collection); /** * Print y momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPy(ROOT::VecOps::RVec collection); +int printPy(ROOT::VecOps::RVec &collection); /** * Print z momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPz(ROOT::VecOps::RVec collection); +int printPz(ROOT::VecOps::RVec &collection); /** * Print pseudorapidity from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printEta(ROOT::VecOps::RVec collection); +int printEta(ROOT::VecOps::RVec &collection); /** * Print rapidity from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printRapidity(ROOT::VecOps::RVec collection); +int printRapidity(ROOT::VecOps::RVec &collection); /** * Print polar angle from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printTheta(ROOT::VecOps::RVec collection); +int printTheta(ROOT::VecOps::RVec &collection); /** * Print azimutal angle from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPhi(ROOT::VecOps::RVec collection); +int printPhi(ROOT::VecOps::RVec &collection); /** * Print momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPEnd(ROOT::VecOps::RVec collection); +int printPEnd(ROOT::VecOps::RVec &collection); /** * Print transverse momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPtEnd(ROOT::VecOps::RVec collection); +int printPtEnd(ROOT::VecOps::RVec &collection); /** * Print x momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPxEnd(ROOT::VecOps::RVec collection); +int printPxEnd(ROOT::VecOps::RVec &collection); /** * Print y momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPyEnd(ROOT::VecOps::RVec collection); +int printPyEnd(ROOT::VecOps::RVec &collection); /** * Print z momentum from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPzEnd(ROOT::VecOps::RVec collection); +int printPzEnd(ROOT::VecOps::RVec &collection); /** * Print pseudorapidity from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printEtaEnd(ROOT::VecOps::RVec collection); +int printEtaEnd(ROOT::VecOps::RVec &collection); /** * Print rapidity from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printRapidityEnd(ROOT::VecOps::RVec collection); +int printRapidityEnd(ROOT::VecOps::RVec &collection); /** * Print polar angle from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printThetaEnd(ROOT::VecOps::RVec collection); +int printThetaEnd(ROOT::VecOps::RVec &collection); /** * Print azimutal angle from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPhiEnd(ROOT::VecOps::RVec collection); +int printPhiEnd(ROOT::VecOps::RVec &collection); /** * Print distance to origin from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printR(ROOT::VecOps::RVec collection); +int printR(ROOT::VecOps::RVec &collection); /** * Print x coordinate from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printX(ROOT::VecOps::RVec collection); +int printX(ROOT::VecOps::RVec &collection); /** * Print y coordinate from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printY(ROOT::VecOps::RVec collection); +int printY(ROOT::VecOps::RVec &collection); /** * Print z coordinate from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printZ(ROOT::VecOps::RVec collection); +int printZ(ROOT::VecOps::RVec &collection); /** * Print distance to origin from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printREnd(ROOT::VecOps::RVec collection); +int printREnd(ROOT::VecOps::RVec &collection); /** * Print x coordinate from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printXEnd(ROOT::VecOps::RVec collection); +int printXEnd(ROOT::VecOps::RVec &collection); /** * Print y coordinate from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printYEnd(ROOT::VecOps::RVec collection); +int printYEnd(ROOT::VecOps::RVec &collection); /** * Print z coordinate from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printZEnd(ROOT::VecOps::RVec collection); +int printZEnd(ROOT::VecOps::RVec &collection); /** * Print energy from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printE(ROOT::VecOps::RVec collection); +int printE(ROOT::VecOps::RVec &collection); /** * Print energy from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printEEnd(ROOT::VecOps::RVec collection); +int printEEnd(ROOT::VecOps::RVec &collection); /** * Print mass from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printM(ROOT::VecOps::RVec collection); +int printM(ROOT::VecOps::RVec &collection); /** * Print charge from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printQ(ROOT::VecOps::RVec collection); +int printQ(ROOT::VecOps::RVec &collection); /** * Print absolute charge from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printAbsq(ROOT::VecOps::RVec collection); +int printAbsq(ROOT::VecOps::RVec &collection); /** * Print pdg from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printPdg(ROOT::VecOps::RVec collection); +int printPdg(ROOT::VecOps::RVec &collection); /** * Print absolute pdg from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printAbspdg(ROOT::VecOps::RVec collection); +int printAbspdg(ROOT::VecOps::RVec &collection); /** * Print simulator status from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printSimStat(ROOT::VecOps::RVec collection); +int printSimStat(ROOT::VecOps::RVec &collection); /** * Print generator status from each item in a collection of MCParticle. * * @param collection Collection of MCParticle to look in * */ -int printGenStat(ROOT::VecOps::RVec collection); +int printGenStat(ROOT::VecOps::RVec &collection); /** * Print momentum from each item in a collection of MCParticle. * @@ -1058,7 +1058,7 @@ int printGenStat(const edm4hep::MCParticleCollection &collection); */ ROOT::VecOps::RVec maskP(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of transverse momentum from each item * in a collection of MCParticle. @@ -1070,7 +1070,7 @@ maskP(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPt(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x momentum from each item in a * collection of MCParticle. @@ -1082,7 +1082,7 @@ maskPt(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPx(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y momentum from each item in a * collection of MCParticle. @@ -1094,7 +1094,7 @@ maskPx(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z momentum from each item in a * collection of MCParticle. @@ -1106,7 +1106,7 @@ maskPy(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPz(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of pseudorapidity from each item in a * collection of MCParticle. @@ -1118,7 +1118,7 @@ maskPz(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskEta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of rapidity from each item in a * collection of MCParticle. @@ -1130,7 +1130,7 @@ maskEta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskRapidity(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of polar angle from each item in a * collection of MCParticle. @@ -1142,7 +1142,7 @@ maskRapidity(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskTheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of azimutal angle from each item in a * collection of MCParticle. @@ -1154,7 +1154,7 @@ maskTheta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of momentum from each item in a * collection of MCParticle. @@ -1166,7 +1166,7 @@ maskPhi(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of transverse momentum from each item * in a collection of MCParticle. @@ -1178,7 +1178,7 @@ maskPEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPtEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x momentum from each item in a * collection of MCParticle. @@ -1190,7 +1190,7 @@ maskPtEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPxEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y momentum from each item in a * collection of MCParticle. @@ -1202,7 +1202,7 @@ maskPxEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPyEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z momentum from each item in a * collection of MCParticle. @@ -1214,7 +1214,7 @@ maskPyEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPzEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of pseudorapidity from each item in a * collection of MCParticle. @@ -1226,7 +1226,7 @@ maskPzEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskEtaEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of rapidity from each item in a * collection of MCParticle. @@ -1238,7 +1238,7 @@ maskEtaEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskRapidityEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of polar angle from each item in a * collection of MCParticle. @@ -1250,7 +1250,7 @@ maskRapidityEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskThetaEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of azimutal angle from each item in a * collection of MCParticle. @@ -1262,7 +1262,7 @@ maskThetaEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPhiEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of distance to origin from each item * in a collection of MCParticle. @@ -1274,7 +1274,7 @@ maskPhiEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x coordinate from each item in a * collection of MCParticle. @@ -1286,7 +1286,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y coordinate from each item in a * collection of MCParticle. @@ -1298,7 +1298,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z coordinate from each item in a * collection of MCParticle. @@ -1310,7 +1310,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of distance to origin from each item * in a collection of MCParticle. @@ -1322,7 +1322,7 @@ maskZ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskREnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x coordinate from each item in a * collection of MCParticle. @@ -1334,7 +1334,7 @@ maskREnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskXEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y coordinate from each item in a * collection of MCParticle. @@ -1346,7 +1346,7 @@ maskXEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskYEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z coordinate from each item in a * collection of MCParticle. @@ -1358,7 +1358,7 @@ maskYEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskZEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of energy from each item in a * collection of MCParticle. @@ -1370,7 +1370,7 @@ maskZEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskE(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of energy from each item in a * collection of MCParticle. @@ -1382,7 +1382,7 @@ maskE(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskEEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of mass from each item in a collection * of MCParticle. @@ -1394,7 +1394,7 @@ maskEEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskM(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of charge from each item in a * collection of MCParticle. @@ -1406,7 +1406,7 @@ maskM(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskQ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of absolute charge from each item in a * collection of MCParticle. @@ -1418,7 +1418,7 @@ maskQ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskAbsq(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of pdg from each item in a collection * of MCParticle. @@ -1430,7 +1430,7 @@ maskAbsq(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of absolute pdg from each item in a * collection of MCParticle. @@ -1442,7 +1442,7 @@ maskPdg(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskAbspdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of simulator status from each item in * a collection of MCParticle. @@ -1454,7 +1454,7 @@ maskAbspdg(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskSimStat(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of generator status from each item in * a collection of MCParticle. @@ -1466,7 +1466,7 @@ maskSimStat(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskGenStat(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of momentum from each item in a * collection of MCParticle. @@ -1897,7 +1897,7 @@ maskGenStat(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selP(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of transverse momentum. * @@ -1908,7 +1908,7 @@ selP(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPt(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of x momentum. * @@ -1919,7 +1919,7 @@ selPt(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPx(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of y momentum. * @@ -1930,7 +1930,7 @@ selPx(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of z momentum. * @@ -1941,7 +1941,7 @@ selPy(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPz(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of pseudorapidity. * @@ -1952,7 +1952,7 @@ selPz(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selEta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of rapidity. * @@ -1963,7 +1963,7 @@ selEta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selRapidity(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of polar angle. * @@ -1974,7 +1974,7 @@ selRapidity(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selTheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of azimutal angle. * @@ -1985,7 +1985,7 @@ selTheta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of momentum. * @@ -1996,7 +1996,7 @@ selPhi(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of transverse momentum. * @@ -2007,7 +2007,7 @@ selPEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPtEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of x momentum. * @@ -2018,7 +2018,7 @@ selPtEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPxEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of y momentum. * @@ -2029,7 +2029,7 @@ selPxEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPyEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of z momentum. * @@ -2040,7 +2040,7 @@ selPyEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPzEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of pseudorapidity. * @@ -2051,7 +2051,7 @@ selPzEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selEtaEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of rapidity. * @@ -2062,7 +2062,7 @@ selEtaEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selRapidityEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of polar angle. * @@ -2073,7 +2073,7 @@ selRapidityEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selThetaEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of azimutal angle. * @@ -2084,7 +2084,7 @@ selThetaEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPhiEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of distance to origin. * @@ -2095,7 +2095,7 @@ selPhiEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of x coordinate. * @@ -2106,7 +2106,7 @@ selR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of y coordinate. * @@ -2117,7 +2117,7 @@ selX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of z coordinate. * @@ -2128,7 +2128,7 @@ selY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of distance to origin. * @@ -2139,7 +2139,7 @@ selZ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selREnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of x coordinate. * @@ -2150,7 +2150,7 @@ selREnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selXEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of y coordinate. * @@ -2161,7 +2161,7 @@ selXEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selYEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of z coordinate. * @@ -2172,7 +2172,7 @@ selYEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selZEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of energy. * @@ -2183,7 +2183,7 @@ selZEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selE(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of energy. * @@ -2194,7 +2194,7 @@ selE(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selEEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of mass. * @@ -2205,7 +2205,7 @@ selEEnd(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selM(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of charge. * @@ -2216,7 +2216,7 @@ selM(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selQ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of absolute charge. * @@ -2227,7 +2227,7 @@ selQ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selAbsq(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of pdg. * @@ -2238,7 +2238,7 @@ selAbsq(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of absolute pdg. * @@ -2249,7 +2249,7 @@ selPdg(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selAbspdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of simulator status. * @@ -2260,7 +2260,7 @@ selAbspdg(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selSimStat(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of generator status. * @@ -2271,7 +2271,7 @@ selSimStat(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selGenStat(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of MCParticle based on the value of momentum. * @@ -2665,7 +2665,7 @@ selGenStat(LogicalOperators::ComparisonOperator op, int val, * */ ROOT::VecOps::RVec -sortP(ROOT::VecOps::RVec collection, +sortP(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of transverse momentum. @@ -2675,7 +2675,7 @@ sortP(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPt(ROOT::VecOps::RVec collection, +sortPt(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of x momentum. @@ -2685,7 +2685,7 @@ sortPt(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPx(ROOT::VecOps::RVec collection, +sortPx(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of y momentum. @@ -2695,7 +2695,7 @@ sortPx(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPy(ROOT::VecOps::RVec collection, +sortPy(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of z momentum. @@ -2705,7 +2705,7 @@ sortPy(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPz(ROOT::VecOps::RVec collection, +sortPz(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of pseudorapidity. @@ -2715,7 +2715,7 @@ sortPz(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortEta(ROOT::VecOps::RVec collection, +sortEta(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of rapidity. @@ -2725,7 +2725,7 @@ sortEta(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortRapidity(ROOT::VecOps::RVec collection, +sortRapidity(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of polar angle. @@ -2735,7 +2735,7 @@ sortRapidity(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortTheta(ROOT::VecOps::RVec collection, +sortTheta(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of azimutal angle. @@ -2745,7 +2745,7 @@ sortTheta(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPhi(ROOT::VecOps::RVec collection, +sortPhi(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of momentum. @@ -2755,7 +2755,7 @@ sortPhi(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPEnd(ROOT::VecOps::RVec collection, +sortPEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of transverse momentum. @@ -2765,7 +2765,7 @@ sortPEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPtEnd(ROOT::VecOps::RVec collection, +sortPtEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of x momentum. @@ -2775,7 +2775,7 @@ sortPtEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPxEnd(ROOT::VecOps::RVec collection, +sortPxEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of y momentum. @@ -2785,7 +2785,7 @@ sortPxEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPyEnd(ROOT::VecOps::RVec collection, +sortPyEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of z momentum. @@ -2795,7 +2795,7 @@ sortPyEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPzEnd(ROOT::VecOps::RVec collection, +sortPzEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of pseudorapidity. @@ -2805,7 +2805,7 @@ sortPzEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortEtaEnd(ROOT::VecOps::RVec collection, +sortEtaEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of rapidity. @@ -2815,7 +2815,7 @@ sortEtaEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortRapidityEnd(ROOT::VecOps::RVec collection, +sortRapidityEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of polar angle. @@ -2825,7 +2825,7 @@ sortRapidityEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortThetaEnd(ROOT::VecOps::RVec collection, +sortThetaEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of azimutal angle. @@ -2835,7 +2835,7 @@ sortThetaEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPhiEnd(ROOT::VecOps::RVec collection, +sortPhiEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of distance to origin. @@ -2845,7 +2845,7 @@ sortPhiEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, +sortR(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of x coordinate. @@ -2855,7 +2855,7 @@ sortR(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, +sortX(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of y coordinate. @@ -2865,7 +2865,7 @@ sortX(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, +sortY(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of z coordinate. @@ -2875,7 +2875,7 @@ sortY(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, +sortZ(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of distance to origin. @@ -2885,7 +2885,7 @@ sortZ(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortREnd(ROOT::VecOps::RVec collection, +sortREnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of x coordinate. @@ -2895,7 +2895,7 @@ sortREnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortXEnd(ROOT::VecOps::RVec collection, +sortXEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of y coordinate. @@ -2905,7 +2905,7 @@ sortXEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortYEnd(ROOT::VecOps::RVec collection, +sortYEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of z coordinate. @@ -2915,7 +2915,7 @@ sortYEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortZEnd(ROOT::VecOps::RVec collection, +sortZEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of energy. @@ -2925,7 +2925,7 @@ sortZEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortE(ROOT::VecOps::RVec collection, +sortE(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of energy. @@ -2935,7 +2935,7 @@ sortE(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortEEnd(ROOT::VecOps::RVec collection, +sortEEnd(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of mass. @@ -2945,7 +2945,7 @@ sortEEnd(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortM(ROOT::VecOps::RVec collection, +sortM(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of charge. @@ -2955,7 +2955,7 @@ sortM(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortQ(ROOT::VecOps::RVec collection, +sortQ(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of absolute charge. @@ -2965,7 +2965,7 @@ sortQ(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortAbsq(ROOT::VecOps::RVec collection, +sortAbsq(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of pdg. @@ -2975,7 +2975,7 @@ sortAbsq(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPdg(ROOT::VecOps::RVec collection, +sortPdg(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of absolute pdg. @@ -2985,7 +2985,7 @@ sortPdg(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortAbspdg(ROOT::VecOps::RVec collection, +sortAbspdg(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of simulator status. @@ -2995,7 +2995,7 @@ sortAbspdg(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortSimStat(ROOT::VecOps::RVec collection, +sortSimStat(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of generator status. @@ -3005,7 +3005,7 @@ sortSimStat(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortGenStat(ROOT::VecOps::RVec collection, +sortGenStat(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of MCParticle based on the value of momentum. @@ -3331,8 +3331,8 @@ sortGenStat(edm4hep::MCParticleCollection &collection, bool reverse = false); * */ ROOT::VecOps::RVec -getParents(edm4hep::MCParticleData item, - ROOT::VecOps::RVec relatedCollection); +getParents(edm4hep::MCParticleData &item, + ROOT::VecOps::RVec &relatedCollection); /** * Get the collection of MCParticle related to a MCParticle. * @@ -3348,8 +3348,8 @@ edm4hep::MCParticleCollection getParents(const edm4hep::MCParticle &item); * */ ROOT::VecOps::RVec -getDaughters(edm4hep::MCParticleData item, - ROOT::VecOps::RVec relatedCollection); +getDaughters(edm4hep::MCParticleData &item, + ROOT::VecOps::RVec &relatedCollection); /** * Get the collection of MCParticle related to a MCParticle. * diff --git a/include/ral/ParticleID.h b/include/ral/ParticleID.h deleted file mode 100644 index 13c6b64..0000000 --- a/include/ral/ParticleID.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef PARTICLEID_ANALYZERS_H -#define PARTICLEID_ANALYZERS_H - -#include "ROOT/RVec.hxx" -#include "edm4hep/ParticleIDData.h" - -/** - * Main namespace of the library - */ -namespace k4::ral { - -/** - * Englobe analyzers that acts on the ParticleID class - */ -namespace ParticleID { - -/** - * Get type member from ParticleIDs - * - * Analyzer that can be use to obtain the type member in the class - * ParticleID from edm4hep - * - * @param particles List of particle id in an event - * - */ -ROOT::VecOps::RVec -get_type(ROOT::VecOps::RVec particles); - -/** - * Get PDG member from ParticleIDs - * - * Analyzer that can be use to obtain the PDG member in the class - * ParticleID from edm4hep - * - * @param particles List of particle id in an event - * - */ -ROOT::VecOps::RVec -get_PDG(ROOT::VecOps::RVec particles); - -/** - * Get algorithmType member from ParticleIDs - * - * Analyzer that can be use to obtain the algorithmType member in the class - * ParticleID from edm4hep - * - * @param particles List of particle id in an event - * - */ -ROOT::VecOps::RVec -get_algorithmType(ROOT::VecOps::RVec particles); - -/** - * Get likelihood member from ParticleIDs - * - * Analyzer that can be use to obtain the likelihood member in the class - * ParticleID from edm4hep - * - * @param particles List of particle id in an event - * - */ -ROOT::VecOps::RVec -get_likelihood(ROOT::VecOps::RVec particles); - -} // namespace ParticleID -} // namespace k4::ral - -#endif diff --git a/include/ral/ReconstructedParticle.h b/include/ral/ReconstructedParticle.h index f373428..22e8292 100644 --- a/include/ral/ReconstructedParticle.h +++ b/include/ral/ReconstructedParticle.h @@ -15,7 +15,7 @@ namespace ReconstructedParticle { * */ ROOT::VecOps::RVec -getP(ROOT::VecOps::RVec collection); +getP(ROOT::VecOps::RVec &collection); /** * Get transverse momentum from each item in a collection of * ReconstructedParticle. @@ -24,7 +24,7 @@ getP(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPt(ROOT::VecOps::RVec collection); +getPt(ROOT::VecOps::RVec &collection); /** * Get x momentum from each item in a collection of ReconstructedParticle. * @@ -32,7 +32,7 @@ getPt(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPx(ROOT::VecOps::RVec collection); +getPx(ROOT::VecOps::RVec &collection); /** * Get y momentum from each item in a collection of ReconstructedParticle. * @@ -40,7 +40,7 @@ getPx(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPy(ROOT::VecOps::RVec collection); +getPy(ROOT::VecOps::RVec &collection); /** * Get z momentum from each item in a collection of ReconstructedParticle. * @@ -48,7 +48,7 @@ getPy(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPz(ROOT::VecOps::RVec collection); +getPz(ROOT::VecOps::RVec &collection); /** * Get pseudorapidity from each item in a collection of ReconstructedParticle. * @@ -56,7 +56,7 @@ getPz(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getEta(ROOT::VecOps::RVec collection); +getEta(ROOT::VecOps::RVec &collection); /** * Get rapidity from each item in a collection of ReconstructedParticle. * @@ -64,7 +64,7 @@ getEta(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getRapidity(ROOT::VecOps::RVec collection); +getRapidity(ROOT::VecOps::RVec &collection); /** * Get polar angle from each item in a collection of ReconstructedParticle. * @@ -72,7 +72,7 @@ getRapidity(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getTheta(ROOT::VecOps::RVec collection); +getTheta(ROOT::VecOps::RVec &collection); /** * Get azimutal angle from each item in a collection of ReconstructedParticle. * @@ -80,7 +80,7 @@ getTheta(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPhi(ROOT::VecOps::RVec collection); +getPhi(ROOT::VecOps::RVec &collection); /** * Get distance to origin from each item in a collection of * ReconstructedParticle. @@ -89,7 +89,7 @@ getPhi(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection); +getR(ROOT::VecOps::RVec &collection); /** * Get x coordinate from each item in a collection of ReconstructedParticle. * @@ -97,7 +97,7 @@ getR(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection); +getX(ROOT::VecOps::RVec &collection); /** * Get y coordinate from each item in a collection of ReconstructedParticle. * @@ -105,7 +105,7 @@ getX(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection); +getY(ROOT::VecOps::RVec &collection); /** * Get z coordinate from each item in a collection of ReconstructedParticle. * @@ -113,7 +113,7 @@ getY(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection); +getZ(ROOT::VecOps::RVec &collection); /** * Get energy from each item in a collection of ReconstructedParticle. * @@ -121,7 +121,7 @@ getZ(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getE(ROOT::VecOps::RVec collection); +getE(ROOT::VecOps::RVec &collection); /** * Get mass from each item in a collection of ReconstructedParticle. * @@ -129,7 +129,7 @@ getE(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getM(ROOT::VecOps::RVec collection); +getM(ROOT::VecOps::RVec &collection); /** * Get charge from each item in a collection of ReconstructedParticle. * @@ -137,7 +137,7 @@ getM(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getQ(ROOT::VecOps::RVec collection); +getQ(ROOT::VecOps::RVec &collection); /** * Get absolute charge from each item in a collection of ReconstructedParticle. * @@ -145,7 +145,7 @@ getQ(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getAbsq(ROOT::VecOps::RVec collection); +getAbsq(ROOT::VecOps::RVec &collection); /** * Get pdg from each item in a collection of ReconstructedParticle. * @@ -153,7 +153,7 @@ getAbsq(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getPdg(ROOT::VecOps::RVec collection); +getPdg(ROOT::VecOps::RVec &collection); /** * Get absolute pdg from each item in a collection of ReconstructedParticle. * @@ -161,7 +161,7 @@ getPdg(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getAbspdg(ROOT::VecOps::RVec collection); +getAbspdg(ROOT::VecOps::RVec &collection); /** * Get momentum from each item in a collection of ReconstructedParticle. * @@ -322,7 +322,7 @@ getAbspdg(const edm4hep::ReconstructedParticleCollection &collection); * @param collection Collection of ReconstructedParticle to look in * */ -int printP(ROOT::VecOps::RVec collection); +int printP(ROOT::VecOps::RVec &collection); /** * Print transverse momentum from each item in a collection of * ReconstructedParticle. @@ -330,35 +330,36 @@ int printP(ROOT::VecOps::RVec collection); * @param collection Collection of ReconstructedParticle to look in * */ -int printPt(ROOT::VecOps::RVec collection); +int printPt(ROOT::VecOps::RVec &collection); /** * Print x momentum from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printPx(ROOT::VecOps::RVec collection); +int printPx(ROOT::VecOps::RVec &collection); /** * Print y momentum from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printPy(ROOT::VecOps::RVec collection); +int printPy(ROOT::VecOps::RVec &collection); /** * Print z momentum from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printPz(ROOT::VecOps::RVec collection); +int printPz(ROOT::VecOps::RVec &collection); /** * Print pseudorapidity from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printEta(ROOT::VecOps::RVec collection); +int printEta( + ROOT::VecOps::RVec &collection); /** * Print rapidity from each item in a collection of ReconstructedParticle. * @@ -366,7 +367,7 @@ int printEta(ROOT::VecOps::RVec collection); * */ int printRapidity( - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Print polar angle from each item in a collection of ReconstructedParticle. * @@ -374,14 +375,15 @@ int printRapidity( * */ int printTheta( - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Print azimutal angle from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printPhi(ROOT::VecOps::RVec collection); +int printPhi( + ROOT::VecOps::RVec &collection); /** * Print distance to origin from each item in a collection of * ReconstructedParticle. @@ -389,49 +391,49 @@ int printPhi(ROOT::VecOps::RVec collection); * @param collection Collection of ReconstructedParticle to look in * */ -int printR(ROOT::VecOps::RVec collection); +int printR(ROOT::VecOps::RVec &collection); /** * Print x coordinate from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printX(ROOT::VecOps::RVec collection); +int printX(ROOT::VecOps::RVec &collection); /** * Print y coordinate from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printY(ROOT::VecOps::RVec collection); +int printY(ROOT::VecOps::RVec &collection); /** * Print z coordinate from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printZ(ROOT::VecOps::RVec collection); +int printZ(ROOT::VecOps::RVec &collection); /** * Print energy from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printE(ROOT::VecOps::RVec collection); +int printE(ROOT::VecOps::RVec &collection); /** * Print mass from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printM(ROOT::VecOps::RVec collection); +int printM(ROOT::VecOps::RVec &collection); /** * Print charge from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printQ(ROOT::VecOps::RVec collection); +int printQ(ROOT::VecOps::RVec &collection); /** * Print absolute charge from each item in a collection of * ReconstructedParticle. @@ -440,14 +442,15 @@ int printQ(ROOT::VecOps::RVec collection); * */ int printAbsq( - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Print pdg from each item in a collection of ReconstructedParticle. * * @param collection Collection of ReconstructedParticle to look in * */ -int printPdg(ROOT::VecOps::RVec collection); +int printPdg( + ROOT::VecOps::RVec &collection); /** * Print absolute pdg from each item in a collection of ReconstructedParticle. * @@ -455,7 +458,7 @@ int printPdg(ROOT::VecOps::RVec collection); * */ int printAbspdg( - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Print momentum from each item in a collection of ReconstructedParticle. * @@ -603,7 +606,7 @@ int printAbspdg(const edm4hep::ReconstructedParticleCollection &collection); */ ROOT::VecOps::RVec maskP(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of transverse momentum from each item * in a collection of ReconstructedParticle. @@ -615,7 +618,7 @@ maskP(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPt(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x momentum from each item in a * collection of ReconstructedParticle. @@ -627,7 +630,7 @@ maskPt(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPx(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y momentum from each item in a * collection of ReconstructedParticle. @@ -639,7 +642,7 @@ maskPx(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z momentum from each item in a * collection of ReconstructedParticle. @@ -651,7 +654,7 @@ maskPy(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPz(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of pseudorapidity from each item in a * collection of ReconstructedParticle. @@ -663,7 +666,7 @@ maskPz(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskEta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of rapidity from each item in a * collection of ReconstructedParticle. @@ -673,9 +676,9 @@ maskEta(LogicalOperators::ComparisonOperator op, float val, * @param collection Collection of ReconstructedParticle to look in * */ -ROOT::VecOps::RVec -maskRapidity(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); +ROOT::VecOps::RVec maskRapidity( + LogicalOperators::ComparisonOperator op, float val, + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of polar angle from each item in a * collection of ReconstructedParticle. @@ -687,7 +690,7 @@ maskRapidity(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskTheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of azimutal angle from each item in a * collection of ReconstructedParticle. @@ -699,7 +702,7 @@ maskTheta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of distance to origin from each item * in a collection of ReconstructedParticle. @@ -711,7 +714,7 @@ maskPhi(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x coordinate from each item in a * collection of ReconstructedParticle. @@ -723,7 +726,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y coordinate from each item in a * collection of ReconstructedParticle. @@ -735,7 +738,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z coordinate from each item in a * collection of ReconstructedParticle. @@ -747,7 +750,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of energy from each item in a * collection of ReconstructedParticle. @@ -759,7 +762,7 @@ maskZ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskE(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of mass from each item in a collection * of ReconstructedParticle. @@ -771,7 +774,7 @@ maskE(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskM(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of charge from each item in a * collection of ReconstructedParticle. @@ -783,7 +786,7 @@ maskM(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskQ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of absolute charge from each item in a * collection of ReconstructedParticle. @@ -795,7 +798,7 @@ maskQ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskAbsq(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of pdg from each item in a collection * of ReconstructedParticle. @@ -807,7 +810,7 @@ maskAbsq(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskPdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of absolute pdg from each item in a * collection of ReconstructedParticle. @@ -819,7 +822,7 @@ maskPdg(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskAbspdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of momentum from each item in a * collection of ReconstructedParticle. @@ -1058,7 +1061,7 @@ maskAbspdg(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selP(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of transverse * momentum. @@ -1070,7 +1073,7 @@ selP(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPt(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of x momentum. * @@ -1081,7 +1084,7 @@ selPt(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPx(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of y momentum. * @@ -1092,7 +1095,7 @@ selPx(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of z momentum. * @@ -1103,7 +1106,7 @@ selPy(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPz(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of * pseudorapidity. @@ -1115,7 +1118,7 @@ selPz(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selEta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of rapidity. * @@ -1126,7 +1129,7 @@ selEta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selRapidity(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of polar angle. * @@ -1137,7 +1140,7 @@ selRapidity(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selTheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of azimutal * angle. @@ -1149,7 +1152,7 @@ selTheta(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of distance to * origin. @@ -1161,7 +1164,7 @@ selPhi(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of x * coordinate. @@ -1173,7 +1176,7 @@ selR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of y * coordinate. @@ -1185,7 +1188,7 @@ selX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of z * coordinate. @@ -1197,7 +1200,7 @@ selY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of energy. * @@ -1208,7 +1211,7 @@ selZ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selE(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of mass. * @@ -1219,7 +1222,7 @@ selE(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selM(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of charge. * @@ -1230,7 +1233,7 @@ selM(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selQ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of absolute * charge. @@ -1242,7 +1245,7 @@ selQ(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selAbsq(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of pdg. * @@ -1253,7 +1256,7 @@ selAbsq(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selPdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of absolute * pdg. @@ -1265,7 +1268,7 @@ selPdg(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selAbspdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of ReconstructedParticle based on the value of momentum. * @@ -1492,7 +1495,7 @@ selAbspdg(LogicalOperators::ComparisonOperator op, int val, * */ ROOT::VecOps::RVec -sortP(ROOT::VecOps::RVec collection, +sortP(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of transverse @@ -1503,7 +1506,7 @@ sortP(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPt(ROOT::VecOps::RVec collection, +sortPt(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of x momentum. @@ -1513,7 +1516,7 @@ sortPt(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPx(ROOT::VecOps::RVec collection, +sortPx(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of y momentum. @@ -1523,7 +1526,7 @@ sortPx(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPy(ROOT::VecOps::RVec collection, +sortPy(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of z momentum. @@ -1533,7 +1536,7 @@ sortPy(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPz(ROOT::VecOps::RVec collection, +sortPz(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of @@ -1544,7 +1547,7 @@ sortPz(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortEta(ROOT::VecOps::RVec collection, +sortEta(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of rapidity. @@ -1554,7 +1557,7 @@ sortEta(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortRapidity(ROOT::VecOps::RVec collection, +sortRapidity(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of polar angle. @@ -1564,7 +1567,7 @@ sortRapidity(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortTheta(ROOT::VecOps::RVec collection, +sortTheta(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of azimutal @@ -1575,7 +1578,7 @@ sortTheta(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPhi(ROOT::VecOps::RVec collection, +sortPhi(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of distance to @@ -1586,7 +1589,7 @@ sortPhi(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, +sortR(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of x @@ -1597,7 +1600,7 @@ sortR(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, +sortX(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of y @@ -1608,7 +1611,7 @@ sortX(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, +sortY(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of z @@ -1619,7 +1622,7 @@ sortY(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, +sortZ(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of energy. @@ -1629,7 +1632,7 @@ sortZ(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortE(ROOT::VecOps::RVec collection, +sortE(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of mass. @@ -1639,7 +1642,7 @@ sortE(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortM(ROOT::VecOps::RVec collection, +sortM(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of charge. @@ -1649,7 +1652,7 @@ sortM(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortQ(ROOT::VecOps::RVec collection, +sortQ(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of absolute @@ -1660,7 +1663,7 @@ sortQ(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortAbsq(ROOT::VecOps::RVec collection, +sortAbsq(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of pdg. @@ -1670,7 +1673,7 @@ sortAbsq(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortPdg(ROOT::VecOps::RVec collection, +sortPdg(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of ReconstructedParticle based on the value of momentum. @@ -1871,8 +1874,8 @@ sortPdg(edm4hep::ReconstructedParticleCollection &collection, * */ ROOT::VecOps::RVec getParticles( - edm4hep::ReconstructedParticleData item, - ROOT::VecOps::RVec relatedCollection); + edm4hep::ReconstructedParticleData &item, + ROOT::VecOps::RVec &relatedCollection); /** * Get the collection of Track related to a ReconstructedParticle. * @@ -1882,8 +1885,8 @@ ROOT::VecOps::RVec getParticles( * */ ROOT::VecOps::RVec -getTracks(edm4hep::ReconstructedParticleData item, - ROOT::VecOps::RVec relatedCollection); +getTracks(edm4hep::ReconstructedParticleData &item, + ROOT::VecOps::RVec &relatedCollection); /** * Get the collection of Cluster related to a ReconstructedParticle. * @@ -1893,8 +1896,8 @@ getTracks(edm4hep::ReconstructedParticleData item, * */ ROOT::VecOps::RVec -getClusters(edm4hep::ReconstructedParticleData item, - ROOT::VecOps::RVec relatedCollection); +getClusters(edm4hep::ReconstructedParticleData &item, + ROOT::VecOps::RVec &relatedCollection); /** * Get the collection of ReconstructedParticle related to a * ReconstructedParticle. diff --git a/include/ral/Track.h b/include/ral/Track.h index 252b2bc..64d4d0b 100644 --- a/include/ral/Track.h +++ b/include/ral/Track.h @@ -11,7 +11,7 @@ namespace Track { * */ ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection); +getType(ROOT::VecOps::RVec &collection); /** * Get chi^2 from each item in a collection of Track. * @@ -19,7 +19,7 @@ getType(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getChi2(ROOT::VecOps::RVec collection); +getChi2(ROOT::VecOps::RVec &collection); /** * Get degrees of freedom from each item in a collection of Track. * @@ -27,7 +27,7 @@ getChi2(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getndf(ROOT::VecOps::RVec collection); +getndf(ROOT::VecOps::RVec &collection); /** * Get number of holes from each item in a collection of Track. * @@ -35,7 +35,7 @@ getndf(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getNholes(ROOT::VecOps::RVec collection); +getNholes(ROOT::VecOps::RVec &collection); /** * Get type from each item in a collection of Track. * @@ -70,28 +70,28 @@ ROOT::VecOps::RVec getNholes(const edm4hep::TrackCollection &collection); * @param collection Collection of Track to look in * */ -int printType(ROOT::VecOps::RVec collection); +int printType(ROOT::VecOps::RVec &collection); /** * Print chi^2 from each item in a collection of Track. * * @param collection Collection of Track to look in * */ -int printChi2(ROOT::VecOps::RVec collection); +int printChi2(ROOT::VecOps::RVec &collection); /** * Print degrees of freedom from each item in a collection of Track. * * @param collection Collection of Track to look in * */ -int printndf(ROOT::VecOps::RVec collection); +int printndf(ROOT::VecOps::RVec &collection); /** * Print number of holes from each item in a collection of Track. * * @param collection Collection of Track to look in * */ -int printNholes(ROOT::VecOps::RVec collection); +int printNholes(ROOT::VecOps::RVec &collection); /** * Print type from each item in a collection of Track. * @@ -131,7 +131,7 @@ int printNholes(const edm4hep::TrackCollection &collection); */ ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of chi^2 from each item in a * collection of Track. @@ -143,7 +143,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskChi2(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of degrees of freedom from each item * in a collection of Track. @@ -155,7 +155,7 @@ maskChi2(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskndf(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of number of holes from each item in a * collection of Track. @@ -167,7 +167,7 @@ maskndf(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskNholes(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of type from each item in a collection * of Track. @@ -226,7 +226,7 @@ ROOT::VecOps::RVec maskNholes(LogicalOperators::ComparisonOperator op, */ ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Track based on the value of chi^2. * @@ -237,7 +237,7 @@ selType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selChi2(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Track based on the value of degrees of freedom. * @@ -248,7 +248,7 @@ selChi2(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selndf(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Track based on the value of number of holes. * @@ -259,7 +259,7 @@ selndf(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selNholes(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Track based on the value of type. * @@ -312,7 +312,7 @@ edm4hep::TrackCollection selNholes(LogicalOperators::ComparisonOperator op, * */ ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, +sortType(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Track based on the value of chi^2. @@ -322,7 +322,7 @@ sortType(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortChi2(ROOT::VecOps::RVec collection, +sortChi2(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Track based on the value of degrees of freedom. @@ -332,7 +332,7 @@ sortChi2(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortndf(ROOT::VecOps::RVec collection, +sortndf(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Track based on the value of number of holes. @@ -342,7 +342,7 @@ sortndf(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortNholes(ROOT::VecOps::RVec collection, +sortNholes(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Track based on the value of type. diff --git a/include/ral/TrackerHit3D.h b/include/ral/TrackerHit3D.h index 7bfdc2f..4f88cc1 100644 --- a/include/ral/TrackerHit3D.h +++ b/include/ral/TrackerHit3D.h @@ -11,7 +11,7 @@ namespace TrackerHit3D { * */ ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection); +getType(ROOT::VecOps::RVec &collection); /** * Get quality from each item in a collection of TrackerHit3D. * @@ -19,7 +19,7 @@ getType(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getQuality(ROOT::VecOps::RVec collection); +getQuality(ROOT::VecOps::RVec &collection); /** * Get detector cell ID from each item in a collection of TrackerHit3D. * @@ -27,7 +27,7 @@ getQuality(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getCellID(ROOT::VecOps::RVec collection); +getCellID(ROOT::VecOps::RVec &collection); /** * Get eDep from each item in a collection of TrackerHit3D. * @@ -35,7 +35,7 @@ getCellID(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getEDep(ROOT::VecOps::RVec collection); +getEDep(ROOT::VecOps::RVec &collection); /** * Get time of the hit from each item in a collection of TrackerHit3D. * @@ -43,7 +43,7 @@ getEDep(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getTime(ROOT::VecOps::RVec collection); +getTime(ROOT::VecOps::RVec &collection); /** * Get type from each item in a collection of TrackerHit3D. * @@ -90,35 +90,35 @@ getTime(const edm4hep::TrackerHit3DCollection &collection); * @param collection Collection of TrackerHit3D to look in * */ -int printType(ROOT::VecOps::RVec collection); +int printType(ROOT::VecOps::RVec &collection); /** * Print type from each item in a collection of TrackerHit3D. * * @param collection Collection of TrackerHit3D to look in * */ -int printQuality(ROOT::VecOps::RVec collection); +int printQuality(ROOT::VecOps::RVec &collection); /** * Print detector cell ID from each item in a collection of TrackerHit3D. * * @param collection Collection of TrackerHit3D to look in * */ -int printCellID(ROOT::VecOps::RVec collection); +int printCellID(ROOT::VecOps::RVec &collection); /** * Print eDep from each item in a collection of TrackerHit3D. * * @param collection Collection of TrackerHit3D to look in * */ -int printEDep(ROOT::VecOps::RVec collection); +int printEDep(ROOT::VecOps::RVec &collection); /** * Print time of the hit from each item in a collection of TrackerHit3D. * * @param collection Collection of TrackerHit3D to look in * */ -int printTime(ROOT::VecOps::RVec collection); +int printTime(ROOT::VecOps::RVec &collection); /** * Print type from each item in a collection of TrackerHit3D. * @@ -165,7 +165,7 @@ int printTime(const edm4hep::TrackerHit3DCollection &collection); */ ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of type from each item in a collection * of TrackerHit3D. @@ -177,7 +177,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskQuality(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of detector cell ID from each item in * a collection of TrackerHit3D. @@ -189,7 +189,7 @@ maskQuality(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of eDep from each item in a collection * of TrackerHit3D. @@ -201,7 +201,7 @@ maskCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, */ ROOT::VecOps::RVec maskEDep(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of time of the hit from each item in a * collection of TrackerHit3D. @@ -213,7 +213,7 @@ maskEDep(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskTime(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of type from each item in a collection * of TrackerHit3D. @@ -284,7 +284,7 @@ maskTime(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of TrackerHit3D based on the value of type. * @@ -295,7 +295,7 @@ selType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selQuality(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of TrackerHit3D based on the value of detector cell ID. * @@ -306,7 +306,7 @@ selQuality(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of TrackerHit3D based on the value of eDep. * @@ -317,7 +317,7 @@ selCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, */ ROOT::VecOps::RVec selEDep(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of TrackerHit3D based on the value of time of the hit. * @@ -328,7 +328,7 @@ selEDep(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selTime(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of TrackerHit3D based on the value of type. * @@ -392,7 +392,7 @@ selTime(LogicalOperators::ComparisonOperator op, float val, * */ ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, +sortType(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of TrackerHit3D based on the value of quality. @@ -402,7 +402,7 @@ sortType(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortQuality(ROOT::VecOps::RVec collection, +sortQuality(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of TrackerHit3D based on the value of detector cell ID. @@ -412,7 +412,7 @@ sortQuality(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortCellID(ROOT::VecOps::RVec collection, +sortCellID(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of TrackerHit3D based on the value of eDep. @@ -422,7 +422,7 @@ sortCellID(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortEDep(ROOT::VecOps::RVec collection, +sortEDep(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of TrackerHit3D based on the value of time of the hit. @@ -432,7 +432,7 @@ sortEDep(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortTime(ROOT::VecOps::RVec collection, +sortTime(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of TrackerHit3D based on the value of type. diff --git a/include/ral/Vertex.h b/include/ral/Vertex.h index 4bc6ff3..d6c314f 100644 --- a/include/ral/Vertex.h +++ b/include/ral/Vertex.h @@ -13,7 +13,7 @@ namespace Vertex { * */ ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection); +getType(ROOT::VecOps::RVec &collection); /** * Get chi^2 from each item in a collection of Vertex. * @@ -21,7 +21,7 @@ getType(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getChi2(ROOT::VecOps::RVec collection); +getChi2(ROOT::VecOps::RVec &collection); /** * Get degrees of freedom from each item in a collection of Vertex. * @@ -29,7 +29,7 @@ getChi2(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getNdf(ROOT::VecOps::RVec collection); +getNdf(ROOT::VecOps::RVec &collection); /** * Get algorithm type from each item in a collection of Vertex. * @@ -37,7 +37,7 @@ getNdf(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getAlgorithmType(ROOT::VecOps::RVec collection); +getAlgorithmType(ROOT::VecOps::RVec &collection); /** * Get distance to origin from each item in a collection of Vertex. * @@ -45,7 +45,7 @@ getAlgorithmType(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection); +getR(ROOT::VecOps::RVec &collection); /** * Get x coordinate from each item in a collection of Vertex. * @@ -53,7 +53,7 @@ getR(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection); +getX(ROOT::VecOps::RVec &collection); /** * Get y coordinate from each item in a collection of Vertex. * @@ -61,7 +61,7 @@ getX(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection); +getY(ROOT::VecOps::RVec &collection); /** * Get z coordinate from each item in a collection of Vertex. * @@ -69,7 +69,7 @@ getY(ROOT::VecOps::RVec collection); * */ ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection); +getZ(ROOT::VecOps::RVec &collection); /** * Get type from each item in a collection of Vertex. * @@ -133,56 +133,56 @@ ROOT::VecOps::RVec getZ(const edm4hep::VertexCollection &collection); * @param collection Collection of Vertex to look in * */ -int printType(ROOT::VecOps::RVec collection); +int printType(ROOT::VecOps::RVec &collection); /** * Print chi^2 from each item in a collection of Vertex. * * @param collection Collection of Vertex to look in * */ -int printChi2(ROOT::VecOps::RVec collection); +int printChi2(ROOT::VecOps::RVec &collection); /** * Print degrees of freedom from each item in a collection of Vertex. * * @param collection Collection of Vertex to look in * */ -int printNdf(ROOT::VecOps::RVec collection); +int printNdf(ROOT::VecOps::RVec &collection); /** * Print algorithm type from each item in a collection of Vertex. * * @param collection Collection of Vertex to look in * */ -int printAlgorithmType(ROOT::VecOps::RVec collection); +int printAlgorithmType(ROOT::VecOps::RVec &collection); /** * Print distance to origin from each item in a collection of Vertex. * * @param collection Collection of Vertex to look in * */ -int printR(ROOT::VecOps::RVec collection); +int printR(ROOT::VecOps::RVec &collection); /** * Print x coordinate from each item in a collection of Vertex. * * @param collection Collection of Vertex to look in * */ -int printX(ROOT::VecOps::RVec collection); +int printX(ROOT::VecOps::RVec &collection); /** * Print y coordinate from each item in a collection of Vertex. * * @param collection Collection of Vertex to look in * */ -int printY(ROOT::VecOps::RVec collection); +int printY(ROOT::VecOps::RVec &collection); /** * Print z coordinate from each item in a collection of Vertex. * * @param collection Collection of Vertex to look in * */ -int printZ(ROOT::VecOps::RVec collection); +int printZ(ROOT::VecOps::RVec &collection); /** * Print type from each item in a collection of Vertex. * @@ -250,7 +250,7 @@ int printZ(const edm4hep::VertexCollection &collection); */ ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of chi^2 from each item in a * collection of Vertex. @@ -262,7 +262,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskChi2(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of degrees of freedom from each item * in a collection of Vertex. @@ -274,7 +274,7 @@ maskChi2(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskNdf(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of algorithm type from each item in a * collection of Vertex. @@ -286,7 +286,7 @@ maskNdf(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskAlgorithmType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of distance to origin from each item * in a collection of Vertex. @@ -298,7 +298,7 @@ maskAlgorithmType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of x coordinate from each item in a * collection of Vertex. @@ -310,7 +310,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of y coordinate from each item in a * collection of Vertex. @@ -322,7 +322,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of z coordinate from each item in a * collection of Vertex. @@ -334,7 +334,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Create boolean mask based on the value of type from each item in a collection * of Vertex. @@ -441,7 +441,7 @@ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, */ ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Vertex based on the value of chi^2. * @@ -452,7 +452,7 @@ selType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selChi2(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Vertex based on the value of degrees of freedom. * @@ -463,7 +463,7 @@ selChi2(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selNdf(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Vertex based on the value of algorithm type. * @@ -474,7 +474,7 @@ selNdf(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selAlgorithmType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Vertex based on the value of distance to origin. * @@ -485,7 +485,7 @@ selAlgorithmType(LogicalOperators::ComparisonOperator op, int val, */ ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Vertex based on the value of x coordinate. * @@ -496,7 +496,7 @@ selR(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Vertex based on the value of y coordinate. * @@ -507,7 +507,7 @@ selX(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Vertex based on the value of z coordinate. * @@ -518,7 +518,7 @@ selY(LogicalOperators::ComparisonOperator op, float val, */ ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection); + ROOT::VecOps::RVec &collection); /** * Select a subgroup of Vertex based on the value of type. * @@ -615,7 +615,7 @@ edm4hep::VertexCollection selZ(LogicalOperators::ComparisonOperator op, * */ ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, +sortType(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Vertex based on the value of chi^2. @@ -625,7 +625,7 @@ sortType(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortChi2(ROOT::VecOps::RVec collection, +sortChi2(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Vertex based on the value of degrees of freedom. @@ -635,7 +635,7 @@ sortChi2(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortNdf(ROOT::VecOps::RVec collection, +sortNdf(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Vertex based on the value of algorithm type. @@ -645,7 +645,7 @@ sortNdf(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortAlgorithmType(ROOT::VecOps::RVec collection, +sortAlgorithmType(ROOT::VecOps::RVec &collection, bool reverse = false); /** * Sort a collection of Vertex based on the value of distance to origin. @@ -655,7 +655,8 @@ sortAlgorithmType(ROOT::VecOps::RVec collection, * */ ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, bool reverse = false); +sortR(ROOT::VecOps::RVec &collection, + bool reverse = false); /** * Sort a collection of Vertex based on the value of b. * @@ -664,7 +665,8 @@ sortR(ROOT::VecOps::RVec collection, bool reverse = false); * */ ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, bool reverse = false); +sortX(ROOT::VecOps::RVec &collection, + bool reverse = false); /** * Sort a collection of Vertex based on the value of b. * @@ -673,7 +675,8 @@ sortX(ROOT::VecOps::RVec collection, bool reverse = false); * */ ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, bool reverse = false); +sortY(ROOT::VecOps::RVec &collection, + bool reverse = false); /** * Sort a collection of Vertex based on the value of z coordinate. * @@ -682,7 +685,8 @@ sortY(ROOT::VecOps::RVec collection, bool reverse = false); * */ ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, bool reverse = false); +sortZ(ROOT::VecOps::RVec &collection, + bool reverse = false); /** * Sort a collection of Vertex based on the value of type. * @@ -764,8 +768,8 @@ edm4hep::VertexCollection sortZ(edm4hep::VertexCollection &collection, * */ ROOT::VecOps::RVec getParticles( - edm4hep::VertexData item, - ROOT::VecOps::RVec relatedCollection); + edm4hep::VertexData &item, + ROOT::VecOps::RVec &relatedCollection); /** * Get the collection of ReconstructedParticle related to a Vertex. * diff --git a/metaprograming/FunctionCollectionRequest.py b/metaprograming/FunctionCollectionRequest.py index a7a1464..774212b 100644 --- a/metaprograming/FunctionCollectionRequest.py +++ b/metaprograming/FunctionCollectionRequest.py @@ -16,9 +16,9 @@ def __init__(self, name: str, in_edm_t: str, out_edm_t: str, case Edm4hepCollection.RVEC: vec_t = rvec(f"edm4hep::{out_edm_t}Data") params = [ - FunctionParameter("item", f"edm4hep::{in_edm_t}Data", + FunctionParameter("item", f"edm4hep::{in_edm_t}Data &", f"{in_edm_t} from which to look for the related collection."), - FunctionParameter("relatedCollection", rvec(f"edm4hep::{out_edm_t}Data"), + FunctionParameter("relatedCollection", rvec(f"edm4hep::{out_edm_t}Data") + "&", f"Complete collection of {out_edm_t} to filter") ] code = ( diff --git a/metaprograming/FunctionGetter.py b/metaprograming/FunctionGetter.py index 85565f5..f0e10b3 100644 --- a/metaprograming/FunctionGetter.py +++ b/metaprograming/FunctionGetter.py @@ -16,7 +16,7 @@ def __init__(self, name: str, out_t: str, edm_t: str, match col_t: case Edm4hepCollection.RVEC: params = [ - FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data"), + FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data") + "&", f"Collection of {edm_t} to look in") ] code = ( @@ -37,7 +37,7 @@ def __init__(self, name: str, out_t: str, edm_t: str, f"vec.reserve(collection.size());\n" f"for(const edm4hep::{edm_t} &item : collection)\u007b\n" f"{out_t} result;\n") + get_code + ( - f"vec.emplace_back(result);\n" + f"vec.push_back(result);\n" f"\u007d\n" f"return vec;\n") diff --git a/metaprograming/FunctionMask.py b/metaprograming/FunctionMask.py index a16531e..4dd9ae7 100644 --- a/metaprograming/FunctionMask.py +++ b/metaprograming/FunctionMask.py @@ -41,7 +41,7 @@ def __init__(self, name: str, val_t: str, edm_t: str, f"Logical operation applied to create the mask."), FunctionParameter("val", val_t, f"Value to compare with."), - FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data"), + FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data") + "&", f"Collection of {edm_t} to look in") ] case Edm4hepCollection.COLLECTION: diff --git a/metaprograming/FunctionPrinter.py b/metaprograming/FunctionPrinter.py index 4d7b3c6..1914816 100644 --- a/metaprograming/FunctionPrinter.py +++ b/metaprograming/FunctionPrinter.py @@ -21,7 +21,7 @@ def __init__(self, name: str, out_t: str, edm_t: str, match col_t: case Edm4hepCollection.RVEC: params = [ - FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data"), + FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data") + "&", f"Collection of {edm_t} to look in") ] case Edm4hepCollection.COLLECTION: diff --git a/metaprograming/FunctionSelector.py b/metaprograming/FunctionSelector.py index 6b71aa4..cdc7ae4 100644 --- a/metaprograming/FunctionSelector.py +++ b/metaprograming/FunctionSelector.py @@ -21,7 +21,7 @@ def __init__(self, name: str, val_t: str, edm_t: str, f"Logical operation applied to create the mask."), FunctionParameter("val", val_t, f"Value to compare with."), - FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data"), + FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data") +"&", f"Collection of {edm_t} to look in") ] case Edm4hepCollection.COLLECTION: diff --git a/metaprograming/FunctionSorter.py b/metaprograming/FunctionSorter.py index b6685e0..60bfe4c 100644 --- a/metaprograming/FunctionSorter.py +++ b/metaprograming/FunctionSorter.py @@ -15,7 +15,7 @@ def __init__(self, name: str, val_t: str, edm_t: str, col_t: Edm4hepCollection, case Edm4hepCollection.RVEC: vec_t = rvec(f"edm4hep::{edm_t}Data") params = [ - FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data"), + FunctionParameter("collection", rvec(f"edm4hep::{edm_t}Data") + "&", f"Collection of {edm_t} to be sorted"), FunctionParameter("reverse", "bool", f"Change the order of sorting.", "false") diff --git a/metaprograming/ReconstructedParticle.py b/metaprograming/ReconstructedParticle.py index 7524f36..0f4e8d6 100644 --- a/metaprograming/ReconstructedParticle.py +++ b/metaprograming/ReconstructedParticle.py @@ -46,7 +46,7 @@ def write_recoparticle_code(header_dir: str, src_dir: str): writer.add_getter("Z", "float", Edm4hepCollection.RVEC, "z coordinate", vertex_property_from_DataClass("item", "referencePoint", "z", "result")) writer.add_getter("E", "float", Edm4hepCollection.RVEC, "energy", - momentum_property_from_DataClass("item", "momentum", "e", "result")) + obj_member("item", "energy", "result")) writer.add_getter("M", "float", Edm4hepCollection.RVEC, "mass", obj_member("item", "mass", "result")) writer.add_getter("Q", "float", Edm4hepCollection.RVEC, "charge", diff --git a/src/CalorimeterHit.cc b/src/CalorimeterHit.cc index 6906e65..2dda1ee 100644 --- a/src/CalorimeterHit.cc +++ b/src/CalorimeterHit.cc @@ -2,7 +2,7 @@ namespace k4::ral { namespace CalorimeterHit { ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection) { +getType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::CalorimeterHitData &item : collection) { @@ -13,7 +13,7 @@ getType(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getCellID(ROOT::VecOps::RVec collection) { +getCellID(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::CalorimeterHitData &item : collection) { @@ -24,7 +24,7 @@ getCellID(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getEnergy(ROOT::VecOps::RVec collection) { +getEnergy(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::CalorimeterHitData &item : collection) { @@ -35,7 +35,7 @@ getEnergy(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getTime(ROOT::VecOps::RVec collection) { +getTime(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::CalorimeterHitData &item : collection) { @@ -46,7 +46,7 @@ getTime(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection) { +getR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::CalorimeterHitData &item : collection) { @@ -59,7 +59,7 @@ getR(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection) { +getX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::CalorimeterHitData &item : collection) { @@ -72,7 +72,7 @@ getX(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection) { +getY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::CalorimeterHitData &item : collection) { @@ -85,7 +85,7 @@ getY(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection) { +getZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::CalorimeterHitData &item : collection) { @@ -104,7 +104,7 @@ getType(const edm4hep::CalorimeterHitCollection &collection) { for (const edm4hep::CalorimeterHit &item : collection) { int result; result = (item.getType()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -115,7 +115,7 @@ getCellID(const edm4hep::CalorimeterHitCollection &collection) { for (const edm4hep::CalorimeterHit &item : collection) { unsigned long long result; result = (item.getCellID()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -126,7 +126,7 @@ getEnergy(const edm4hep::CalorimeterHitCollection &collection) { for (const edm4hep::CalorimeterHit &item : collection) { float result; result = (item.getEnergy()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -137,7 +137,7 @@ getTime(const edm4hep::CalorimeterHitCollection &collection) { for (const edm4hep::CalorimeterHit &item : collection) { float result; result = (item.getTime()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -150,7 +150,7 @@ getR(const edm4hep::CalorimeterHitCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.r(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -163,7 +163,7 @@ getX(const edm4hep::CalorimeterHitCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.x(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -176,7 +176,7 @@ getY(const edm4hep::CalorimeterHitCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.y(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -189,11 +189,11 @@ getZ(const edm4hep::CalorimeterHitCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.z(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } -int printType(ROOT::VecOps::RVec collection) { +int printType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getType(collection); std::cout << "Type: "; for (const int &item : vec) { @@ -202,7 +202,7 @@ int printType(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printCellID(ROOT::VecOps::RVec collection) { +int printCellID(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getCellID(collection); std::cout << "Detector cell id: "; for (const unsigned long long &item : vec) { @@ -211,7 +211,7 @@ int printCellID(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printEnergy(ROOT::VecOps::RVec collection) { +int printEnergy(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getEnergy(collection); std::cout << "Energy: "; for (const float &item : vec) { @@ -220,7 +220,7 @@ int printEnergy(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printTime(ROOT::VecOps::RVec collection) { +int printTime(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getTime(collection); std::cout << "Time of the hit: "; for (const float &item : vec) { @@ -229,7 +229,7 @@ int printTime(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printR(ROOT::VecOps::RVec collection) { +int printR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getR(collection); std::cout << "Distance to origin: "; for (const float &item : vec) { @@ -238,7 +238,7 @@ int printR(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printX(ROOT::VecOps::RVec collection) { +int printX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getX(collection); std::cout << "X coordinate: "; for (const float &item : vec) { @@ -247,7 +247,7 @@ int printX(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printY(ROOT::VecOps::RVec collection) { +int printY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getY(collection); std::cout << "Y coordinate: "; for (const float &item : vec) { @@ -256,7 +256,7 @@ int printY(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printZ(ROOT::VecOps::RVec collection) { +int printZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getZ(collection); std::cout << "Z coordinate: "; for (const float &item : vec) { @@ -339,7 +339,7 @@ int printZ(const edm4hep::CalorimeterHitCollection &collection) { } ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getType(collection); @@ -366,7 +366,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getCellID(collection); @@ -393,7 +393,7 @@ maskCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, } ROOT::VecOps::RVec maskEnergy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getEnergy(collection); @@ -420,7 +420,7 @@ maskEnergy(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskTime(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getTime(collection); @@ -447,7 +447,7 @@ maskTime(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getR(collection); @@ -474,7 +474,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getX(collection); @@ -501,7 +501,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getY(collection); @@ -528,7 +528,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getZ(collection); @@ -771,49 +771,49 @@ maskZ(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskType(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskCellID(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selEnergy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskEnergy(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selTime(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskTime(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskR(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskX(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskY(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskZ(op, val, collection); return LogicalOperators::filter(mask, collection); } @@ -866,7 +866,7 @@ selZ(LogicalOperators::ComparisonOperator op, float val, return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, +sortType(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::CalorimeterHitData x, edm4hep::CalorimeterHitData y) { @@ -879,7 +879,7 @@ sortType(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortCellID(ROOT::VecOps::RVec collection, +sortCellID(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::CalorimeterHitData x, edm4hep::CalorimeterHitData y) { @@ -892,7 +892,7 @@ sortCellID(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortEnergy(ROOT::VecOps::RVec collection, +sortEnergy(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::CalorimeterHitData x, edm4hep::CalorimeterHitData y) { @@ -905,7 +905,7 @@ sortEnergy(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortTime(ROOT::VecOps::RVec collection, +sortTime(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::CalorimeterHitData x, edm4hep::CalorimeterHitData y) { @@ -918,7 +918,7 @@ sortTime(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, +sortR(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::CalorimeterHitData x, edm4hep::CalorimeterHitData y) { @@ -933,7 +933,7 @@ sortR(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, +sortX(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::CalorimeterHitData x, edm4hep::CalorimeterHitData y) { @@ -948,7 +948,7 @@ sortX(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, +sortY(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::CalorimeterHitData x, edm4hep::CalorimeterHitData y) { @@ -963,7 +963,7 @@ sortY(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, +sortZ(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::CalorimeterHitData x, edm4hep::CalorimeterHitData y) { diff --git a/src/Cluster.cc b/src/Cluster.cc index 28ea85b..efdaba7 100644 --- a/src/Cluster.cc +++ b/src/Cluster.cc @@ -2,7 +2,7 @@ namespace k4::ral { namespace Cluster { ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection) { +getType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ClusterData &item : collection) { @@ -13,7 +13,7 @@ getType(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getEnergy(ROOT::VecOps::RVec collection) { +getEnergy(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ClusterData &item : collection) { @@ -24,7 +24,7 @@ getEnergy(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getITheta(ROOT::VecOps::RVec collection) { +getITheta(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ClusterData &item : collection) { @@ -35,7 +35,7 @@ getITheta(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPhi(ROOT::VecOps::RVec collection) { +getPhi(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ClusterData &item : collection) { @@ -46,7 +46,7 @@ getPhi(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection) { +getR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ClusterData &item : collection) { @@ -59,7 +59,7 @@ getR(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection) { +getX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ClusterData &item : collection) { @@ -72,7 +72,7 @@ getX(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection) { +getY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ClusterData &item : collection) { @@ -85,7 +85,7 @@ getY(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection) { +getZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ClusterData &item : collection) { @@ -103,7 +103,7 @@ ROOT::VecOps::RVec getType(const edm4hep::ClusterCollection &collection) { for (const edm4hep::Cluster &item : collection) { int result; result = (item.getType()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -114,7 +114,7 @@ getEnergy(const edm4hep::ClusterCollection &collection) { for (const edm4hep::Cluster &item : collection) { float result; result = (item.getEnergy()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -125,7 +125,7 @@ getITheta(const edm4hep::ClusterCollection &collection) { for (const edm4hep::Cluster &item : collection) { float result; result = (item.getITheta()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -135,7 +135,7 @@ ROOT::VecOps::RVec getPhi(const edm4hep::ClusterCollection &collection) { for (const edm4hep::Cluster &item : collection) { float result; result = (item.getPhi()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -147,7 +147,7 @@ ROOT::VecOps::RVec getR(const edm4hep::ClusterCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.r(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -159,7 +159,7 @@ ROOT::VecOps::RVec getX(const edm4hep::ClusterCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.x(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -171,7 +171,7 @@ ROOT::VecOps::RVec getY(const edm4hep::ClusterCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.y(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -183,11 +183,11 @@ ROOT::VecOps::RVec getZ(const edm4hep::ClusterCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.z(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } -int printType(ROOT::VecOps::RVec collection) { +int printType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getType(collection); std::cout << "Type: "; for (const int &item : vec) { @@ -196,7 +196,7 @@ int printType(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printEnergy(ROOT::VecOps::RVec collection) { +int printEnergy(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getEnergy(collection); std::cout << "Energy: "; for (const float &item : vec) { @@ -205,7 +205,7 @@ int printEnergy(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printITheta(ROOT::VecOps::RVec collection) { +int printITheta(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getITheta(collection); std::cout << "Intrinsic theta angle: "; for (const float &item : vec) { @@ -214,7 +214,7 @@ int printITheta(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPhi(ROOT::VecOps::RVec collection) { +int printPhi(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPhi(collection); std::cout << "Intrinsic phi angle: "; for (const float &item : vec) { @@ -223,7 +223,7 @@ int printPhi(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printR(ROOT::VecOps::RVec collection) { +int printR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getR(collection); std::cout << "Distance to origin: "; for (const float &item : vec) { @@ -232,7 +232,7 @@ int printR(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printX(ROOT::VecOps::RVec collection) { +int printX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getX(collection); std::cout << "X coordinate: "; for (const float &item : vec) { @@ -241,7 +241,7 @@ int printX(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printY(ROOT::VecOps::RVec collection) { +int printY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getY(collection); std::cout << "Y coordinate: "; for (const float &item : vec) { @@ -250,7 +250,7 @@ int printY(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printZ(ROOT::VecOps::RVec collection) { +int printZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getZ(collection); std::cout << "Z coordinate: "; for (const float &item : vec) { @@ -333,7 +333,7 @@ int printZ(const edm4hep::ClusterCollection &collection) { } ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getType(collection); @@ -360,7 +360,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskEnergy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getEnergy(collection); @@ -387,7 +387,7 @@ maskEnergy(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskITheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getITheta(collection); @@ -414,7 +414,7 @@ maskITheta(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPhi(collection); @@ -441,7 +441,7 @@ maskPhi(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getR(collection); @@ -468,7 +468,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getX(collection); @@ -495,7 +495,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getY(collection); @@ -522,7 +522,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getZ(collection); @@ -765,49 +765,49 @@ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, } ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskType(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selEnergy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskEnergy(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selITheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskITheta(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPhi(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskR(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskX(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskY(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskZ(op, val, collection); return LogicalOperators::filter(mask, collection); } @@ -860,7 +860,7 @@ edm4hep::ClusterCollection selZ(LogicalOperators::ComparisonOperator op, return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, bool reverse) { +sortType(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ClusterData x, edm4hep::ClusterData y) { int a, b; a = (x.type); @@ -871,7 +871,7 @@ sortType(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortEnergy(ROOT::VecOps::RVec collection, bool reverse) { +sortEnergy(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ClusterData x, edm4hep::ClusterData y) { float a, b; a = (x.energy); @@ -882,7 +882,7 @@ sortEnergy(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortITheta(ROOT::VecOps::RVec collection, bool reverse) { +sortITheta(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ClusterData x, edm4hep::ClusterData y) { float a, b; a = (x.iTheta); @@ -893,7 +893,7 @@ sortITheta(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPhi(ROOT::VecOps::RVec collection, bool reverse) { +sortPhi(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ClusterData x, edm4hep::ClusterData y) { float a, b; a = (x.phi); @@ -904,7 +904,7 @@ sortPhi(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, bool reverse) { +sortR(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ClusterData x, edm4hep::ClusterData y) { float a, b; ROOT::Math::XYZVector ra(x.position.x, x.position.y, x.position.z); @@ -917,7 +917,7 @@ sortR(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, bool reverse) { +sortX(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ClusterData x, edm4hep::ClusterData y) { float a, b; ROOT::Math::XYZVector ra(x.position.x, x.position.y, x.position.z); @@ -930,7 +930,7 @@ sortX(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, bool reverse) { +sortY(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ClusterData x, edm4hep::ClusterData y) { float a, b; ROOT::Math::XYZVector ra(x.position.x, x.position.y, x.position.z); @@ -943,7 +943,7 @@ sortY(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, bool reverse) { +sortZ(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ClusterData x, edm4hep::ClusterData y) { float a, b; ROOT::Math::XYZVector ra(x.position.x, x.position.y, x.position.z); @@ -1140,8 +1140,8 @@ edm4hep::ClusterCollection sortZ(edm4hep::ClusterCollection &collection, return newCollection; } ROOT::VecOps::RVec -getClusters(edm4hep::ClusterData item, - ROOT::VecOps::RVec relatedCollection) { +getClusters(edm4hep::ClusterData &item, + ROOT::VecOps::RVec &relatedCollection) { ROOT::VecOps::RVec vec; size_t len = item.clusters_end - item.clusters_begin; vec.reserve(len); @@ -1151,8 +1151,8 @@ getClusters(edm4hep::ClusterData item, return vec; } ROOT::VecOps::RVec -getHits(edm4hep::ClusterData item, - ROOT::VecOps::RVec relatedCollection) { +getHits(edm4hep::ClusterData &item, + ROOT::VecOps::RVec &relatedCollection) { ROOT::VecOps::RVec vec; size_t len = item.hits_end - item.hits_begin; vec.reserve(len); diff --git a/src/MCParticle.cc b/src/MCParticle.cc index 5840f7f..4d898d5 100644 --- a/src/MCParticle.cc +++ b/src/MCParticle.cc @@ -2,7 +2,7 @@ namespace k4::ral { namespace MCParticle { ROOT::VecOps::RVec -getP(ROOT::VecOps::RVec collection) { +getP(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -15,7 +15,7 @@ getP(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPt(ROOT::VecOps::RVec collection) { +getPt(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -28,7 +28,7 @@ getPt(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPx(ROOT::VecOps::RVec collection) { +getPx(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -41,7 +41,7 @@ getPx(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPy(ROOT::VecOps::RVec collection) { +getPy(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -54,7 +54,7 @@ getPy(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPz(ROOT::VecOps::RVec collection) { +getPz(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -67,7 +67,7 @@ getPz(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getEta(ROOT::VecOps::RVec collection) { +getEta(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -80,7 +80,7 @@ getEta(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getRapidity(ROOT::VecOps::RVec collection) { +getRapidity(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -93,7 +93,7 @@ getRapidity(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getTheta(ROOT::VecOps::RVec collection) { +getTheta(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -106,7 +106,7 @@ getTheta(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPhi(ROOT::VecOps::RVec collection) { +getPhi(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -119,7 +119,7 @@ getPhi(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPEnd(ROOT::VecOps::RVec collection) { +getPEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -133,7 +133,7 @@ getPEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPtEnd(ROOT::VecOps::RVec collection) { +getPtEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -147,7 +147,7 @@ getPtEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPxEnd(ROOT::VecOps::RVec collection) { +getPxEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -161,7 +161,7 @@ getPxEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPyEnd(ROOT::VecOps::RVec collection) { +getPyEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -175,7 +175,7 @@ getPyEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPzEnd(ROOT::VecOps::RVec collection) { +getPzEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -189,7 +189,7 @@ getPzEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getEtaEnd(ROOT::VecOps::RVec collection) { +getEtaEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -203,7 +203,7 @@ getEtaEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getRapidityEnd(ROOT::VecOps::RVec collection) { +getRapidityEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -217,7 +217,7 @@ getRapidityEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getThetaEnd(ROOT::VecOps::RVec collection) { +getThetaEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -231,7 +231,7 @@ getThetaEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPhiEnd(ROOT::VecOps::RVec collection) { +getPhiEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -245,7 +245,7 @@ getPhiEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection) { +getR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -257,7 +257,7 @@ getR(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection) { +getX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -269,7 +269,7 @@ getX(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection) { +getY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -281,7 +281,7 @@ getY(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection) { +getZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -293,7 +293,7 @@ getZ(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getREnd(ROOT::VecOps::RVec collection) { +getREnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -306,7 +306,7 @@ getREnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getXEnd(ROOT::VecOps::RVec collection) { +getXEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -319,7 +319,7 @@ getXEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getYEnd(ROOT::VecOps::RVec collection) { +getYEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -332,7 +332,7 @@ getYEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getZEnd(ROOT::VecOps::RVec collection) { +getZEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -345,7 +345,7 @@ getZEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getE(ROOT::VecOps::RVec collection) { +getE(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -358,7 +358,7 @@ getE(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getEEnd(ROOT::VecOps::RVec collection) { +getEEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -372,7 +372,7 @@ getEEnd(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getM(ROOT::VecOps::RVec collection) { +getM(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -383,7 +383,7 @@ getM(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getQ(ROOT::VecOps::RVec collection) { +getQ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -394,7 +394,7 @@ getQ(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getAbsq(ROOT::VecOps::RVec collection) { +getAbsq(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -405,7 +405,7 @@ getAbsq(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPdg(ROOT::VecOps::RVec collection) { +getPdg(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -416,7 +416,7 @@ getPdg(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getAbspdg(ROOT::VecOps::RVec collection) { +getAbspdg(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -427,7 +427,7 @@ getAbspdg(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getSimStat(ROOT::VecOps::RVec collection) { +getSimStat(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -438,7 +438,7 @@ getSimStat(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getGenStat(ROOT::VecOps::RVec collection) { +getGenStat(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::MCParticleData &item : collection) { @@ -458,7 +458,7 @@ getP(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.P(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -472,7 +472,7 @@ getPt(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.pt(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -486,7 +486,7 @@ getPx(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.px(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -500,7 +500,7 @@ getPy(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.py(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -514,7 +514,7 @@ getPz(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.pz(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -528,7 +528,7 @@ getEta(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.eta(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -542,7 +542,7 @@ getRapidity(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.Rapidity(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -556,7 +556,7 @@ getTheta(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.theta(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -570,7 +570,7 @@ getPhi(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.phi(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -584,7 +584,7 @@ getPEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.P(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -598,7 +598,7 @@ getPtEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.pt(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -612,7 +612,7 @@ getPxEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.px(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -626,7 +626,7 @@ getPyEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.py(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -640,7 +640,7 @@ getPzEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.pz(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -654,7 +654,7 @@ getEtaEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.eta(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -668,7 +668,7 @@ getRapidityEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.Rapidity(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -682,7 +682,7 @@ getThetaEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.theta(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -696,7 +696,7 @@ getPhiEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.phi(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -709,7 +709,7 @@ getR(const edm4hep::MCParticleCollection &collection) { ROOT::Math::XYZVector rresult(item.getVertex().x, item.getVertex().y, item.getVertex().z); result = rresult.r(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -722,7 +722,7 @@ getX(const edm4hep::MCParticleCollection &collection) { ROOT::Math::XYZVector rresult(item.getVertex().x, item.getVertex().y, item.getVertex().z); result = rresult.x(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -735,7 +735,7 @@ getY(const edm4hep::MCParticleCollection &collection) { ROOT::Math::XYZVector rresult(item.getVertex().x, item.getVertex().y, item.getVertex().z); result = rresult.y(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -748,7 +748,7 @@ getZ(const edm4hep::MCParticleCollection &collection) { ROOT::Math::XYZVector rresult(item.getVertex().x, item.getVertex().y, item.getVertex().z); result = rresult.z(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -761,7 +761,7 @@ getREnd(const edm4hep::MCParticleCollection &collection) { ROOT::Math::XYZVector rresult(item.getEndpoint().x, item.getEndpoint().y, item.getEndpoint().z); result = rresult.r(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -774,7 +774,7 @@ getXEnd(const edm4hep::MCParticleCollection &collection) { ROOT::Math::XYZVector rresult(item.getEndpoint().x, item.getEndpoint().y, item.getEndpoint().z); result = rresult.x(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -787,7 +787,7 @@ getYEnd(const edm4hep::MCParticleCollection &collection) { ROOT::Math::XYZVector rresult(item.getEndpoint().x, item.getEndpoint().y, item.getEndpoint().z); result = rresult.y(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -800,7 +800,7 @@ getZEnd(const edm4hep::MCParticleCollection &collection) { ROOT::Math::XYZVector rresult(item.getEndpoint().x, item.getEndpoint().y, item.getEndpoint().z); result = rresult.z(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -814,7 +814,7 @@ getE(const edm4hep::MCParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.e(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -828,7 +828,7 @@ getEEnd(const edm4hep::MCParticleCollection &collection) { item.getMomentumAtEndpoint().x, item.getMomentumAtEndpoint().y, item.getMomentumAtEndpoint().z, item.getMass()); result = presult.e(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -839,7 +839,7 @@ getM(const edm4hep::MCParticleCollection &collection) { for (const edm4hep::MCParticle &item : collection) { float result; result = (item.getMass()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -850,7 +850,7 @@ getQ(const edm4hep::MCParticleCollection &collection) { for (const edm4hep::MCParticle &item : collection) { float result; result = (item.getCharge()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -861,7 +861,7 @@ getAbsq(const edm4hep::MCParticleCollection &collection) { for (const edm4hep::MCParticle &item : collection) { float result; result = std::abs(item.getCharge()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -872,7 +872,7 @@ getPdg(const edm4hep::MCParticleCollection &collection) { for (const edm4hep::MCParticle &item : collection) { int result; result = (item.getPDG()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -883,7 +883,7 @@ getAbspdg(const edm4hep::MCParticleCollection &collection) { for (const edm4hep::MCParticle &item : collection) { int result; result = std::abs(item.getPDG()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -894,7 +894,7 @@ getSimStat(const edm4hep::MCParticleCollection &collection) { for (const edm4hep::MCParticle &item : collection) { int result; result = (item.getSimulatorStatus()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -905,11 +905,11 @@ getGenStat(const edm4hep::MCParticleCollection &collection) { for (const edm4hep::MCParticle &item : collection) { int result; result = (item.getGeneratorStatus()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } -int printP(ROOT::VecOps::RVec collection) { +int printP(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getP(collection); std::cout << "Momentum: "; for (const float &item : vec) { @@ -918,7 +918,7 @@ int printP(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPt(ROOT::VecOps::RVec collection) { +int printPt(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPt(collection); std::cout << "Transverse momentum: "; for (const float &item : vec) { @@ -927,7 +927,7 @@ int printPt(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPx(ROOT::VecOps::RVec collection) { +int printPx(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPx(collection); std::cout << "X momentum: "; for (const float &item : vec) { @@ -936,7 +936,7 @@ int printPx(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPy(ROOT::VecOps::RVec collection) { +int printPy(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPy(collection); std::cout << "Y momentum: "; for (const float &item : vec) { @@ -945,7 +945,7 @@ int printPy(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPz(ROOT::VecOps::RVec collection) { +int printPz(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPz(collection); std::cout << "Z momentum: "; for (const float &item : vec) { @@ -954,7 +954,7 @@ int printPz(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printEta(ROOT::VecOps::RVec collection) { +int printEta(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getEta(collection); std::cout << "Pseudorapidity: "; for (const float &item : vec) { @@ -963,7 +963,7 @@ int printEta(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printRapidity(ROOT::VecOps::RVec collection) { +int printRapidity(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getRapidity(collection); std::cout << "Rapidity: "; for (const float &item : vec) { @@ -972,7 +972,7 @@ int printRapidity(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printTheta(ROOT::VecOps::RVec collection) { +int printTheta(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getTheta(collection); std::cout << "Polar angle: "; for (const float &item : vec) { @@ -981,7 +981,7 @@ int printTheta(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPhi(ROOT::VecOps::RVec collection) { +int printPhi(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPhi(collection); std::cout << "Azimutal angle: "; for (const float &item : vec) { @@ -990,7 +990,7 @@ int printPhi(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPEnd(ROOT::VecOps::RVec collection) { +int printPEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPEnd(collection); std::cout << "Momentum: "; for (const float &item : vec) { @@ -999,7 +999,7 @@ int printPEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPtEnd(ROOT::VecOps::RVec collection) { +int printPtEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPtEnd(collection); std::cout << "Transverse momentum: "; for (const float &item : vec) { @@ -1008,7 +1008,7 @@ int printPtEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPxEnd(ROOT::VecOps::RVec collection) { +int printPxEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPxEnd(collection); std::cout << "X momentum: "; for (const float &item : vec) { @@ -1017,7 +1017,7 @@ int printPxEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPyEnd(ROOT::VecOps::RVec collection) { +int printPyEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPyEnd(collection); std::cout << "Y momentum: "; for (const float &item : vec) { @@ -1026,7 +1026,7 @@ int printPyEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPzEnd(ROOT::VecOps::RVec collection) { +int printPzEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPzEnd(collection); std::cout << "Z momentum: "; for (const float &item : vec) { @@ -1035,7 +1035,7 @@ int printPzEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printEtaEnd(ROOT::VecOps::RVec collection) { +int printEtaEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getEtaEnd(collection); std::cout << "Pseudorapidity: "; for (const float &item : vec) { @@ -1044,7 +1044,7 @@ int printEtaEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printRapidityEnd(ROOT::VecOps::RVec collection) { +int printRapidityEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getRapidityEnd(collection); std::cout << "Rapidity: "; for (const float &item : vec) { @@ -1053,7 +1053,7 @@ int printRapidityEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printThetaEnd(ROOT::VecOps::RVec collection) { +int printThetaEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getThetaEnd(collection); std::cout << "Polar angle: "; for (const float &item : vec) { @@ -1062,7 +1062,7 @@ int printThetaEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPhiEnd(ROOT::VecOps::RVec collection) { +int printPhiEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPhiEnd(collection); std::cout << "Azimutal angle: "; for (const float &item : vec) { @@ -1071,7 +1071,7 @@ int printPhiEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printR(ROOT::VecOps::RVec collection) { +int printR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getR(collection); std::cout << "Distance to origin: "; for (const float &item : vec) { @@ -1080,7 +1080,7 @@ int printR(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printX(ROOT::VecOps::RVec collection) { +int printX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getX(collection); std::cout << "X coordinate: "; for (const float &item : vec) { @@ -1089,7 +1089,7 @@ int printX(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printY(ROOT::VecOps::RVec collection) { +int printY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getY(collection); std::cout << "Y coordinate: "; for (const float &item : vec) { @@ -1098,7 +1098,7 @@ int printY(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printZ(ROOT::VecOps::RVec collection) { +int printZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getZ(collection); std::cout << "Z coordinate: "; for (const float &item : vec) { @@ -1107,7 +1107,7 @@ int printZ(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printREnd(ROOT::VecOps::RVec collection) { +int printREnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getREnd(collection); std::cout << "Distance to origin: "; for (const float &item : vec) { @@ -1116,7 +1116,7 @@ int printREnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printXEnd(ROOT::VecOps::RVec collection) { +int printXEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getXEnd(collection); std::cout << "X coordinate: "; for (const float &item : vec) { @@ -1125,7 +1125,7 @@ int printXEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printYEnd(ROOT::VecOps::RVec collection) { +int printYEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getYEnd(collection); std::cout << "Y coordinate: "; for (const float &item : vec) { @@ -1134,7 +1134,7 @@ int printYEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printZEnd(ROOT::VecOps::RVec collection) { +int printZEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getZEnd(collection); std::cout << "Z coordinate: "; for (const float &item : vec) { @@ -1143,7 +1143,7 @@ int printZEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printE(ROOT::VecOps::RVec collection) { +int printE(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getE(collection); std::cout << "Energy: "; for (const float &item : vec) { @@ -1152,7 +1152,7 @@ int printE(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printEEnd(ROOT::VecOps::RVec collection) { +int printEEnd(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getEEnd(collection); std::cout << "Energy: "; for (const float &item : vec) { @@ -1161,7 +1161,7 @@ int printEEnd(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printM(ROOT::VecOps::RVec collection) { +int printM(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getM(collection); std::cout << "Mass: "; for (const float &item : vec) { @@ -1170,7 +1170,7 @@ int printM(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printQ(ROOT::VecOps::RVec collection) { +int printQ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getQ(collection); std::cout << "Charge: "; for (const float &item : vec) { @@ -1179,7 +1179,7 @@ int printQ(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printAbsq(ROOT::VecOps::RVec collection) { +int printAbsq(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getAbsq(collection); std::cout << "Absolute charge: "; for (const float &item : vec) { @@ -1188,7 +1188,7 @@ int printAbsq(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPdg(ROOT::VecOps::RVec collection) { +int printPdg(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPdg(collection); std::cout << "Pdg: "; for (const int &item : vec) { @@ -1197,7 +1197,7 @@ int printPdg(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printAbspdg(ROOT::VecOps::RVec collection) { +int printAbspdg(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getAbspdg(collection); std::cout << "Absolute pdg: "; for (const int &item : vec) { @@ -1206,7 +1206,7 @@ int printAbspdg(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printSimStat(ROOT::VecOps::RVec collection) { +int printSimStat(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getSimStat(collection); std::cout << "Simulator status: "; for (const int &item : vec) { @@ -1215,7 +1215,7 @@ int printSimStat(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printGenStat(ROOT::VecOps::RVec collection) { +int printGenStat(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getGenStat(collection); std::cout << "Generator status: "; for (const int &item : vec) { @@ -1541,7 +1541,7 @@ int printGenStat(const edm4hep::MCParticleCollection &collection) { } ROOT::VecOps::RVec maskP(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getP(collection); @@ -1568,7 +1568,7 @@ maskP(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPt(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPt(collection); @@ -1595,7 +1595,7 @@ maskPt(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPx(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPx(collection); @@ -1622,7 +1622,7 @@ maskPx(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPy(collection); @@ -1649,7 +1649,7 @@ maskPy(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPz(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPz(collection); @@ -1676,7 +1676,7 @@ maskPz(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskEta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getEta(collection); @@ -1703,7 +1703,7 @@ maskEta(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskRapidity(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getRapidity(collection); @@ -1730,7 +1730,7 @@ maskRapidity(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskTheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getTheta(collection); @@ -1757,7 +1757,7 @@ maskTheta(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPhi(collection); @@ -1784,7 +1784,7 @@ maskPhi(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPEnd(collection); @@ -1811,7 +1811,7 @@ maskPEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPtEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPtEnd(collection); @@ -1838,7 +1838,7 @@ maskPtEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPxEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPxEnd(collection); @@ -1865,7 +1865,7 @@ maskPxEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPyEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPyEnd(collection); @@ -1892,7 +1892,7 @@ maskPyEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPzEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPzEnd(collection); @@ -1919,7 +1919,7 @@ maskPzEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskEtaEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getEtaEnd(collection); @@ -1946,7 +1946,7 @@ maskEtaEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskRapidityEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getRapidityEnd(collection); @@ -1973,7 +1973,7 @@ maskRapidityEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskThetaEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getThetaEnd(collection); @@ -2000,7 +2000,7 @@ maskThetaEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPhiEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPhiEnd(collection); @@ -2027,7 +2027,7 @@ maskPhiEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getR(collection); @@ -2054,7 +2054,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getX(collection); @@ -2081,7 +2081,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getY(collection); @@ -2108,7 +2108,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getZ(collection); @@ -2135,7 +2135,7 @@ maskZ(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskREnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getREnd(collection); @@ -2162,7 +2162,7 @@ maskREnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskXEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getXEnd(collection); @@ -2189,7 +2189,7 @@ maskXEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskYEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getYEnd(collection); @@ -2216,7 +2216,7 @@ maskYEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskZEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getZEnd(collection); @@ -2243,7 +2243,7 @@ maskZEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskE(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getE(collection); @@ -2270,7 +2270,7 @@ maskE(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskEEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getEEnd(collection); @@ -2297,7 +2297,7 @@ maskEEnd(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskM(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getM(collection); @@ -2324,7 +2324,7 @@ maskM(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskQ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getQ(collection); @@ -2351,7 +2351,7 @@ maskQ(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskAbsq(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getAbsq(collection); @@ -2378,7 +2378,7 @@ maskAbsq(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPdg(collection); @@ -2405,7 +2405,7 @@ maskPdg(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskAbspdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getAbspdg(collection); @@ -2432,7 +2432,7 @@ maskAbspdg(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskSimStat(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getSimStat(collection); @@ -2459,7 +2459,7 @@ maskSimStat(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskGenStat(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getGenStat(collection); @@ -3431,211 +3431,211 @@ maskGenStat(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec selP(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskP(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPt(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPt(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPx(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPx(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPy(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPz(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPz(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selEta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskEta(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selRapidity(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskRapidity(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selTheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskTheta(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPhi(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPtEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPtEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPxEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPxEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPyEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPyEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPzEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPzEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selEtaEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskEtaEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selRapidityEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskRapidityEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selThetaEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskThetaEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPhiEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPhiEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskR(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskX(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskY(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskZ(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selREnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskREnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selXEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskXEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selYEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskYEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selZEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskZEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selE(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskE(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selEEnd(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskEEnd(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selM(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskM(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selQ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskQ(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selAbsq(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskAbsq(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPdg(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selAbspdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskAbspdg(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selSimStat(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskSimStat(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selGenStat(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskGenStat(op, val, collection); return LogicalOperators::filter(mask, collection); } @@ -3850,7 +3850,7 @@ selGenStat(LogicalOperators::ComparisonOperator op, int val, return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec -sortP(ROOT::VecOps::RVec collection, bool reverse) { +sortP(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -3866,7 +3866,7 @@ sortP(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPt(ROOT::VecOps::RVec collection, bool reverse) { +sortPt(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -3882,7 +3882,7 @@ sortPt(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPx(ROOT::VecOps::RVec collection, bool reverse) { +sortPx(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -3898,7 +3898,7 @@ sortPx(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPy(ROOT::VecOps::RVec collection, bool reverse) { +sortPy(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -3914,7 +3914,7 @@ sortPy(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPz(ROOT::VecOps::RVec collection, bool reverse) { +sortPz(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -3930,7 +3930,7 @@ sortPz(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortEta(ROOT::VecOps::RVec collection, bool reverse) { +sortEta(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -3946,7 +3946,7 @@ sortEta(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortRapidity(ROOT::VecOps::RVec collection, +sortRapidity(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -3963,7 +3963,7 @@ sortRapidity(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortTheta(ROOT::VecOps::RVec collection, +sortTheta(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -3980,7 +3980,7 @@ sortTheta(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPhi(ROOT::VecOps::RVec collection, bool reverse) { +sortPhi(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -3996,7 +3996,8 @@ sortPhi(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPEnd(ROOT::VecOps::RVec collection, bool reverse) { +sortPEnd(ROOT::VecOps::RVec &collection, + bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4012,7 +4013,7 @@ sortPEnd(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPtEnd(ROOT::VecOps::RVec collection, +sortPtEnd(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4029,7 +4030,7 @@ sortPtEnd(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPxEnd(ROOT::VecOps::RVec collection, +sortPxEnd(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4046,7 +4047,7 @@ sortPxEnd(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPyEnd(ROOT::VecOps::RVec collection, +sortPyEnd(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4063,7 +4064,7 @@ sortPyEnd(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPzEnd(ROOT::VecOps::RVec collection, +sortPzEnd(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4080,7 +4081,7 @@ sortPzEnd(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortEtaEnd(ROOT::VecOps::RVec collection, +sortEtaEnd(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4097,7 +4098,7 @@ sortEtaEnd(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortRapidityEnd(ROOT::VecOps::RVec collection, +sortRapidityEnd(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4114,7 +4115,7 @@ sortRapidityEnd(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortThetaEnd(ROOT::VecOps::RVec collection, +sortThetaEnd(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4131,7 +4132,7 @@ sortThetaEnd(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPhiEnd(ROOT::VecOps::RVec collection, +sortPhiEnd(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4148,7 +4149,7 @@ sortPhiEnd(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, bool reverse) { +sortR(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4162,7 +4163,7 @@ sortR(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, bool reverse) { +sortX(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4176,7 +4177,7 @@ sortX(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, bool reverse) { +sortY(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4190,7 +4191,7 @@ sortY(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, bool reverse) { +sortZ(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4204,7 +4205,8 @@ sortZ(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortREnd(ROOT::VecOps::RVec collection, bool reverse) { +sortREnd(ROOT::VecOps::RVec &collection, + bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4218,7 +4220,8 @@ sortREnd(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortXEnd(ROOT::VecOps::RVec collection, bool reverse) { +sortXEnd(ROOT::VecOps::RVec &collection, + bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4232,7 +4235,8 @@ sortXEnd(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortYEnd(ROOT::VecOps::RVec collection, bool reverse) { +sortYEnd(ROOT::VecOps::RVec &collection, + bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4246,7 +4250,8 @@ sortYEnd(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortZEnd(ROOT::VecOps::RVec collection, bool reverse) { +sortZEnd(ROOT::VecOps::RVec &collection, + bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4260,7 +4265,7 @@ sortZEnd(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortE(ROOT::VecOps::RVec collection, bool reverse) { +sortE(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4276,7 +4281,8 @@ sortE(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortEEnd(ROOT::VecOps::RVec collection, bool reverse) { +sortEEnd(ROOT::VecOps::RVec &collection, + bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4292,7 +4298,7 @@ sortEEnd(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortM(ROOT::VecOps::RVec collection, bool reverse) { +sortM(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4304,7 +4310,7 @@ sortM(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortQ(ROOT::VecOps::RVec collection, bool reverse) { +sortQ(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4316,7 +4322,8 @@ sortQ(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortAbsq(ROOT::VecOps::RVec collection, bool reverse) { +sortAbsq(ROOT::VecOps::RVec &collection, + bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { float a, b; @@ -4328,7 +4335,7 @@ sortAbsq(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPdg(ROOT::VecOps::RVec collection, bool reverse) { +sortPdg(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { int a, b; @@ -4340,7 +4347,7 @@ sortPdg(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortAbspdg(ROOT::VecOps::RVec collection, +sortAbspdg(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4353,7 +4360,7 @@ sortAbspdg(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortSimStat(ROOT::VecOps::RVec collection, +sortSimStat(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -4366,7 +4373,7 @@ sortSimStat(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortGenStat(ROOT::VecOps::RVec collection, +sortGenStat(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::MCParticleData x, edm4hep::MCParticleData y) { @@ -5238,8 +5245,8 @@ sortGenStat(edm4hep::MCParticleCollection &collection, bool reverse) { return newCollection; } ROOT::VecOps::RVec -getParents(edm4hep::MCParticleData item, - ROOT::VecOps::RVec relatedCollection) { +getParents(edm4hep::MCParticleData &item, + ROOT::VecOps::RVec &relatedCollection) { ROOT::VecOps::RVec vec; size_t len = item.parents_end - item.parents_begin; vec.reserve(len); @@ -5257,8 +5264,8 @@ edm4hep::MCParticleCollection getParents(const edm4hep::MCParticle &item) { return vec; } ROOT::VecOps::RVec -getDaughters(edm4hep::MCParticleData item, - ROOT::VecOps::RVec relatedCollection) { +getDaughters(edm4hep::MCParticleData &item, + ROOT::VecOps::RVec &relatedCollection) { ROOT::VecOps::RVec vec; size_t len = item.daughters_end - item.daughters_begin; vec.reserve(len); diff --git a/src/ParticleID.cc b/src/ParticleID.cc deleted file mode 100644 index 65eb2f3..0000000 --- a/src/ParticleID.cc +++ /dev/null @@ -1,48 +0,0 @@ -#include "ral/ParticleID.h" - -namespace k4::ral { - -namespace ParticleID { - -ROOT::VecOps::RVec -get_type(ROOT::VecOps::RVec particles) { - ROOT::VecOps::RVec result; - result.reserve(particles.size()); - for (edm4hep::ParticleIDData p : particles) { - result.emplace_back(p.type); - } - return result; -} - -ROOT::VecOps::RVec -get_PDG(ROOT::VecOps::RVec particles) { - ROOT::VecOps::RVec result; - result.reserve(particles.size()); - for (edm4hep::ParticleIDData p : particles) { - result.emplace_back(p.PDG); - } - return result; -} - -ROOT::VecOps::RVec -get_algorithmType(ROOT::VecOps::RVec particles) { - ROOT::VecOps::RVec result; - result.reserve(particles.size()); - for (edm4hep::ParticleIDData p : particles) { - result.emplace_back(p.algorithmType); - } - return result; -} - -ROOT::VecOps::RVec -get_likelihood(ROOT::VecOps::RVec particles) { - ROOT::VecOps::RVec result; - result.reserve(particles.size()); - for (edm4hep::ParticleIDData p : particles) { - result.emplace_back(p.likelihood); - } - return result; -} - -} // namespace ParticleID -} // namespace k4::ral diff --git a/src/ReconstructedParticle.cc b/src/ReconstructedParticle.cc index 4114e13..d7fa2e6 100644 --- a/src/ReconstructedParticle.cc +++ b/src/ReconstructedParticle.cc @@ -2,7 +2,7 @@ namespace k4::ral { namespace ReconstructedParticle { ROOT::VecOps::RVec -getP(ROOT::VecOps::RVec collection) { +getP(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -15,7 +15,7 @@ getP(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPt(ROOT::VecOps::RVec collection) { +getPt(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -28,7 +28,7 @@ getPt(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPx(ROOT::VecOps::RVec collection) { +getPx(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -41,7 +41,7 @@ getPx(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPy(ROOT::VecOps::RVec collection) { +getPy(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -54,7 +54,7 @@ getPy(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPz(ROOT::VecOps::RVec collection) { +getPz(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -67,7 +67,7 @@ getPz(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getEta(ROOT::VecOps::RVec collection) { +getEta(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -79,8 +79,8 @@ getEta(ROOT::VecOps::RVec collection) { } return vec; } -ROOT::VecOps::RVec -getRapidity(ROOT::VecOps::RVec collection) { +ROOT::VecOps::RVec getRapidity( + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -93,7 +93,7 @@ getRapidity(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getTheta(ROOT::VecOps::RVec collection) { +getTheta(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -106,7 +106,7 @@ getTheta(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPhi(ROOT::VecOps::RVec collection) { +getPhi(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -119,7 +119,7 @@ getPhi(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection) { +getR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -132,7 +132,7 @@ getR(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection) { +getX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -145,7 +145,7 @@ getX(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection) { +getY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -158,7 +158,7 @@ getY(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection) { +getZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -171,20 +171,18 @@ getZ(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getE(ROOT::VecOps::RVec collection) { +getE(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { float result; - ROOT::Math::PxPyPzMVector presult(item.momentum.x, item.momentum.y, - item.momentum.z, item.mass); - result = presult.e(); + result = (item.energy); vec.emplace_back(result); } return vec; } ROOT::VecOps::RVec -getM(ROOT::VecOps::RVec collection) { +getM(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -195,7 +193,7 @@ getM(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getQ(ROOT::VecOps::RVec collection) { +getQ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -206,7 +204,7 @@ getQ(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getAbsq(ROOT::VecOps::RVec collection) { +getAbsq(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -217,7 +215,7 @@ getAbsq(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getPdg(ROOT::VecOps::RVec collection) { +getPdg(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -228,7 +226,7 @@ getPdg(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getAbspdg(ROOT::VecOps::RVec collection) { +getAbspdg(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::ReconstructedParticleData &item : collection) { @@ -248,7 +246,7 @@ getP(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.P(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -262,7 +260,7 @@ getPt(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.pt(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -276,7 +274,7 @@ getPx(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.px(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -290,7 +288,7 @@ getPy(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.py(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -304,7 +302,7 @@ getPz(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.pz(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -318,7 +316,7 @@ getEta(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.eta(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -332,7 +330,7 @@ getRapidity(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.Rapidity(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -346,7 +344,7 @@ getTheta(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.theta(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -360,7 +358,7 @@ getPhi(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.phi(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -374,7 +372,7 @@ getR(const edm4hep::ReconstructedParticleCollection &collection) { item.getReferencePoint().y, item.getReferencePoint().z); result = rresult.r(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -388,7 +386,7 @@ getX(const edm4hep::ReconstructedParticleCollection &collection) { item.getReferencePoint().y, item.getReferencePoint().z); result = rresult.x(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -402,7 +400,7 @@ getY(const edm4hep::ReconstructedParticleCollection &collection) { item.getReferencePoint().y, item.getReferencePoint().z); result = rresult.y(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -416,7 +414,7 @@ getZ(const edm4hep::ReconstructedParticleCollection &collection) { item.getReferencePoint().y, item.getReferencePoint().z); result = rresult.z(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -430,7 +428,7 @@ getE(const edm4hep::ReconstructedParticleCollection &collection) { item.getMomentum().y, item.getMomentum().z, item.getMass()); result = presult.e(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -441,7 +439,7 @@ getM(const edm4hep::ReconstructedParticleCollection &collection) { for (const edm4hep::ReconstructedParticle &item : collection) { float result; result = (item.getMass()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -452,7 +450,7 @@ getQ(const edm4hep::ReconstructedParticleCollection &collection) { for (const edm4hep::ReconstructedParticle &item : collection) { float result; result = (item.getCharge()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -463,7 +461,7 @@ getAbsq(const edm4hep::ReconstructedParticleCollection &collection) { for (const edm4hep::ReconstructedParticle &item : collection) { float result; result = std::abs(item.getCharge()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -474,7 +472,7 @@ getPdg(const edm4hep::ReconstructedParticleCollection &collection) { for (const edm4hep::ReconstructedParticle &item : collection) { int result; result = (item.getPDG()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -485,11 +483,11 @@ getAbspdg(const edm4hep::ReconstructedParticleCollection &collection) { for (const edm4hep::ReconstructedParticle &item : collection) { int result; result = std::abs(item.getPDG()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } -int printP(ROOT::VecOps::RVec collection) { +int printP(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getP(collection); std::cout << "Momentum: "; for (const float &item : vec) { @@ -498,7 +496,8 @@ int printP(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPt(ROOT::VecOps::RVec collection) { +int printPt( + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPt(collection); std::cout << "Transverse momentum: "; for (const float &item : vec) { @@ -507,7 +506,8 @@ int printPt(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPx(ROOT::VecOps::RVec collection) { +int printPx( + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPx(collection); std::cout << "X momentum: "; for (const float &item : vec) { @@ -516,7 +516,8 @@ int printPx(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPy(ROOT::VecOps::RVec collection) { +int printPy( + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPy(collection); std::cout << "Y momentum: "; for (const float &item : vec) { @@ -525,7 +526,8 @@ int printPy(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printPz(ROOT::VecOps::RVec collection) { +int printPz( + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPz(collection); std::cout << "Z momentum: "; for (const float &item : vec) { @@ -535,7 +537,7 @@ int printPz(ROOT::VecOps::RVec collection) { return 0; } int printEta( - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getEta(collection); std::cout << "Pseudorapidity: "; for (const float &item : vec) { @@ -545,7 +547,7 @@ int printEta( return 0; } int printRapidity( - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getRapidity(collection); std::cout << "Rapidity: "; for (const float &item : vec) { @@ -555,7 +557,7 @@ int printRapidity( return 0; } int printTheta( - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getTheta(collection); std::cout << "Polar angle: "; for (const float &item : vec) { @@ -565,7 +567,7 @@ int printTheta( return 0; } int printPhi( - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPhi(collection); std::cout << "Azimutal angle: "; for (const float &item : vec) { @@ -574,7 +576,7 @@ int printPhi( std::cout << std::endl; return 0; } -int printR(ROOT::VecOps::RVec collection) { +int printR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getR(collection); std::cout << "Distance to origin: "; for (const float &item : vec) { @@ -583,7 +585,7 @@ int printR(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printX(ROOT::VecOps::RVec collection) { +int printX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getX(collection); std::cout << "X coordinate: "; for (const float &item : vec) { @@ -592,7 +594,7 @@ int printX(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printY(ROOT::VecOps::RVec collection) { +int printY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getY(collection); std::cout << "Y coordinate: "; for (const float &item : vec) { @@ -601,7 +603,7 @@ int printY(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printZ(ROOT::VecOps::RVec collection) { +int printZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getZ(collection); std::cout << "Z coordinate: "; for (const float &item : vec) { @@ -610,7 +612,7 @@ int printZ(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printE(ROOT::VecOps::RVec collection) { +int printE(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getE(collection); std::cout << "Energy: "; for (const float &item : vec) { @@ -619,7 +621,7 @@ int printE(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printM(ROOT::VecOps::RVec collection) { +int printM(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getM(collection); std::cout << "Mass: "; for (const float &item : vec) { @@ -628,7 +630,7 @@ int printM(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printQ(ROOT::VecOps::RVec collection) { +int printQ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getQ(collection); std::cout << "Charge: "; for (const float &item : vec) { @@ -638,7 +640,7 @@ int printQ(ROOT::VecOps::RVec collection) { return 0; } int printAbsq( - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getAbsq(collection); std::cout << "Absolute charge: "; for (const float &item : vec) { @@ -648,7 +650,7 @@ int printAbsq( return 0; } int printPdg( - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getPdg(collection); std::cout << "Pdg: "; for (const int &item : vec) { @@ -658,7 +660,7 @@ int printPdg( return 0; } int printAbspdg( - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getAbspdg(collection); std::cout << "Absolute pdg: "; for (const int &item : vec) { @@ -840,7 +842,7 @@ int printAbspdg(const edm4hep::ReconstructedParticleCollection &collection) { } ROOT::VecOps::RVec maskP(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getP(collection); @@ -867,7 +869,7 @@ maskP(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPt(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPt(collection); @@ -894,7 +896,7 @@ maskPt(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPx(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPx(collection); @@ -921,7 +923,7 @@ maskPx(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPy(collection); @@ -948,7 +950,7 @@ maskPy(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPz(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPz(collection); @@ -975,7 +977,7 @@ maskPz(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskEta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getEta(collection); @@ -1002,7 +1004,7 @@ maskEta(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskRapidity( LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getRapidity(collection); @@ -1029,7 +1031,7 @@ ROOT::VecOps::RVec maskRapidity( } ROOT::VecOps::RVec maskTheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getTheta(collection); @@ -1056,7 +1058,7 @@ maskTheta(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPhi(collection); @@ -1083,7 +1085,7 @@ maskPhi(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getR(collection); @@ -1110,7 +1112,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getX(collection); @@ -1137,7 +1139,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getY(collection); @@ -1164,7 +1166,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getZ(collection); @@ -1191,7 +1193,7 @@ maskZ(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskE(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getE(collection); @@ -1218,7 +1220,7 @@ maskE(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskM(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getM(collection); @@ -1245,7 +1247,7 @@ maskM(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskQ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getQ(collection); @@ -1272,7 +1274,7 @@ maskQ(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskAbsq(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getAbsq(collection); @@ -1299,7 +1301,7 @@ maskAbsq(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskPdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getPdg(collection); @@ -1326,7 +1328,7 @@ maskPdg(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskAbspdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getAbspdg(collection); @@ -1866,115 +1868,115 @@ maskAbspdg(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec selP(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskP(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPt(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPt(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPx(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPx(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPy(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPy(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPz(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPz(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selEta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskEta(op, val, collection); return LogicalOperators::filter(mask, collection); } -ROOT::VecOps::RVec -selRapidity(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { +ROOT::VecOps::RVec selRapidity( + LogicalOperators::ComparisonOperator op, float val, + ROOT::VecOps::RVec &collection) { auto mask = maskRapidity(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selTheta(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskTheta(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPhi(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPhi(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskR(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskX(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskY(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskZ(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selE(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskE(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selM(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskM(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selQ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskQ(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selAbsq(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskAbsq(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selPdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskPdg(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selAbspdg(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskAbspdg(op, val, collection); return LogicalOperators::filter(mask, collection); } @@ -2093,7 +2095,7 @@ selAbspdg(LogicalOperators::ComparisonOperator op, int val, return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec -sortP(ROOT::VecOps::RVec collection, +sortP(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2110,7 +2112,7 @@ sortP(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPt(ROOT::VecOps::RVec collection, +sortPt(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2127,7 +2129,7 @@ sortPt(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPx(ROOT::VecOps::RVec collection, +sortPx(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2144,7 +2146,7 @@ sortPx(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPy(ROOT::VecOps::RVec collection, +sortPy(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2161,7 +2163,7 @@ sortPy(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPz(ROOT::VecOps::RVec collection, +sortPz(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2178,7 +2180,7 @@ sortPz(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortEta(ROOT::VecOps::RVec collection, +sortEta(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2195,7 +2197,7 @@ sortEta(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortRapidity(ROOT::VecOps::RVec collection, +sortRapidity(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2212,7 +2214,7 @@ sortRapidity(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortTheta(ROOT::VecOps::RVec collection, +sortTheta(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2229,7 +2231,7 @@ sortTheta(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPhi(ROOT::VecOps::RVec collection, +sortPhi(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2246,7 +2248,7 @@ sortPhi(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, +sortR(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2263,7 +2265,7 @@ sortR(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, +sortX(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2280,7 +2282,7 @@ sortX(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, +sortY(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2297,7 +2299,7 @@ sortY(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, +sortZ(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2314,7 +2316,7 @@ sortZ(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortE(ROOT::VecOps::RVec collection, +sortE(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2327,7 +2329,7 @@ sortE(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortM(ROOT::VecOps::RVec collection, +sortM(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2340,7 +2342,7 @@ sortM(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortQ(ROOT::VecOps::RVec collection, +sortQ(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2353,7 +2355,7 @@ sortQ(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortAbsq(ROOT::VecOps::RVec collection, +sortAbsq(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2366,7 +2368,7 @@ sortAbsq(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortPdg(ROOT::VecOps::RVec collection, +sortPdg(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::ReconstructedParticleData x, edm4hep::ReconstructedParticleData y) { @@ -2828,8 +2830,8 @@ sortPdg(edm4hep::ReconstructedParticleCollection &collection, bool reverse) { return newCollection; } ROOT::VecOps::RVec getParticles( - edm4hep::ReconstructedParticleData item, - ROOT::VecOps::RVec relatedCollection) { + edm4hep::ReconstructedParticleData &item, + ROOT::VecOps::RVec &relatedCollection) { ROOT::VecOps::RVec vec; size_t len = item.particles_end - item.particles_begin; vec.reserve(len); @@ -2839,8 +2841,8 @@ ROOT::VecOps::RVec getParticles( return vec; } ROOT::VecOps::RVec -getTracks(edm4hep::ReconstructedParticleData item, - ROOT::VecOps::RVec relatedCollection) { +getTracks(edm4hep::ReconstructedParticleData &item, + ROOT::VecOps::RVec &relatedCollection) { ROOT::VecOps::RVec vec; size_t len = item.tracks_end - item.tracks_begin; vec.reserve(len); @@ -2850,8 +2852,8 @@ getTracks(edm4hep::ReconstructedParticleData item, return vec; } ROOT::VecOps::RVec -getClusters(edm4hep::ReconstructedParticleData item, - ROOT::VecOps::RVec relatedCollection) { +getClusters(edm4hep::ReconstructedParticleData &item, + ROOT::VecOps::RVec &relatedCollection) { ROOT::VecOps::RVec vec; size_t len = item.clusters_end - item.clusters_begin; vec.reserve(len); diff --git a/src/Track.cc b/src/Track.cc index 2257508..9540231 100644 --- a/src/Track.cc +++ b/src/Track.cc @@ -2,7 +2,7 @@ namespace k4::ral { namespace Track { ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection) { +getType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackData &item : collection) { @@ -13,7 +13,7 @@ getType(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getChi2(ROOT::VecOps::RVec collection) { +getChi2(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackData &item : collection) { @@ -24,7 +24,7 @@ getChi2(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getndf(ROOT::VecOps::RVec collection) { +getndf(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackData &item : collection) { @@ -35,7 +35,7 @@ getndf(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getNholes(ROOT::VecOps::RVec collection) { +getNholes(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackData &item : collection) { @@ -51,7 +51,7 @@ ROOT::VecOps::RVec getType(const edm4hep::TrackCollection &collection) { for (const edm4hep::Track &item : collection) { int result; result = (item.getType()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -61,7 +61,7 @@ ROOT::VecOps::RVec getChi2(const edm4hep::TrackCollection &collection) { for (const edm4hep::Track &item : collection) { float result; result = (item.getChi2()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -71,7 +71,7 @@ ROOT::VecOps::RVec getndf(const edm4hep::TrackCollection &collection) { for (const edm4hep::Track &item : collection) { int result; result = (item.getNdf()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -81,11 +81,11 @@ ROOT::VecOps::RVec getNholes(const edm4hep::TrackCollection &collection) { for (const edm4hep::Track &item : collection) { int result; result = (item.getNholes()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } -int printType(ROOT::VecOps::RVec collection) { +int printType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getType(collection); std::cout << "Type: "; for (const int &item : vec) { @@ -94,7 +94,7 @@ int printType(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printChi2(ROOT::VecOps::RVec collection) { +int printChi2(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getChi2(collection); std::cout << "Chi^2: "; for (const float &item : vec) { @@ -103,7 +103,7 @@ int printChi2(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printndf(ROOT::VecOps::RVec collection) { +int printndf(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getndf(collection); std::cout << "Degrees of freedom: "; for (const int &item : vec) { @@ -112,7 +112,7 @@ int printndf(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printNholes(ROOT::VecOps::RVec collection) { +int printNholes(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getNholes(collection); std::cout << "Number of holes: "; for (const int &item : vec) { @@ -159,7 +159,7 @@ int printNholes(const edm4hep::TrackCollection &collection) { } ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getType(collection); @@ -186,7 +186,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskChi2(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getChi2(collection); @@ -213,7 +213,7 @@ maskChi2(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskndf(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getndf(collection); @@ -240,7 +240,7 @@ maskndf(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskNholes(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getNholes(collection); @@ -375,25 +375,25 @@ maskNholes(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskType(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selChi2(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskChi2(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selndf(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskndf(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selNholes(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskNholes(op, val, collection); return LogicalOperators::filter(mask, collection); } @@ -422,7 +422,7 @@ edm4hep::TrackCollection selNholes(LogicalOperators::ComparisonOperator op, return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, bool reverse) { +sortType(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackData x, edm4hep::TrackData y) { int a, b; a = (x.type); @@ -433,7 +433,7 @@ sortType(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortChi2(ROOT::VecOps::RVec collection, bool reverse) { +sortChi2(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackData x, edm4hep::TrackData y) { float a, b; a = (x.chi2); @@ -444,7 +444,7 @@ sortChi2(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortndf(ROOT::VecOps::RVec collection, bool reverse) { +sortndf(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackData x, edm4hep::TrackData y) { int a, b; a = (x.ndf); @@ -455,7 +455,7 @@ sortndf(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortNholes(ROOT::VecOps::RVec collection, bool reverse) { +sortNholes(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackData x, edm4hep::TrackData y) { int a, b; a = (x.Nholes); diff --git a/src/TrackerHit3D.cc b/src/TrackerHit3D.cc index 1a96429..db89e39 100644 --- a/src/TrackerHit3D.cc +++ b/src/TrackerHit3D.cc @@ -2,7 +2,7 @@ namespace k4::ral { namespace TrackerHit3D { ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection) { +getType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackerHit3DData &item : collection) { @@ -13,7 +13,7 @@ getType(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getQuality(ROOT::VecOps::RVec collection) { +getQuality(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackerHit3DData &item : collection) { @@ -24,7 +24,7 @@ getQuality(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getCellID(ROOT::VecOps::RVec collection) { +getCellID(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackerHit3DData &item : collection) { @@ -35,7 +35,7 @@ getCellID(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getEDep(ROOT::VecOps::RVec collection) { +getEDep(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackerHit3DData &item : collection) { @@ -46,7 +46,7 @@ getEDep(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getTime(ROOT::VecOps::RVec collection) { +getTime(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::TrackerHit3DData &item : collection) { @@ -63,7 +63,7 @@ getType(const edm4hep::TrackerHit3DCollection &collection) { for (const edm4hep::TrackerHit3D &item : collection) { int result; result = (item.getType()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -74,7 +74,7 @@ getQuality(const edm4hep::TrackerHit3DCollection &collection) { for (const edm4hep::TrackerHit3D &item : collection) { int result; result = (item.getQuality()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -85,7 +85,7 @@ getCellID(const edm4hep::TrackerHit3DCollection &collection) { for (const edm4hep::TrackerHit3D &item : collection) { unsigned long long result; result = (item.getCellID()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -96,7 +96,7 @@ getEDep(const edm4hep::TrackerHit3DCollection &collection) { for (const edm4hep::TrackerHit3D &item : collection) { float result; result = (item.getEDep()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -107,11 +107,11 @@ getTime(const edm4hep::TrackerHit3DCollection &collection) { for (const edm4hep::TrackerHit3D &item : collection) { float result; result = (item.getTime()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } -int printType(ROOT::VecOps::RVec collection) { +int printType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getType(collection); std::cout << "Type: "; for (const int &item : vec) { @@ -120,7 +120,7 @@ int printType(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printQuality(ROOT::VecOps::RVec collection) { +int printQuality(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getQuality(collection); std::cout << "Type: "; for (const int &item : vec) { @@ -129,7 +129,7 @@ int printQuality(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printCellID(ROOT::VecOps::RVec collection) { +int printCellID(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getCellID(collection); std::cout << "Detector cell id: "; for (const unsigned long long &item : vec) { @@ -138,7 +138,7 @@ int printCellID(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printEDep(ROOT::VecOps::RVec collection) { +int printEDep(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getEDep(collection); std::cout << "Edep: "; for (const float &item : vec) { @@ -147,7 +147,7 @@ int printEDep(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printTime(ROOT::VecOps::RVec collection) { +int printTime(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getTime(collection); std::cout << "Time of the hit: "; for (const float &item : vec) { @@ -203,7 +203,7 @@ int printTime(const edm4hep::TrackerHit3DCollection &collection) { } ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getType(collection); @@ -230,7 +230,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskQuality(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getQuality(collection); @@ -257,7 +257,7 @@ maskQuality(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getCellID(collection); @@ -284,7 +284,7 @@ maskCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, } ROOT::VecOps::RVec maskEDep(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getEDep(collection); @@ -311,7 +311,7 @@ maskEDep(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskTime(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getTime(collection); @@ -473,31 +473,31 @@ maskTime(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskType(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selQuality(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskQuality(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selCellID(LogicalOperators::ComparisonOperator op, unsigned long long val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskCellID(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selEDep(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskEDep(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selTime(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskTime(op, val, collection); return LogicalOperators::filter(mask, collection); } @@ -532,7 +532,7 @@ selTime(LogicalOperators::ComparisonOperator op, float val, return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, +sortType(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackerHit3DData x, edm4hep::TrackerHit3DData y) { @@ -545,7 +545,7 @@ sortType(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortQuality(ROOT::VecOps::RVec collection, +sortQuality(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackerHit3DData x, edm4hep::TrackerHit3DData y) { @@ -558,7 +558,7 @@ sortQuality(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortCellID(ROOT::VecOps::RVec collection, +sortCellID(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackerHit3DData x, edm4hep::TrackerHit3DData y) { @@ -571,7 +571,7 @@ sortCellID(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortEDep(ROOT::VecOps::RVec collection, +sortEDep(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackerHit3DData x, edm4hep::TrackerHit3DData y) { @@ -584,7 +584,7 @@ sortEDep(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortTime(ROOT::VecOps::RVec collection, +sortTime(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::TrackerHit3DData x, edm4hep::TrackerHit3DData y) { diff --git a/src/Vertex.cc b/src/Vertex.cc index d60137b..20395d5 100644 --- a/src/Vertex.cc +++ b/src/Vertex.cc @@ -2,7 +2,7 @@ namespace k4::ral { namespace Vertex { ROOT::VecOps::RVec -getType(ROOT::VecOps::RVec collection) { +getType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::VertexData &item : collection) { @@ -13,7 +13,7 @@ getType(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getChi2(ROOT::VecOps::RVec collection) { +getChi2(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::VertexData &item : collection) { @@ -24,7 +24,7 @@ getChi2(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getNdf(ROOT::VecOps::RVec collection) { +getNdf(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::VertexData &item : collection) { @@ -35,7 +35,7 @@ getNdf(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getAlgorithmType(ROOT::VecOps::RVec collection) { +getAlgorithmType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::VertexData &item : collection) { @@ -46,7 +46,7 @@ getAlgorithmType(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getR(ROOT::VecOps::RVec collection) { +getR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::VertexData &item : collection) { @@ -59,7 +59,7 @@ getR(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getX(ROOT::VecOps::RVec collection) { +getX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::VertexData &item : collection) { @@ -72,7 +72,7 @@ getX(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getY(ROOT::VecOps::RVec collection) { +getY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::VertexData &item : collection) { @@ -85,7 +85,7 @@ getY(ROOT::VecOps::RVec collection) { return vec; } ROOT::VecOps::RVec -getZ(ROOT::VecOps::RVec collection) { +getZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); for (const edm4hep::VertexData &item : collection) { @@ -103,7 +103,7 @@ ROOT::VecOps::RVec getType(const edm4hep::VertexCollection &collection) { for (const edm4hep::Vertex &item : collection) { int result; result = (item.getType()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -113,7 +113,7 @@ ROOT::VecOps::RVec getChi2(const edm4hep::VertexCollection &collection) { for (const edm4hep::Vertex &item : collection) { float result; result = (item.getChi2()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -123,7 +123,7 @@ ROOT::VecOps::RVec getNdf(const edm4hep::VertexCollection &collection) { for (const edm4hep::Vertex &item : collection) { int result; result = (item.getNdf()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -134,7 +134,7 @@ getAlgorithmType(const edm4hep::VertexCollection &collection) { for (const edm4hep::Vertex &item : collection) { int result; result = (item.getAlgorithmType()); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -146,7 +146,7 @@ ROOT::VecOps::RVec getR(const edm4hep::VertexCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.r(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -158,7 +158,7 @@ ROOT::VecOps::RVec getX(const edm4hep::VertexCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.x(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -170,7 +170,7 @@ ROOT::VecOps::RVec getY(const edm4hep::VertexCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.y(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } @@ -182,11 +182,11 @@ ROOT::VecOps::RVec getZ(const edm4hep::VertexCollection &collection) { ROOT::Math::XYZVector rresult(item.getPosition().x, item.getPosition().y, item.getPosition().z); result = rresult.z(); - vec.emplace_back(result); + vec.push_back(result); } return vec; } -int printType(ROOT::VecOps::RVec collection) { +int printType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getType(collection); std::cout << "Type: "; for (const int &item : vec) { @@ -195,7 +195,7 @@ int printType(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printChi2(ROOT::VecOps::RVec collection) { +int printChi2(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getChi2(collection); std::cout << "Chi^2: "; for (const float &item : vec) { @@ -204,7 +204,7 @@ int printChi2(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printNdf(ROOT::VecOps::RVec collection) { +int printNdf(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getNdf(collection); std::cout << "Degrees of freedom: "; for (const int &item : vec) { @@ -213,7 +213,7 @@ int printNdf(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printAlgorithmType(ROOT::VecOps::RVec collection) { +int printAlgorithmType(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getAlgorithmType(collection); std::cout << "Algorithm type: "; for (const int &item : vec) { @@ -222,7 +222,7 @@ int printAlgorithmType(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printR(ROOT::VecOps::RVec collection) { +int printR(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getR(collection); std::cout << "Distance to origin: "; for (const float &item : vec) { @@ -231,7 +231,7 @@ int printR(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printX(ROOT::VecOps::RVec collection) { +int printX(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getX(collection); std::cout << "X coordinate: "; for (const float &item : vec) { @@ -240,7 +240,7 @@ int printX(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printY(ROOT::VecOps::RVec collection) { +int printY(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getY(collection); std::cout << "Y coordinate: "; for (const float &item : vec) { @@ -249,7 +249,7 @@ int printY(ROOT::VecOps::RVec collection) { std::cout << std::endl; return 0; } -int printZ(ROOT::VecOps::RVec collection) { +int printZ(ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec = getZ(collection); std::cout << "Z coordinate: "; for (const float &item : vec) { @@ -332,7 +332,7 @@ int printZ(const edm4hep::VertexCollection &collection) { } ROOT::VecOps::RVec maskType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getType(collection); @@ -359,7 +359,7 @@ maskType(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskChi2(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getChi2(collection); @@ -386,7 +386,7 @@ maskChi2(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskNdf(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getNdf(collection); @@ -413,7 +413,7 @@ maskNdf(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskAlgorithmType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getAlgorithmType(collection); @@ -440,7 +440,7 @@ maskAlgorithmType(LogicalOperators::ComparisonOperator op, int val, } ROOT::VecOps::RVec maskR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getR(collection); @@ -467,7 +467,7 @@ maskR(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getX(collection); @@ -494,7 +494,7 @@ maskX(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getY(collection); @@ -521,7 +521,7 @@ maskY(LogicalOperators::ComparisonOperator op, float val, } ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { ROOT::VecOps::RVec vec; vec.reserve(collection.size()); ROOT::VecOps::RVec vals = getZ(collection); @@ -764,49 +764,49 @@ ROOT::VecOps::RVec maskZ(LogicalOperators::ComparisonOperator op, } ROOT::VecOps::RVec selType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskType(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selChi2(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskChi2(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selNdf(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskNdf(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selAlgorithmType(LogicalOperators::ComparisonOperator op, int val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskAlgorithmType(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selR(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskR(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selX(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskX(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selY(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskY(op, val, collection); return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec selZ(LogicalOperators::ComparisonOperator op, float val, - ROOT::VecOps::RVec collection) { + ROOT::VecOps::RVec &collection) { auto mask = maskZ(op, val, collection); return LogicalOperators::filter(mask, collection); } @@ -859,7 +859,7 @@ edm4hep::VertexCollection selZ(LogicalOperators::ComparisonOperator op, return LogicalOperators::filter(mask, collection); } ROOT::VecOps::RVec -sortType(ROOT::VecOps::RVec collection, bool reverse) { +sortType(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::VertexData x, edm4hep::VertexData y) { int a, b; a = (x.type); @@ -870,7 +870,7 @@ sortType(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortChi2(ROOT::VecOps::RVec collection, bool reverse) { +sortChi2(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::VertexData x, edm4hep::VertexData y) { float a, b; a = (x.chi2); @@ -881,7 +881,7 @@ sortChi2(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortNdf(ROOT::VecOps::RVec collection, bool reverse) { +sortNdf(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::VertexData x, edm4hep::VertexData y) { int a, b; a = (x.ndf); @@ -892,7 +892,7 @@ sortNdf(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortAlgorithmType(ROOT::VecOps::RVec collection, +sortAlgorithmType(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::VertexData x, edm4hep::VertexData y) { int a, b; @@ -904,7 +904,7 @@ sortAlgorithmType(ROOT::VecOps::RVec collection, return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortR(ROOT::VecOps::RVec collection, bool reverse) { +sortR(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::VertexData x, edm4hep::VertexData y) { float a, b; ROOT::Math::XYZVector ra(x.position.x, x.position.y, x.position.z); @@ -917,7 +917,7 @@ sortR(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortX(ROOT::VecOps::RVec collection, bool reverse) { +sortX(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::VertexData x, edm4hep::VertexData y) { float a, b; ROOT::Math::XYZVector ra(x.position.x, x.position.y, x.position.z); @@ -930,7 +930,7 @@ sortX(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortY(ROOT::VecOps::RVec collection, bool reverse) { +sortY(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::VertexData x, edm4hep::VertexData y) { float a, b; ROOT::Math::XYZVector ra(x.position.x, x.position.y, x.position.z); @@ -943,7 +943,7 @@ sortY(ROOT::VecOps::RVec collection, bool reverse) { return ROOT::VecOps::Sort(collection, lambda); } ROOT::VecOps::RVec -sortZ(ROOT::VecOps::RVec collection, bool reverse) { +sortZ(ROOT::VecOps::RVec &collection, bool reverse) { auto lambda = [reverse](edm4hep::VertexData x, edm4hep::VertexData y) { float a, b; ROOT::Math::XYZVector ra(x.position.x, x.position.y, x.position.z); @@ -1140,8 +1140,8 @@ edm4hep::VertexCollection sortZ(edm4hep::VertexCollection &collection, return newCollection; } ROOT::VecOps::RVec getParticles( - edm4hep::VertexData item, - ROOT::VecOps::RVec relatedCollection) { + edm4hep::VertexData &item, + ROOT::VecOps::RVec &relatedCollection) { ROOT::VecOps::RVec vec; size_t len = item.particles_end - item.particles_begin; vec.reserve(len); diff --git a/test/unittest/ReconstructedParticle.cpp b/test/unittest/ReconstructedParticle.cpp index ce2e678..ed83cdc 100644 --- a/test/unittest/ReconstructedParticle.cpp +++ b/test/unittest/ReconstructedParticle.cpp @@ -67,7 +67,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", generateRandomParticle); SECTION("Getting momentum modulus") { - auto vec = ReconstructedParticle::get_pmod(particles); + auto vec = ReconstructedParticle::getP(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { float px = particles[i].momentum.x; @@ -79,7 +79,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting transverse momentum") { - auto vec = ReconstructedParticle::get_pt(particles); + auto vec = ReconstructedParticle::getPt(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { ROOT::Math::PxPyPzMVector momentum( @@ -90,7 +90,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting x momentum") { - auto vec = ReconstructedParticle::get_px(particles); + auto vec = ReconstructedParticle::getPx(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { ROOT::Math::PxPyPzMVector momentum( @@ -101,7 +101,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting y momentum") { - auto vec = ReconstructedParticle::get_py(particles); + auto vec = ReconstructedParticle::getPy(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { ROOT::Math::PxPyPzMVector momentum( @@ -112,7 +112,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting z momentum") { - auto vec = ReconstructedParticle::get_pz(particles); + auto vec = ReconstructedParticle::getPz(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { ROOT::Math::PxPyPzMVector momentum( @@ -123,7 +123,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting Pseudorapidity") { - auto vec = ReconstructedParticle::get_eta(particles); + auto vec = ReconstructedParticle::getEta(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { ROOT::Math::PxPyPzMVector momentum( @@ -134,7 +134,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting rapidity") { - auto vec = ReconstructedParticle::get_rapidity(particles); + auto vec = ReconstructedParticle::getRapidity(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { ROOT::Math::PxPyPzMVector momentum( @@ -146,7 +146,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting polar angle") { - auto vec = ReconstructedParticle::get_theta(particles); + auto vec = ReconstructedParticle::getTheta(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { ROOT::Math::PxPyPzMVector momentum( @@ -158,7 +158,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting azimutal angle") { - auto vec = ReconstructedParticle::get_phi(particles); + auto vec = ReconstructedParticle::getPhi(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { ROOT::Math::PxPyPzMVector momentum( @@ -169,7 +169,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting distance to origin") { - auto vec = ReconstructedParticle::get_r(particles); + auto vec = ReconstructedParticle::getR(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { float x = particles[i].referencePoint.x; @@ -181,7 +181,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting x distance to origin") { - auto vec = ReconstructedParticle::get_x(particles); + auto vec = ReconstructedParticle::getX(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { float x = particles[i].referencePoint.x; @@ -190,7 +190,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting y distance to origin") { - auto vec = ReconstructedParticle::get_y(particles); + auto vec = ReconstructedParticle::getY(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { float y = particles[i].referencePoint.y; @@ -199,7 +199,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting z distance to origin") { - auto vec = ReconstructedParticle::get_z(particles); + auto vec = ReconstructedParticle::getZ(particles); REQUIRE(vec.size() == particles.size()); for (size_t i = 0; i < vec.size(); i++) { float z = particles[i].referencePoint.z; @@ -208,7 +208,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting mass") { - ROOT::VecOps::RVec mass = ReconstructedParticle::get_m(particles); + ROOT::VecOps::RVec mass = ReconstructedParticle::getM(particles); REQUIRE(mass.size() == particles.size()); for (size_t i = 0; i < mass.size(); i++) { REQUIRE(mass.at(i) == particles.at(i).mass); @@ -216,7 +216,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting energy") { - ROOT::VecOps::RVec energy = ReconstructedParticle::get_e(particles); + ROOT::VecOps::RVec energy = ReconstructedParticle::getE(particles); REQUIRE(energy.size() == particles.size()); for (size_t i = 0; i < energy.size(); i++) { REQUIRE(energy.at(i) == particles.at(i).energy); @@ -224,7 +224,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting charge") { - ROOT::VecOps::RVec charges = ReconstructedParticle::get_q(particles); + ROOT::VecOps::RVec charges = ReconstructedParticle::getQ(particles); REQUIRE(charges.size() == particles.size()); for (size_t i = 0; i < charges.size(); i++) { REQUIRE(charges.at(i) == particles.at(i).charge); @@ -233,7 +233,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", SECTION("Getting absolute charge") { ROOT::VecOps::RVec charges = - ReconstructedParticle::get_absq(particles); + ReconstructedParticle::getAbsq(particles); REQUIRE(charges.size() == particles.size()); for (size_t i = 0; i < charges.size(); i++) { REQUIRE(charges.at(i) == std::abs(particles.at(i).charge)); @@ -241,7 +241,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting PDG") { - ROOT::VecOps::RVec PDG = ReconstructedParticle::get_pdg(particles); + ROOT::VecOps::RVec PDG = ReconstructedParticle::getPdg(particles); REQUIRE(PDG.size() == particles.size()); for (size_t i = 0; i < PDG.size(); i++) { REQUIRE(PDG.at(i) == particles.at(i).PDG); @@ -249,7 +249,7 @@ TEST_CASE("Getter analyzers from ReconstructedParticle", } SECTION("Getting absPDG") { - ROOT::VecOps::RVec PDG = ReconstructedParticle::get_abspdg(particles); + ROOT::VecOps::RVec PDG = ReconstructedParticle::getAbspdg(particles); REQUIRE(PDG.size() == particles.size()); for (size_t i = 0; i < PDG.size(); i++) { REQUIRE(PDG.at(i) == std::abs(particles.at(i).PDG)); @@ -270,7 +270,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking energy") { float n = GENERATE(0., 50.); - auto mask = ReconstructedParticle::mask_e(op, n, particles); + auto mask = ReconstructedParticle::maskE(op, n, particles); for (int i = 0; i < particles.size(); i++) { test_masking(op, n, (float)particles[i].energy, mask[i]); } @@ -282,7 +282,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking momentum modulus") { float n = GENERATE(0., 100, 500); - auto mask = ReconstructedParticle::mask_pmod(op, n, particles); + auto mask = ReconstructedParticle::maskP(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -297,7 +297,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking transverse momentum") { float n = GENERATE(0., 100, 500); - auto mask = ReconstructedParticle::mask_pt(op, n, particles); + auto mask = ReconstructedParticle::maskPt(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -312,7 +312,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking x momentum") { float n = GENERATE(0., 100, 500); - auto mask = ReconstructedParticle::mask_px(op, n, particles); + auto mask = ReconstructedParticle::maskPx(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -327,7 +327,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking y momentum") { float n = GENERATE(0., 100, 500); - auto mask = ReconstructedParticle::mask_py(op, n, particles); + auto mask = ReconstructedParticle::maskPy(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -342,7 +342,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking z momentum") { float n = GENERATE(0., 100, 500); - auto mask = ReconstructedParticle::mask_pz(op, n, particles); + auto mask = ReconstructedParticle::maskPz(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -357,7 +357,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking pseudorapidity") { float n = GENERATE(0., 100, 500); - auto mask = ReconstructedParticle::mask_eta(op, n, particles); + auto mask = ReconstructedParticle::maskEta(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -372,7 +372,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking rapidity") { float n = GENERATE(0., 100, 500); - auto mask = ReconstructedParticle::mask_rapidity(op, n, particles); + auto mask = ReconstructedParticle::maskRapidity(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -387,7 +387,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking polar angle") { float n = GENERATE(0., 3.14, 6.28); - auto mask = ReconstructedParticle::mask_theta(op, n, particles); + auto mask = ReconstructedParticle::maskTheta(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -402,7 +402,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking azimutal angle") { float n = GENERATE(0., 3.14, 6.28); - auto mask = ReconstructedParticle::mask_phi(op, n, particles); + auto mask = ReconstructedParticle::maskPhi(op, n, particles); for (int i = 0; i < particles.size(); i++) { ROOT::Math::PxPyPzMVector momentum( particles[i].momentum.x, particles[i].momentum.y, @@ -417,7 +417,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking distance to origin") { float n = GENERATE(0., 100., 500.); - auto mask = ReconstructedParticle::mask_r(op, n, particles); + auto mask = ReconstructedParticle::maskR(op, n, particles); for (int i = 0; i < particles.size(); i++) { float x = particles[i].referencePoint.x; float y = particles[i].referencePoint.y; @@ -433,7 +433,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking x distance to origin") { float n = GENERATE(0., 100., 500.); - auto mask = ReconstructedParticle::mask_x(op, n, particles); + auto mask = ReconstructedParticle::maskX(op, n, particles); for (int i = 0; i < particles.size(); i++) { float x = particles[i].referencePoint.x; test_masking(op, n, x, mask[i]); @@ -446,7 +446,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking y distance to origin") { float n = GENERATE(0., 100., 500.); - auto mask = ReconstructedParticle::mask_y(op, n, particles); + auto mask = ReconstructedParticle::maskY(op, n, particles); for (int i = 0; i < particles.size(); i++) { float y = particles[i].referencePoint.y; test_masking(op, n, y, mask[i]); @@ -459,7 +459,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking z distance to origin") { float n = GENERATE(0., 100., 500.); - auto mask = ReconstructedParticle::mask_z(op, n, particles); + auto mask = ReconstructedParticle::maskZ(op, n, particles); for (int i = 0; i < particles.size(); i++) { float z = particles[i].referencePoint.z; test_masking(op, n, z, mask[i]); @@ -472,7 +472,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking particle mass") { float n = GENERATE(0., 100., 500.); - auto mask = ReconstructedParticle::mask_m(op, n, particles); + auto mask = ReconstructedParticle::maskM(op, n, particles); for (int i = 0; i < particles.size(); i++) { test_masking(op, n, particles[i].mass, mask[i]); } @@ -484,7 +484,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking particle charge") { float n = GENERATE(0., 100., 500.); - auto mask = ReconstructedParticle::mask_q(op, n, particles); + auto mask = ReconstructedParticle::maskQ(op, n, particles); for (int i = 0; i < particles.size(); i++) { test_masking(op, n, particles[i].charge, mask[i]); } @@ -496,7 +496,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking particle absolute charge") { float n = GENERATE(-100., 100., 500.); - auto mask = ReconstructedParticle::mask_absq(op, std::abs(n), particles); + auto mask = ReconstructedParticle::maskAbsq(op, std::abs(n), particles); for (int i = 0; i < particles.size(); i++) { test_masking(op, std::abs(n), std::abs(particles[i].charge), mask[i]); } @@ -508,7 +508,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking particle pdg") { int n = GENERATE(-5, 0, 5); - auto mask = ReconstructedParticle::mask_pdg(op, n, particles); + auto mask = ReconstructedParticle::maskPdg(op, n, particles); for (int i = 0; i < particles.size(); i++) { test_masking(op, n, particles[i].PDG, mask[i]); } @@ -520,7 +520,7 @@ TEST_CASE("Boolean masking analyzers from ReconstructedParticle", SECTION("Masking particle abspdg") { int n = GENERATE(-5, 0, 5); - auto mask = ReconstructedParticle::mask_abspdg(op, std::abs(n), particles); + auto mask = ReconstructedParticle::maskAbspdg(op, std::abs(n), particles); for (int i = 0; i < particles.size(); i++) { test_masking(op, std::abs(n), std::abs(particles[i].PDG), mask[i]); }