Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Beamspot.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Beamspot.h
1 #include "TObject.h"
2 #include "TH2F.h"
3 
4 struct Beamspot : TObject
5 {
6  double x;
7  double y;
8  double z;
9  double sigma_x;
10  double sigma_y;
11  double sigma_z;
13 
14  double covariance[21];
15  double dzdx;
16  double dzdy;
17  double zwidth;
18 
20  TH2F* d0phi0dist;
21  TH1F* z0dist;
22  TH2F* pcadist;
23 
24  Beamspot() : x(0.),y(0.),z(0.),sigma_x(0.),sigma_y(0.),sigma_z(0.),Ntracklets(0.)
25  {
26  for(int i=0;i<21;i++) covariance[i] = 1.;
27  d0phi0dist = new TH2F("d0phi0dist","tracklet phi0 vs. d0",200,-M_PI,M_PI,200,-2.,2.);
28  z0dist = new TH1F("z0","z0",200,-40.,40.);
29  pcadist = new TH2F("pcadist","PCA",200,-.5,.5,200,-.5,.5);
30  }
31 
32  void identify()
33  {
34  std::cout << "Beamspot: " << std::endl;
35  std::cout << "(x,y,z) = (" << x << " +- " << sigma_x << ", " << y << " +- " << sigma_y << ", " << z << " +- " << sigma_z << ")" << std::endl;
36  std::cout << "Ntracklets: " << Ntracklets << std::endl;
37  }
38 };