File indexing completed on 2025-08-05 08:15:11
0001 #ifndef __groot_H__
0002 #define __groot_H__
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030 #include <vector>
0031 #include <string>
0032 #include <map>
0033 #include "TRandom.h"
0034
0035 #include "params.h"
0036
0037
0038 class ATrace;
0039 class ABlob;
0040 class ATrack;
0041 class AZigzag;
0042 class Event;
0043 class TH1;
0044
0045 class groot
0046 {
0047 public:
0048 static groot *instance()
0049 {
0050 if (__instance)
0051 {
0052 return __instance;
0053 }
0054 else
0055 {
0056 __instance = new groot();
0057 return __instance;
0058 }
0059 }
0060 virtual ~groot();
0061
0062
0063 std::vector<ATrace*> theTraces;
0064
0065
0066 std::vector<AZigzag*> theZigzags;
0067 std::vector<ABlob*> theBlobs[Nr];
0068
0069
0070 ABlob* AccessBlobs[Nr][10];
0071 int BlobCount[Nr];
0072 void FillAccessBlobs();
0073
0074
0075
0076 std::vector<ATrack*> theTracks;
0077
0078 Event* event;
0079
0080 std::vector<TH1*> theHistograms;
0081
0082
0083 void Report();
0084 void ClearTheDetector();
0085 void SaveTheHistograms(std::string filename);
0086
0087 TRandom Randy;
0088
0089
0090
0091 AZigzag* ZigzagMap2[Nr][Nphi];
0092 AZigzag* ZigzagMap[Nsrs];
0093 AZigzag* ZWaveMap[Nsrs];
0094
0095 protected:
0096 groot();
0097 static groot *__instance;
0098
0099 void CreateZigzags();
0100 void FillZigzagMaps();
0101 void CreateZigzagMaps();
0102 void FindNeighbors();
0103
0104
0105
0106 int demapper[128];
0107 int remapper[128];
0108
0109 std::map<std::string,std::string> Padplane_NameToConnector;
0110 std::map<std::string,std::string> Padplane_NameToSamPin;
0111
0112 std::map<std::string,int> PanSam_SamPinToPanPin;
0113
0114
0115
0116 int PanPinToChannel(int PanPin);
0117
0118
0119 int ConnectorToHybrid(std::string Conn);
0120
0121 };
0122
0123 #endif