helper to convert from CaloCellContainer to CaloCompactCellContainer and back
More...
#include <CaloCompactCellTool.h>
|
| int | getLogCompact (const double &x, const double &log_x0, const double &log_x1, const int &n) |
| double | unpackLog (const int &log_x, const double &log_x0, const double &log_x1, const int &n) |
| int | getCubRootCompact (const double &x, const double &cbrt_x1, const int &n) |
| double | unpackCubRoot (const int &cbrt_x, const double &cbrt_x1, const int &n) |
helper to convert from CaloCellContainer to CaloCompactCellContainer and back
- Author
- Sven Menke
Definition at line 28 of file CaloCompactCellTool.h.
◆ KNOWN_VERSIONS
| Enumerator |
|---|
| VERSION_400 | |
| VERSION_500 | |
| VERSION_501 | |
| VERSION_502 | |
| VERSION_503 | |
| VERSION_504 | |
| VERSION_LATEST | |
Definition at line 31 of file CaloCompactCellTool.h.
◆ CaloCompactCellTool()
| CaloCompactCellTool::CaloCompactCellTool |
( |
| ) |
|
◆ getCubRootCompact()
| int CaloCompactCellTool::getCubRootCompact |
( |
const double & | x, |
|
|
const double & | cbrt_x1, |
|
|
const int & | n ) |
|
inlineprivate |
Definition at line 88 of file CaloCompactCellTool.h.
90 {
92 double cbrt_x=cbrt(
x);
93 if ( cbrt_x >= cbrt_x1 ) {
95 } else {
98 }
100}
◆ getLogCompact()
| int CaloCompactCellTool::getLogCompact |
( |
const double & | x, |
|
|
const double & | log_x0, |
|
|
const double & | log_x1, |
|
|
const int & | n ) |
|
inlineprivate |
Definition at line 69 of file CaloCompactCellTool.h.
73{
76 double log_x =
log(
x);
77 if ( log_x >= log_x1 ) {
79 }
80 else if ( log_x > log_x0 ) {
83 }
84 }
86}
◆ getPersistent()
Definition at line 66 of file CaloCompactCellTool.cxx.
71{
72
73
76
77 switch (theVersion ) {
78
85 {
86 CaloCellPacker_400_500 packer;
87
88 packer.
pack (theCellContainer, *theCompactContainer, dec, theVersion);
89 }
90 break;
91
92 default:
94 msg <<
" unknown version " << theVersion
95 <<
" requested for packing the CaloCellContainer" <<
endmsg;
96 return StatusCode::FAILURE;
97 }
98 return StatusCode::SUCCESS;
99}
void pack(const CaloCellContainer &cells, CaloCompactCellContainer &packed, const SG::ThinningDecisionBase *dec, int version) const
Pack cells.
IMessageSvc * getMessageSvc(bool quiet=false)
◆ getTransient()
Definition at line 30 of file CaloCompactCellTool.cxx.
33{
34 const std::vector<CaloCompactCellContainer::value_type> theHeader = theCompactContainer.
getHeader();
35
36
37 DataPool<LArCell> larCellsP(220000);
38 DataPool<TileCell> tileCellsP(13000);
39
40 switch (theHeader[1]) {
41
48 {
49 CaloCellPacker_400_500 packer;
50 packer.
unpack (theCompactContainer, theHeader, *theCellContainer,
51 larCellsP, tileCellsP);
52 }
53 break;
54
55 default:
57 msg <<
" unknown version " << theHeader[1]
58 <<
" requested for unpacking the CaloCompactCellContainer" <<
endmsg;
59 return StatusCode::FAILURE;
60 }
61
62 return StatusCode::SUCCESS;
63}
void unpack(const CaloCompactCellContainer &packed, const std::vector< CaloCompactCellContainer::value_type > &vheader, CaloCellContainer &cells, DataPool< LArCell > &larpool, DataPool< TileCell > &tilepool) const
Unpack cells.
const std::vector< value_type > getHeader() const
returns header portion of the compact cell container
◆ unpackCubRoot()
| double CaloCompactCellTool::unpackCubRoot |
( |
const int & | cbrt_x, |
|
|
const double & | cbrt_x1, |
|
|
const int & | n ) |
|
inlineprivate |
◆ unpackLog()
| double CaloCompactCellTool::unpackLog |
( |
const int & | log_x, |
|
|
const double & | log_x0, |
|
|
const double & | log_x1, |
|
|
const int & | n ) |
|
inlineprivate |
The documentation for this class was generated from the following files: