Minutes of CDF Detector Simulation Meeting (28 March 2002)
	 **********************************************************

-------------------------------------------------------------------------
(1) Follow-up on problems with Pythia crashes on the farm and
    upgrade to Pythia 6.2                              (Elena Gerchtein)

Pythia 6.203 works in cdfSim 4.5.0.
User defined calls are fixed by Stan (development)- this means you can
implement other generators (e.g. Grappa).
runMC still has problems:
Purify shows 6 places of array bound errors (1 fixed so far). 
The offensive Code is in ParticleDB/src/cdfdbParticle.cc

cdfSim running Pythia and Production have still to be run separately,
otherwise the job will core dump at the end on exiting after the last
event. 

-------------------------------------------------------------------------
(2) A proposal to save more hard scattering information on generator
    level for CDF simulation                           (Rick Field)

We have two main methods of generating MC:
a) do everything within cdfsoft (things stored in HEPG common block)
b) generate MC outside CDF (method initiated by Henry Frisch) 
   and then input via HEPEVT (see last meeting) into detector simulation.

However there are some inputs missing (see also last meeting) and Rick
suggested an additional common block for hard scattering information such
as pt^hat and things like that- all necessary generator level information.
--> add common block HEPEV4 (following Les Houches accords) 

Rick was also talking about an additional common block HEPEV5 that should
contain info about multiple events, to allow for several events per
crossing. Elena and Marjorie however didn't see the need for HEPEV5 and
after a short discussion Rick disregarded it also (the argument being that
we have already the possibility to pile up events later on)

--> Current conclusion: only HEPEV4 will be added which needs a routine to
    put it into a storable object

-------------------------------------------------------------------------
(3) Updates to the Run II Random number package        (Elena Gerchtein)

The goal was to unify all random number generation within all CDF
simulation modules as well as generator products and to allow for setting,
saving and restoring of the random state. This new package consists
of HEPRandom module, cdfRn class and RandomModule. It is currently included
already in all generators except Isajet. 

9 random distributions are available (all of run I):
RandFlat, RandExp, RandGauss, RandBreightWigner, RandPoisson,
RandBinomial, RandChiSquared, RandGamma, RandStudentT

RanecuEngine is used as HepRandomEngine: 
2 seeds are used, the random engine state can be restored.
Rnd engine objects are in CdfRn class

you can request and engine either by name or by setting the seed:
GetEngine() or setseeds 
(instance of CdfRn is a singleton)
example of usage:
   HepRandomEngine* engine = CdfRn::Instance()->GetEngine("GENTRIG");
scatter = RandGauss::shoot(engine, 0.0, smearDeflectPhi((*track)->Pt()));

you can use several engines (give them different names for instance) if
you want to keep streams within a module separately.

There is an example in generatorMods/random/RandomTestModule.hh, .cc
You can also look into random_test_crash.tcl and
random_test_restore_crash.tcl where Elena tried to impose a condition for
the random number which causes a crash if that condition is not fulfilled. 
in one example the crash occurred at event 7- the current engine state is
stored. Starting the job with that condition again caused the crash at
event 1 as expected.

CDF products (Pythia, Herwig, ...) are now also forced to use the CDF
version of this random number generator:
Pythia 6,203 uses CDF version of PYR(IDUMMY) with engine name PYTHIA,
Geant3 uses name GRNDM, Herwig uses HERWIG and so on. Isajet still needs to
be fixed.

The current state is saved in RandomModule, default output file is
CdfRnStat.dat and the random state is always dumped at abortJob!
The format of the current engine state in the output file consists of a string
(name) and 2 seeds.

-------------------------------------------------------------------------
(4) Brief report on the status of simulation           (Manfred Paulini)

Silicon - geometric CDM (charge deposition model): working- default
        - parametric CDM: work on tuning to read-all Si data started
        - physical: started to test model on ttbar events and to compare
          to data - not fully functional yet (Hall effect in ISL still
	  missing) 

COT      functional for long time, main issue is to simulate dE/dx,
         complete sim. of pulse width exists, need to understand 
         dE/dx in data to make progress in simulation

TOF      functions

Calorimeter
CEM,PEM: linearities and resolutions fine
CHA,PHA: tuning to single track (high pt) test beam data finished. CHA tune
	 to low pt tracks in progress. Would need same for PHA but no Si
	 standalone tracking yet. => use jets? 

Stripchambers need some attention

muons:   central fine, comparison to data needed - people work on that
         IMU finally functioning

CLC:     good agreement to data now

-------------------------------------------------------------------------
(5) Dead channels, noise and misalignment in silicon simulation
                                                       (Satyajit Behari)

- Noise not in yet, will be added in a couple of days

This all refers to what Petar was saying the other meeting

Dead channels:
User needs to set calibration run (number of actual data run you want to
compare to) in StripCorrectorMenu of SiClusteringModule

Misalignment:
Simulate MC with perfect detector and later reconstruct tracks using a
mis-aligned detector geometry.
Done by setting AlignmentSource in GeometryManager/SiliconGeometryMenu

Some plots were shown: more careful choice of comparison conditions
necessary ... Ronan and Tara pointed out that some of the discrepancies
between data and MC are not actually due to alignment but will be rather
due to the fact that the beam offset was not simulated. Ronan said the
plots show symptoms of missing beamspot.
You can apparently not just change the beamspot but also the slope in the 
MC, but Marjorie wanted two verify that.
You can do that in Geant for instance, or in GenPrimVert. If you do it in
GenPrimVert a bank is created. SimControl checks for this bank- and if it
exists it won't apply additional smearing.

In the discussion part about which plots should be made as there were 
some requests (missing Et, multiplicities in COT, ...)

-------------------------------------------------------------------------
(6) Plans from top/EWK group on how to help validate simulation and list of
    physics processes with volunteers to run on the farm
                                                        (Greg Veramendi)

Not much was shown, mainly discussion of plans:
Samples of fakeEvent electrons are generated:

10k 50 GeV events at center of each central eta tower
100k 50 GeV events evenly spread in phi and eta for central+plug
 
Done with 4.4.0 for generation and simulation and 4.3.2 for reconstruction
to match the data as closely as possible.

Additionally W's and Z's where requested for generation with Herwig.

In the data we have already 5800 central W's and 750 Z's to look at.

The plan is to check things like energy scale, ID distribution, 
ID efficiency, fiducial volume for all subsystems - A list of people for
these tasks exists. 

-------------------------------------------------------------------------
Remark:
Rick Field will work with B-group on tuning Pythia to get right fraction
of B-production processes at Born level.


Minutes kindly provided by Tatjana Unverhau.