Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_G4_EICDetector_LQ_reference.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_G4_EICDetector_LQ_reference.C
2  string n="1093",
3  string ebeam="20",
4  string pbeam="250",
5  //string inputFile,
6  string inputFile="/direct/phenix+u/spjeffas/LQGENEP/TestOut.1093event.root",
7  string output="",
8  const char * outputFile = "G4EICDetector.root"
9  )
10 {
11  // Set the number of TPC layer
12  const int n_TPC_layers = 40; // use 60 for backward compatibility only
13 
14  //Get parameter variables from parameter file
15 
16  int nEvents;
17  stringstream geek(n);
18  geek>>nEvents;
19 
20 
21 
22  string directory = "/direct/phenix+u/spjeffas/leptoquark/output/"+output+"/";
23 
24 
25  //===============
26  // Input options
27  //===============
28  // Either:
29  // read previously generated g4-hits files, in this case it opens a DST and skips
30  // the simulations step completely. The G4Setup macro is only loaded to get information
31  // about the number of layers used for the cell reco code
32  //
33  // In case reading production output, please double check your G4Setup_sPHENIX.C and G4_*.C consistent with those in the production macro folder
34  // E.g. /sphenix/sim//sim01/production/2016-07-21/single_particle/spacal2d/
35  const bool readhits = false;
36  // Or:
37  // read files in HepMC format (typically output from event generators like hijing or pythia)
38  const bool readhepmc = false; // read HepMC files
39  // Or:
40  // read files in EICTree format generated by eicsmear package
41  const bool readeictree = true;
42  // Or:
43  // Use Pythia 8
44  const bool runpythia8 = false;
45  // Or:
46  // Use Pythia 6
47  const bool runpythia6 = false;
48  // Or:
49  // Use HEPGen
50  const bool runhepgen = false;
51  // Or:
52  // Use Sartre
53  const bool runsartre = false;
54 
55 
56 
57  // Besides the above flags. One can further choose to further put in following particles in Geant4 simulation
58  // Use multi-particle generator (PHG4SimpleEventGenerator), see the code block below to choose particle species and kinematics
59  const bool particles = false && !readhits;
60  // or gun/ very simple single particle gun generator
61  const bool usegun = false && !readhits;
62  // Throw single Upsilons, may be embedded in Hijing by setting readhepmc flag also (note, careful to set Z vertex equal to Hijing events)
63  const bool upsilons = false && !readhits;
64 
65  //======================
66  // What to run
67  //======================
68 
69  // sPHENIX barrel
70  bool do_bbc = true;
71 
72  bool do_pipe = true;
73 
74  bool do_svtx = true;
75  bool do_svtx_cell = do_svtx && true;
76  bool do_svtx_track = do_svtx_cell && true;
77  bool do_svtx_eval = do_svtx_track && true;
78 
79  bool do_pstof = false;
80 
81  bool do_cemc = true;
82 
83  bool do_cemc_cell = true;
84  bool do_cemc_twr = true;
85  bool do_cemc_cluster = true;
86  bool do_cemc_eval = true;
87 
88  bool do_hcalin = true;
89  bool do_hcalin_cell = true;
90  bool do_hcalin_twr = true;
91  bool do_hcalin_cluster = true;
92  bool do_hcalin_eval = true;
93 
94  bool do_cemc_cell = do_cemc && true;
95  bool do_cemc_twr = do_cemc_cell && true;
96  bool do_cemc_cluster = do_cemc_twr && true;
97  bool do_cemc_eval = do_cemc_cluster && true;
98 
99  bool do_hcalin = true;
100  bool do_hcalin_cell = do_hcalin && true;
101  bool do_hcalin_twr = do_hcalin_cell && true;
102  bool do_hcalin_cluster = do_hcalin_twr && true;
103  bool do_hcalin_eval = do_hcalin_cluster && true;
104 
105 
106  bool do_magnet = true;
107 
108  bool do_hcalout = true;
109 
110  bool do_hcalout_cell = true;
111  bool do_hcalout_twr = true;
112  bool do_hcalout_cluster = true;
113  bool do_hcalout_eval = true;
114 
115  bool do_global = true;
116  bool do_global_fastsim = false;
117 
118  bool do_jet_reco = true;
119  bool do_jet_eval = true;
120 
121  bool do_fwd_jet_reco = true;
122  bool do_fwd_jet_eval = false;
123 
124  bool do_hcalout_cell = do_hcalout && true;
125  bool do_hcalout_twr = do_hcalout_cell && true;
126  bool do_hcalout_cluster = do_hcalout_twr && true;
127  bool do_hcalout_eval = do_hcalout_cluster && true;
128 
129 
130  // EICDetector geometry - barrel
131  bool do_DIRC = true;
132 
133  // EICDetector geometry - 'hadron' direction
134  bool do_FGEM = true;
135  bool do_FGEM_track = do_FGEM && false;
136 
137  bool do_RICH = true;
138  bool do_Aerogel = true;
139 
140  bool do_FEMC = true;
141  bool do_FEMC_cell = do_FEMC && true;
142  bool do_FEMC_twr = do_FEMC_cell && true;
143  bool do_FEMC_cluster = do_FEMC_twr && true;
144  bool do_FEMC_eval = do_FEMC_cluster && true;
145 
146  bool do_FHCAL = true;
147  bool do_FHCAL_cell = do_FHCAL && true;
148  bool do_FHCAL_twr = do_FHCAL_cell && true;
149  bool do_FHCAL_cluster = do_FHCAL_twr && true;
150  bool do_FHCAL_eval = do_FHCAL_cluster && true;
151 
152  // EICDetector geometry - 'electron' direction
153  bool do_EGEM = true;
154  bool do_EGEM_track = do_EGEM && false;
155 
156  bool do_EEMC = true;
157  bool do_EEMC_cell = do_EEMC && true;
158  bool do_EEMC_twr = do_EEMC_cell && true;
159  bool do_EEMC_cluster = do_EEMC_twr && true;
160  bool do_EEMC_eval = do_EEMC_cluster && true;
161 
162  //do leptoquark analysis modules
163  bool do_lepto_analysis = true;
164 
165  // Other options
166  bool do_global = true;
167  bool do_global_fastsim = false;
168 
169  bool do_calotrigger = false && do_cemc_twr && do_hcalin_twr && do_hcalout_twr;
170 
171  bool do_jet_reco = true;
172  bool do_jet_eval = do_jet_reco && true;
173 
174  bool do_fwd_jet_reco = true;
175  bool do_fwd_jet_eval = do_fwd_jet_reco && true;
176 
177  // HI Jet Reco for jet simulations in Au+Au (default is false for
178  // single particle / p+p simulations, or for Au+Au simulations which
179  // don't care about jets)
180  bool do_HIjetreco = false && do_jet_reco && do_cemc_twr && do_hcalin_twr && do_hcalout_twr;
181 
182  // Compress DST files
183  bool do_dst_compress = false;
184 
185  //Option to convert DST to human command readable TTree for quick poke around the outputs
186  bool do_DSTReader = false;
187 
188  //---------------
189  // Load libraries
190  //---------------
191 
192  gSystem->Load("libfun4all.so");
193  gSystem->Load("libg4detectors.so");
194  gSystem->Load("libphhepmc.so");
195  gSystem->Load("libg4testbench.so");
196  gSystem->Load("libg4hough.so");
197  gSystem->Load("libg4calo.so");
198  gSystem->Load("libg4eval.so");
199  gSystem->Load("libeicana.so");
200 
201  // establish the geometry and reconstruction setup
202  gROOT->LoadMacro("G4Setup_EICDetector.C");
203  G4Init(do_svtx,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,do_FGEM,do_EGEM,do_FEMC,do_FHCAL,do_EEMC,do_DIRC,do_RICH,do_Aerogel,n_TPC_layers);
204 
205  int absorberactive = 0; // set to 1 to make all absorbers active volumes
206  // const string magfield = "1.5"; // if like float -> solenoidal field in T, if string use as fieldmap name (including path)
207  const string magfield = "/phenix/upgrades/decadal/fieldmaps/sPHENIX.2d.root"; // if like float -> solenoidal field in T, if string use as fieldmap name (including path)
208  const float magfield_rescale = 1.4/1.5; // scale the map to a 1.4 T field
209 
210  //---------------
211  // Fun4All server
212  //---------------
213 
215  se->Verbosity(0); // uncomment for batch production running with minimal output messages
216  // se->Verbosity(Fun4AllServer::VERBOSITY_SOME); // uncomment for some info for interactive running
217 
218  // just if we set some flags somewhere in this macro
220  // By default every random number generator uses
221  // PHRandomSeed() which reads /dev/urandom to get its seed
222  // if the RANDOMSEED flag is set its value is taken as seed
223  // You can either set this to a random value using PHRandomSeed()
224  // which will make all seeds identical (not sure what the point of
225  // this would be:
226  // rc->set_IntFlag("RANDOMSEED",PHRandomSeed());
227  // or set it to a fixed value so you can debug your code
228  // rc->set_IntFlag("RANDOMSEED", 12345);
229 
230  //-----------------
231  // Event generation
232  //-----------------
233 
234  if (readhits)
235  {
236  // Get the hits from a file
237  // The input manager is declared later
238  }
239  else if (readhepmc)
240  {
241  // this module is needed to read the HepMC records into our G4 sims
242  // but only if you read HepMC input files
243  HepMCNodeReader *hr = new HepMCNodeReader();
244  se->registerSubsystem(hr);
245  }
246  else if (readeictree)
247  {
248  // this module is needed to read the EICTree style records into our G4 sims
249  ReadEICFiles *eicr = new ReadEICFiles();
250  eicr->OpenInputFile(inputFile);
251 
252  se->registerSubsystem(eicr);
253  }
254  else if (runpythia8)
255  {
256  gSystem->Load("libPHPythia8.so");
257 
258  PHPythia8* pythia8 = new PHPythia8();
259  // see coresoftware/generators/PHPythia8 for example config
260  pythia8->set_config_file("/direct/phenix+u/spjeffas/coresoftware/generators/PHPythia8/phpythia8.cfg");
261  se->registerSubsystem(pythia8);
262 
263  HepMCNodeReader *hr = new HepMCNodeReader();
264  se->registerSubsystem(hr);
265  }
266  else if (runpythia6)
267  {
268  gSystem->Load("libPHPythia6.so");
269 
270  PHPythia6 *pythia6 = new PHPythia6();
271  // see coresoftware/generators/PHPythia6 for example config
272  pythia6->set_config_file("/direct/phenix+u/spjeffas/coresoftware/generators/PHPythia6/phpythia6_ep.cfg");
273  se->registerSubsystem(pythia6);
274 
275  HepMCNodeReader *hr = new HepMCNodeReader();
276  se->registerSubsystem(hr);
277  }
278  else if (runhepgen)
279  {
280  gSystem->Load("libsHEPGen.so");
281 
282  sHEPGen *hepgen = new sHEPGen();
283  // see HEPGen source directory/share/vggdata for required .dat files
284  // see HEPGen source directory/share/datacards for required datacard files
285  hepgen->set_datacard_file("hepgen_dvcs.data");
286  hepgen->set_momentum_electron(-20);
287  hepgen->set_momentum_hadron(250);
288  se->registerSubsystem(hepgen);
289 
290  HepMCNodeReader *hr = new HepMCNodeReader();
291  se->registerSubsystem(hr);
292  }
293  else if (runsartre)
294  {
295  // see coresoftware/generators/PHSartre/README for setup instructions
296  // before running:
297  // setenv SARTRE_DIR /opt/sphenix/core/sartre-1.20_root-5.34.36
298  gSystem->Load("libPHSartre.so");
299 
300  PHSartre* mysartre = new PHSartre();
301  // see coresoftware/generators/PHSartre for example config
302  mysartre->set_config_file("sartre.cfg");
303 
304  // particle trigger to enhance forward J/Psi -> ee
305  PHSartreParticleTrigger* pTrig = new PHSartreParticleTrigger("MySartreTrigger");
306  pTrig->AddParticles(-11);
307  //pTrig->SetEtaHighLow(4.0,1.4);
308  pTrig->SetEtaHighLow(1.0,-1.1); // central arm
309  pTrig->PrintConfig();
310  mysartre->register_trigger((PHSartreGenTrigger *)pTrig);
311  se->registerSubsystem(mysartre);
312 
313  HepMCNodeReader *hr = new HepMCNodeReader();
314  se->registerSubsystem(hr);
315  }
316 
317  // If "readhepMC" is also set, the particles will be embedded in Hijing events
318  if(particles)
319  {
320  // toss low multiplicity dummy events
322 
323  //gen->add_particles("e-",5); // mu+,e+,proton,pi+,Upsilon
324  //gen->add_particles("e+",5); // mu-,e-,anti_proton,pi-
325  gen->add_particles("tau-",1); // mu-,e-,anti_proton,pi-
326  if (readhepmc) {
327  gen->set_reuse_existing_vertex(true);
328  gen->set_existing_vertex_offset_vector(0.0,0.0,0.0);
329  } else {
333  gen->set_vertex_distribution_mean(0.0,0.0,0.0);
334  gen->set_vertex_distribution_width(0.0,0.0,5.0);
335  }
337  gen->set_vertex_size_parameters(0.0,0.0);
338  gen->set_eta_range(0.1, 0.1);
339  //gen->set_eta_range(3.0, 3.0); //EICDetector FWD
340  gen->set_phi_range(TMath::Pi()/2-0.1, TMath::Pi()/2-0.1);
341  //gen->set_phi_range(TMath::Pi()/2-0.1, TMath::Pi()/2-0.1);
342  gen->set_p_range(30.0, 30.0);
343 
344  //gen->add_particles("pi-",1); // mu+,e+,proton,pi+,Upsilon
345  //gen->add_particles("pi+",100); // 100 pion option
346  if (readhepmc)
347  {
348  gen->set_reuse_existing_vertex(true);
349  gen->set_existing_vertex_offset_vector(0.0, 0.0, 0.0);
350  }
351  else
352  {
356  gen->set_vertex_distribution_mean(0.0, 0.0, 0.0);
357  gen->set_vertex_distribution_width(0.0, 0.0, 0.0);
358  }
360  gen->set_vertex_size_parameters(0.0, 0.0);
361  gen->set_eta_range(-1.0, 1.0);
362  gen->set_phi_range(-1.0 * TMath::Pi(), 1.0 * TMath::Pi());
363  //gen->set_pt_range(0.1, 50.0);
364  gen->set_pt_range(0.1, 20.0);
365 
366  gen->Embed(1);
367  gen->Verbosity(0);
368 
369  se->registerSubsystem(gen);
370  }
371  if (usegun)
372  {
373  // PHG4ParticleGun *gun = new PHG4ParticleGun();
374  // gun->set_name("anti_proton");
375  // gun->set_name("geantino");
376  // gun->set_vtx(0, 0, 0);
377  // gun->set_mom(10, 0, 0.01);
378  // gun->AddParticle("geantino",1.7776,-0.4335,0.);
379  // gun->AddParticle("geantino",1.7709,-0.4598,0.);
380  // gun->AddParticle("geantino",2.5621,0.60964,0.);
381  // gun->AddParticle("geantino",1.8121,0.253,0.);
382  // se->registerSubsystem(gun);
384  pgen->set_name("e-");
385  pgen->set_z_range(0,0);
386  pgen->set_eta_range(0.01,0.01);
387  pgen->set_mom_range(10,10);
388  pgen->set_phi_range(-1.0 * TMath::Pi(), 1.0 * TMath::Pi());
389  se->registerSubsystem(pgen);
390  }
391 
392  // If "readhepMC" is also set, the Upsilons will be embedded in Hijing events, if 'particles" is set, the Upsilons will be embedded in whatever particles are thrown
393  if(upsilons)
394  {
395  // run upsilons for momentum, dca performance, alone or embedded in Hijing
396 
398  vgen->add_decay_particles("e+","e-",0); // i = decay id
399  // event vertex
400  if (readhepmc || particles)
401  {
402  vgen->set_reuse_existing_vertex(true);
403  }
404  else
405  {
406  vgen->set_vtx_zrange(-10.0, +10.0);
407  }
408 
409  // Note: this rapidity range completely fills the acceptance of eta = +/- 1 unit
410  vgen->set_rapidity_range(-1.0, +1.0);
411  vgen->set_pt_range(0.0, 10.0);
412 
413  int istate = 1;
414 
415  if(istate == 1)
416  {
417  // Upsilon(1S)
418  vgen->set_mass(9.46);
419  vgen->set_width(54.02e-6);
420  }
421  else if (istate == 2)
422  {
423  // Upsilon(2S)
424  vgen->set_mass(10.0233);
425  vgen->set_width(31.98e-6);
426  }
427  else
428  {
429  // Upsilon(3S)
430  vgen->set_mass(10.3552);
431  vgen->set_width(20.32e-6);
432  }
433 
434  vgen->Verbosity(0);
435  vgen->Embed(2);
436  se->registerSubsystem(vgen);
437 
438  cout << "Upsilon generator for istate = " << istate << " created and registered " << endl;
439  }
440 
441  if (!readhits)
442  {
443  //---------------------
444  // Detector description
445  //---------------------
446 
447  G4Setup(absorberactive, magfield, TPythia6Decayer::kAll,
448  do_svtx,do_cemc,do_hcalin,do_magnet,do_hcalout,do_pipe,
449  do_FGEM,do_EGEM,do_FEMC,do_FHCAL,do_EEMC,do_DIRC,do_RICH,do_Aerogel,
450  magfield_rescale);
451 
452  }
453 
454  //---------
455  // BBC Reco
456  //---------
457 
458  if (do_bbc)
459  {
460  gROOT->LoadMacro("G4_Bbc.C");
461  BbcInit();
462  Bbc_Reco();
463  }
464 
465  //------------------
466  // Detector Division
467  //------------------
468 
469  if (do_svtx_cell) Svtx_Cells();
470 
471  if (do_cemc_cell) CEMC_Cells();
472 
473  if (do_hcalin_cell) HCALInner_Cells();
474 
475  if (do_hcalout_cell) HCALOuter_Cells();
476 
477  if (do_FEMC_cell) FEMC_Cells();
478 
479  if (do_FHCAL_cell) FHCAL_Cells();
480 
481  if (do_EEMC_cell) EEMC_Cells();
482 
483  //-----------------------------
484  // CEMC towering and clustering
485  //-----------------------------
486 
487  if (do_cemc_twr) CEMC_Towers();
488  if (do_cemc_cluster) CEMC_Clusters();
489 
490  //-----------------------------
491  // HCAL towering and clustering
492  //-----------------------------
493 
494  if (do_hcalin_twr) HCALInner_Towers();
495  if (do_hcalin_cluster) HCALInner_Clusters();
496 
497  if (do_hcalout_twr) HCALOuter_Towers();
498  if (do_hcalout_cluster) HCALOuter_Clusters();
499 
500  //-----------------------------
501  // e, h direction Calorimeter towering and clustering
502  //-----------------------------
503 
504  if (do_FEMC_twr) FEMC_Towers();
505  if (do_FEMC_cluster) FEMC_Clusters();
506 
507  if (do_FHCAL_twr) FHCAL_Towers();
508  if (do_FHCAL_cluster) FHCAL_Clusters();
509 
510  if (do_EEMC_twr) EEMC_Towers();
511  if (do_EEMC_cluster) EEMC_Clusters();
512 
513  if (do_dst_compress) ShowerCompress();
514 
515  //--------------
516  // SVTX tracking
517  //--------------
518 
519  if (do_svtx_track) Svtx_Reco();
520 
521  //--------------
522  // FGEM tracking
523  //--------------
524 
525  if(do_FGEM_track) FGEM_FastSim_Reco();
526 
527  //--------------
528  // EGEM tracking
529  //--------------
530 
531  if(do_EGEM_track) EGEM_FastSim_Reco();
532 
533  //-----------------
534  // Global Vertexing
535  //-----------------
536 
537  if (do_global)
538  {
539  gROOT->LoadMacro("G4_Global.C");
540  Global_Reco();
541  }
542 
543  else if (do_global_fastsim)
544  {
545  gROOT->LoadMacro("G4_Global.C");
546  Global_FastSim();
547  }
548 
549  //-----------------
550  // Calo Trigger Simulation
551  //-----------------
552 
553  if (do_calotrigger)
554  {
555  gROOT->LoadMacro("G4_CaloTrigger.C");
556  CaloTrigger_Sim();
557  }
558 
559  //---------
560  // Jet reco
561  //---------
562 
563  if (do_jet_reco)
564  {
565  gROOT->LoadMacro("G4_Jets.C");
566  Jet_Reco();
567  }
568 
569  if (do_HIjetreco) {
570  gROOT->LoadMacro("G4_HIJetReco.C");
571  HIJetReco();
572  }
573 
574  if (do_fwd_jet_reco)
575  {
576  gROOT->LoadMacro("G4_FwdJets.C");
577  Jet_FwdReco();
578  }
579 
580  //----------------------
581  // Simulation evaluation
582  //----------------------
583 
584 
585  if (do_svtx_eval) Svtx_Eval(directory+"g4svtx_p"+pbeam+"_e"+ebeam+"_"+n+"events_eval.root");
586 
587  if (do_cemc_eval) CEMC_Eval(directory+"g4cemc_p"+pbeam+"_e"+ebeam+"_"+n+"events_eval.root");
588 
589  if (do_hcalin_eval) HCALInner_Eval(directory+"g4hcalin_p"+pbeam+"_e"+ebeam+"_"+n+"events_eval.root");
590 
591  if (do_hcalout_eval) HCALOuter_Eval(directory+"g4hcalout_p"+pbeam+"_e"+ebeam+"_"+n+"events_eval.root");
592 
593  if (do_jet_eval) Jet_Eval(directory+"g4jet_p"+pbeam+"_e"+ebeam+"_"+n+"events_eval.root");
594 
595  if (do_fwd_jet_eval) Jet_FwdEval(directory+"g4fwdjet_p"+pbeam+"_e"+ebeam+"_"+n+"events_eval.root");
596 
597  if(do_lepto_analysis){
598  gROOT->LoadMacro("G4_Lepto.C");
599  G4_Lepto(directory+"LeptoAna_p"+pbeam+"_e"+ebeam+"_"+n+"events");
600  }
601 
602 
603 
604 
605 
606  //--------------
607  // IO management
608  //--------------
609 
610  if (readhits)
611  {
612  // Hits file
613  Fun4AllInputManager *hitsin = new Fun4AllDstInputManager("DSTin");
614  hitsin->fileopen(inputFile);
615  se->registerInputManager(hitsin);
616  }
617  if (readhepmc)
618  {
620  se->registerInputManager( in );
621  se->fileopen( in->Name().c_str(), inputFile );
622  }
623  else
624  {
625  // for single particle generators we just need something which drives
626  // the event loop, the Dummy Input Mgr does just that
628  se->registerInputManager( in );
629  }
630 
631  if (do_DSTReader)
632  {
633  //Convert DST to human command readable TTree for quick poke around the outputs
634  gROOT->LoadMacro("G4_DSTReader_EICDetector.C");
635 
636  G4DSTreader_EICDetector( outputFile, //
637  /*int*/ absorberactive ,
638  /*bool*/ do_svtx ,
639  /*bool*/ do_cemc ,
640  /*bool*/ do_hcalin ,
641  /*bool*/ do_magnet ,
642  /*bool*/ do_hcalout ,
643  /*bool*/ do_cemc_twr ,
644  /*bool*/ do_hcalin_twr ,
645  /*bool*/ do_magnet ,
646  /*bool*/ do_hcalout_twr,
647  /*bool*/ do_FGEM,
648  /*bool*/ do_EGEM,
649  /*bool*/ do_FHCAL,
650  /*bool*/ do_FHCAL_twr,
651  /*bool*/ do_FEMC,
652  /*bool*/ do_FEMC_twr,
653  /*bool*/ do_EEMC,
654  /*bool*/ do_EEMC_twr
655  );
656  }
657 
658  Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT", outputFile);
659  if (do_dst_compress) DstCompress(out);
660  se->registerOutputManager(out);
661 
662  //-----------------
663  // Event processing
664  //-----------------
665  if (nEvents < 0)
666  {
667  return;
668  }
669  // if we run the particle generator and use 0 it'll run forever
670  if (nEvents == 0 && !readhits && !readhepmc)
671  {
672  cout << "using 0 for number of events is a bad idea when using particle generators" << endl;
673  cout << "it will run forever, so I just return without running anything" << endl;
674  return;
675  }
676 
677  se->run(nEvents);
678 
679  //-----
680  // Exit
681  //-----
682 
683  se->End();
684  std::cout << "All done" << std::endl;
685  delete se;
686  gSystem->Exit(0);
687 }