Re: brhijing

From: Hironori Ito (hito@rcf.rhic.bnl.gov)
Date: Mon Jun 02 2003 - 13:27:51 EDT

  • Next message: Stephen J. Sanders: "brahms db access screwed up?"
    This is very strange.  My change is done by almost 9month old.  And, it 
    was WORKING at the time when I commited the change.  Something has been 
    change.  Is it because hijing used to use own inc file instead of 
    breg/base (or something like that). (I do not quite remember the old 
    settings but vaguely remember wondering why we need multiple files with 
      same name.)   Anyhow, as it is pointed out, it is caused by common 
    blocks from inc files.
    
    Hiro
    
    Christian Holm Christensen wrote:
    > Hi Steve, 
    > 
    > [changed to `dev' list]
    > 
    > "Stephen J. Sanders" <ssanders@ku.edu> wrote concerning
    >   brhijing [Wed, 21 May 2003 16:35:23 -0500] 
    > ----------------------------------------------------------------------
    > 
    >>Hi,
    >>I just checked out breg with the hope of running Hijing on
    >>the rcas machines.  However, the make fails miserably with
    >>numerous invalid declarations and inconsistent common block
    >>length errors for hijing_main.f
    > 
    > 
    > The problem is, that Hiro introduced additional variables in the
    > common block `eventinfo', which unfortunately has the same name as
    > existing variables in Hijing itself. Hence, there's a conflict. 
    > 
    > I would suggest changing the variable names in `event.inc' from
    > `breg/base'. 
    > 
    > 
    >>Is there a trick for building hijing on rcas?
    > 
    > 
    > If you want to use plain Hijing, I would suggest getting `THijing'
    > from my web-site [1].  It's a sub-class of `TGenerator', which makes
    > it easy to use in ROOT.  Then, you can output the relevant information
    > to a plain text file: 
    > 
    >   int testHijing(Int_t nEvents=10)
    >   {
    >     // Define your main function here
    >     gROOT->LoadClass("THijing", ".libs/libHijing.so");
    >     // gDebug = 1;
    > 
    >     TClonesArray* particles = new TClonesArray("TParticle");
    >     THijing*         hijing = new THijing("hijing", "HIJING Simulation");
    >     hijing->SetParameter("ihpr2",12,1);
    >     hijing->Initialize(200, "CMS", "A", "A", 197, 79, 197, 79);
    > 
    >     std::ostream output("data.dat"); 
    >     if (!output) return 1;
    > 
    >     Int_t i;
    >     for (i = 0; i < nEvents; i++) {
    >       cout << "Event # " << i << " ... " << flush;
    >       
    >       Int_t npart = hijing->GenerateEvent(0, 0, "final", particles);
    >       
    >       output << npart << "\t" << i << std::endl;
    >       
    >       TIter      next(particles);
    >       TParticle* particle = 0;
    >       while ((particle = (TParticle*)next())) {
    >         pid = 0; 
    > 	switch (particle->GetPdgCode()) { 
    > 	case 211:  pid = ... 
    > 	...
    > 	}
    >         output << pid << "\t" 
    > 	       << particle->Px() << "\t"
    > 	       << particle->Py() << "\t"
    > 	       << particle->Pz() << "\t"
    > 	       << std::endl;
    >       }
    >     }
    >     
    >     output.close();
    >     
    >     return 0;
    >   }
    > 
    > (see also the `testHijing.C' example that comes with the tar-ball.) 
    > 
    > Then, if you're concerned with the disk-space, you can `bzip2' the
    > files after you're done with them (a cool thing to do with `.dat', and
    > `.cdat' files). 
    >   
    > Yours,
    > 
    >  ___  |  Christian Holm Christensen 
    >   |_| |	 -------------------------------------------------------------
    >     | |	 Address: Sankt Hansgade 23, 1. th.  Phone:  (+45) 35 35 96 91
    >      _|	          DK-2200 Copenhagen N       Cell:   (+45) 24 61 85 91
    >     _|	          Denmark                    Office: (+45) 353  25 305
    >  ____|	 Email:   cholm@nbi.dk               Web:    www.nbi.dk/~cholm
    >  | |
    > 
    > 
    > [1] http://cholm.home.cern.ch/cholm/root/#thijing 
    


    This archive was generated by hypermail 2.1.5 : Mon Jun 02 2003 - 13:28:18 EDT