StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFtpcClusterDebug.cc
1 // StFtpcClusterDebug
2 
3 //#include <iostream.h>
4 #include <Stiostream.h>
5 #include <stdlib.h>
6 #include "StMessMgr.h"
7 #include "StFtpcClusterDebug.hh"
8 #include "math_constants.h"
9 #include <math.h>
10 #include "TH1.h"
11 #include "TH2.h"
12 #include "TBranch.h"
13 
14 #include "StFtpcTrackMaker/StFtpcConfMapper.hh"
15 
16 namespace {
17 struct RUN
18 {
19  Int_t run;
20  Int_t date;
21  Int_t time;
22  Float_t micropertimebin;
23  Float_t normalizedNowPressure, standardPressure;
24  Float_t baseTemperature, gasTemperatureWest, gasTemperatureEast;
25  Float_t deltapW,deltapE;
26 } Run;
27 
28 struct HIT
29 {
30  Float_t x,y,z;
31  Float_t rad,phi;
32  Float_t raderror,phierror;
33 } hit;
34 
35 struct CLUSTER
36 {
37  Float_t timepos,padpos,timesigma,padsigma;
38  Float_t peakheight, charge;
39  Int_t timebin,pad;
40  Int_t padlength,timelength;
41  Int_t row,sec;
42  Int_t flag;
43  Int_t numpeaks;
44 } cluster;
45 
46 struct EVENT
47 {
48  Int_t run;
49  Int_t nevent;
50 }event;
51 
52 struct TEVENT
53 {
54  Int_t run;
55  Int_t nevent;
56 }tevent;
57 
58 
59 struct TCLUSTER
60 {
61  Int_t trow,tsec, tpadlength, ttimelength;
62  Float_t tpeakheight, tcharge;
63  Int_t ntracks;
64  Float_t padpos, timepos;
65  Float_t padpossigma, timepossigma;
66 } tcluster;
67 
68 struct THIT
69 {
70  Float_t tx,ty,tz;
71  Float_t ex,ey,ez;
72  Float_t globResX,globResY,globResPhi,globResR;
73  Float_t primResX,primResY,primResPhi,primResR;
74 }thit;
75 
76 struct TREVENT
77 {
78  Int_t run;
79  Int_t nevent;
80 }trevent;
81 
82 struct TRACK
83 {
84  Float_t px,py,pz;
85  Float_t eta,p,pt;
86  Int_t npoints;
87  Int_t charge;
88  Int_t type;
89  Int_t sec;
90  //Double_t chi2;
91 }track;
92 
93 struct MVERTEX
94 {
95  Float_t x,y,z;
96 }mvertex;
97 
98 struct RAW
99 {
100  Int_t sec,row,time,pad;
101  Float_t adc;
102 }raw;
103 
104 // so nur vor Klasse !? genauer !!!
105 }
106 
107 StFtpcClusterDebug::StFtpcClusterDebug()
108  : histofile(0), hardsecold(-1), hardrowold(-1)
109  , hardsecold2(-1), hardrowold2(-1)
110  , run(-1956), nevent(0), neventold(0)
111  , clusterhisto(new TH2F()), clusterhisto2(new TH2F())
112  , vertex_east(0),vertex_west(0),vertex_both(0)
113  , fileopen(false),dir(false),dir2(false)
114  , bRun(0),bhit(0), bevent(0), bcluster(0)
115  , bthit(0), btcluster(0), btevent(0)
116  , btrevent(0), btrack(0), btrvertex(0)
117  , bclusterraw(0)
118 
119  , histdir(0), histdir2(0), vertexdir(0), topdir(0)
120  , drtree (0), dtree(0), dttree(0), dtrtree(0), dtreeraw(0)
121  , drawclhisto(0), drawvertexhisto(0)
122 {
123  // default constructor
124  // LOG_INFO << "StFtpcClusterDebug constructed" << endm;
125 }
126 
127 StFtpcClusterDebug::StFtpcClusterDebug(int grun, int gevent)
128  : histofile(0)
129  , hardsecold(-1), hardrowold(-1)
130  , hardsecold2(-1), hardrowold2(-1)
131  , run(grun), nevent(gevent), neventold(0)
132  , clusterhisto(new TH2F()), clusterhisto2(new TH2F())
133  , vertex_east(new TH1F()),vertex_west(new TH1F()),vertex_both(new TH1F())
134 
135  , fileopen(false),dir(false),dir2(false)
136 
137  , bRun(0),bhit(0), bevent(0), bcluster(0)
138  , bthit(0), btcluster(0), btevent(0)
139  , btrevent(0), btrack(0), btrvertex(0)
140  , bclusterraw(0)
141 
142  , histdir(0), histdir2(0), vertexdir(0), topdir(0)
143  , drtree (0), dtree(0), dttree(0), dtrtree(0), dtreeraw(0)
144  , drawclhisto(0), drawvertexhisto(0)
145 {
146 
147  // initialize filename and open file
148  TFile *test=0;
149  // Initialize debug root file name
150  std::string fname="fdbg";
151  // Read debug.ini file
152  ifstream ini;
153  ini.open("./debug.ini",ios::in);
154  if (ini.good() ) {
155  ini>>fname>>drawclhisto>>drawvertexhisto;
156  }
157  else {
158  LOG_WARN << "debug.ini file missing - used default filename, drawclhisto = " << drawclhisto << " drawvertexhist0 = " << drawvertexhisto <<endm;
159  }
160  //LOG_INFO << "StFtpcClusterDebug constructed" << endm;
161  stringstream histodateis;
162  histodateis <<"run_" <<run<<"_" << fname <<".root";
163  std::string histodateistring = histodateis.str();
164  const char *histodatei = histodateistring.c_str();
165 
166  test=new TFile(histodatei);
167 
168  if (!(test->IsOpen()))
169  {
170  delete test; test = 0;
171  fileopen=false;
172  LOG_INFO << "histodatei = " << histodatei << endm;
173  histofile=new TFile(histodatei,"RECREATE","FTPC Cluster Finder histograms");
174 
175  drtree=new TTree("rinfo","Run calibration information");
176  drtree->Branch("Run",&Run,"run/I:date/I:time/I:micropertimebin/F:normalizedNowPressure/F:standardPressure/F:baseTemperature/F:gasTemperatureWest/F:gasTemperatureEast/F:deltapW/F:deltapE/F");
177 
178  dtree=new TTree("cl","Cluster calibration informations");
179  dtree->Branch("hit",&hit,"x/F:y/F:z/F:rad/F:phi/F:raderror/F:phierror/F");
180  dtree->Branch("cluster",&cluster,"timepos/F:padpos/F:timesigma/F:padsigma/F:peakheight/F:charge/F:timebin/I:pad/I:padlength/I:timelength/I:row/I:sec/I:flag/I:numpeaks/I");
181  dtree->Branch("event",&event,"run/I:nevent/I");
182 
183  dttree=new TTree("clot","Cluster on tracks calibration information");
184  dttree->Branch("cluster",&tcluster,"row/I:sec/I:padlength/I:timelength/I:peakheight/F:charge/F:ntracks/I:padpos/F:timepos/F:padsigma/F:timesigma/F");
185  dttree->Branch("hit",&thit,"x/F:y/F:z/F:ex/F:ey/F:ez/F:globResX/F:globResY/F:globResR/F:globResPhi/F:primResX/F:primResY/F:primResR/F:primResPhi/F");
186  dttree->Branch("event",&tevent,"run/I:nevent/I");
187 
188  dtrtree=new TTree("tr","Track calibration information");
189  dtrtree->Branch("event",&trevent,"run/I:nevent/I");
190  dtrtree->Branch("track",&track,"px/F:py/F:pz/F:eta/F:p/F:pt/F:npoints/I:charge/I:type/I:sec/I");//:chi2/D");
191  dtrtree->Branch("vertex",&mvertex,"x/F:y/F:z/F");
192 
193  dtreeraw=new TTree("raw","Cluster raw data");
194  dtreeraw->Branch("cl_raw",&raw,"sec/I:row/I:time/I:pad/I:adc/F");
195 
196  topdir=histofile->mkdir("histograms");
197  }
198  else
199  {
200  delete test; test = 0;
201  fileopen=true;
202  histofile=new TFile(histodatei,"UPDATE","histogramme fuer fcl");
203  bRun = 0;
204  drtree=(TTree*) histofile->Get("rinfo");
205  if (drtree) {
206  bRun=drtree->GetBranch("Run");
207  bRun->SetAddress(&Run);
208  dtree=(TTree*) histofile->Get("cl");
209  bhit=dtree->GetBranch("hit");
210  bhit->SetAddress(&hit);
211 
212  bcluster=dtree->GetBranch("cluster");
213  bcluster->SetAddress(&cluster);
214 
215  bevent=dtree->GetBranch("event");
216  bevent->SetAddress(&event);
217 
218  dttree=(TTree*) histofile->Get("clot");
219  btcluster=dttree->GetBranch("cluster");
220  btcluster->SetAddress(&tcluster);
221 
222  bthit=dttree->GetBranch("hit");
223  bthit->SetAddress(&thit);
224 
225  btevent=dttree->GetBranch("event");
226  btevent->SetAddress(&tevent);
227 
228  dtrtree=(TTree*) histofile->Get("tr");
229  btrevent=dtrtree->GetBranch("event");
230  btrevent->SetAddress(&trevent);
231 
232  btrack=dtrtree->GetBranch("track");
233  btrack->SetAddress(&track);
234 
235  btrvertex=dtrtree->GetBranch("vertex");
236  btrvertex->SetAddress(&mvertex);
237 
238  dtreeraw=(TTree*) histofile->Get("raw");
239  bclusterraw=dtreeraw->GetBranch("cl_raw");
240  bclusterraw->SetAddress(&raw);
241 
242  histofile->Delete("rinfo;1");
243  histofile->Delete("cl;1");
244  histofile->Delete("clot;1");
245  histofile->Delete("tr;1");
246  histofile->Delete("raw;1");
247 
248  topdir=(TDirectory*) histofile->Get("histograms");
249  } else {
250  LOG_ERROR << "StFtpcClusterDebug::StFtpcClusterDebug():"
251  << " No \"rinfo\" object was found on <"
252  << histodatei << "> ROOT file" << endm;
253  }
254  }
255 
256  delete test;
257 }
258 
259 StFtpcClusterDebug::~StFtpcClusterDebug()
260 {
261  //LOG_INFO << "StFtpcClusterDebug deconstructed" << endm;
262  histofile->Write();
263 #if 0
264  delete clusterhisto;
265  delete vertex_west; delete vertex_east; delete vertex_both;
266 #endif
267  //if (fileopen)
268  //{
269  //delete bhit; delete bcluster; delete bevent;
270  //delete btcluster; delete bthit; delete btevent;
271  //delete btrevent; delete btrack; delete btrvertex;
272  // }
273 #if 0
274  delete dtree; delete dttree; delete dtrtree; // bei sim hier seg. violat.(auch ab > 2300003) !???
275 #endif
276  histofile->Close();
277  delete histofile; // ???? (auch ab > 2300003)
278 }
279 
280 void StFtpcClusterDebug::backup()
281 {
282  // dummy fuer backup des Treefiles nach 10 events !
283 }
284 
285 void StFtpcClusterDebug::drawgainhisto(int hardsec, int hardrow,int iPad, float gainfac,TPCSequence HSequence)
286 {
287  // called from StFtpcClusterMaker/StFtpcClusterFinder.cc if drawclhist = 1 in debug.ini file
288  // define histogramname only if new sector or row
289  if (!dir2)
290  {
291  char dirname[25];
292  sprintf(dirname,"evt_%d_gain",nevent);
293  histdir2=topdir->mkdir(dirname);
294  dir2=true;
295  }
296 
297  if (hardsecold2!=hardsec || hardrowold2!=hardrow)
298  {
299  char histotitel[100],histoname[25];
300  //histotitel +="(hardsec ";
301  //histotitel +=hardsec;
302  //histotitel +=" hardrow ";
303  //histotitel +=hardrow;
304  //histotitel +=") & gainfactor";
305  sprintf(histotitel,"(hardsec %d hardrow %d) & gainfactor",hardsec,hardrow);
306  sprintf(histoname,"hsec%d_hrow%d_gain",hardsec,hardrow);
307  topdir->cd();
308  histdir2->cd();
309  clusterhisto2=new TH2F(histoname,histotitel,160,0,160,255,0,255);
310  }
311  hardsecold2=hardsec; hardrowold2=hardrow;
312 
313  //fill gain-data pad vs time histograms for each sector and row
314 
315  //LOG_INFO << "Using gainfac = " << gainfac << endm;
316 
317  for(int iIndex=0; iIndex<HSequence.Length; iIndex++)
318  {
319  if (((float)(unsigned int)(HSequence.FirstAdc[iIndex]))>0)
320  {
321  clusterhisto2->Fill(iPad,HSequence.startTimeBin+iIndex-1,(((float)(unsigned int)(HSequence.FirstAdc[iIndex]))*gainfac));
322  //clusterhisto2->Fill(iPad,iPad);
323  // check fuer zero supressed !
324  //if (((float)(unsigned int)(HSequence.FirstAdc[iIndex]))<4) LOG_INFO<<((float)(unsigned int)(HSequence.FirstAdc[iIndex]))<<endm;
325  //clusterhisto->Fill(iPad,HSequence.startTimeBin+iIndex-1); //ohne ADC fuer contour-plot !!!
326  }
327  }
328 }
329 
330 void StFtpcClusterDebug::drawhisto(int hardsec, int hardrow, int iPad, TPCSequence HSequence)
331 {
332  // called from StFtpcClusterMaker/StFtpcClusterFinder.cc if drawclhist = 1 in debug.ini file
333  // define histogramname only if new sector or row
334  if (!dir)
335  {
336  char dirname[25];
337  sprintf(dirname,"evt_%d",nevent);
338  histdir=topdir->mkdir(dirname);
339  dir=true;
340  }
341 
342  if (hardsecold!=hardsec || hardrowold!=hardrow)
343  {
344  char histotitel[100],histoname[25];
345  //histotitel +="(hardsec ";
346  //histotitel +=hardsec;
347  //histotitel +=" hardrow ";
348  //histotitel +=hardrow;
349  //histotitel +=")";
350  sprintf(histotitel,"(hardsec %d hardrow %d)",hardsec,hardrow);
351  sprintf(histoname,"hsec%d_hrow%d",hardsec,hardrow);
352  topdir->cd();
353  histdir->cd();
354  clusterhisto=new TH2F(histoname,histotitel,160,0,160,255,0,255);
355  }
356  hardsecold=hardsec; hardrowold=hardrow;
357 
358  //fill raw-data pad vs time histograms for each sector and row
359 
360  for(int iIndex=0; iIndex<HSequence.Length; iIndex++)
361  {
362  if (((float)(unsigned int)(HSequence.FirstAdc[iIndex]))>0)
363  {
364  clusterhisto->Fill(iPad,HSequence.startTimeBin+iIndex-1,((float)(unsigned int)(HSequence.FirstAdc[iIndex])));
365  // check fuer zero supressed !
366  //if (((float)(unsigned int)(HSequence.FirstAdc[iIndex]))<4) LOG_INFO<<((float)(unsigned int)(HSequence.FirstAdc[iIndex]))<<endm;
367  //clusterhisto->Fill(iPad,HSequence.startTimeBin+iIndex-1); //ohne ADC fuer contour-plot !!!
368  }
369  }
370 }
371 
372 void StFtpcClusterDebug::fillRun(Int_t grun, Int_t gdate, Int_t gtime, Float_t micropertimebin, Float_t normalizedNowPressure, Float_t standardPressure, Float_t baseTemperature, Float_t gasTemperatureWest, Float_t gasTemperatureEast, Float_t deltapW, Float_t deltapE)
373 {
374  Run.run = grun;
375  Run.date = gdate;
376  Run.time = gtime;
377  Run.micropertimebin = micropertimebin;
378  Run.normalizedNowPressure = normalizedNowPressure;
379  Run.standardPressure = standardPressure;
380  Run.baseTemperature = baseTemperature;
381  Run.gasTemperatureWest = gasTemperatureWest;
382  Run.gasTemperatureEast = gasTemperatureEast;
383  Run.deltapW = deltapW;
384  Run.deltapE = deltapE;
385  drtree->Fill();
386 }
387 
388 void StFtpcClusterDebug::fillraw(int hardsec, int hardrow, int iPad, TPCSequence HSequence)
389 {
390  for(int iIndex=0; iIndex<HSequence.Length; iIndex++)
391  {
392  if (((float)(unsigned int)(HSequence.FirstAdc[iIndex]))>0)
393  {
394  if (HSequence.startTimeBin+iIndex-1>10 && HSequence.startTimeBin+iIndex-1<200)
395  {
396  raw.sec=hardsec;
397  raw.row=hardrow;
398  raw.pad=iPad;
399  raw.time=HSequence.startTimeBin+iIndex-1;
400  raw.adc=((float)(unsigned int)(HSequence.FirstAdc[iIndex]));
401  dtreeraw->Fill();
402  }
403  //clusterhisto->Fill(iPad,HSequence.startTimeBin+iIndex-1,((float)(unsigned int)(HSequence.FirstAdc[iIndex])));
404  // check fuer zero supressed !
405  //if (((float)(unsigned int)(HSequence.FirstAdc[iIndex]))<4) LOG_INFO<<((float)(unsigned int)(HSequence.FirstAdc[iIndex]))<<endm;
406  //clusterhisto->Fill(iPad,HSequence.startTimeBin+iIndex-1); //ohne ADC fuer contour-plot !!!
407  }
408  }
409 }
410 
411 void StFtpcClusterDebug::drawvertex(TH1F *veast,TH1F *vwest, TH1F *v)
412 {
413  // called from StFtpcTrackMaker/StFtpcTrackMaker.cxx if drawvertexhist = 1 in debug.ini file
414  // (currently commented out - may be obsolete)
415  char dirname[10];
416  sprintf(dirname,"vtx_%d",nevent);
417  vertexdir=topdir->mkdir(dirname);
418  topdir->cd();
419  vertexdir->cd();
420  vertex_west=(TH1F*) vwest->Clone();
421  vertex_east=(TH1F*) veast->Clone();
422  vertex_both=(TH1F*) v->Clone();
423  // ggf. einfacher !? noch aendern (noch alles doppelt)!!!
424  // vertexdir->Delete("*;2"); Damit Eintraege geloescht !!!
425 }
426 
427 void StFtpcClusterDebug::fillclustertree(TPeak *Peak,TClusterUC *cl,Float_t charge, Int_t hsec, Int_t hrow, Float_t raderror, Float_t phierror, Int_t flag, float getpressure, int getnumpeaks)
428 {
429  hit.x=Peak->x;
430  hit.y=Peak->y;
431  hit.z=Peak->z;
432  hit.rad=Peak->Rad;
433  hit.phi=Peak->Phi;
434  hit.raderror=raderror;
435  hit.phierror=phierror;
436  cluster.timepos=Peak->TimePosition;
437  cluster.padpos=Peak->PadPosition;
438  if (Peak->TimeSigma<=10 && Peak->TimeSigma>=-10)
439  cluster.timesigma=Peak->TimeSigma;
440  if (Peak->PadSigma<=10 && Peak->PadSigma>=-10 )
441  cluster.padsigma=Peak->PadSigma;
442  cluster.peakheight=Peak->PeakHeight;
443  cluster.charge=charge;
444  cluster.timebin=Peak->Timebin;
445  cluster.pad=Peak->pad;
446  cluster.padlength=(cl->EndPad-cl->StartPad)+1;
447  cluster.timelength=Peak->Sequence.Length;
448  cluster.sec=hsec;
449  cluster.row=hrow;
450  cluster.flag=flag;
451  cluster.numpeaks=getnumpeaks;
452  //cluster.timelength=cl->NumSequences;
453  event.run=run;
454  event.nevent=nevent;
455  dtree->Fill();
456 }
457 
458 void StFtpcClusterDebug::fillclustertree(TPeak Peak,TClusterUC *cl,Float_t charge, Int_t hsec, Int_t hrow, Float_t raderror, Float_t phierror,Int_t flag, float getpressure, int getnumpeaks)
459 {
460  hit.x=Peak.x;
461  hit.y=Peak.y;
462  hit.z=Peak.z;
463  hit.rad=Peak.Rad;
464  hit.phi=Peak.Phi;
465  hit.raderror=raderror;
466  hit.phierror=phierror;
467  cluster.timepos=Peak.TimePosition;
468  cluster.padpos=Peak.PadPosition;
469  cluster.timesigma=Peak.TimeSigma;
470  cluster.padsigma=Peak.PadSigma;
471  cluster.peakheight=Peak.PeakHeight;
472  cluster.charge=charge;
473  cluster.timebin=Peak.Timebin;
474  cluster.pad=Peak.pad;
475  cluster.padlength=(cl->EndPad-cl->StartPad)+1;
476  cluster.timelength=Peak.Sequence.Length;
477  cluster.sec=hsec;
478  cluster.row=hrow;
479  cluster.flag=flag;
480  cluster.numpeaks=getnumpeaks;
481  //cluster.timelength=cl->NumSequences;
482  event.run=run;
483  event.nevent=nevent;
484  dtree->Fill();
485 }
486 
487 void StFtpcClusterDebug::clusteranalyse()
488 {
489  // dummy fuer weitere analyse plots !!!
490 }
491 
492 void StFtpcClusterDebug::fillgeanttree()
493 {
494  // dummy fuer geant simulationen
495 }
496 
497 void StFtpcClusterDebug::filltracktree(TObjArray *foundtracks, Double_t vertexpos[3])
498 {
499 
500  for (Int_t t_counter = 0; t_counter < foundtracks->GetEntriesFast(); t_counter++)
501  {
502  StFtpcTrack *tracks = (StFtpcTrack*) foundtracks->At(t_counter);
503  TObjArray *fhits = (TObjArray*) tracks->GetHits();
504 
505  StFtpcPoint *po1 = (StFtpcPoint *)(fhits->First());
506  StFtpcPoint *po2 = (StFtpcPoint *)(fhits->Last());
507  Double_t r1 = TMath::Sqrt(po1->GetX()*po1->GetX() + po1->GetY()*po1->GetY()),
508  r2 = TMath::Sqrt(po2->GetX()*po2->GetX() + po2->GetY()*po2->GetY());
509  Double_t r = TMath::Abs(r1-r2);
510 
511  track.px=tracks->GetPx();
512  track.py=tracks->GetPy();
513  track.pz=tracks->GetPz();
514  track.eta=tracks->GetEta();
515  track.p=tracks->GetP();
516  track.pt=tracks->GetPt();
517  track.npoints=tracks->GetNumberOfPoints();
518  track.charge=tracks->GetCharge();
519  if (r > 5. && r2>r1)
520  track.type=2;
521  else if (r > 5. && r2<r1)
522  track.type=1;
523  else
524  track.type=0;
525 
526  track.sec=po1->GetSector();
527 
528  trevent.run=run;
529  trevent.nevent=nevent;
530  //track.chi2=tracks->GetChiSq();
531  mvertex.x=vertexpos[0];
532  mvertex.y=vertexpos[1];
533  mvertex.z=vertexpos[2];
534  dtrtree->Fill();
535 
536  for (Int_t h_counter = 0; h_counter < fhits->GetEntriesFast(); h_counter++)
537  {
538  StFtpcPoint *mhit = (StFtpcPoint *) fhits->At(h_counter);
539 
540  tcluster.trow=mhit->GetPadRow();
541  tcluster.tsec=mhit->GetSector();
542  tcluster.tpadlength=mhit->GetNumberPads();
543  tcluster.ttimelength=mhit->GetNumberBins();
544  tcluster.tpeakheight=mhit->GetMaxADC();
545 
546  tcluster.padpos=mhit->GetPadPos();
547  tcluster.timepos=mhit->GetTimePos();
548  tcluster.padpossigma=mhit->GetPadPosSigma();
549  tcluster.timepossigma=mhit->GetTimePosSigma();
550 
551  thit.globResX=mhit->GetXGlobResidual();
552  thit.globResY=mhit->GetYGlobResidual();
553  thit.globResR=mhit->GetRGlobResidual();
554  thit.globResPhi=mhit->GetPhiGlobResidual();
555 
556  thit.primResX=mhit->GetXPrimResidual();
557  thit.primResY=mhit->GetYPrimResidual();
558  thit.primResR=mhit->GetRPrimResidual();
559  thit.primResPhi=mhit->GetPhiPrimResidual();
560 
561  tcluster.tcharge=mhit->GetCharge();
562  tcluster.ntracks=t_counter;
563  thit.tx=mhit->GetX();
564  thit.ty=mhit->GetY();
565  thit.tz=mhit->GetZ();
566  thit.ex=mhit->GetXerr();
567  thit.ey=mhit->GetYerr();
568  thit.ez=mhit->GetZerr();
569  tevent.run=run;
570  tevent.nevent=nevent;
571 
572  dttree->Fill();
573  }
574  }
575  // warum geht nicht delete !???
576  //delete foundtracks;// delete fhits;delete mhit;
577 }