|
ATLAS Offline Software
|
#include <CaloFillRectangularCluster.h>
|
| CaloFillRectangularCluster (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard Gaudi constructor. More...
|
|
virtual StatusCode | initialize () override |
| Standard Gaudi initialize method. More...
|
|
virtual void | makeCorrection (const Context &myctx, xAOD::CaloCluster *cluster) const override |
| CaloClusterCorrection virtual method. More...
|
|
void | makeCorrection (const EventContext &ctx, xAOD::CaloCluster *cluster) const |
|
virtual void | get_seed (CaloClusterCorr::SamplingHelper &helper, const xAOD::CaloCluster *cluster, double &eta, double &phi) const |
|
virtual StatusCode | setCaloCellContainerName (const std::string &name) override |
| Change the name of the CaloCellContainer used by this tool. More...
|
|
virtual WindowArray_t | initWindows (const int neta, const int nphi, const double detas2, const double dphis2) const |
| Set up layer-by-layer cluster window sizes. More...
|
|
virtual void | setsample (xAOD::CaloCluster *cluster, CaloSampling::CaloSample sampling, float em, float etam, float phim, float emax, float etamax, float phimax, float etas, float phis) const |
|
virtual void | setenergy (xAOD::CaloCluster *cluster, float energy) const |
|
StatusCode | execute (const EventContext &ctx, xAOD::CaloCluster *cluster) const override |
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloCluster *cluster) const=0 |
| Execute on a single cluster. More...
|
|
virtual StatusCode | execute (xAOD::CaloCluster *cluster) final |
| Execute on a single cluster. More...
|
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const |
| Execute on an entire collection of clusters. More...
|
|
Context | context (const EventContext &ctx) const |
| Create a Context object. More...
|
|
virtual void | writeConstants (std::ostream &stream, const std::string &name, const EventContext &ctx) const |
| Dump method (for debugging) More...
|
|
virtual StatusCode | mergeConstants (CaloRec::ToolConstants &out, const EventContext &ctx) const override |
| Merge our constants into out with the proper prefix. More...
|
|
virtual int | toolVersion () const |
| Return the version number for this tool. More...
|
|
virtual const std::string & | toolType () const |
| Return the name of the type of this tool. More...
|
|
◆ base_class
◆ Constant
◆ Context
◆ WindowArray_t
◆ CaloFillRectangularCluster() [1/2]
CaloFillRectangularCluster::CaloFillRectangularCluster |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
Standard Gaudi constructor.
- Parameters
-
type | The type of the tool. |
name | The name of the tool. |
parent | The parent algorithm of the tool. |
Definition at line 781 of file CaloFillRectangularCluster.cxx.
788 declareProperty(
"eta_size",
m_neta = 5);
789 declareProperty(
"phi_size",
m_nphi = 5);
791 declareProperty(
"cells_name",
m_cellsName =
"AllCalo");
◆ CaloFillRectangularCluster() [2/2]
CaloFillRectangularCluster::CaloFillRectangularCluster |
( |
| ) |
|
|
privatedelete |
◆ context()
Create a Context
object.
This can then be passed to Constant::operator()
.
◆ execute() [1/4]
◆ execute() [2/4]
virtual StatusCode CaloClusterProcessor::execute |
|
inherited |
Execute on a single cluster.
- Parameters
-
cluster | The cluster to process. |
ctx | The event context. |
◆ execute() [3/4]
StatusCode CaloClusterProcessor::execute |
|
inherited |
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. |
This will iterate over all the clusters in collection
and call execute
on each one individually.
- Parameters
-
collection | The container of clusters. |
ctx | The event context. |
This will iterate over all the clusters in collection
and call execute
on each one individually.
Definition at line 73 of file CaloClusterProcessor.cxx.
65 return StatusCode::SUCCESS;
◆ execute() [4/4]
StatusCode CaloClusterProcessor::execute |
|
finalinherited |
Execute on a single cluster.
- Parameters
-
cluster | The cluster to process. (deprecated) |
Definition at line 63 of file CaloClusterProcessor.cxx.
45 return execute (Gaudi::Hive::currentContext(), cluster);
◆ get_seed()
◆ initialize()
StatusCode CaloFillRectangularCluster::initialize |
( |
| ) |
|
|
overridevirtual |
◆ initWindows()
Set up layer-by-layer cluster window sizes.
- Parameters
-
neta | Cluster eta size. |
nphi | Cluster phi size. |
detas2 | Middle layer cell eta size. |
detas2 | Middle layer cell phi size. |
Returns per-layer array of deta,dphi pairs.
Reimplemented in CaloTopoEMlayers.
Definition at line 1235 of file CaloFillRectangularCluster.cxx.
1243 w[0].first = detas2*neta;
1244 w[0].second = dphis2*4;
1251 w[1].first =
w[0].first;
1252 w[1].second =
w[0].second;
1254 w[2].first = detas2*neta;
1255 w[2].second = dphis2*nphi;
1257 w[3].first = (2*detas2)*(0.5 + (neta/2.));
1258 w[3].second =
w[2].second;
◆ makeCorrection() [1/2]
◆ makeCorrection() [2/2]
void CaloFillRectangularCluster::makeCorrection |
( |
const EventContext & |
ctx, |
|
|
xAOD::CaloCluster * |
cluster |
|
) |
| const |
|
inline |
◆ makeCorrection1()
Definition at line 823 of file CaloFillRectangularCluster.cxx.
833 helper.calculate_and_set (
eta,
phi, 2, -1, samplings,
true);
836 double phi2 =
helper.phim();
839 if (phi2 == -999.) phi2 =
phi;
842 helper.calculate_and_set (
eta2, phi2, 1, -1, samplings);
844 double phi1 =
helper.phim();
846 if (
eta1 == -999. || phi1 == -999.) {
849 if (phi1 == -999.) phi1 = phi2;
864 double detastr, dphistr;
869 if (detastr > 0 && dphistr > 0) {
871 detastr, dphistr, samplings[1]);
873 if (
helper.etam()!=-999.) {
875 double eta1r =
helper.etareal();
876 helper.cluster()->setEta(samplings[1], eta1r);
882 helper.calculate_and_set (
eta1, phi2, 0, 1, samplings);
885 helper.calculate_and_set (
eta2, phi2, 3, -1, samplings);
897 if (!cchand.isValid()) {
908 <<
"Can't find cell container; cluster does not give a cell container";
919 for ( ; f_cell!=l_cell; ++f_cell)
925 if( fabs(
cell->eta()) < 1.4 || fabs(
cell->eta()) > 1.6 )
continue;
926 double phic =
cell->phi();
927 double etac =
cell->eta();
929 float diffeta = etac-
eta2;
930 float diffphi = phic-phi2;
931 if (diffphi < -
pi) diffphi +=
twopi;
932 if (diffphi >
pi) diffphi -=
twopi;
934 if(fabs(diffeta)<deta && fabs(diffphi)<dphi){
935 eh_scint +=
cell->e();
◆ makeCorrection2()
Definition at line 954 of file CaloFillRectangularCluster.cxx.
968 double aeta = fabs(
eta);
1033 samplingPattern |=samplingPattern_b;
1036 samplingPattern |=samplingPattern_e;
1038 if (aeta > 1.37 && aeta < 1.63)
1041 cluster->setSamplingPattern(samplingPattern);
1055 for(
int i=0;
i<4;
i++ ){
1056 cl_ene += cluster->
eSample(samplings_b[
i]);
1057 cl_ene += cluster->
eSample(samplings_e[
i]);
1059 cluster->
setE(cl_ene);
◆ mergeConstants()
Merge our constants into out
with the proper prefix.
- Parameters
-
[out] | out | Object to receive our constants. |
| ctx | Event context. |
◆ setCaloCellContainerName()
StatusCode CaloFillRectangularCluster::setCaloCellContainerName |
( |
const std::string & |
name | ) |
|
|
overridevirtual |
◆ setenergy()
void CaloClusterCorrection::setenergy |
( |
xAOD::CaloCluster * |
cluster, |
|
|
float |
energy |
|
) |
| const |
|
virtualinherited |
◆ setsample()
void CaloClusterCorrection::setsample |
( |
xAOD::CaloCluster * |
cluster, |
|
|
CaloSampling::CaloSample |
sampling, |
|
|
float |
em, |
|
|
float |
etam, |
|
|
float |
phim, |
|
|
float |
emax, |
|
|
float |
etamax, |
|
|
float |
phimax, |
|
|
float |
etas, |
|
|
float |
phis |
|
) |
| const |
|
virtualinherited |
◆ toolType()
Return the name of the type of this tool.
A saved set of constants includes both the C++ class name and a version number. Normally, the class name is taken from the Gaudi type() method, but that may be changed by overriding this method. This can be used, for example, when there are tools with distinct C++ classes but which are yet similar enough to combine together.
◆ toolVersion()
Return the version number for this tool.
A saved set of constants includes both the C++ class name and a version number. The idea is that the version number can be bumped whenever there's a backwards-incompatible change; this gives some protection against trying to use an old version of a tool with an incompatible newer set of constants.
If you want a tool to have a version number, override this method. Otherwise, it will default to a version number of 0.
◆ writeConstants()
Dump method (for debugging)
- Parameters
-
stream | Ostream to which to write. |
name | Name to go in output |
ctx | Event context. |
◆ m_caloMgrKey
◆ m_cellsName
◆ m_DBHandle
◆ m_deta0
double CaloFillRectangularCluster::m_deta0 = 0.0 |
|
protected |
◆ m_deta1
double CaloFillRectangularCluster::m_deta1 = 0.0 |
|
protected |
◆ m_deta2
double CaloFillRectangularCluster::m_deta2 = 0.0 |
|
protected |
◆ m_deta3
double CaloFillRectangularCluster::m_deta3 = 0.0 |
|
protected |
◆ m_dphi0
double CaloFillRectangularCluster::m_dphi0 = 0.0 |
|
protected |
◆ m_dphi1
double CaloFillRectangularCluster::m_dphi1 = 0.0 |
|
protected |
◆ m_dphi2
double CaloFillRectangularCluster::m_dphi2 = 0.0 |
|
protected |
◆ m_dphi3
double CaloFillRectangularCluster::m_dphi3 = 0.0 |
|
protected |
◆ m_fill_cluster
bool CaloFillRectangularCluster::m_fill_cluster |
|
protected |
Fill-cluster flag.
This is a property. If true, then we fill the cluster with cells from StoreGate. Otherwise, we use the cells already in the cluster.
Definition at line 185 of file CaloFillRectangularCluster.h.
◆ m_impl
◆ m_isdummy
If true, then this is a dummy tool that should not be executed.
This is used for the case of reading from COOL using hierarchical tags: we need to have such tags associated with some object in each folder, regardless of whether or not the correction from that folder is actually used. [Every folder that IOVDbSvc knows about at configuration time needs to have a valid object for the configured tag, else IOVDbSvc will raise a fatal error. But we don't know at configuration time which folders we're actually going to need, so we gotta configure all of them.]
Definition at line 553 of file ToolWithConstants.h.
◆ m_neta
int CaloFillRectangularCluster::m_neta |
|
protected |
◆ m_nphi
int CaloFillRectangularCluster::m_nphi |
|
protected |
◆ m_order
Used to fix the ordering of tools when we're initializing from COOL based on a hierarchical tag.
Tools should be executed in order of increasing m_order.
Definition at line 540 of file ToolWithConstants.h.
◆ m_prefix
Prefix for finding our constants within the ToolConstants object.
Definition at line 531 of file ToolWithConstants.h.
◆ m_setRawState
bool CaloFillRectangularCluster::m_setRawState |
|
protected |
The documentation for this class was generated from the following files:
float deta() const
cell deta
flt_t phi0() const
Returns raw of cluster seed.
double calo_eta_max() const
'ideal' geometry: eta maximal
virtual double phi() const
The azimuthal angle ( ) of the particle.
bool is_lar_em_endcap_inner() const
cell belongs to the inner wheel of EM end cap
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
bool setPhisize(const CaloSample sampling, const float phiSize)
Set the cluster size in for a given sampling.
Const iterator class for DataVector/DataList.
#define REPORT_ERROR(SC)
Report an error.
bool is_lar_em_endcap_outer() const
cell belongs to the outer wheel of EM end cap
Scalar phi() const
phi method
void makeCorrection1(const EventContext &ctx, const CaloDetDescrManager &dd_man, CaloClusterCorr::SamplingHelper &helper, double eta, double phi, const CaloSampling::CaloSample samplings[4]) const
void setRawEta(double eta)
Set raw eta.
int m_neta
cluster size. These are properties.
Scalar eta() const
pseudorapidity method
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
unsigned int getClusterPhiSize() const
setEt setPhi setE277 setWeta2 eta1
float phiBE(const unsigned layer) const
Get the phi in one layer of the EM Calo.
bool setEnergy(const CaloSample sampling, const float e)
Set energy for a given sampling. Returns false if the sample isn't part of the cluster.
const std::string & key() const
Return the StoreGate ID for the referenced object.
bool setEmax(const CaloSample sampling, const float eMax)
Set the Energy of the cell with the highest energy in a particular sampling.
virtual StatusCode initialize() override
Initialize method.
float eta_raw() const
cell eta_raw
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
bool setPhimax(const CaloSample sampling, const float phiMax)
Set the phi of the cell with the highest energy in a particular sampling.
SG::ReadHandleKey< CaloCellContainer > m_cellsName
The StoreGate key for the container of our input cells.
(Non-const) Iterator class for DataVector/DataList.
virtual double eta() const
The pseudorapidity ( ) of the particle.
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Principal data class for CaloCell clusters.
#define CHECK(...)
Evaluate an expression and check for errors.
void etaphi_range(const CaloDetDescrManager &dd_man, double eta, double phi, CaloCell_ID::CaloSample sampling, double &deta, double &dphi)
Return eta/phi ranges encompassing +- 1 cell.
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
void setRawE(double e)
Set raw energy.
static double fix(double phi)
std::array< std::pair< double, double >, 4 > WindowArray_t
Holds the per-layer window sizes.
StatusCode initialize(bool used=true)
void setRawPhi(double phi)
Set raw phi.
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
Container class for CaloCell.
#define REPORT_MESSAGE(LVL)
Report a message.
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *) const =0
bool m_setRawState
Property to tell if the raw energy, eta0 and phi0 should be saved as uncalibrated signal state
flt_t eta0() const
Returns raw of cluster seed.
ClusterSize
enums to identify different cluster size
virtual void setE(double e)
Set energy.
float eSample(const CaloSample sampling) const
double calo_eta_min() const
'ideal' geometry: eta minimal
Data object for each calorimeter readout cell.
bool m_fill_cluster
Fill-cluster flag.
void setClusterSize(unsigned int theClusterSize)
Set cluster size.
bool setPhi(const CaloSample sampling, const float phi)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
const CaloDetDescriptor * descriptor() const
cell descriptor
bool setEtamax(const CaloSample sampling, const float etaMax)
Set the eta of the cell with the highest energy in a particular sampling.
float eta() const
cell eta
virtual void get_seed(CaloClusterCorr::SamplingHelper &helper, const xAOD::CaloCluster *cluster, double &eta, double &phi) const
float phi() const
cell phi
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *cluster) const override
CaloClusterCorrection virtual method.
bool setEtasize(const CaloSample sampling, const float etaSize)
Set the cluster size in for a given sampling.
bool setEta(const CaloSample sampling, const float eta)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *cluster) const override
unsigned int getClusterEtaSize() const
virtual double e() const
The total energy of the particle.
float phi_raw() const
cell phi_raw