BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
EventAnalysisOrbit.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2022.
4
5This file is part of BDSIM.
6
7BDSIM is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published
9by the Free Software Foundation version 3 of the License.
10
11BDSIM is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with BDSIM. If not, see <http://www.gnu.org/licenses/>.
18*/
19#ifndef EVENTANALYSISORBIT_H
20#define EVENTANALYSISORBIT_H
21
22#include "EventAnalysis.hh"
23
24#include "Rtypes.h" // for classdef
25
26#include <string>
27#include <vector>
28
29class Event;
30class TChain;
31class TFile;
32
40{
41public:
46
49 TChain* chain,
50 bool perEntryAnalysis = true,
51 bool processSamplersIn = true,
52 bool debugIn = false,
53 double printModuloFraction = 0.01,
54 bool emittanceOnTheFlyIn = false,
55 long int eventStartIn = 0,
56 long int eventEndIn = -1);
57
58 virtual ~EventAnalysisOrbit(){;}
59
60 void Clear();
61 void ExtractOrbit(int index);
62 void WriteOrbit(TFile* f);
63
65 std::vector<double> ss;
66 std::vector<double> x;
67 std::vector<double> xp;
68 std::vector<double> y;
69 std::vector<double> yp;
70 std::vector<std::string> elementName;
72
73 ClassDef(EventAnalysisOrbit,1);
74};
75
76#endif
Simple analysis to pull out first hit in each sampler.
std::vector< std::string > elementName
Temporary storage for orbit.
std::vector< double > y
Temporary storage for orbit.
std::vector< double > ss
Temporary storage for orbit.
std::vector< double > xp
Temporary storage for orbit.
void Clear()
Empty the member vectors of their data.
void ExtractOrbit(int index)
Extract an orbit from the data.
std::vector< double > x
Temporary storage for orbit.
std::vector< double > yp
Temporary storage for orbit.
void WriteOrbit(TFile *f)
Write orbit to a ROOT file.
Event level analysis.
Event loader.
Definition: Event.hh:50