ATLAS Offline Software
Functions
DNNCaloSimSvc.cxx File Reference
#include "DNNCaloSimSvc.h"
#include "ISF_FastCaloSimEvent/TFCSParametrizationBase.h"
#include "ISF_FastCaloSimEvent/TFCSSimulationState.h"
#include "ISF_FastCaloSimEvent/TFCSTruthState.h"
#include "ISF_FastCaloSimEvent/TFCSExtrapolationState.h"
#include "ISF_FastCaloSimParametrization/CaloGeometryFromCaloDDM.h"
#include "ISF_FastCaloSimEvent/FastCaloSim_CaloCell_ID.h"
#include "CaloGeoHelpers/CaloPhiRange.h"
#include "AtlasDetDescr/AtlasDetectorID.h"
#include "IdDictParser/IdDictParser.h"
#include "CaloIdentifier/LArEM_ID.h"
#include "CaloIdentifier/TileID.h"
#include "StoreGate/StoreGateSvc.h"
#include "CaloDetDescr/CaloDetDescrElement.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
#include "CaloIdentifier/CaloIdManager.h"
#include "CaloDetDescrUtils/CaloDetDescrBuilder.h"
#include "AthenaKernel/getMessageSvc.h"
#include "LArReadoutGeometry/FCALDetectorManager.h"
#include "PathResolver/PathResolver.h"
#include "lwtnn/parse_json.hh"
#include "TFile.h"
#include <fstream>
#include "CLHEP/Random/RandGaussZiggurat.h"
#include "CLHEP/Random/RandFlat.h"
#include "CLHEP/Units/SystemOfUnits.h"

Go to the source code of this file.

Functions

bool compCellsForDNNSortMirror (const CaloCell *a, const CaloCell *b)
 
bool compCellsForDNNSort (const CaloCell *a, const CaloCell *b)
 

Function Documentation

◆ compCellsForDNNSort()

bool compCellsForDNNSort ( const CaloCell a,
const CaloCell b 
)

Definition at line 305 of file DNNCaloSimSvc.cxx.

306 {
307  CaloCell_ID::CaloSample aSampling = a->caloDDE()->getSampling();
308  CaloCell_ID::CaloSample bSampling = b->caloDDE()->getSampling();
309 
310  float aEtaRaw = a->caloDDE()->eta_raw();
311  float bEtaRaw = b->caloDDE()->eta_raw();
312 
313  float aPhiRaw = a->caloDDE()->phi_raw();
314  float bPhiRaw = b->caloDDE()->phi_raw();
315 
316  if ((aSampling) < (bSampling))
317  return true;
318  else if ((aSampling) > (bSampling))
319  return false;
320 
321  if ((aEtaRaw) < (bEtaRaw))
322  return true;
323  else if ((aEtaRaw) > (bEtaRaw))
324  return false;
325 
326 return CaloPhiRange::diff(aPhiRaw, bPhiRaw) <= 0;
327 }

◆ compCellsForDNNSortMirror()

bool compCellsForDNNSortMirror ( const CaloCell a,
const CaloCell b 
)

Definition at line 281 of file DNNCaloSimSvc.cxx.

282 {
283  CaloCell_ID::CaloSample aSampling = a->caloDDE()->getSampling();
284  CaloCell_ID::CaloSample bSampling = b->caloDDE()->getSampling();
285 
286  float aEtaRaw = a->caloDDE()->eta_raw();
287  float bEtaRaw = b->caloDDE()->eta_raw();
288 
289  float aPhiRaw = a->caloDDE()->phi_raw();
290  float bPhiRaw = b->caloDDE()->phi_raw();
291 
292  if ((aSampling) < (bSampling))
293  return true;
294  else if ((aSampling) > (bSampling))
295  return false;
296  // reverse sort in eta for left half of detector
297  if ((aEtaRaw) < (bEtaRaw))
298  return false;
299  else if ((aEtaRaw) > (bEtaRaw))
300  return true;
301 
302  return CaloPhiRange::diff(aPhiRaw, bPhiRaw) <= 0;
303 }
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
a
TList * a
Definition: liststreamerinfos.cxx:10
CaloPhiRange::diff
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.
Definition: CaloPhiRange.cxx:22