Fork me on GitHub

source: svn/trunk/Examples/Frog_on_analysis_output.cpp@ 754

Last change on this file since 754 was 443, checked in by Xavier Rouby, 15 years ago

new header in all files

File size: 3.7 KB
RevLine 
[260]1/***********************************************************************
2** **
3** /----------------------------------------------\ **
4** | Delphes, a framework for the fast simulation | **
5** | of a generic collider experiment | **
[443]6** \------------- arXiv:0903.2225v1 ------------/ **
[260]7** **
8** **
9** This package uses: **
10** ------------------ **
[443]11** ROOT: Nucl. Inst. & Meth. in Phys. Res. A389 (1997) 81-86 **
12** FastJet algorithm: Phys. Lett. B641 (2006) [hep-ph/0512210] **
13** Hector: JINST 2:P09005 (2007) [physics.acc-ph:0707.1198v2] **
[260]14** FROG: [hep-ex/0901.2718v1] **
[443]15** HepMC: Comput. Phys. Commun.134 (2001) 41 **
[260]16** **
17** ------------------------------------------------------------------ **
18** **
19** Main authors: **
20** ------------- **
21** **
[443]22** Severine Ovyn Xavier Rouby **
23** severine.ovyn@uclouvain.be xavier.rouby@cern **
[260]24** **
[443]25** Center for Particle Physics and Phenomenology (CP3) **
26** Universite catholique de Louvain (UCL) **
27** Louvain-la-Neuve, Belgium **
28** **
[260]29** Copyright (C) 2008-2009, **
[443]30** All rights reserved. **
[260]31** **
32***********************************************************************/
[188]33
34#include "TApplication.h"
[225]35#include "FrogUtil.h"
36#include "SmearUtil.h"
[188]37#include <iostream>
[225]38#include <string>
[188]39using namespace std;
40
41int main(int argc, char *argv[])
42{
43 int appargc = 2;
44 char *appName = "Delphes";
45 char *appargv[] = {appName, "-b"};
46 TApplication app(appName, &appargc, appargv);
47
48 if(argc != 2 && argc != 3) {
49 cout << " Usage: " << argv[0] << " input_file [N_events]" << endl;
50 cout << " input_file - root file containing the events to display" << endl;
51 cout << " detector_card - Datacard containing resolution variables for the detector simulation (optional) "<<endl;
52 exit(1);
53 }
54
55// 1. ********** initialisation ***********
56 //read the input *root file
57 string inputfilename(argv[1]);
58 if(inputfilename.find(".root") > inputfilename.length() ) {
59 cout << "output_file should be a .root file!\n";
60 exit(1);
61 }
62
63 //data card
64 string DetDatacard("");
65 if(argc==3) DetDatacard =argv[2];
66
67 //create output log-file name
68 string forLog = inputfilename;
69 string LogName = forLog.erase(forLog.find(".root"));
70 LogName = LogName+"_FROG.log";
71
72
73
74 //Smearing information
75 RESOLution *DET = new RESOLution();
76 DET->ReadDataCard(DetDatacard);
77 DET->Logfile(LogName);
78
79
80// 2 ************** FROG display
[225]81 FrogDisplay *FROG = new FrogDisplay(DetDatacard);
82 FROG->BuildEvents(inputfilename);
83 FROG->BuildGeom();
[188]84
85 cout << "** Exiting..." << endl;
86 delete FROG;
[225]87 delete DET;
[188]88}
Note: See TracBrowser for help on using the repository browser.