1 #ifndef BSEMCFLAGSPLITOFFS_HH 2 #define BSEMCFLAGSPLITOFFS_HH 16 class FairParGenericSet;
43 Cluster_Info(
const std::vector<const BSEmcDigi *> &digis,
const std::vector<const BSEmcCluster *> &clusters,
const BSEmcCluster *current_cluster,
44 const std::vector<const BSEmcSubCluster *> &subclusters)
45 : DigiArray(digis), ClusterArray(clusters), cluster(current_cluster), SubclusterArray(subclusters)
171 bool RatioCut(
const double ratio,
const double distance);
211 std::string fPositionParName{
""};
212 std::string fNeighbouringRelationParName{
""};
213 std::string fSplitOffParName{
""};
218 TString fDigiBranchname{
""};
219 TString fClusterBranchname{
""};
220 TString fSubClusterBranchname{
""};
221 TString fRecoHitBranchname{
""};
228 std::unique_ptr<TF1> f1PEDFunction;
229 std::unique_ptr<TF1> f2PEDFunction;
230 std::unique_ptr<TF1> fHighPEDFunction;
double FindEnergyClosestCluster(const std::vector< const BSEmcCluster *> &ClusterArray, const std::vector< const BSEmcDigi *> &DigiArray, const BSEmcDigiInfo_t &max)
Find the next closest Cluster to the current maximum and return its energy.
Resembles/Contains all information a particle hitting the EMC can provide for later use in the PID st...
double CalculateShowerMass(const std::vector< const BSEmcDigi *> &DigiArray, const BSEmcCluster *cluster)
Calculate the shower mass of a Cluster. The shower mass corresponds to the invariant mass of a cluste...
void Flag1PED(Cluster_Info &ClusterInfo, std::vector< int > &SplitOffSubclusterIds)
Collect the crystal Ids of Subclusters from 1 PED (Particle Energy Deposition) clusters that are mark...
friend F32vec4 max(const F32vec4 &a, const F32vec4 &b)
Container for SplitOff parameters.
const std::vector< const BSEmcDigi * > & DigiArray
void Flag2PED(Cluster_Info &ClusterInfo, std::vector< int > &SplitOffSubclusterIds)
Collect the crystal Ids of Subclusters from 2 PED (Particle Energy Deposition) clusters that are mark...
a cluster (group of neighboring crystals) of hit emc crystals
std::vector< BSEmcDigiInfo_t > FindSecondaryMaxima(const BSEmcDigiInfo_t ¢ralmax, const std::vector< BSEmcDigiInfo_t > &maxima)
Create an array of all the secondary maxima of a Cluster.
virtual void SetupParameters(const PndParameterRegister *t_parameterRegister)
Fetch all parameters from the PndParameterRegister.
Parameter for crystal positions.
bool HighPEDCut(const std::vector< const BSEmcDigi *> &DigiArray, const BSEmcSubCluster *subcluster1, const BSEmcSubCluster *subcluster2)
Evaluate if a high (>2) PED (Particle Energy Deposition) cluster (build out of 2 SubClusters) is dete...
std::map< int, std::vector< const BSEmcSubCluster * > > CreateClusterMap()
Create a Map that links Clusters to their corresponding Subclusters.
Cluster_Info(const std::vector< const BSEmcDigi *> &digis, const std::vector< const BSEmcCluster *> &clusters, const BSEmcCluster *current_cluster, const std::vector< const BSEmcSubCluster *> &subclusters)
const BSEmcSubCluster * FindSubCluster(const BSEmcDigiInfo_t &max, std::vector< const BSEmcSubCluster *> subcluster_array)
Search the Subcluster-array for the Subcluster that belongs to the current maximum.
const std::vector< const BSEmcSubCluster * > & SubclusterArray
virtual void SetDetectorName(const std::string &t_detectorName)
Set the Detector name. Important, as most EmcParameter need to know for which detector they need to b...
virtual void Process()
The actual data transformation (digitizing, clustering, etc.) should be defined here.
represents the reconstructed hit of one emc crystal
void SetClusterBranchName(const TString &t_branchname)
void SetDigiBranchName(const TString &t_branchname)
bool ShowerMassCut(const std::vector< const BSEmcDigi *> &DigiArray, const BSEmcCluster *cluster)
Evaluate if a 2 PED (Particle Energy Deposition) cluster is determined to include a Split-Off maximum...
void SetRecoHitBranchName(const TString &t_branchname)
bool RatioCut(const double ratio, const double distance)
Evaluate if a 1 PED (Particle Energy Deposition) cluster is determined to be a Split-Off maximum base...
void SetSubClusterBranchName(const TString &t_branchname)
Interface to a datacontainer to be used in PandaROOT.
double CalculateHighPEDShowerMass(const std::vector< const BSEmcDigi *> &DigiArray, const BSEmcSubCluster *subcluster1, const BSEmcSubCluster *subcluster2)
Calculate the shower mass of two Subclusters of a Cluster. The shower mass corresponds to the invaria...
virtual void RequestDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and get the processes container requirements.
Helper class to indirect the Parameter fetching via the FairRuntimeDb.
Neigbouring Relations based on a list of detectorIds.
const BSEmcCluster * cluster
void FlagHighPED(Cluster_Info &ClusterInfo, std::vector< int > &SplitOffSubclusterIds)
Collect the crystal Ids of Subclusters from high (>2) PED (Particle Energy Deposition) clusters that ...
represents a reconstructed (splitted) emc cluster
const std::vector< const BSEmcCluster * > & ClusterArray
virtual void GetDataContainer(PndContainerRegister *t_register)
Pass the container register to the process, and set the processes container requirements.
double CalculateDistance(const std::vector< const BSEmcDigi *> &DigiArray, const BSEmcDigiInfo_t &firstmax, const BSEmcDigiInfo_t &secondmax)
Calculate the distance between the centers of two given forward endcap crystals.
virtual ~BSEmcFlagSplitOffs()
double FindSmallestDistance(const std::vector< const BSEmcCluster *> &ClusterArray, const std::vector< const BSEmcDigi *> &DigiArray, const BSEmcDigiInfo_t &max)
Find the next closest Cluster to the current maximum and calculate the distance to its closest digi...
simple Struct used in Cluster classes to index crystal. Includes the weight of the crystal on the cur...