1 #if !defined(__CINT__) || defined(__MAKECINT__)
13 #include<TClassTable.h>
15 #include<TClonesArray.h>
23 #include <TInterpreter.h>
35 #include "AliITSgeom.h"
37 #include "AliITSDetTypeRec.h"
39 #include "AliITSRecPoint.h"
41 #include "AliITSRecPoint.h"
43 #include "AliITSdigit.h"
45 #include "AliITSdigitSSD.h"
47 #include "AliITShit.h"
49 #include "AliITSmodule.h"
51 #include "AliITSsegmentation.h"
53 #include "AliITSsegmentationSPD.h"
55 #include "AliITSsegmentationSDD.h"
57 #include "AliITSsegmentationSSD.h"
59 #include "AliRunLoader.h"
61 #include "AliITSLoader.h"
63 #include "AliHeader.h"
67 void GetHitsCoor(TObject *its, Int_t mod, TObjArray & histos, Int_t subd,Bool_t verb);
69 Int_t GetRecCoor(TObject *ge, TClonesArray *ITSrec, Int_t mod, TH2F *h2, TH1F *h1, Bool_t verb);
71 Int_t GetClusCoor(TObject *ge, TClonesArray *ITSrec, Int_t mod, TH2F *h2, TH1F *h1, Bool_t verb);
73 void GetDigits(TObject *tmps,TObject *ge,TClonesArray *ITSdigits, Int_t subd, Int_t mod, Bool_t verbose, TObjArray & histos);
77 Int_t AliITSGeoPlot (Int_t evesel=0, char *opt="All+ClustersV2", char *filename="galice.root", Int_t isfastpoints = 0) {
79 /*******************************************************************
81 * This macro displays geometrical information related to the
83 * hits, digits and rec points (or V2 clusters) in ITS.
85 * There are histograms that are not displayed (i.e. energy
87 * deposition) but that are saved onto a file (see below)
95 * Int_t evesel: the selected event number. It's =0 by default
99 * Options: Any combination of:
101 * 1) subdetector name: "SPD", "SDD", "SSD", "All" (default)
103 * 2) Printouts: "Verbose" Almost everything is printed out:
105 * it is wise to redirect the output onto a file
107 * e.g.: .x AliITSGeoPlot.C("All+Verbose") > out.log
109 * 3) Rec Points option: "Rec" ---> Uses Rec. Points (default)
113 * 4) ClustersV2 option: "ClustersV2" ---->Uses ClustersV2
115 * otherwise ---->uses hits and digits only
119 * .x AliITSGeoPlot(); (All subdetectors; no-verbose; no-recpoints)
121 * .x AliITSGeoPlot("SPD+SSD+Verbose+Rec");
125 * filename: It's "galice.root" by default.
127 * isfastpoints: integer. It is set to 0 by defaults. This means that
129 * slow reconstruction is assumed. If fast recpoint are in
131 * in use, isfastpoints must be set =1.
135 * OUTPUT: It produces a root file with a list of histograms
139 * WARNING: spatial information for SSD/DIGITS is obtained by pairing
141 * digits on p and n side originating from the same track, when
143 * possible. This (mis)use of DIGITS is tolerated for debugging
145 * purposes only !!!! The pairing in real life should be done
147 * starting from info really available...
151 * COMPILATION: this macro can be compiled.
153 * 1) You need to set your include path with
155 * gSystem->SetIncludePath("-I- -I$ALICE_ROOT/include -I$ALICE_ROOT/ITS -g");
157 * 3) If you are using root instead of aliroot you need to
159 * execute the macro loadlibs.C in advance
161 * 4) To compile this macro from root (or aliroot):
163 * --- .L AliITSGeoPlot.C++
165 * --- AliITSGeoPlot();
169 * M.Masera 14/05/2001 18:30
171 * Last rev. 31/05/2004 14:00 (Clusters V2 added) E.C.
173 ********************************************************************/
181 Bool_t All = choice.Contains("All");
183 Bool_t verbose=choice.Contains("Verbose");
185 Bool_t userec=choice.Contains("Rec");
187 Bool_t useclustersv2=choice.Contains("ClustersV2");
189 Int_t retcode=1; //return code
193 if (gClassTable->GetID("AliRun") < 0) {
195 gInterpreter->ExecuteMacro("loadlibs.C");
203 delete gAlice->GetRunLoader();
215 AliRunLoader* rl = AliRunLoader::Open(filename);
219 cerr<<"AliITSGeoPlot.C : Can not open session RL=NULL"<< endl;
225 Int_t retval = rl->LoadgAlice();
229 cerr<<"AliITSGeoPlot.C : LoadgAlice returned error"<<endl;
235 gAlice=rl->GetAliRun();
239 retval = rl->LoadHeader();
243 cerr<<"AliITSGeoPlot.C : LoadHeader returned error"<<endl;
251 AliITSLoader* ITSloader = (AliITSLoader*) rl->GetLoader("ITSLoader");
257 cerr<<"AliITSGeoPlot.C : ITS loader not found"<<endl;
265 ITSloader->LoadHits("read");
267 ITSloader->LoadDigits("read");
269 if(isfastpoints==1)ITSloader->SetRecPointsFileName("ITS.FastRecPoints.root");
271 ITSloader->LoadRecPoints("read");
273 rl->GetEvent(evesel);
275 Int_t nparticles = rl->GetHeader()->GetNtrack();
277 AliITS *ITS = (AliITS*)gAlice->GetModule("ITS");
279 ITS->SetTreeAddress();
283 cout<<" "<<endl<<" "<<endl;
285 cout<<"******* Event processing started *******"<<endl;
287 cout<<"In the following, hits with 'StatusEntering' flag active"<<endl;
289 cout<<"will not be processed"<<endl;
291 cout << "Number of particles= " << nparticles <<endl;
299 TTree *TH = ITSloader->TreeH();
301 Stat_t ntracks = TH->GetEntries();
303 if(verbose)cout<<"Number of primary tracks= "<<ntracks<<endl;
311 ITS->InitModules(-1,nmodules);
313 cout<<"Number of ITS modules= "<<nmodules<<endl;
315 cout<<"Filling modules... It takes a while, now. Please be patient"<<endl;
317 ITS->FillModules(0,0,nmodules," "," ");
319 cout<<"ITS modules .... DONE!"<<endl;
323 AliITSDetTypeRec* detTypeRec = new AliITSDetTypeRec(ITSloader);
325 detTypeRec->SetDefaults();
329 TTree *TD = ITSloader->TreeD();
333 //RECPOINTS (V2 clusters)
335 TTree *TR = ITSloader->TreeR();
337 TClonesArray *ITSrec = detTypeRec->RecPoints();
341 if(userec && TR && ITSrec){
345 branch = ITSloader->TreeR()->GetBranch("ITSRecPointsF");
347 cout<<"using fast points\n";
353 branch = ITSloader->TreeR()->GetBranch("ITSRecPoints");
357 if(branch)branch->SetAddress(&ITSrec);
363 if(userec && (!TR || !ITSrec || !branch)){
367 cout<<"\n ======================================================= \n";
369 cout<<"WARNING: there are no RECPOINTS on this file ! \n";
371 cout<<"======================================================= \n \n";
375 if(useclustersv2 && TR && ITSrec){
377 branch = ITSloader->TreeR()->GetBranch("ITSRecPoints");
379 if(branch)branch->SetAddress(&ITSrec);
385 if(useclustersv2 && (!TR || !ITSrec || !branch)){
387 useclustersv2 = kFALSE;
389 cout<<"\n ======================================================= \n";
391 cout<<"WARNING: there are no CLUSTERSV2 on this file ! \n";
393 cout<<"======================================================= \n \n";
403 Int_t mod; //module number
407 Double_t pos[3]; // Global position of the current module
409 Float_t ragdet; // Radius of detector (x y plane)
411 Int_t first; // first module
413 Int_t last; // last module
415 Int_t nrecp; //number of RecPoints for a given module
421 TObjArray histos(26,0); // contains the pointers to the histograms
423 // Book histograms SPD
425 TH2F *rspd = new TH2F("rspd","Radii of digits - SPD",50,-10.,10.,50,-10.,10.);
427 TH2F *rhspd = new TH2F("rhspd","Radii of hits - SPD",50,-10.,10.,50,-10.,10.);
429 TH2F *rmspd = new TH2F("rmspd","Radii of SPD modules",50,-10.,10.,50,-10.,10.);
431 TH1F *zspd = new TH1F("zspd","Z of digits - SPD",100,-30.,30.);
433 TH1F *zhspd = new TH1F("zhspd","Z of hits - SPD",100,-30.,30.);
435 TH1F *zmspd = new TH1F("zmspd","Z of SPD modules",100,-30,30.);
439 Char_t title1[50]="";
441 Char_t title2[50]="";
445 sprintf(title1,"Radii of recpoints - %s","SPD");
447 sprintf(title2,"Z of recpoints - %s","SPD");
453 sprintf(title1,"Radii of clustersV2 - %s","SPD");
455 sprintf(title2,"Z of clustersV2 - %s","SPD");
459 TH2F *rrspd = new TH2F("rrspd",title1,50,-10.,10.,50,-10.,10.);
461 TH1F *zrspd = new TH1F("zrspd",title2,100,-30.,30.);
463 TH1F *enespd = new TH1F("enespd","Energy deposition SPD (KeV)",100,0.,1000.);
465 histos.AddLast(rspd); // 0
467 histos.AddLast(rhspd); // 1
469 histos.AddLast(rmspd); // 2
471 histos.AddLast(zspd); // 3
473 histos.AddLast(zhspd); // 4
475 histos.AddLast(zmspd); // 5
477 histos.AddLast(rrspd); // 6
479 histos.AddLast(zrspd); // 7
481 histos.AddLast(enespd); // 8
483 // Book histograms SDD
485 TH2F *rsdd = new TH2F("rsdd","Radii of digits - SDD",50,-40.,40.,50,-40.,40.);
487 TH2F *rhsdd = new TH2F("rhsdd","Radii of hits - SDD",50,-40.,40.,50,-40.,40.);
489 TH2F *rmsdd = new TH2F("rmsdd","Radii of SDD modules",50,-40.,40.,50,-40.,40.);
491 TH1F *zsdd = new TH1F("zsdd","Z of digits - SDD",100,-40.,40.);
493 TH1F *zhsdd = new TH1F("zhsdd","Z of hits - SDD",100,-40.,40.);
495 TH1F *zmsdd = new TH1F("zmsdd","Z of SDD modules",100,-40,40.);
503 sprintf(title3,"Radii of recpoints - %s","SDD");
505 sprintf(title4,"Z of recpoints - %s","SDD");
511 sprintf(title3,"Radii of clustersV2 - %s","SDD");
513 sprintf(title4,"Z of clustersV2 - %s","SDD");
517 TH2F *rrsdd = new TH2F("rrsdd",title3,50,-40.,40.,50,-40.,40.);
519 TH1F *zrsdd = new TH1F("zrsdd",title4,100,-40.,40.);
521 TH1F *enesdd = new TH1F("enesdd","Energy deposition SDD (KeV)",100,0.,1000.);
523 histos.AddLast(rsdd); // 9
525 histos.AddLast(rhsdd); // 10
527 histos.AddLast(rmsdd); // 11
529 histos.AddLast(zsdd); // 12
531 histos.AddLast(zhsdd); // 13
533 histos.AddLast(zmsdd); // 14
535 histos.AddLast(rrsdd); // 15
537 histos.AddLast(zrsdd); // 16
539 histos.AddLast(enesdd); // 17
541 // Book histogram SSD
543 TH2F *rssd = new TH2F("rssd","Radii of digits - SSD",50,-50.,50.,50,-50.,50.);
545 TH2F *rhssd = new TH2F("rhssd","Radii of hits - SSD",50,-50.,50.,50,-50.,50.);
547 TH2F *rmssd = new TH2F("rmssd","Radii of SSD modules",50,-50.,50.,50,-50.,50.);
549 TH1F *zssd = new TH1F("zssd","Z of digits - SSD",100,-70.,70.);
551 TH1F *zhssd = new TH1F("zhssd","Z of hits - SSD",100,-70.,70.);
553 TH1F *zmssd = new TH1F("zmssd","Z of SSD modules",100,-70,70.);
561 sprintf(title5,"Radii of recpoints - %s","SSD");
563 sprintf(title6,"Z of recpoints - %s","SSD");
569 sprintf(title5,"Radii of clustersV2 - %s","SSD");
571 sprintf(title6,"Z of clustersV2 - %s","SSD");
577 TH2F *rrssd = new TH2F("rrssd",title5,50,-50.,50.,50,-50.,50.);
579 TH1F *zrssd = new TH1F("zrssd",title6,100,-70.,70.);
581 TH1F *enessd = new TH1F("enessd","Energy deposition SSD (KeV)",100,0.,1000.);
583 histos.AddLast(rssd); // 18
585 histos.AddLast(rhssd); // 19
587 histos.AddLast(rmssd); // 20
589 histos.AddLast(zssd); // 21
591 histos.AddLast(zhssd); // 22
593 histos.AddLast(zmssd); // 23
595 histos.AddLast(rrssd); // 24
597 histos.AddLast(zrssd); // 25
599 histos.AddLast(enessd); // 26
603 // Loop on subdetectors
607 AliITSgeom *geom = ITS->GetITSgeom();
609 TString detna; // subdetector name
611 for(Int_t subd=0;subd<3;subd++){
613 if(All || (choice.Contains("SPD") && subd==0) || (choice.Contains("SDD") && subd==1) || (choice.Contains("SSD") && subd==2)){
615 // Prepare array for the digits
617 TClonesArray *ITSdigits = ITS->DigitsAddress(subd);
619 Bool_t usedigits = kTRUE;
625 cout<<"\n ======================================================= \n";
627 cout<<"WARNING: there are no DIGITS on this file ! \n";
629 cout<<"======================================================= \n \n";
633 // Get segmentation model
635 if(subd==0)detna="SPD";
637 if(subd==1)detna="SDD";
639 if(subd==2)detna="SSD";
641 AliITSsegmentation *seg=(AliITSsegmentation*)detTypeRec->GetSegmentationModel(subd);
645 first = geom->GetStartDet(subd);
647 last = geom->GetLastDet(subd);
651 cout<<" "<<endl<<"-------------------------------------"<<endl;
653 cout<<"Start processing subdetector "<<detna<<endl;
655 cout<<detna<<" first module "<<first<<endl;
657 cout<<detna<<" last module "<<last<<endl;
659 cout<<" "<<endl<<" "<<endl;
663 for (mod=first; mod<=last; mod++){
665 geom->GetTrans(mod,pos); // position of the module in the MRS
667 ragdet=sqrt(pos[0]*pos[0]+pos[1]*pos[1]);
669 // The following 2 histos are a check of the geometry
671 TH2F *bidi = (TH2F*)histos.At(2+subd*9);
673 TH1F *uni = (TH1F*)histos.At(5+subd*9);
675 bidi->Fill(pos[0],pos[1]);
681 cout<<"=========================================================\n";
683 cout<<detna<<" module="<<mod<<endl;
685 cout<<"Mod. coordinates: "<<pos[0]<<", "<<pos[1]<<", ";
687 cout<<pos[2]<<" Radius "<<ragdet<<endl;
695 GetHitsCoor(ITS,mod,histos,subd,verbose);
703 detTypeRec->ResetRecPoints();
705 branch->GetEvent(mod);
707 TH2F *bidi=(TH2F*)histos.At(6+subd*9);
709 TH1F *uni=(TH1F*)histos.At(7+subd*9);
711 nrecp=GetRecCoor(geom,ITSrec,mod,bidi,uni,verbose);
717 detTypeRec->ResetRecPoints();
719 branch->GetEvent(mod);
721 TH2F *bidi=(TH2F*)histos.At(6+subd*9);
723 TH1F *uni=(TH1F*)histos.At(7+subd*9);
725 nrecp=GetClusCoor(geom,ITSrec,mod,bidi,uni,verbose);
737 detTypeRec->ResetDigits();
739 nbytes += TD->GetEvent(mod);
741 GetDigits(seg,geom,ITSdigits,subd,mod,verbose,histos);
747 } // End of loop on the modules
753 // Plot the histograms
755 TCanvas *current=0; // current Canvas (1--> SPD, 2---> SDD, 3---> SSD)
761 TCanvas *c1 = new TCanvas("c1","SPD",10,10,600,900);
773 TCanvas *c2 = new TCanvas("c2","SDD",40,40,600,900);
785 TCanvas *c3 = new TCanvas("c3","SSD",70,70,600,900);
795 h2tmp = (TH2F*)histos.At(9*subd);
801 h1tmp=(TH1F*)histos.At(3+subd*9);
807 h2tmp=(TH2F*)histos.At(1+9*subd);
813 h1tmp=(TH1F*)histos.At(4+subd*9);
819 if(userec || useclustersv2){
823 h2tmp=(TH2F*)histos.At(6+9*subd);
829 h1tmp=(TH1F*)histos.At(7+subd*9);
841 h2tmp=(TH2F*)histos.At(2+9*subd);
847 h2tmp=(TH2F*)histos.At(5+9*subd);
855 } // end of loop on subdetectors
857 // Save the histograms
859 TFile *fh = new TFile("AliITSGeoPlot.root","recreate");
861 // The list is written to file as a single entry
863 TList *lihi = new TList();
865 // copy the pointers to the histograms to a TList object.
867 // The histograms concerning recpoints are not copied if
869 // 'userec' is false.
871 for(Int_t i=0;i<histos.GetEntriesFast();i++){
873 if(choice.Contains("All") || (choice.Contains("SPD") && i<8) || (choice.Contains("SDD") && i>7 && i<16) || (choice.Contains("SSD") && i>15)){
875 if(!(!userec && ((i+2)%9==0 || (i+1)%9==0)))lihi->Add(histos.At(i));
881 lihi->Write("Histograms ITS hits+digits+recpoints",TObject::kSingleKey);
895 void GetHitsCoor(TObject *its, Int_t mod, TObjArray & histos, Int_t subd,Bool_t verb){
897 TH2F *h2=(TH2F*)histos.At(1+subd*9);
899 TH1F *h1=(TH1F*)histos.At(4+subd*9);
901 TH1F *ener=(TH1F*)histos.At(8+subd*9);
903 AliITS *ITS= (AliITS*)its;
905 AliITSmodule *modu = ITS->GetModule(mod);
907 TObjArray *fHits = modu->GetHits();
909 Int_t nhits = fHits->GetEntriesFast();
915 cout<<"-------------------------------------------------------"<<endl;
917 cout<<"Number of HITS for module "<<mod<<": "<<nhits<<endl;
921 for (Int_t hit=0;hit<nhits;hit++) {
923 AliITShit *iHit = (AliITShit*) fHits->At(hit);
925 if(!iHit->StatusEntering()){
927 Float_t x=iHit->GetXG();
929 Float_t y=iHit->GetYG();
931 Float_t z=iHit->GetZG();
933 Float_t edep=iHit->GetIonization()*1000000;
943 cout<<"hit # "<<hit<<" Global coordinates "<<x<<" "<<y<<" "<<z<<endl;
945 cout<<"track # "<<iHit->GetTrack()<<" energy deposition (KeV)= ";
963 Int_t GetClusCoor(TObject *ge, TClonesArray *ITSrec, Int_t mod, TH2F *h2, TH1F *h1, Bool_t verb){
967 AliITSgeom *geom = (AliITSgeom*)ge;
969 Int_t nrecp = ITSrec->GetEntries();
973 Float_t lc[3]; for(Int_t i=0; i<3; i++) lc[i]=0.;
975 Float_t gc[3]; for(Int_t i=0; i<3; i++) gc[i]=0.;
979 cout<<"-------------------------------------------------------"<<endl;
981 cout<<"Number of CLUSTERS for module "<<mod<<": "<<nrecp<<endl;
985 for(Int_t irec=0;irec<nrecp;irec++) {
987 AliITSRecPoint *recp = (AliITSRecPoint*)ITSrec->At(irec);
991 geom->GetRotMatrix(mod,rot);
995 geom->GetModuleId(mod,lay,lad,det);
999 geom->GetTrans(lay,lad,det,tx,ty,tz);
1003 Double_t alpha=TMath::ATan2(rot[1],rot[0])+TMath::Pi();
1005 Double_t phi1=TMath::Pi()/2+alpha;
1007 if(lay==1) phi1+=TMath::Pi();
1011 Float_t cp=TMath::Cos(phi1), sp=TMath::Sin(phi1);
1013 Float_t r=tx*cp+ty*sp;
1015 gc[0]= r*cp - recp->GetY()*sp;
1017 gc[1]= r*sp + recp->GetY()*cp;
1025 Float_t r=sqrt(gc[0]*gc[0]+gc[1]*gc[1]);
1027 cout<<"Global coor. + radius "<<gc[0]<<" "<<gc[1]<<" "<<gc[2]<<" ";
1031 cout<<"Associated track "<<recp->GetLabel(0)<<endl;
1035 h2->Fill(gc[0],gc[1]);
1049 Int_t GetRecCoor(TObject *ge, TClonesArray *ITSrec, Int_t mod, TH2F *h2, TH1F *h1, Bool_t verb){
1051 AliITSgeom *geom = (AliITSgeom*)ge;
1053 Int_t nrecp = ITSrec->GetEntries();
1057 Float_t lc[3]; for(Int_t i=0; i<3; i++) lc[i]=0.;
1059 Float_t gc[3]; for(Int_t i=0; i<3; i++) gc[i]=0.;
1063 cout<<"-------------------------------------------------------"<<endl;
1065 cout<<"Number of REC POINTS for module "<<mod<<": "<<nrecp<<endl;
1069 for(Int_t irec=0;irec<nrecp;irec++) {
1071 AliITSRecPoint *recp = (AliITSRecPoint*)ITSrec->At(irec);
1073 lc[0]=recp->GetDetLocalX();
1075 lc[2]=recp->GetDetLocalZ();
1077 geom->LtoG(mod,lc,gc);
1081 cout<<"recp # "<<irec<<" local coordinates. lx= "<<lc[0]<<" lz= ";
1085 Float_t r=sqrt(gc[0]*gc[0]+gc[1]*gc[1]);
1087 cout<<"Global coor. + radius "<<gc[0]<<" "<<gc[1]<<" "<<gc[2]<<" ";
1091 cout<<"Associated track "<<recp->GetLabel(0)<<endl;
1095 h2->Fill(gc[0],gc[1]);
1109 void GetDigits(TObject *tmps,TObject *ge,TClonesArray *ITSdigits, Int_t subd, Int_t mod, Bool_t verbose, TObjArray & histos){
1111 AliITSsegmentation *seg = (AliITSsegmentation*)tmps;
1113 AliITSgeom *geom = (AliITSgeom*)ge;
1123 geom->GetModuleId(mod,layer,ladder,detec);
1125 seg->SetLayer(layer);
1129 Float_t lcoor[3]; for(Int_t j=0; j<3; j++) lcoor[j]=0.; //local coord dig.
1131 Float_t gcoor[3]; for(Int_t j=0; j<3; j++) gcoor[j]=0.; // global coo. dig.
1133 Float_t ragdig; // Radius digit
1135 TArrayI ssdone(5000); // used to match p and n side digits of strips
1137 TArrayI pair(5000); // as above
1139 Int_t ndigits = ITSdigits->GetEntries();
1147 cout<<"-------------------------------------------------------"<<endl;
1149 cout<<"Number of DIGITS for module "<<mod<<": "<<ndigits<<endl;
1153 // Get the coordinates of the module
1157 for (Int_t digit=0;digit<ndigits;digit++){
1167 for (Int_t digit=0;digit<ndigits;digit++) {
1169 digs = (AliITSdigit*)ITSdigits->UncheckedAt(digit);
1171 Int_t iz=digs->GetCoord1(); // cell number z
1173 Int_t ix=digs->GetCoord2(); // cell number x
1175 // Get local coordinates of the element
1179 seg->DetToLocal(ix,iz,lcoor[0],lcoor[2]);
1185 // SSD: if iz==0 ---> N side; if iz==1 P side
1187 if(ssdone[digit]==0){
1193 Bool_t pside=(iz==1);
1195 Bool_t impaired=kTRUE;
1203 if(!pside)nstrip=ix;
1205 for(Int_t digi2=0;digi2<ndigits;digi2++){
1207 if(ssdone[digi2]==0 && impaired){
1209 AliITSdigitSSD *dig2=(AliITSdigitSSD*)ITSdigits->UncheckedAt(digi2);
1211 if(dig2->GetCoord1() != iz && dig2->GetTrack(0)==digs->GetTrack(0) && dig2->GetTrack(0)>0){
1217 if(pside)nstrip=dig2->GetCoord2();
1219 if(!pside)pstrip=dig2->GetCoord2();
1229 if(!impaired)seg->GetPadCxz(pstrip,nstrip,lcoor[0],lcoor[2]);
1235 if(subd<2 || (subd==2 && ssdone[digit]==1)){
1237 Int_t coor1=digs->GetCoord1();
1239 Int_t coor2=digs->GetCoord2();
1241 Int_t tra0=digs->GetTrack(0);
1245 cout<<"digit # "<<digit<<" fCoord1= "<<coor1<<" fCoord2= ";
1247 cout<<coor2<<" track "<<tra0<<" "<<endl;
1249 if(subd<2)cout<<"local coordinates -- x="<<lcoor[0]<<", z=";
1251 cout<<lcoor[2]<<endl;
1255 if(pair[digit]==-1){
1257 cout<<"(digit not paired)"<<endl;
1263 cout<<"local coordinates -- x="<<lcoor[0]<<", z="<<lcoor[2];
1267 Int_t dtmp=pair[digit];
1269 AliITSdigitSSD *dig2=(AliITSdigitSSD*)ITSdigits->UncheckedAt(dtmp);
1271 Int_t coor1b=dig2->GetCoord1();
1273 Int_t coor2b=dig2->GetCoord2();
1275 Int_t tra0b=dig2->GetTrack(0);
1277 cout<<"(digit paired with digit #"<<dtmp<<endl;
1279 cout<<"with fCoord1= "<<coor1b<<" fCoord2= "<<coor2b;
1281 cout<<" track "<<tra0b<<")"<<endl;
1289 if(subd<2 || (subd==2 && pair[digit]!=-1)){
1291 // Global coordinates of the element
1293 //SDD and SPD use cm, SSD microns (GetPadCxz)
1295 if(subd==2)for(Int_t j=0;j<3;j++)lcoor[j]=lcoor[j]/10000.;
1299 geom->LtoG(mod,lcoor,gcoor); // global coord. in cm
1301 ragdig=sqrt(gcoor[0]*gcoor[0]+gcoor[1]*gcoor[1]);
1305 cout<<"global coordinates "<<gcoor[0]<<" "<<gcoor[1];
1307 cout<<" "<<gcoor[2]<<" Radius "<<ragdig<<endl;
1313 TH2F *bidi = (TH2F*)histos.At(subd*9);
1315 TH1F *uni = (TH1F*)histos.At(3+subd*9);
1317 bidi->Fill(gcoor[0],gcoor[1]);
1319 uni->Fill(gcoor[2]);
1325 } // loop on digits for this module
1327 } // if(ndigits>0....