2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
4 /**************************************************************************
5 * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6 * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for *
7 * full copyright notice. *
8 **************************************************************************/
10 #include "AliEveVSDCreator.h"
12 #include <TEveTreeTools.h>
15 #include <AliITSLoader.h>
16 #include <AliTPCTrackHitsV2.h>
19 #include <AliSimDigits.h>
20 #include <AliKalmanTrack.h>
21 #include <AliESDEvent.h>
23 #include <AliTPCclusterMI.h>
24 #include <AliTPCClustersRow.h>
26 #include <AliITSclusterV2.h>
27 #include <AliTrackReference.h>
28 #include <AliESDkink.h>
29 #include <AliESDtrack.h>
32 #include <AliTPCParam.h>
41 //______________________________________________________________________
45 ClassImp(AliEveVSDCreator)
47 AliEveVSDCreator::AliEveVSDCreator(const Text_t* name, const Text_t* title) :
50 mKineType (KT_Standard),
62 // Particles not in ROOT's PDG database occuring in ALICE
63 AliPDG::AddParticlesToPdgDataBase();
65 TDatabasePDG *pdgDB = TDatabasePDG::Instance();
66 // const Int_t kspe=50000000;
67 const Int_t kion=10000000;
69 const Double_t kAu2Gev=0.9314943228;
70 const Double_t khSlash = 1.0545726663e-27;
71 const Double_t kErg2Gev = 1/1.6021773349e-3;
72 const Double_t khShGev = khSlash*kErg2Gev;
73 const Double_t kYear2Sec = 3600*24*365.25;
75 pdgDB->AddParticle("Deuteron","Deuteron",2*kAu2Gev+8.071e-3,kTRUE,
76 0,1,"Ion",kion+10020);
77 pdgDB->AddParticle("Triton","Triton",3*kAu2Gev+14.931e-3,kFALSE,
78 khShGev/(12.33*kYear2Sec),1,"Ion",kion+10030);
79 pdgDB->AddParticle("Alpha","Alpha",4*kAu2Gev+2.424e-3,kTRUE,
80 khShGev/(12.33*kYear2Sec),2,"Ion",kion+20040);
81 pdgDB->AddParticle("HE3","HE3",3*kAu2Gev+14.931e-3,kFALSE,
82 0,2,"Ion",kion+20030);
85 // AliKalmanTrack::SetConvConst(1);
88 /**************************************************************************/
90 void AliEveVSDCreator::CreateVSD(const Text_t* data_dir, Int_t event,
91 const Text_t* vsd_file)
93 static const TEveException eH("AliEveVSDCreator::CreateVSD ");
98 string galice_file (Form("%s/galice.root", mDataDir.Data()));
101 printf("%s opening %s \n", eH.Data(), galice_file.c_str());
103 if(gSystem->AccessPathName(galice_file.c_str(), kReadPermission)) {
104 throw(eH + "Can not read file '" + galice_file + "'.");
106 pRunLoader = AliRunLoader::Open(galice_file.c_str());
108 throw(eH + "AliRunLoader::Open failed.");
110 pRunLoader->LoadgAlice();
111 Int_t status = pRunLoader->GetEvent(mEvent);
113 throw(eH + Form("GetEvent(%d) failed, exit code %s.", mEvent, status));
116 printf("%s open seems ok. Now loading sim data.\n", eH.Data());
118 pRunLoader->LoadHeader();
119 pRunLoader->LoadKinematics();
120 pRunLoader->LoadTrackRefs();
121 pRunLoader->LoadHits();
126 printf("%s opening output TEveVSD.\n", eH.Data());
128 TFile* file = TFile::Open(vsd_file, "RECREATE", "ALICE VisualizationDataSummary");
129 fDirectory = new TDirectoryFile("Event0", "");
132 printf("%s creating trees now ...\n", eH.Data());
137 printf("%s trees created, closing files.\n", eH.Data());
146 // clean after the TEveVSD data was sucessfuly written
156 pRunLoader->UnloadAll();
159 delete gAlice; gAlice = 0;
164 printf("%s all done.\n", eH.Data());
167 void AliEveVSDCreator::CreateTrees()
169 static const TEveException eH("AliEveVSDCreator::CreateTrees ");
172 throw(eH + "output directory not set.");
176 printf("%sConvertKinematics.\n", eH.Data());
178 } catch(TEveException& exc) { Warning(eH, exc); }
182 printf("%sConvertHits.\n", eH.Data());
184 } catch(TEveException& exc) { Warning(eH, exc); }
188 printf("%sConvertClusters.\n", eH.Data());
190 } catch(TEveException& exc) { Warning(eH, exc); }
194 printf("%sConvertRecTracks.\n", eH.Data());
196 } catch(TEveException& exc) {
197 Warning(exc, "skipping AliEveV0 extraction.");
198 goto end_esd_processing;
203 printf("%sConvertV0.\n", eH.Data());
205 } catch(TEveException& exc) { Warning(eH, exc); }
209 printf("%sConvertKinks.\n", eH.Data());
211 } catch(TEveException& exc) { Warning(eH, exc); }
217 printf("%sConvertGenInfo.\n", eH.Data());
219 } catch(TEveException& exc) { Warning(eH, exc); }
224 /**************************************************************************/
226 /**************************************************************************/
228 void AliEveVSDCreator::ConvertKinematics()
230 static const TEveException eH("AliEveVSDCreator::ConvertKinematics ");
233 throw (eH + "kinematics already converted");
235 AliStack* stack = pRunLoader->Stack();
237 throw(eH + "stack is null.");
240 fTreeK = new TTree("Kinematics", "TParticles sorted by Label");
242 Int_t nentries = stack->GetNtrack();
243 vector<TEveMCTrack> vmc(nentries);
244 for (Int_t idx=0; idx<nentries; idx++) {
245 TParticle* tp = stack->Particle(idx);
247 vmc[idx].fLabel = idx;
250 // read track refrences
251 // functionality now in AliEveKineTools.
253 TTree* fTreeTR = pRunLoader->TreeTR();
256 Warning(eH, "no TrackRefs; some data will not be available.");
258 TClonesArray* RunArrayTR = 0;
259 fTreeTR->SetBranchAddress("AliRun", &RunArrayTR);
261 Int_t nPrimaries = (Int_t) fTreeTR->GetEntries();
262 for (Int_t iPrimPart = 0; iPrimPart<nPrimaries; iPrimPart++) {
263 // printf("T0 fTreeTR->GetEntry(%d) \n",iPrimPart);
264 fTreeTR->GetEntry(iPrimPart);
265 // printf("END fTreeTR->GetEntry(%d) \n",iPrimPart);
267 for (Int_t iTrackRef = 0; iTrackRef < RunArrayTR->GetEntriesFast(); iTrackRef++) {
268 AliTrackReference *trackRef = (AliTrackReference*)RunArrayTR->At(iTrackRef);
269 Int_t track = trackRef->GetTrack();
270 if(track < nentries && track > 0){
271 TEveMCTrack& mct = vmc[track];
272 if(trackRef->TestBit(kNotDeleted)) {
274 mct.t_decay = trackRef->GetTime();
275 mct.V_decay.x = trackRef->X();
276 mct.V_decay.y = trackRef->Y();
277 mct.V_decay.z = trackRef->Z();
278 mct.P_decay.x = trackRef->Px();
279 mct.P_decay.y = trackRef->Py();
280 mct.P_decay.z = trackRef->Pz();
281 if(TMath::Abs(mct.GetPdgCode()) == 11)
282 mct.decayed = false; // a bug in TreeTR
290 fTreeK->Branch("K", "TEveMCTrack", &fpK, fBuffSize);
292 printf("sizeofvmc = %d\n", vmc.size());
293 for(vector<TEveMCTrack>::iterator k=vmc.begin(); k!=vmc.end(); ++k) {
294 TEveMCTrack& mct = *k;
298 Int_t mi = mct.fLabel;
300 while(m->GetMother(0) != -1) {
302 printf("cnt %d mi=%d, mo=%d\n", cnt, mi, m->GetMother(0));
304 mi = m->GetMother(0);
313 fTreeK->BuildIndex("label");
316 /**************************************************************************/
318 /**************************************************************************/
325 const char* hitbranch;
326 unsigned char detidx;
329 Detector detects[] = {
330 { "ITS", "AliITShit", 0 },
331 { "TPC", "AliTPCTrackHitsV2", 1 },
332 { "TRD", "AliTRDhit", 2 },
333 { "TOF", "AliTOFhit", 3 }
334 // { "HMPID", "AliHMPIDhit", 4 },
339 /**************************************************************************/
341 void AliEveVSDCreator::ConvertHits()
343 static const TEveException eH("AliEveVSDCreator::ConvertHits ");
346 throw(eH + "hits already converted.");
349 fTreeH = new TTree("Hits", "Combined detector hits.");
350 fTreeH->Branch("H", "TEveHit", &fpH, fBuffSize);
352 map<Int_t, Int_t> hmap;
353 // parameters for ITS, TPC hits filtering
354 Float_t x,y,z, x1,y1,z1;
355 Float_t tpc_sqr_res = mTPCHitRes*mTPCHitRes;
356 Float_t trd_sqr_res = mTRDHitRes*mTRDHitRes;
359 // load hits from the rest of detectors
360 while(detects[l].name != 0) {
361 Detector& det = detects[l++];
366 TTree* treeh = pRunLoader->GetTreeH(det.name, false);
368 Warning(eH, Form("no hits for %s.", det.name));
371 AliTPCTrackHitsV2 hv2, *_hv2=&hv2;
372 treeh->SetBranchAddress("TPC2", &_hv2);
373 Int_t np = treeh->GetEntries();
374 for(Int_t i=0; i<np; i++){
376 Int_t eva_idx = np -i -1;
377 if (hv2.First() == 0) continue;
380 AliHit* ah = hv2.GetHit();
381 x1 = ah->X(); y1 = ah->Y(); z1 = ah->Z();
382 if ((x-x1)*(x-x1) + (y-y1)*(y-y1) + (z-z1)*(z-z1) > tpc_sqr_res)
384 fH.fDetId = det.detidx;
386 fH.fLabel = ah->Track();
387 fH.fEvaLabel = eva_idx;
388 fH.fV.fX = x1; fH.fV.fY = y1; fH.fV.fZ = z1;
391 x = x1; y = y1; z = z1;
394 } while (hv2.Next());
396 // printf("%d entries in TPChits \n",count);
400 TTree* treeh = pRunLoader->GetTreeH(det.name, false);
402 Warning(eH, Form("no hits for %s.", det.name));
405 TClonesArray *arr = new TClonesArray(det.hitbranch);
406 treeh->SetBranchAddress(det.name, &arr);
407 Int_t np = treeh->GetEntries();
408 // in TreeH files hits are grouped in clones arrays
409 // each eva particle has its own clone array
410 for (Int_t i=0; i<np; i++) {
412 Int_t eva_idx = np -i -1;
413 Int_t nh=arr->GetEntriesFast();
415 // printf("%d entry %d hits for primary %d \n", i, nh, eva_idx);
416 for (Int_t j=0; j<nh; j++) {
417 AliHit* ali_hit = (AliHit*)arr->UncheckedAt(j);
418 fH.fDetId = det.detidx;
420 fH.fLabel = ali_hit->GetTrack();
421 fH.fEvaLabel = eva_idx;
422 fH.fV.Set(ali_hit->X(), ali_hit->Y(), ali_hit->Z());
423 if(det.detidx == 2) {
424 x1=ali_hit->X();y1=ali_hit->Y();z1=ali_hit->Z();
425 if((x-x1)*(x-x1)+(y-y1)*(y-y1)+(z-z1)*(z-z1) < trd_sqr_res) continue;
440 for(map<Int_t, Int_t>::iterator j=hmap.begin(); j!=hmap.end(); ++j) {
441 GetGeninfo(j->first)->fNHits += j->second;
445 /**************************************************************************/
447 /**************************************************************************/
449 void AliEveVSDCreator::ConvertClusters()
451 static const TEveException eH("AliEveVSDCreator::ConvertClusters ");
454 throw(eH + "clusters already converted.");
457 fTreeC = new TTree("Clusters", "rec clusters");
458 fTreeC->Branch("C", "TEveCluster", &fpC, fBuffSize);
461 ConvertITSClusters();
462 } catch(TEveException& exc) { Warning(eH, exc); }
465 ConvertTPCClusters();
466 } catch(TEveException& exc) { Warning(eH, exc); }
469 /**************************************************************************/
471 void AliEveVSDCreator::ConvertTPCClusters()
473 static const TEveException eH("AliEveVSDCreator::ConvertTPCClusters ");
476 ( TFile::Open(Form("%s/TPC.RecPoints.root", mDataDir.Data())) );
478 throw(eH + "can not open 'TPC.RecPoints.root' file.");
480 auto_ptr<TDirectory> d
481 ( (TDirectory*) f->Get(Form("AliEveEventManager%d", mEvent)) );
483 throw(eH + Form("event directory '%d' not found.", 0));
485 auto_ptr<TTree> tree( (TTree*) d->Get("TreeR") );
487 throw(eH + "'TreeR' not found.");
489 auto_ptr<AliTPCParam> par( GetTpcParam(eH) );
491 AliTPCClustersRow clrow, *_clrow=&clrow;
493 _clrow->SetClass("AliTPCclusterMI");
494 tree->SetBranchAddress("Segment", &_clrow);
498 Int_t n_ent = tree->GetEntries();
499 for (Int_t n=0; n<n_ent; n++) {
501 nClusters += _clrow->GetArray()->GetEntriesFast();
504 // calculate xyz for a cluster and add it to container
507 map<Int_t, Int_t> cmap;
509 for (Int_t n=0; n<tree->GetEntries(); n++) {
511 Int_t ncl = _clrow->GetArray()->GetEntriesFast();
514 par->AdjustSectorRow(_clrow->GetID(),sec,row);
516 if(_clrow->GetArray()) {
517 // cl = new AliTPCclusterMI(*(AliTPCclusterMI*)_clrow->GetArray()->UncheckedAt(ncl));
518 cl = (AliTPCclusterMI*)_clrow->GetArray()->UncheckedAt(ncl);
519 if(cl->GetLabel(0) >= 0)
521 x = par->GetPadRowRadii(sec,row); y = cl->GetY(); z = cl->GetZ();
522 par->AdjustCosSin(sec,cs,sn);
523 tmp = x*cs-y*sn; y= x*sn+y*cs; x=tmp;
527 fC.fLabel[0] = cl->GetLabel(0);
528 fC.fLabel[1] = cl->GetLabel(1);
529 fC.fLabel[2] = cl->GetLabel(2);
535 while(i < 3 && fC.fLabel[i])
536 cmap[fC.fLabel[i++]]++;
544 for(map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
545 GetGeninfo(j->first)->fNClus += j->second;
549 /**************************************************************************/
551 void AliEveVSDCreator::ConvertITSClusters()
553 static const TEveException eH("AliEveVSDCreator::ConvertITSClusters ");
556 ( TFile::Open(Form("%s/ITS.RecPoints.root", mDataDir.Data())) );
558 throw(eH + "can not open 'ITS.RecPoints.root' file.");
560 auto_ptr<TDirectory> d
561 ( (TDirectory*) f->Get(Form("AliEveEventManager%d", mEvent)) );
563 throw(eH + Form("event directory '%d' not found.", 0));
565 auto_ptr<TTree> tree( (TTree*) d->Get("TreeR") );
567 throw(eH + "'TreeR' not found.");
569 AliITSLoader* ITSld = (AliITSLoader*) pRunLoader->GetLoader("ITSLoader");
570 //AliITS* pITS = ITSld->GetITS();
571 AliITSgeom* geom = ITSld->GetITSgeom();
572 //AliITSgeom* geom = new AliITSgeom();
573 //geom->ReadNewFile("/home/aljam/ITSgeometry.det");
575 //printf("alice ITS geom %p \n",geom );
578 throw(eH + "can not find ITS geometry");
580 TClonesArray *arr = new TClonesArray("AliITSclusterV2");
581 tree->SetBranchAddress("Clusters", &arr);
582 Int_t nmods = tree->GetEntries();
584 map<Int_t, Int_t> cmap;
586 for (Int_t mod=0; mod<nmods; mod++) {
588 Int_t nc=arr->GetEntriesFast();
589 for (Int_t j=0; j<nc; j++) {
590 AliITSclusterV2* recp = (AliITSclusterV2*)arr->UncheckedAt(j);
593 geom->GetRotMatrix(mod,rot);
595 geom->GetModuleId(mod,lay,lad,det);
597 geom->GetTrans(lay,lad,det,tx,ty,tz);
599 Double_t alpha=TMath::ATan2(rot[1],rot[0])+TMath::Pi();
600 Double_t phi1=TMath::Pi()/2+alpha;
601 if(lay==1) phi1+=TMath::Pi();
603 Float_t cp=TMath::Cos(phi1), sp=TMath::Sin(phi1);
604 Float_t r=tx*cp+ty*sp;
605 gc[0] = r*cp - recp->GetY()*sp;
606 gc[1] = r*sp + recp->GetY()*cp;
607 gc[2] = recp->GetZ();
611 fC.fLabel[0] = recp->GetLabel(0);
612 fC.fLabel[1] = recp->GetLabel(1);
613 fC.fLabel[2] = recp->GetLabel(2);
614 fC.fV.fX = r*cp - recp->GetY()*sp;
615 fC.fV.fY = r*sp + recp->GetY()*cp;
616 fC.fV.fZ = recp->GetZ();
619 while(i < 3 && fC.fLabel[i])
620 cmap[fC.fLabel[i++]]++;
624 for(map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
625 GetGeninfo(j->first)->fNClus += j->second;
631 /**************************************************************************/
633 /**************************************************************************/
635 void AliEveVSDCreator::ConvertRecTracks()
637 static const TEveException eH("AliEveVSDCreator::ConvertRecTracks ");
640 throw(eH + "tracks already converted.");
643 fTreeR = new TTree("RecTracks", "rec tracks");
645 fTreeR->Branch("R", "TEveRecTrack", &fpR, 512*1024,1);
647 TFile f(Form("%s/AliESDs.root", mDataDir.Data()));
649 throw(eH + "no AliESDs.root file.");
651 TTree* tree = (TTree*) f.Get("esdTree");
653 throw(eH + "no esdTree.");
656 AliESDEvent *fEvent= new AliESDEvent();
657 fEvent->ReadFromTree(tree);
658 tree->GetEntry(mEvent);
659 if(fEvent->GetAliESDOld())fEvent->CopyFromOldESD();
662 // reconstructed tracks
665 for (Int_t n=0; n<fEvent->GetNumberOfTracks(); n++) {
666 esd_t = fEvent->GetTrack(n);
668 fR.fLabel = esd_t->GetLabel();
669 fR.fStatus = (Int_t) esd_t->GetStatus();
670 fR.fSign = (Int_t) esd_t->GetSign();
671 esd_t->GetXYZ(dbuf); fR.fV.Set(dbuf);
672 esd_t->GetPxPyPz(dbuf); fR.fP.Set(dbuf);
673 Double_t ep = esd_t->GetP();
674 fR.fBeta = ep/TMath::Sqrt(ep*ep + TMath::C()*TMath::C()*esd_t->GetMass()*esd_t->GetMass());
677 fTreeR->BuildIndex("label");
681 /**************************************************************************/
683 void AliEveVSDCreator::ConvertV0()
685 static const TEveException eH("AliEveVSDCreator::ConvertV0 ");
688 throw(eH + "AliEveV0 already converted.");
691 fTreeV0 = new TTree("AliEveV0", "AliEveV0 points");
693 fTreeV0->Branch("AliEveV0", "TEveRecV0", &fpV0, 512*1024,1);
695 TFile f(Form("%s/AliESDs.root", mDataDir.Data()));
697 throw(eH + "no AliESDs.root file.");
700 TTree* tree = (TTree*) f.Get("esdTree");
702 throw(eH + "no esdTree.");
704 AliESDEvent *fEvent= new AliESDEvent();
705 fEvent->ReadFromTree(tree);
706 tree->GetEntry(mEvent);
707 if(fEvent->GetAliESDOld())fEvent->CopyFromOldESD();
709 for (Int_t n =0; n< fEvent->GetNumberOfV0s(); n++)
711 AliESDv0 *av = fEvent->GetV0(n);
712 AliESDtrack *trackN = fEvent->GetTrack(av->GetNindex()); // negative daughter
713 AliESDtrack *trackP = fEvent->GetTrack(av->GetPindex()); // positive daughter
717 fV0.fStatus = av->GetStatus();
718 // Point of closest approach
719 av->GetXYZ(pos[0],pos[1],pos[2]);
720 fV0.fVCa.fX = pos[0];
721 fV0.fVCa.fY = pos[1];
722 fV0.fVCa.fZ = pos[2];
723 // set birth vertex of neutral particle
724 av->GetXYZ(pos[0], pos[1], pos[2]);
725 fV0.fV0Birth.Set(pos);
727 // momentum and position of negative particle
728 av->GetParamN()->GetPxPyPz(pos);
730 av->GetParamN()->GetXYZ(pos);
733 // momentum and position of positive particle
734 av->GetParamP()->GetPxPyPz(pos);
736 av->GetParamP()->GetXYZ(pos);
739 fV0.fLabel = 0; // !!!! mother label unknown
740 fV0.fPdg = av->GetPdgCode();
743 fV0.fDLabel[0] = TMath::Abs(trackN->GetLabel());
744 fV0.fDLabel[1] = TMath::Abs(trackP->GetLabel());
746 // printf("AliEveV0 convert labels(%d,%d) index(%d,%d)\n",
747 // fV0.d_label[0], fV0.d_label[1],
748 // av->GetNIndex(), av->GetPIndex());
752 // if(fEvent->GetNumberOfV0s()) fTreeV0->BuildIndex("label");
756 /**************************************************************************/
758 void AliEveVSDCreator::ConvertKinks()
760 static const TEveException eH("AliEveVSDCreator::ConvertKinks ");
763 throw(eH + "Kinks already converted.");
766 fTreeKK = new TTree("Kinks", "ESD Kinks");
768 fTreeKK->Branch("KK", "TEveRecKink", &fpKK, fBuffSize);
770 TFile f(Form("%s/AliESDs.root", mDataDir.Data()));
772 throw(eH + "no AliESDs.root file.");
775 TTree* tree = (TTree*) f.Get("esdTree");
777 throw(eH + "no esdTree.");
780 AliESDEvent *fEvent= new AliESDEvent();
781 fEvent->ReadFromTree(tree);
782 tree->GetEntry(mEvent);
783 if(fEvent->GetAliESDOld())fEvent->CopyFromOldESD();
786 // printf("CONVERT KINK Read %d entries in tree kinks \n", fEvent->GetNumberOfKinks());
787 for (Int_t n =0; n< fEvent->GetNumberOfKinks(); n++) {
788 AliESDkink* kk = fEvent->GetKink(n);
792 fKK.fLabel = kk->GetLabel(0);
793 fKK.fStatus = Int_t(kk->GetStatus(1) << 8 + kk->GetStatus(2));
795 // reconstructed kink position
796 fKK.fLabelSec = kk->GetLabel(1);
797 fKK.fVKink.Set(kk->GetPosition());
799 const AliExternalTrackParam& tp_mother = kk->RefParamMother();
800 // momentum and position of mother
801 tp_mother.GetPxPyPz(pos);
803 tp_mother.GetXYZ(pos);
805 const Double_t* par = tp_mother.GetParameter();
806 // printf("KINK Pt %f, %f \n",1/tp_mother.Pt(),par[4] );
807 fKK.fSign = (par[4] < 0) ? -1 : 1;
809 const AliExternalTrackParam& tp_daughter = kk->RefParamDaughter();
810 // momentum and position of daughter
811 tp_daughter.GetPxPyPz(pos);
813 tp_daughter.GetXYZ(pos);
818 if(fEvent->GetNumberOfKinks()) fTreeKK->BuildIndex("label");
821 /**************************************************************************/
823 /**************************************************************************/
825 void AliEveVSDCreator::ConvertGenInfo()
827 static const TEveException eH("AliEveVSDCreator::ConvertGenInfo ");
830 throw(eH + "GI already converted.");
833 fTreeGI = new TTree("TEveMCRecCrossRef", "Objects prepared for cross querry");
835 TEveMCRecCrossRef::Class()->IgnoreTObjectStreamer(true);
836 fTreeGI->Branch("GI", "TEveMCRecCrossRef", &fpGI, fBuffSize);
837 fTreeGI->Branch("K.", "TEveMCTrack", &fpK);
838 fTreeGI->Branch("R.", "TEveRecTrack", &fpR);
840 for (map<Int_t, TEveMCRecCrossRef*>::iterator j=mGenInfoMap.begin(); j!=mGenInfoMap.end(); ++j) {
842 fGI.fLabel = j->first;
843 fTreeK->GetEntry(j->first);
846 Int_t re = fTreeR->GetEntryNumberWithIndex(j->first);
850 // Int_t has_v0 = fTreeV0->GetEntryNumberWithIndex(j->first);
852 // fGI.has_AliEveV0 = true;
854 Int_t has_kk = fTreeKK->GetEntryNumberWithIndex(j->first);
863 /**************************************************************************/
864 /**************************************************************************/
866 /**************************************************************************/
867 /**************************************************************************/
869 AliTPCParam* AliEveVSDCreator::GetTpcParam(const TEveException& eh)
871 auto_ptr<TFile> fp( TFile::Open(Form("%s/galice.root", mDataDir.Data())) );
873 throw(eh + "can not open 'galice.root' file.");
874 AliTPCParam* par = (AliTPCParam *) fp->Get("75x40_100x60_150x60");
876 throw(eh + "TPC data not found.");
882 TEveMCRecCrossRef* AliEveVSDCreator::GetGeninfo(Int_t label)
884 // printf("get_geninfo %d\n", label);
885 TEveMCRecCrossRef* gi;
886 map<Int_t, TEveMCRecCrossRef*>::iterator i = mGenInfoMap.find(label);
887 if(i == mGenInfoMap.end()) {
888 gi = new TEveMCRecCrossRef();
889 mGenInfoMap[label] = gi;