1 |
querten |
1.1 |
// SimEvent.h: interface for the SimEvent class.
|
2 |
|
|
//
|
3 |
|
|
//////////////////////////////////////////////////////////////////////
|
4 |
|
|
|
5 |
|
|
#ifndef _MYSIMEVENT_H__
|
6 |
|
|
#define _MYSIMEVENT_H__
|
7 |
|
|
|
8 |
|
|
#define _CRT_SECURE_NO_DEPRECATE
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
#include <vector>
|
12 |
|
|
|
13 |
|
|
struct MyPSimHit {float x; float y; float z; float dEdX; int ProcessType;};
|
14 |
|
|
struct MyPCaloHit {float x; float y; float z; float E; int ProcessType;};
|
15 |
|
|
struct MySimVertex{float x; float y; float z; int parentTrack_id;};
|
16 |
|
|
struct MySimTrack {int track_id;float Px;float Py; float Pz; float E;int Type;int parent_vertex;float charge;};
|
17 |
|
|
|
18 |
|
|
struct MyRecoHit {float x; float y; float z; int DetId; int Charge;};
|
19 |
|
|
struct MyRecoTrack {int N; MyRecoHit* Hits;};
|
20 |
|
|
|
21 |
|
|
struct Chunk {int type;int size;int read;};
|
22 |
|
|
|
23 |
|
|
#define C_PRIMARY 9999
|
24 |
|
|
#define C_EVENT 999
|
25 |
|
|
#define C_PSIMHIT 100
|
26 |
|
|
#define C_PCALOHIT 200
|
27 |
|
|
#define C_SIMTRACK 300
|
28 |
|
|
#define C_SIMVERTEX 400
|
29 |
|
|
|
30 |
|
|
#define C_RECOTRACK 1100
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
class MySimEvent
|
34 |
|
|
{
|
35 |
|
|
public:
|
36 |
|
|
MySimEvent();
|
37 |
|
|
virtual ~MySimEvent();
|
38 |
|
|
|
39 |
|
|
int LoadEvent(FILE* f);
|
40 |
|
|
void SaveEvent(FILE* f);
|
41 |
|
|
|
42 |
|
|
int LoadChunk (FILE* f);
|
43 |
|
|
|
44 |
|
|
// void ComputeLine();
|
45 |
|
|
int Chunk_size();
|
46 |
|
|
|
47 |
|
|
|
48 |
|
|
void Open(char* path);
|
49 |
|
|
|
50 |
|
|
std::vector<MyPSimHit> MyPSimHitCollection;
|
51 |
|
|
std::vector<MyPCaloHit> MyPCaloHitCollection;
|
52 |
|
|
std::vector<MySimVertex> MySimVertexCollection;
|
53 |
|
|
std::vector<MySimTrack> MySimTrackCollection;
|
54 |
|
|
|
55 |
|
|
std::vector<MyRecoTrack> MyRecoTrackCollection;
|
56 |
|
|
};
|
57 |
|
|
|
58 |
|
|
class MySimEvents
|
59 |
|
|
{
|
60 |
|
|
public:
|
61 |
|
|
MySimEvents();
|
62 |
|
|
virtual ~MySimEvents();
|
63 |
|
|
|
64 |
|
|
void Load(char* path);
|
65 |
|
|
void Save(char* path);
|
66 |
|
|
void NextEvent();
|
67 |
|
|
void PreviousEvent();
|
68 |
|
|
MySimEvent* GetEvent();
|
69 |
|
|
|
70 |
|
|
std::vector<MySimEvent*> Events;
|
71 |
|
|
int Current_Event;
|
72 |
|
|
};
|
73 |
|
|
|
74 |
|
|
#endif
|