BDSIM
BDSIM is a Geant4 extension toolkit for simulation of particle transport in accelerator beamlines.
Loading...
Searching...
No Matches
EventAnalysisOrbit.hh
1/*
2Beam Delivery Simulation (BDSIM) Copyright (C) Royal Holloway,
3University of London 2001 - 2023.
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 bool printOutIn = true,
54 double printModuloFraction = 0.01,
55 bool emittanceOnTheFlyIn = false,
56 long int eventStartIn = 0,
57 long int eventEndIn = -1);
58
59 virtual ~EventAnalysisOrbit(){;}
60
61 void Clear();
62 void ExtractOrbit(int index);
63 void WriteOrbit(TFile* f);
64
66 std::vector<double> ss;
67 std::vector<double> x;
68 std::vector<double> xp;
69 std::vector<double> y;
70 std::vector<double> yp;
71 std::vector<std::string> elementName;
73
74 ClassDef(EventAnalysisOrbit,1);
75};
76
77#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