2 // How to access the basic TRD data structures when a
3 // pointer to an Eve opject is available. One can get a
4 // valid pointer from the event display by accessing the
5 // function ExportToCINT
12 // Alex Bercuci (A.Bercuci@gsi.de)
15 //_______________________________________________________
16 void analyseHits(AliEveTRDHits *hits = 0x0)
18 // Simple print hits from a detector
21 Info("analyseHits", "Invalid hits set.");
26 for(Int_t ih=0; ih<hits->GetN(); ih++){
27 hits->PointSelected(ih);
31 //_______________________________________________________
32 void analyseDigits(AliEveTRDDigits *digits = 0x0)
34 // Simple print digits from a detector
37 Info("analyseDigits", "Invalid digits set.");
42 AliTRDdataArrayI *data = digits->GetData();
43 Int_t nrows = data->GetNrow(),
44 ncols = data->GetNcol(),
45 ntbs = data->GetNtime();
47 printf("nrows[%d] ncols[%d] ntbs[%d]\n", nrows, ncols, ntbs);
48 for (Int_t row = 0; row < nrows; row++)
49 for (Int_t col = 0; col < ncols; col++)
50 for (Int_t time = 0; time < ntbs; time++) {
51 if((adc = data->GetDataUnchecked(row, col, time)) <= 1) continue;
52 printf("r[%d] c[%d] t[%d] ADC[%d]\n", row, col, time, adc);
57 //_______________________________________________________
58 void analyseClusters(TEvePointSet *points = 0x0)
60 // print some info about clusters in one detector or
61 // attached to tracks.
63 Info("analyseClusters", "Invalid clusters set.");
67 AliTRDcluster *c = 0x0;
68 for(Int_t ic=0; ic<points->Size(); ic++){
69 if(!(c = (AliTRDcluster*)points->GetPointId(ic))) continue;
75 //_______________________________________________________
76 void analyseTracklet(AliEveTRDTracklet *line)
78 // print tracklet information
80 Info("analyseTracklet", "Invalid tracklet.");
84 AliTRDseedV1 *tracklet = 0x0;
85 tracklet = (AliTRDseedV1*)line->GetUserData();
89 //_______________________________________________________
90 void analyseTrack(AliEveTRDTrack *line)
92 // print tracklet information
94 Info("analyseTrack", "Invalid track.");
98 AliTRDtrackV1 *track = 0x0;
99 track = (AliTRDtrackV1*)line->GetUserData();
101 AliTRDReconstructor *rec = new AliTRDReconstructor();
102 rec->SetRecoParam(AliTRDrecoParam::GetLowFluxParam());
103 track->SetReconstructor(rec);
105 rec->SetOption("!nn");
107 printf("PID LQ : "); for(int is=0; is<AliPID::kSPECIES; is++) printf("%s[%5.2f] ", AliPID::ParticleName(is), 1.E2*track->GetPID(is)); printf("\n");
109 rec->SetOption("nn");
111 printf("PID NN : "); for(int is=0; is<AliPID::kSPECIES; is++) printf("%s[%5.2f] ", AliPID::ParticleName(is), 1.E2*track->GetPID(is)); printf("\n");
114 //_______________________________________________________
117 Info("trd_analyse", "******************************");
118 Info("trd_analyse", "Example function which shows how to analyse TRD data exported from the EVE display.");
119 Info("trd_analyse", "Usage : Load the macro. Select a TRD data object (digits, clusters, tracklet, track) and call the function \"ExportToCINT()\". Afterwards call the appropiate function (analyseXXX()) on the pointer.");
120 Info("trd_analyse", "E.g. If \"tracklet\" is a pointer to a TRD track than one can call :");
121 Info("trd_analyse", "analyseTrack(track)");
123 //gROOT->LoadMacro("$ALICE_ROOT/EVE/alice-macros/trd_analyse.C");