[cfc3160] | 1 | /*
|
---|
| 2 | * Delphes: a framework for fast simulation of a generic collider experiment
|
---|
| 3 | * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium
|
---|
| 4 | *
|
---|
| 5 | * This program is free software: you can redistribute it and/or modify
|
---|
| 6 | * it under the terms of the GNU General Public License as published by
|
---|
| 7 | * the Free Software Foundation, either version 3 of the License, or
|
---|
| 8 | * (at your option) any later version.
|
---|
| 9 | *
|
---|
| 10 | * This program is distributed in the hope that it will be useful,
|
---|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 13 | * GNU General Public License for more details.
|
---|
| 14 | *
|
---|
| 15 | * You should have received a copy of the GNU General Public License
|
---|
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 17 | */
|
---|
| 18 |
|
---|
| 19 | #ifndef DelphesEventDisplay_h
|
---|
| 20 | #define DelphesEventDisplay_h
|
---|
| 21 |
|
---|
| 22 | #include <vector>
|
---|
[fafc433] | 23 | #include <iostream>
|
---|
[cfc3160] | 24 | #include "external/ExRootAnalysis/ExRootTreeReader.h"
|
---|
| 25 | #include "display/DelphesDisplay.h"
|
---|
| 26 | #include "display/Delphes3DGeometry.h"
|
---|
[5fbcfe8] | 27 | #include "display/DelphesHtmlSummary.h"
|
---|
[cfc3160] | 28 | #include "TChain.h"
|
---|
[4fd37d4] | 29 | #include "TAxis.h"
|
---|
[5fbcfe8] | 30 | #include "TGHtml.h"
|
---|
[cfc3160] | 31 | #include "TClonesArray.h"
|
---|
| 32 |
|
---|
| 33 | /*
|
---|
| 34 | * assembly.C: sauvegarde as shape-extract -> implement in the geometry class (read/write)
|
---|
| 35 | * histobrowser.C: intégration d'histogrammes dans le display (on pourrait avoir Pt, eta, phi pour les principales collections)
|
---|
| 36 | * also from alice_esd: summary html table
|
---|
| 37 | *
|
---|
| 38 | */
|
---|
| 39 |
|
---|
| 40 | class DelphesEventDisplay
|
---|
| 41 | {
|
---|
| 42 | public:
|
---|
| 43 | DelphesEventDisplay();
|
---|
| 44 | DelphesEventDisplay(const char *configFile, const char *inputFile, Delphes3DGeometry& det3D);
|
---|
| 45 | ~DelphesEventDisplay();
|
---|
| 46 |
|
---|
| 47 | private:
|
---|
| 48 | void make_gui();
|
---|
[fafc433] | 49 | void load_event();
|
---|
[4fd37d4] | 50 | void readConfig(const char *configFile, std::vector<DelphesBranchBase*>& elements);
|
---|
[cfc3160] | 51 |
|
---|
| 52 | // Configuration and global variables.
|
---|
[fafc433] | 53 | Int_t event_id_;
|
---|
| 54 | ExRootTreeReader *treeReader_;
|
---|
[4fd37d4] | 55 | Double_t tkRadius_, totRadius_, tkHalfLength_, muHalfLength_, bz_;
|
---|
| 56 | TAxis *etaAxis_, *phiAxis_;
|
---|
[cfc3160] | 57 | TChain* chain_;
|
---|
[fafc433] | 58 | std::vector<DelphesBranchBase*> elements_;
|
---|
| 59 | DelphesDisplay *delphesDisplay_;
|
---|
[5fbcfe8] | 60 | DelphesHtmlSummary *htmlSummary_;
|
---|
| 61 | TGHtml *gHtml_;
|
---|
[cfc3160] | 62 |
|
---|
[fafc433] | 63 | // gui controls
|
---|
| 64 | public:
|
---|
| 65 | void Fwd() {
|
---|
| 66 | if (event_id_ < treeReader_->GetEntries() - 1) {
|
---|
| 67 | ++event_id_;
|
---|
| 68 | load_event();
|
---|
| 69 | } else {
|
---|
| 70 | printf("Already at last event.\n");
|
---|
| 71 | }
|
---|
| 72 | }
|
---|
[cfc3160] | 73 |
|
---|
[fafc433] | 74 | void Bck() {
|
---|
| 75 | if (event_id_ > 0) {
|
---|
| 76 | --event_id_;
|
---|
| 77 | load_event();
|
---|
| 78 | } else {
|
---|
| 79 | printf("Already at first event.\n");
|
---|
| 80 | }
|
---|
| 81 | }
|
---|
[cfc3160] | 82 | };
|
---|
| 83 |
|
---|
| 84 | #endif //DelphesEventDisplay_h
|
---|