PandaRoot
BSEmcFlagSplitOffs Class Reference

#include <BSEmcFlagSplitOffs.h>

Inheritance diagram for BSEmcFlagSplitOffs:
PndProcess< BSEmcClusteringData >

Classes

struct  Cluster_Info
 

Public Member Functions

 BSEmcFlagSplitOffs ()
 
virtual ~BSEmcFlagSplitOffs ()
 
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 be fetched (each Emc Subdetector has its own set of parameters) More...
 
virtual void SetupParameters (const PndParameterRegister *t_parameterRegister)
 Fetch all parameters from the PndParameterRegister. More...
 
virtual void SetData (BSEmcClusteringData *t_pdata)
 Pass the data container ptrs to the process, and store pointers in class members. More...
 
virtual void Process ()
 The actual data transformation (digitizing, clustering, etc.) should be defined here. More...
 
std::map< int, std::vector< const BSEmcSubCluster * > > CreateClusterMap ()
 Create a Map that links Clusters to their corresponding Subclusters. More...
 
const BSEmcSubClusterFindSubCluster (const BSEmcDigiInfo_t &max, std::vector< const BSEmcSubCluster *> subcluster_array)
 Search the Subcluster-array for the Subcluster that belongs to the current maximum. More...
 
std::vector< BSEmcDigiInfo_tFindSecondaryMaxima (const BSEmcDigiInfo_t &centralmax, const std::vector< BSEmcDigiInfo_t > &maxima)
 Create an array of all the secondary maxima of a Cluster. More...
 
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 cluster, if each crystal is treated as a photon with the crystal's energy. More...
 
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 based on a cut on the shower mass. The cut was determined in MC studies. More...
 
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 invariant mass of a cluster, if each crystal is treated as a photon with the crystal's energy. More...
 
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 determined to include a Split-Off maximum based on a cut on the shower mass. The cut was determined in MC studies. More...
 
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. More...
 
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. More...
 
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. More...
 
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 based on a cut on the distance to the next closest cluster and the ratio of the cluster energies. The cut was determined in MC studies. More...
 
void FlagHighPED (Cluster_Info &ClusterInfo, std::vector< int > &SplitOffSubclusterIds)
 Collect the crystal Ids of Subclusters from high (>2) PED (Particle Energy Deposition) clusters that are marked to be Split-Off, based on a cut on the shower mass. More...
 
void Flag2PED (Cluster_Info &ClusterInfo, std::vector< int > &SplitOffSubclusterIds)
 Collect the crystal Ids of Subclusters from 2 PED (Particle Energy Deposition) clusters that are marked to be Split-Off, based on a cut on the shower mass. More...
 
void Flag1PED (Cluster_Info &ClusterInfo, std::vector< int > &SplitOffSubclusterIds)
 Collect the crystal Ids of Subclusters from 1 PED (Particle Energy Deposition) clusters that are marked to be Split-Off, based on a cut on the energy ratio and the distance to the next closest Cluster. More...
 
- Public Member Functions inherited from PndProcess< BSEmcClusteringData >
 PndProcess ()
 
 PndProcess (const std::string &t_processname)
 
virtual ~PndProcess ()
 
const std::vector< std::string > & GetListOfRequiredParameters () const
 Get the List Of Required Parameters. More...
 
virtual void PreProcess ()
 PreProcess() is called before the actual Process() call in each event. More...
 
virtual void PostProcess ()
 Immediately after calling Process() PostProcess() is called for cleanup of internal process data, or if not needed, to end the time and memory increase measurement started by PreProcess() More...
 
virtual void TearDown ()
 Last actions at the end of the run. More...
 

Additional Inherited Members

- Protected Attributes inherited from PndProcess< BSEmcClusteringData >
std::vector< std::string > fParameterList
 Parameter names required by this PndProcess. Needs to be populated in derived class. More...
 
std::string fDetectorName
 Set Detector name this PndProcess transforms data for. Required for example by EMC Processes to fetch right parameters. More...
 
std::string fProcessName
 Name of current PndProcess (for debugging) More...
 
TStopwatch fTimer
 Timer to monitor Process() time. More...
 
Double_t fTotalTime
 Time taken by this Process' Process() More...
 
ProcInfo_t fProcInfo
 Helper to access cpu process Memory Info. More...
 
Long_t fLastMemSize
 

Detailed Description

Definition at line 25 of file BSEmcFlagSplitOffs.h.

Constructor & Destructor Documentation

◆ BSEmcFlagSplitOffs()

BSEmcFlagSplitOffs::BSEmcFlagSplitOffs ( )

◆ ~BSEmcFlagSplitOffs()

virtual BSEmcFlagSplitOffs::~BSEmcFlagSplitOffs ( )
virtual

Member Function Documentation

◆ CalculateDistance()

double BSEmcFlagSplitOffs::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.

Parameters
DigiArray
firstmax
secondmax
Returns
double - distance in cm

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ CalculateHighPEDShowerMass()

double BSEmcFlagSplitOffs::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 invariant mass of a cluster, if each crystal is treated as a photon with the crystal's energy.

Parameters
DigiArray
subcluster1
subcluster2
Returns
double - shower mass of the two Sublusters in GeV

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ CalculateShowerMass()

double BSEmcFlagSplitOffs::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 cluster, if each crystal is treated as a photon with the crystal's energy.

Parameters
DigiArray
cluster
Returns
double - shower mass of the Cluster in GeV

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ CreateClusterMap()

std::map<int,std::vector<const BSEmcSubCluster*> > BSEmcFlagSplitOffs::CreateClusterMap ( )

Create a Map that links Clusters to their corresponding Subclusters.

Returns
std::map<int,std::vector<BSEmcSubCluster*>>

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ FindEnergyClosestCluster()

double BSEmcFlagSplitOffs::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.

Parameters
ClusterArray
DigiArray
max- Info about the current maximum.
Returns
double - energy of next closest cluster

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ FindSecondaryMaxima()

std::vector<BSEmcDigiInfo_t> BSEmcFlagSplitOffs::FindSecondaryMaxima ( const BSEmcDigiInfo_t centralmax,
const std::vector< BSEmcDigiInfo_t > &  maxima 
)

Create an array of all the secondary maxima of a Cluster.

Parameters
centralmax- Central maximum of the cluster.
maxima- All maxima of the cluster.
Returns
std::vector<BSEmcDigiInfo_t>

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ FindSmallestDistance()

double BSEmcFlagSplitOffs::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.

Parameters
ClusterArray
DigiArray
max- Info about the current maximum.
Returns
double - distance in cm

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ FindSubCluster()

const BSEmcSubCluster* BSEmcFlagSplitOffs::FindSubCluster ( const BSEmcDigiInfo_t max,
std::vector< const BSEmcSubCluster *>  subcluster_array 
)

Search the Subcluster-array for the Subcluster that belongs to the current maximum.

Parameters
max- current maximum
subcluster_array- array of Subclusters of the corresponding Cluster
Returns
BSEmcSubCluster* - Subcluster belonging to the current maximum

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ Flag1PED()

void BSEmcFlagSplitOffs::Flag1PED ( Cluster_Info ClusterInfo,
std::vector< int > &  SplitOffSubclusterIds 
)

Collect the crystal Ids of Subclusters from 1 PED (Particle Energy Deposition) clusters that are marked to be Split-Off, based on a cut on the energy ratio and the distance to the next closest Cluster.

Parameters
ClusterInfo- Contains all of the important information relevant to the current cluster.
SplitOffSubclusterIds- CentralCrystalIds of Subclusters flagged to be SplitOff are filled into this vector.

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ Flag2PED()

void BSEmcFlagSplitOffs::Flag2PED ( Cluster_Info ClusterInfo,
std::vector< int > &  SplitOffSubclusterIds 
)

Collect the crystal Ids of Subclusters from 2 PED (Particle Energy Deposition) clusters that are marked to be Split-Off, based on a cut on the shower mass.

Parameters
ClusterInfo- Contains all of the important information relevant to the current cluster.
SplitOffSubclusterIds- CentralCrystalIds of Subclusters flagged to be SplitOff are filled into this vector

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ FlagHighPED()

void BSEmcFlagSplitOffs::FlagHighPED ( Cluster_Info ClusterInfo,
std::vector< int > &  SplitOffSubclusterIds 
)

Collect the crystal Ids of Subclusters from high (>2) PED (Particle Energy Deposition) clusters that are marked to be Split-Off, based on a cut on the shower mass.

Parameters
ClusterInfo- Contains all of the important information relevant to the current cluster.
SplitOffSubclusterIds- CentralCrystalIds of Subclusters flagged to be SplitOff are filled into this vector

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ HighPEDCut()

bool BSEmcFlagSplitOffs::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 determined to include a Split-Off maximum based on a cut on the shower mass. The cut was determined in MC studies.

Parameters
DigiArray
subcluster1
subcluster2
Returns
true - if Subclusters are flagged to contain a Split-Off
false - if Subclusters are not flagged to contain a Split-Off

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ Process()

virtual void BSEmcFlagSplitOffs::Process ( )
virtual

The actual data transformation (digitizing, clustering, etc.) should be defined here.

Implements PndProcess< BSEmcClusteringData >.

◆ RatioCut()

bool BSEmcFlagSplitOffs::RatioCut ( const double  ratio,
const double  distance 
)

Evaluate if a 1 PED (Particle Energy Deposition) cluster is determined to be a Split-Off maximum based on a cut on the distance to the next closest cluster and the ratio of the cluster energies. The cut was determined in MC studies.

Parameters
ratio- current cluster energy divided by energy of next closest cluster
distance- distance to next closest cluster
Returns
true - if Cluster is flagged as a Split-Off
false - if Cluster is not flagged as a Split-Off

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().

◆ SetData()

virtual void BSEmcFlagSplitOffs::SetData ( BSEmcClusteringData t_data)
virtual

Pass the data container ptrs to the process, and store pointers in class members.

Parameters
t_data

Implements PndProcess< BSEmcClusteringData >.

◆ SetDetectorName()

virtual void BSEmcFlagSplitOffs::SetDetectorName ( const std::string &  t_detectorname)
virtual

Set the Detector name. Important, as most EmcParameter need to know for which detector they need to be fetched (each Emc Subdetector has its own set of parameters)

Parameters
t_detectorname

Reimplemented from PndProcess< BSEmcClusteringData >.

◆ SetupParameters()

virtual void BSEmcFlagSplitOffs::SetupParameters ( const PndParameterRegister t_parameter)
virtual

Fetch all parameters from the PndParameterRegister.

Parameters
t_parameter

Implements PndProcess< BSEmcClusteringData >.

◆ ShowerMassCut()

bool BSEmcFlagSplitOffs::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 based on a cut on the shower mass. The cut was determined in MC studies.

Parameters
DigiArray
cluster
Returns
true - if Cluster is flagged to contain a Split-Off
false - if Cluster is not flagged to contain a Split-Off

Referenced by BSEmcFlagSplitOffs::Cluster_Info::Cluster_Info().


The documentation for this class was generated from the following file: