PandaRoot
BSEmcFwEndcap_AgThomaBonnVersion_SensorNameIdMap.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 #ifndef BSEMCFWENDCAP_AGTHOMABONNVERSION_SENSORNAMEIDMAP_HH
14 #define BSEMCFWENDCAP_AGTHOMABONNVERSION_SENSORNAMEIDMAP_HH
15 
16 #include <utility>
17 #include <vector>
18 
19 #include "Rtypes.h"
20 #include "RtypesCore.h"
21 #include "TString.h"
22 
23 #include "PndSensorNameIdMap.h"
24 
25 class TBuffer;
26 class TClass;
27 class TMemberInspector;
28 class TString;
29 
39  public:
42  virtual Int_t CreateId(TString &t_sensName) const /*override*/;
43 
44  private:
45  std::pair<Int_t, Int_t> ConvertIntoAlveole(Int_t t_section, Int_t t_alveolex, Int_t t_alveoley) const;
46  Int_t RemapCrystal(Int_t t_crystal, Int_t t_alveolex, Int_t t_alveoley) const;
47  Bool_t IsIncludedIn(Int_t t_xIndex, Int_t t_yIndex, const std::vector<std::pair<Int_t, Int_t>> &t_indices) const;
48  Int_t CalculateRow(Int_t t_crystal, Int_t t_xAlveoleIndex, Int_t t_yAlveoleIndex) const;
49  Int_t CalculateColumn(Int_t t_crystal, Int_t t_xAlveoleIndex, Int_t t_yAlveoleIndex) const;
50 
51  std::vector<std::pair<Int_t, Int_t>> f0DegRot{};
52  std::vector<std::pair<Int_t, Int_t>> f90DegRot{};
53  std::vector<std::pair<Int_t, Int_t>> f180DegRot{};
54  std::vector<std::pair<Int_t, Int_t>> f270DegRot{};
55  std::vector<std::pair<Int_t, Int_t>> fRequireOffset{};
56 
58 };
59 
60 #endif /*BSEMCFWENDCAP_AGTHOMABONNVERSION_SENSORNAMEIDMAP_HH*/
Base class for NameIdMaps used by the EmcGeoHandling singleton to retrieve a detector id from a name ...
virtual Int_t CreateId(TString &t_sensName) const
FwEndcap specific crystal-geometry-name decoding into detector Id used by EmcDetector.