PandaRoot
PndOtMapCreator.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 
14 // PndOtMapCreator source file
15 //
16 // Mapper for OT
17 //
18 // authors: Radoslaw Karabowicz, GSI, 2024
19 //
20 // modified from PndGeoFts by Nafija Ibrišimović in 2023
22 
23 #ifndef PNDOTMAPCREATOR_H
24 #define PNDOTMAPCREATOR_H
25 
26 // from ROOT
27 #include <TObject.h>
28 // standard
29 #include <iostream>
30 #include <map>
31 
32 class PndOtTube;
33 class PndGeoOtPar;
34 class PndGeoOtPar;
35 
36 class TClonesArray;
37 
38 class PndOtMapCreator : public TObject {
39  public:
41  PndOtMapCreator(Int_t geoType);
44 
45  // general functions
46  void SetGeneralParameters();
47 
48  // general functions, to be specified depending on geo type
49  Int_t GetTubeIDFromPath(TString path);
50  PndOtTube *GetTubeFromTubeID(Int_t tubeid);
51  TClonesArray *FillTubeArray();
52  Int_t GetChamberIDFromPath(TString path);
53  Int_t GetChamberIDFromName(TString name);
54  Int_t GetLayerID(Int_t chamberid, TString path);
55  Int_t IsSkew(Int_t layerid);
56  Int_t GetTubeIDTot(Int_t chamberid, Int_t layerid, TString path);
57  Int_t GetOTTubeIDTot(Int_t chamberid, Int_t layerid, Int_t module_type, Int_t module_number, Int_t tube_in_module, Int_t strawCh12);
58 
59  private:
60  Int_t GetTubeIDFromName(TString name);
61  TString GetNameFromPath(TString path);
62  TString GetNameFromTubeID(Int_t tubeid, Bool_t isCopy);
63  PndOtTube *GetTubeFromNameToFill(TString tubename, Int_t tubeid, Int_t layerid);
64  int GetTypeNumTube(TString path, int &module_type, int &module_number, int &tube_in_module);
65 
66  Int_t fGeoType{0};
67  Double_t fTubeInRad{0.}, fTubeOutRad{0.};
68  PndGeoOtPar *fOtParameters{nullptr};
69  int fModShiftOT1[3][20] = {{192, 256, 320, 384, 448, 1536, 1600, 1664, 1728, 1792, 2880, 2944, 3008, 3072, 3136, 4224, 4288, 4352, 4416, 4480},
70  {64, 128, 512, 576, 1408, 1472, 1856, 1920, 2752, 2816, 3200, 3264, 4096, 4160, 4544, 4608, 0, 0, 0, 0},
71  {0, 32, 640, 1344, 1376, 1984, 2688, 2720, 3328, 4032, 4064, 4672, 0, 0, 0, 0, 0, 0, 0, 0}};
72  int fModShiftOT2[3][28] = {
73  {128, 192, 256, 320, 384, 448, 512, 1472, 1536, 1600, 1664, 1728, 1792, 1856, 2816, 2880, 2944, 3008, 3072, 3136, 3200, 4160, 4224, 4288, 4352, 4416, 4480, 4544},
74  {64, 576, 1408, 1920, 2752, 3264, 4096, 4608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
75  {0, 32, 640, 1344, 1376, 1984, 2688, 2720, 3328, 4032, 4064, 4672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
76 
77  // fGeoType1
78  // std::map<int, int> fCopy_Map;
79 
81  PndOtMapCreator &operator=(const PndOtMapCreator &) { return *this; }
82 
83  protected:
84  ClassDef(PndOtMapCreator, 1)
85 };
86 
87 #endif
void SetGeneralParameters()
PndOtTube * GetTubeFromTubeID(Int_t tubeid)
Int_t GetTubeIDTot(Int_t chamberid, Int_t layerid, TString path)
Int_t GetLayerID(Int_t chamberid, TString path)
TClonesArray * FillTubeArray()
Int_t IsSkew(Int_t layerid)
Int_t GetTubeIDFromPath(TString path)
Int_t GetOTTubeIDTot(Int_t chamberid, Int_t layerid, Int_t module_type, Int_t module_number, Int_t tube_in_module, Int_t strawCh12)
Int_t GetChamberIDFromPath(TString path)
Int_t GetChamberIDFromName(TString name)