/************************************************ * usr_dump.c * This routine is called from usr_analysis.c to * write out the mcfast common black data to a * Root Data Tree (rdt) file. * Paul Eugenio * Carnegie Mellon University * 9 Nov 98 **********************************************/ #include #include #include #include #include #include #include #include #include #include //#include //#include struct offline_track_struct *trk_off; struct trace_s *trace,*trace_point,tmp_trace[50],tmp2_trace[20]; struct heppart_t *heppart; struct ntraces_t { int ntraces; /* Number of track intersections */ struct trace_s *trace_par; } ; struct ntrkoff_t { int ntracks; struct offline_track_struct *trk_off; } ; struct hepevt_t { int nevhep; /* The event number */ int nhep; /* The number of entries in this event */ struct heppart_t *heppart; }; /* struct cal_hits_t { int nCalHits; cal_hit **calhit; }; */ struct event_t { struct ntraces_t traces; // defined in TMCFastTraceEvent.h struct hepevt_t mcevt; // defined in TMCFastHepEvt.h struct ntrkoff_t offtrk; // defined in TMCFastOfflineTrack.h struct cal_hits_t calor0; // defined in TMCFastCalorimeter.h lgd_smearedparts_t *lgdSmears; // struct dev_hits_t *devhits; //struct dev_hits_t *devhits_cdc; }; //int usr_hits(int devtype,int devnum,struct dev_hits_t *devhits); void usr_calor(struct cal_hits_t *Calor); void usr_dump(void){ int i,j; double rloc,zloc; int trk_off_num=0; int trace_num=0,trace_num2=0,ntrace_points; int nevhep,nhep=0; extern int Debug,SaveUsingMCFIO; struct event_t event; extern lgd_smearedparts_t *LgdParts; //int devtype, devnum; //struct dev_hits_t devhits; //struct dev_hits_t devhits_cdc; /* * Allocate memory and copy the hepevt_ common block (i.e. the mc input ) */ nevhep=hepevt_.nevhep; nhep=hepevt_.nhep; heppart = malloc(sizeof(struct heppart_t)*nhep); for(i=0;iinfo_tr); free(event.calor0.CalorHits[i]); } free(event.calor0.CalorHits); }