MarlinTrkProcessors  2.4.1
MyBranch_TestTriplet.h
1 #ifndef MyBranch_TestTriplet_H
2 #define MyBranch_TestTriplet_H 1
3 
4 
5 #include<iostream>
6 #include<EVENT/MCParticle.h>
7 #include<EVENT/SimTrackerHit.h>
8 
9 class MCPStatus{
10  public:
12  int pdg;
13  double energy;
14  double mass;
15  float charge;
16  float time;
17  double vx;
18  double vy;
19  double vz;
20  double px;
21  double py;
22  double pz;
23  double Pt;
24  double Pabs;
25  int isCreatedInSimulation;
26  int isBackscatter;
27  int vertexIsNotEndpointOfParent;
28  int isDecayedInTracker;
29  int isDecayedInCalorimeter;
30  int hasLeftDetector;
31  int isStopped;
33  float d0;
34  float phi0;
35  float omega;
36  float z0;
37  float tanL;
38  int nhits;
39  int nvxdhits;
40  int nsithits;
41  int nftdhits;
42  int ntpchits;
43  int nsethits;
44  MCPStatus(){
45  d0=0; phi0=0; omega=0; z0=0; tanL=0;
46  nhits=0; nvxdhits=0; nsithits=0; nftdhits=0; ntpchits=0; nsethits=0;
47  }
48  void BasicInitialize(MCParticle* mcp);
49 };
50 
51 void MCPStatus::BasicInitialize(MCParticle* mcp){
52  pdg = mcp->getPDG();
53  energy = mcp->getEnergy();
54  charge = mcp->getCharge();
55  mass = mcp->getMass();
56  time = mcp->getTime();
57  px = mcp->getMomentum()[0];
58  py = mcp->getMomentum()[1];
59  pz = mcp->getMomentum()[2];
60  Pt = sqrt(pow(px,2) + pow(py,2) );
61  Pabs = sqrt(pow(px,2) + pow(py,2) + pow(pz,2));
62  vx = mcp->getVertex()[0];
63  vy = mcp->getVertex()[1];
64  vz = mcp->getVertex()[2];
65  isCreatedInSimulation = mcp->isCreatedInSimulation();
66  isBackscatter = mcp->isBackscatter();
67  vertexIsNotEndpointOfParent = mcp->vertexIsNotEndpointOfParent();
68  isDecayedInTracker = mcp->isDecayedInTracker();
69  isDecayedInCalorimeter = mcp->isDecayedInCalorimeter();
70  hasLeftDetector = mcp->hasLeftDetector();
71  isStopped = mcp->isStopped();
72 }
73 
74 
76  public:
77  int id;
78  int quality_code;
79  int detID[3];
80  int layer[3];
81  int Comb;
82  float chi2;
83  int ndf;
84  float prob;
85  float purity;
86  float d0;
87  float z0;
88  float phi0;
89  float omega;
90  float tanL;
91  float cov[15];//lcioと同じ詰め方
92  MCPStatus mcp;
93 };
94 
95 
96 
97 
98 
99 
100 
101 
102 
103 #endif
Definition: MyBranch_TestTriplet.h:9
Definition: MyBranch_TestTriplet.h:75