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 1
|
9 |
|
10 |
#include <iostream>
|
11 |
#include <vector>
|
12 |
#include "Chunk.h"
|
13 |
|
14 |
struct MyPSimHit {float x; float y; float z; float dEdX; int ProcessType;};
|
15 |
struct MyPCaloHit {float x; float y; float z; float E; int ProcessType;};
|
16 |
struct MySimVertex{float x; float y; float z; int parentTrack_id;};
|
17 |
struct MySimTrack {int track_id;float Px;float Py; float Pz; float E;int Type;int parent_vertex;float charge;};
|
18 |
|
19 |
struct MyRecoHit {float x; float y; float z; int DetId; int Charge;};
|
20 |
struct MyRecoTrack {std::vector<MyRecoHit> Hits;};
|
21 |
|
22 |
struct MyCaloHit {float E; float t; int DetId;};
|
23 |
|
24 |
|
25 |
class MySimEvent
|
26 |
{
|
27 |
public:
|
28 |
MySimEvent();
|
29 |
virtual ~MySimEvent();
|
30 |
|
31 |
// int LoadEvent(FILE* f);
|
32 |
void LoadEvent(FILE* pFile, stChunk* ParentChunk);
|
33 |
void SaveEvent(stChunkToSave* ParentChunk);
|
34 |
|
35 |
// int LoadChunk (FILE* f, stChunk* chunk);
|
36 |
// int Chunk_size();
|
37 |
|
38 |
// void ReadChunk (FILE* pFile, stChunk* pChunk);
|
39 |
// void WriteChunk(FILE* pFile, stChunkToSave* pChunk);
|
40 |
|
41 |
std::vector<MyPSimHit> MyPSimHitCollection;
|
42 |
std::vector<MyPCaloHit> MyPCaloHitCollection;
|
43 |
std::vector<MySimVertex> MySimVertexCollection;
|
44 |
std::vector<MySimTrack> MySimTrackCollection;
|
45 |
|
46 |
std::vector<MyRecoTrack> MyRecoTrackCollection;
|
47 |
|
48 |
std::vector<MyCaloHit> MyEcalCaloHitCollection;
|
49 |
std::vector<MyCaloHit> MyHcalCaloHitCollection;
|
50 |
};
|
51 |
|
52 |
class MySimEvents
|
53 |
{
|
54 |
public:
|
55 |
MySimEvents();
|
56 |
virtual ~MySimEvents();
|
57 |
|
58 |
void Load(char* path);
|
59 |
void Save(char* path);
|
60 |
void NextEvent();
|
61 |
void PreviousEvent();
|
62 |
MySimEvent* GetEvent();
|
63 |
|
64 |
std::vector<MySimEvent*> Events;
|
65 |
int Current_Event;
|
66 |
};
|
67 |
|
68 |
#endif
|