ATLAS Offline Software
Loading...
Searching...
No Matches
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 307 of file DNNCaloSimSvc.cxx.

308{
309 CaloCell_ID::CaloSample aSampling = a->caloDDE()->getSampling();
310 CaloCell_ID::CaloSample bSampling = b->caloDDE()->getSampling();
311
312 float aEtaRaw = a->caloDDE()->eta_raw();
313 float bEtaRaw = b->caloDDE()->eta_raw();
314
315 float aPhiRaw = a->caloDDE()->phi_raw();
316 float bPhiRaw = b->caloDDE()->phi_raw();
317
318 if ((aSampling) < (bSampling))
319 return true;
320 else if ((aSampling) > (bSampling))
321 return false;
322
323 if ((aEtaRaw) < (bEtaRaw))
324 return true;
325 else if ((aEtaRaw) > (bEtaRaw))
326 return false;
327
328return CaloPhiRange::diff(aPhiRaw, bPhiRaw) <= 0;
329}
static Double_t a
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
static double diff(double phi1, double phi2)
simple phi1 - phi2 calculation, but result is fixed to respect range.

◆ compCellsForDNNSortMirror()

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

Definition at line 283 of file DNNCaloSimSvc.cxx.

284{
285 CaloCell_ID::CaloSample aSampling = a->caloDDE()->getSampling();
286 CaloCell_ID::CaloSample bSampling = b->caloDDE()->getSampling();
287
288 float aEtaRaw = a->caloDDE()->eta_raw();
289 float bEtaRaw = b->caloDDE()->eta_raw();
290
291 float aPhiRaw = a->caloDDE()->phi_raw();
292 float bPhiRaw = b->caloDDE()->phi_raw();
293
294 if ((aSampling) < (bSampling))
295 return true;
296 else if ((aSampling) > (bSampling))
297 return false;
298 // reverse sort in eta for left half of detector
299 if ((aEtaRaw) < (bEtaRaw))
300 return false;
301 else if ((aEtaRaw) > (bEtaRaw))
302 return true;
303
304 return CaloPhiRange::diff(aPhiRaw, bPhiRaw) <= 0;
305}