19#if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
66 #if !defined(XAOD_STANDALONE) && !defined(XAOD_ANALYSIS)
73 return StatusCode::SUCCESS;
97 metCont->
at(i)->setSource( source );
101 std::string termName =
"";
102 for(
int i=0; i<3; ++i) {
104 case 0: termName =
"AllCells";
break;
105 case 1: termName =
"Cells_Abs2S";
break;
106 case 2: termName =
"Cells_Abs2S_m5S";
break;
114 StatusCode
sc = StatusCode::SUCCESS;
121 #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
126 return StatusCode::SUCCESS;
137 return StatusCode::SUCCESS;
147 if(!currentTerm)
continue;
149 ", source " << currentTerm->
source() <<
150 ", mpx " << currentTerm->
mpx() <<
151 ", mpy " << currentTerm->
mpy() <<
152 ", met " << currentTerm->
met() <<
153 ", sumet " << currentTerm->
sumet()
161 return StatusCode::SUCCESS;
168 case CaloSampling::EMB1:
169 case CaloSampling::EMB2:
170 case CaloSampling::EMB3:
171 return metContainer->
at(
EMB);
173 case CaloSampling::EME1:
174 case CaloSampling::EME2:
175 case CaloSampling::EME3:
176 return metContainer->
at(
EME);
178 case CaloSampling::FCAL0:
179 case CaloSampling::FCAL1:
180 case CaloSampling::FCAL2:
181 return metContainer->
at(
FCAL);
183 case CaloSampling::HEC0:
184 case CaloSampling::HEC1:
185 case CaloSampling::HEC2:
186 case CaloSampling::HEC3:
187 return metContainer->
at(
HEC);
189 case CaloSampling::PreSamplerB:
190 return metContainer->
at(
PEMB);
192 case CaloSampling::PreSamplerE:
193 return metContainer->
at(
PEME);
195 case CaloSampling::TileBar0:
196 case CaloSampling::TileBar1:
197 case CaloSampling::TileBar2:
198 case CaloSampling::TileExt0:
199 case CaloSampling::TileExt1:
200 case CaloSampling::TileExt2:
201 case CaloSampling::TileGap1:
202 case CaloSampling::TileGap2:
203 case CaloSampling::TileGap3:
204 return metContainer->
at(
TILE);
206 default:
return nullptr;
214 #if defined (XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
215 ATH_MSG_WARNING(
"Cell information is only available in athena framework");
220 for (
const CaloCell* cell : *caloCellContainer) {
226 double e_cell = cell->energy();
227 double et_cell = e_cell/cosh(cell->eta());
228 double phi_cell = cell->phi();
238 metTerm->
add(et_cell*cos(phi_cell),
239 et_cell*sin(phi_cell),
244 #if defined(XAOD_STANDALONE) || defined(XAOD_ANALYSIS)
245 double noise_cell = 0;
247 double noise_cell = noiseCDO->
getNoise(cell->ID(),cell->gain());
251 et_cell*sin(phi_cell),
254 if( fabs(e_cell) < 2.0*noise_cell )
continue;
256 et_cell*sin(phi_cell),
259 if( e_cell < -5.0*noise_cell )
continue;
261 et_cell*sin(phi_cell),
266 return StatusCode::SUCCESS;
275 for(
const auto *iClus : *caloClusContainer) {
277 for(
int iSample=CaloSampling::PreSamplerB;
278 iSample<=CaloSampling::FCAL2; ++iSample) {
283 if(fabs(iClus->eSample(sample))>0) {
286 double et_sample = iClus->eSample(sample)/cosh(iClus->etaSample(sample));
287 double phi_sample = iClus->phiSample(sample);
297 metTerm->
add(et_sample*cos(phi_sample),
298 et_sample*sin(phi_sample),
303 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Container class for CaloCell.
Data object for each calorimeter readout cell.
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
const T * at(size_type n) const
Access an element, as an rvalue.
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const SG::AuxVectorData * container() const
Return the container holding this element.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
const_pointer_type cptr()
Dereference the pointer.
Class providing the definition of the 4-vector interface.
float sumet() const
Returns.
void add(const IParticle *particle)
Add particle kinematics to MET.
MissingETBase::Types::bitmask_t source() const
MET object source tag.
float met() const
Returns .
const std::string & name() const
Identifier getters.
float mpx() const
Returns .
float mpy() const
Returns .
uint64_t bitmask_t
Type for status word bit mask.
MissingETComponentMap_v1 MissingETComponentMap
Version control by type definition.
MissingET_v1 MissingET
Version control by type defintion.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
MissingETContainer_v1 MissingETContainer
CaloClusterContainer_v1 CaloClusterContainer
Define the latest version of the calorimeter cluster container.
static Types::bitmask_t clusterEM(Region reg=Region::FullAcceptance)
Bit mask for MET term from EMTopo signal objects.
@ Calo
Indicator for MET terms reconstructed from calorimeter signals alone.