1 |
querten |
1.1 |
// SimEvent.h: interface for the SimEvent class.
|
2 |
|
|
//
|
3 |
|
|
//////////////////////////////////////////////////////////////////////
|
4 |
|
|
|
5 |
|
|
#ifndef _MYSIMEVENT_H__
|
6 |
|
|
#define _MYSIMEVENT_H__
|
7 |
|
|
|
8 |
querten |
1.3 |
#define _CRT_SECURE_NO_DEPRECATE 1
|
9 |
querten |
1.1 |
|
10 |
querten |
1.3 |
#include <iostream>
|
11 |
querten |
1.1 |
#include <vector>
|
12 |
querten |
1.2 |
#include "Chunk.h"
|
13 |
querten |
1.1 |
|
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 |
querten |
1.8 |
struct MyRecoHit {float x; float y; float z; int DetId; int Charge;};
|
20 |
|
|
struct MyRecoTrackInfo {char Coll; float P; float Pt;};
|
21 |
|
|
struct MyRecoTrack {std::vector<MyRecoHit*> Hits; MyRecoTrackInfo* Info;
|
22 |
|
|
MyRecoTrack() : Info(NULL){} };
|
23 |
querten |
1.1 |
|
24 |
querten |
1.3 |
struct MyCaloHit {float E; float t; int DetId;};
|
25 |
|
|
|
26 |
querten |
1.6 |
struct MyMuonSegment {int DetId; float PosX; float PosY; float PosZ; float DirX; float DirY; float DirZ;};
|
27 |
|
|
struct MyMuonHit {int DetId; float x; float y; float z;};
|
28 |
|
|
|
29 |
querten |
1.1 |
|
30 |
|
|
class MySimEvent
|
31 |
|
|
{
|
32 |
|
|
public:
|
33 |
|
|
MySimEvent();
|
34 |
|
|
virtual ~MySimEvent();
|
35 |
|
|
|
36 |
querten |
1.2 |
// int LoadEvent(FILE* f);
|
37 |
|
|
void LoadEvent(FILE* pFile, stChunk* ParentChunk);
|
38 |
|
|
void SaveEvent(stChunkToSave* ParentChunk);
|
39 |
querten |
1.1 |
|
40 |
querten |
1.7 |
std::vector<MyPSimHit*> MyPSimHitCollection;
|
41 |
|
|
std::vector<MyPCaloHit*> MyPCaloHitCollection;
|
42 |
|
|
std::vector<MySimVertex*> MySimVertexCollection;
|
43 |
|
|
std::vector<MySimTrack*> MySimTrackCollection;
|
44 |
querten |
1.1 |
|
45 |
querten |
1.7 |
std::vector<MyRecoTrack*> MyRecoTrackCollection;
|
46 |
querten |
1.1 |
|
47 |
querten |
1.7 |
std::vector<MyCaloHit*> MyEcalCaloHitCollection;
|
48 |
|
|
std::vector<MyCaloHit*> MyHcalCaloHitCollection;
|
49 |
querten |
1.1 |
|
50 |
querten |
1.7 |
std::vector<MyMuonSegment*> MyMuonSegmentCollection;
|
51 |
|
|
std::vector<MyMuonHit*> MyMuonHitCollection;
|
52 |
querten |
1.1 |
};
|
53 |
|
|
|
54 |
|
|
class MySimEvents
|
55 |
|
|
{
|
56 |
|
|
public:
|
57 |
|
|
MySimEvents();
|
58 |
|
|
virtual ~MySimEvents();
|
59 |
|
|
|
60 |
querten |
1.5 |
void Load(const char* path);
|
61 |
|
|
void Save(const char* path);
|
62 |
querten |
1.1 |
void NextEvent();
|
63 |
|
|
void PreviousEvent();
|
64 |
roberfro |
1.4 |
void GoToEvent(unsigned int i);
|
65 |
querten |
1.1 |
MySimEvent* GetEvent();
|
66 |
|
|
|
67 |
|
|
std::vector<MySimEvent*> Events;
|
68 |
|
|
int Current_Event;
|
69 |
|
|
};
|
70 |
|
|
|
71 |
|
|
#endif
|