Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
groot.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file groot.h
1
#ifndef __groot_H__
2
#define __groot_H__
3
4
5
//
6
// Hello TPC Fans :P
7
//
8
// Welcome to groot. groot is the code to analyze SLAC
9
// test beam data. It gets its name form the highly non-uniform
10
// namture of the MPC-EX and also the test beam apparatus.
11
//
12
// If this code were written for PHENIX, data objects
13
// (Blobs, Clusters, etc) would be <vector> located in a PHENIX "Node Tree"
14
// (linked list). Since TESTBEAM is not PHENIX, we have TEMPORARILY(!!!) located
15
// these objects inside groot.
16
//
17
// This file principally declares vectors of object types that are essential to the
18
// pattern recognition itself.
19
//
20
// The thing that distinguishes groot from legolas is the inclusion of
21
// the two trackers but exclusion of the RICH. The trackers will be used to define
22
// the vectors coming from the tracks and thereby define the places of shower
23
// centers and also the number of electrons.
24
//
25
//
26
// TKH
27
// 2-27-2014
28
//
29
30
#include <vector>
31
#include <string>
32
#include <map>
33
#include "TRandom.h"
34
35
#include "
params.h
"
36
37
// Forward declarations...
38
class
ATrace
;
39
class
ABlob
;
40
class
ATrack
;
41
class
AZigzag
;
42
class
Event
;
43
class
TH1;
44
45
class
groot
46
{
47
public
:
48
static
groot
*
instance
()
49
{
50
if
(
__instance
)
51
{
52
return
__instance
;
53
}
54
else
55
{
56
__instance
=
new
groot
();
57
return
__instance
;
58
}
59
}
60
virtual
~groot
();
61
62
/* BEAMLINE Counters */
63
std::vector<ATrace*>
theTraces
;
64
65
/* Tracker */
66
std::vector<AZigzag*>
theZigzags
;
67
std::vector<ABlob*>
theBlobs
[
Nr
];
68
69
// To allow easy access at the prompt...
70
ABlob
*
AccessBlobs
[
Nr
][10];
71
int
BlobCount
[
Nr
];
72
void
FillAccessBlobs
();
73
74
75
/* Tracker combined */
76
std::vector<ATrack*>
theTracks
;
77
78
Event
*
event
;
79
80
std::vector<TH1*>
theHistograms
;
81
82
// Utility Functions...
83
void
Report
();
84
void
ClearTheDetector
();
85
void
SaveTheHistograms
(
std::string
filename
);
86
87
TRandom
Randy
;
88
89
// ZZM[r][phi] is an ORDERED set of pointers to the Zigzags
90
// WM[WaveformIndex] is a pointer to a Zigzag in waveform order (used to suppress crosstalk).
91
AZigzag
*
ZigzagMap2
[
Nr
][
Nphi
];
92
AZigzag
*
ZigzagMap
[
Nsrs
];
93
AZigzag
*
ZWaveMap
[
Nsrs
];
94
95
protected
:
96
groot
();
97
static
groot
*
__instance
;
98
99
void
CreateZigzags
();
100
void
FillZigzagMaps
();
101
void
CreateZigzagMaps
();
102
void
FindNeighbors
();
103
104
// demapper[MartinIndex] = WaveformIndex
105
// remapper[WaveformIndex] = MartinIndex
106
int
demapper
[128];
107
int
remapper
[128];
108
109
std::map<std::string,std::string>
Padplane_NameToConnector
;
110
std::map<std::string,std::string>
Padplane_NameToSamPin
;
111
112
std::map<std::string,int>
PanSam_SamPinToPanPin
;
113
114
// Accepts SBU panasonic numbering as input.
115
// Returns true APV channel number...
116
int
PanPinToChannel
(
int
PanPin);
117
118
// This takes a connector like U$1 and tells you the hybrid index...
119
int
ConnectorToHybrid
(
std::string
Conn);
120
121
};
122
123
#endif
/* __groot_H__ */
analysis
blob
master
TPC
groot
groot.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:58
using
1.8.2 with
sPHENIX GitHub integration