I generated 10000 events from the pi0 production from a Pb target and ran them through the GEANT simulation. Next, I processed the output file through thepsim_digitize code to create the raw detector banks.
I am focusing on the HYCAL banks now and am having difficult with the reconstruction. It looks like I am losing a lot of the events in the clustering algorithm. I will talk to Dustin about this.
In the meantime, I wanted to see what geometrical acceptance is with the MCPART bank. I reconstructed the particle quantities from their generated 4-vectors. Next, I apply cuts on the cluster energy (E>0.5GeV) and the x,y postions(inside HYCAL geometry and remove the hits near the beampipe). The plots below show the x,y distributions before and after the cuts.

Here are the generated, detected, and acceptance distributions for the angles theta and phi of the pi0.

Here are the generated, detected, and acceptance distributions for the angle phi of the pi0.

I am going back to the generator and simulation program primsim. I summed up the energy deposited in each element of HYCAL which is written in the MCDEPOSITED bank. Then, I compared that energy sum to the energy sum of two pi0-decay photons which hit the HYCAL fiducial area (taken from the MCPART bank).
Here is a plot of the energy sums from MCPART vs MCDEPOSITED.

Here is a plot of the ratio of those energy sums.

Dave helped me install some debuggin code in primsim to see the photon conversion in the HYCAL elements and track the energy deposition for each step in GEANT.
Electron's propagation through HYCAL elementsI found an error in the primsim geometry definition file for the calorimeter box. I added this volume in fall 2005. The mistake was that I labelled the calorimeter box volume as "ONLY" instead of "MANY". The "ONLY" flag meant that secondary particles would not be tracked through overlapping volumes which are not daughter volumes. Since the box surrounded the calorimeter but was not a mother volume of the calorimeter. Thus, secondary photons from the brem. of the e+e- pairs were tracked throught the calorimeter box material but not the calorimeter. Their energies were never deposited in the calorimeter.
Here is a new plot of the energy sums from MCPART vs MCDEPOSITED.

Cluster are now identified by the reconstruction software. Below is the mass from events with 2 clusters in HYCAL.

Here is a pi0 theta plot.

I have another issue with the hycalcluster banks. Only 20% of the events are reconstructed. Below is an event from the simulation which does not create a HYCALCLUSTER bank.
These hits are taken from the HYCAL bank.

These hits are taken from the MCDEPOSITED bank.

I found an error in my changes to psim_digitize where I did not empty the HYCAL bank at the start of each event before I filled the entries from the MCDEPOSITED bank.
The following results are for 10000 generated events. The simulation program runs at about 30Hz on my computer. So generating 1 million events would take about 10 hours.
Here are plots of the acceptance for pi0 theta angles when the generated and detected distributions come from the MCPART bank.

Here are plots of the acceptance for pi0 theta angles when the generated distribution comes from the MCPART bank and the the detected comes from the MCDEPOSITED bank..

I am trying to simulate the Veto ADCs and TDCs.
For the ADCs, I take the energy deposited from the simulation and convert it to ADC channels. Then, I add the pedestals and broaden the width according to parameters from the calibration databasse for real data.
This plot is a ADC comparison between data(black) and simulation(red)

For the TDCs, I take the time given by GSIM from the start of the event and convert it from ns to TDC channels. Then, I add the TDC offset from the calibration database.
This plot is a TDC comparison between data(black) and simulation(red)

Here are preliminary results of efficiency of detecting a photon with the veto. I analyzed simulated data and made the ratio of hits in veto to hits in HYCAL.
Veto reconstruction of real data has the following cuts:
For the reconstruction of simulated data, I required only cuts 2 and 4.
Here is the efficiency with matchin the x of the veto and HYCAL.

Here is the efficiency with matching the x and y of the veto and HYCAL.

On an unrelated topic, I scan over 350 runs and calculated the time difference between veto and the trigphoton. At the last collaboration meeting, Dave saw a dispersion in this time difference.
Here is the time difference between veto time and trigphoton time.

I have added more material to the description of HYCAL. I added the cooling system with its brass pipes and plates on each side of HYCAL. This material is shown in red in the picture below.

I also added some material to each HYCAL module. I added the brass faceplates, the brass tensioning straps, and the pmt endplates. Furthermore, I added the tyvek and tedlar wrappings aropund the PbWO4 and the mylar wrapping around the PbGlass elements. I followed Dave's lead and added air gaps of 0.075mm between each wrapping. Lastly, I added brass sheets of the same thickness as the tensioning straps between the rows of the modules. This gives the proper spacing in y as in x between module centers.
There are 2 features which look unrealistic with the new materials. I have circled them in the picture below.
First, the blue circle shows the overlap of PbWO4 modules and PbGlass modules. I was not expecting the PbWO4 modules to extend that far. If I remove the air gaps, the overlap appears better.
Second, from the green circle, the top and side cooling plates do not meet properly. It could be that the technical drawings are the ideal case and the position of the plates was adjusted in the experimental setup.
