data origin defines converted to constants, operator| for merging of DataType struct...
[u/mrichter/AliRoot.git] / HMPID / Hdisp.C
CommitLineData
c0d7adf8 1#if !defined(__CINT__) || defined(__MAKECINT__)
2
e9f11028 3#include <TSystem.h>
4#include <TFile.h>
06a9f120 5#include <TVirtualX.h>
e9f11028 6#include <TTree.h>
7#include <TButton.h>
8#include <TCanvas.h>
06a9f120 9#include <TStyle.h>
45b05be5 10#include <TString.h>
e9f11028 11#include <TClonesArray.h>
12#include <TParticle.h>
13#include <TRandom.h>
14#include <TLatex.h>
45b05be5 15#include <TPDGCode.h>
e9f11028 16#include <TLegend.h>
17#include <TPolyMarker.h>
18#include <TBox.h>
6e06db1d 19#include <AliESDEvent.h>
e9f11028 20#include <AliCDBManager.h>
21#include <AliCDBEntry.h>
22#include "AliHMPIDHit.h"
23#include "AliHMPIDv2.h"
24#include "AliHMPIDReconstructor.h"
25#include "AliHMPIDRecon.h"
26#include "AliHMPIDParam.h"
27#include "AliHMPIDCluster.h"
e4290ede 28#include "AliTracker.h"
29
c0d7adf8 30#endif
31
45b05be5 32TCanvas *fCanvas=0; Int_t fType=3; Int_t fEvt=-1; Int_t fNevt=0;
e9f11028 33TFile *fHitFile; TTree *fHitTree; TClonesArray *fHitLst; TPolyMarker *fRenMip[7]; TPolyMarker *fRenCko[7]; TPolyMarker *fRenFee[7];
34 TClonesArray *fSdiLst;
06a9f120 35TFile *fDigFile; TTree *fDigTree; TObjArray *fDigLst; TBox *fRenDig[7][160*144]; TBox *fBox[7][160*144];
e9f11028 36TFile *fCluFile; TTree *fCluTree; TObjArray *fCluLst; TPolyMarker *fRenClu[7];
45b05be5 37TFile *fEsdFile; TTree *fEsdTree; AliESDEvent *fEsd; TPolyMarker *fRenTxC[7]; TPolyMarker *fRenRin[7];
e9f11028 38TFile *fCosFile; TTree *fCosTree;
45b05be5 39
40TButton *fHitMipBok,*fHitCkoBok,*fHitFeeBok,*fDigBok,*fCluBok,*fEsdBok;
41
42TString fStHitMip = "ON";
43TString fStHitCko = "ON";
44TString fStHitFee = "ON";
45TString fStDig = "ON";
46TString fStClu = "ON";
47TString fStEsd = "ON";
48
49Int_t fTimeArrow = 1;
50
06a9f120 51Int_t fMaxCharge = 200; //maximum charge to saturate color to red
52
e4290ede 53AliRunLoader *gAL=0;
8282f9d0 54
06a9f120 55Int_t nDigs[7];
e9f11028 56//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
57void CreateContainers()
58{//to create all containers
59 fHitLst=new TClonesArray("AliHMPIDHit");
60 fSdiLst=new TClonesArray("AliHMPIDDigit");
61 fDigLst=new TObjArray(7); for(Int_t i=0;i<7;i++) fDigLst->AddAt(new TClonesArray("AliHMPIDDigit"),i); fDigLst->SetOwner(kTRUE);
62 fCluLst=new TObjArray(7); for(Int_t i=0;i<7;i++) fCluLst->AddAt(new TClonesArray("AliHMPIDCluster"),i); fCluLst->SetOwner(kTRUE);
6e06db1d 63 fEsd =new AliESDEvent;
126b3e0e 64}
126b3e0e 65//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e9f11028 66void CreateRenders()
67{
68 for(Int_t ch=0;ch<7;ch++){
06a9f120 69 fRenMip[ch]=new TPolyMarker; fRenMip[ch]->SetMarkerStyle(kOpenTriangleUp); fRenMip[ch]->SetMarkerColor(kBlack);
70 fRenCko[ch]=new TPolyMarker; fRenCko[ch]->SetMarkerStyle(kOpenCircle); fRenCko[ch]->SetMarkerColor(kBlack);
71 fRenFee[ch]=new TPolyMarker; fRenFee[ch]->SetMarkerStyle(kOpenDiamond); fRenFee[ch]->SetMarkerColor(kBlack);
72 fRenClu[ch]=new TPolyMarker; fRenClu[ch]->SetMarkerStyle(kStar); fRenClu[ch]->SetMarkerColor(kMagenta);
e9f11028 73 fRenTxC[ch]=new TPolyMarker; fRenTxC[ch]->SetMarkerStyle(kPlus); fRenTxC[ch]->SetMarkerColor(kRed); fRenTxC[ch]->SetMarkerSize(3);
74 fRenRin[ch]=new TPolyMarker; fRenRin[ch]->SetMarkerStyle(kFullDotSmall); fRenRin[ch]->SetMarkerColor(kMagenta);
06a9f120 75 for(Int_t iDig=0;iDig<160*144;iDig++) {
76 fRenDig[ch][iDig] = new TBox;
77 fRenDig[ch][iDig]->SetFillStyle(1);
78 fBox[ch][iDig] = new TBox;
79 fBox[ch][iDig]->SetFillStyle(0);
80 }
e9f11028 81 }
82}//CreateRenders()
83//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
84void ClearRenders()
85{
86 for(Int_t ch=0;ch<7;ch++){
87 fRenTxC[ch]->SetPolyMarker(0);
88 fRenRin[ch]->SetPolyMarker(0);
89 fRenMip[ch]->SetPolyMarker(0);
90 fRenCko[ch]->SetPolyMarker(0);
91 fRenFee[ch]->SetPolyMarker(0);
06a9f120 92 nDigs[ch] = 0;
e9f11028 93 fRenClu[ch]->SetPolyMarker(0);
94 }
95}//ClearRenders()
96//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
97void PrintHits()
98{
99//Prints a list of HMPID hits for a given event. Default is event number 0.
100 if(!fHitTree) return;
101 Printf("List of HMPID hits for event %i",fEvt);
102 Int_t iTot=0;
103 for(Int_t iEnt=0;iEnt<fHitTree->GetEntries();iEnt++){//entries loop
104 fHitTree->GetEntry(iEnt);
105 fHitLst->Print();
106 iTot+=fHitLst->GetEntries();
107 }
108 Printf("totally %i hits for event %i",iTot,fEvt);
109}//PrintHits();
110//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
111void PrintSdis()
112{//prints a list of HMPID sdigits for a given event
113 Printf("List of HMPID sdigits for event %i",fEvt);
114 fSdiLst->Print();
115 Printf("totally %i sdigits for event %i",fSdiLst->GetEntries(),fEvt);
116}//PrintSdis()
117//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
118void PrintDigs()
119{//prints a list of HMPID digits
120 Printf("List of HMPID digits for event %i",fEvt);
121 fDigLst->Print();
122 Int_t iTot=0; for(Int_t i=0;i<7;i++) {iTot+=((TClonesArray*)fDigLst->At(i))->GetEntries();}
123 Printf("totally %i digits for event %i",iTot,fEvt);
8282f9d0 124}
125//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e9f11028 126void PrintClus()
127{//prints a list of HMPID clusters for a given event
128 Printf("List of HMPID clusters for event %i",fEvt);
8282f9d0 129
e9f11028 130 fCluLst->Print();
131 Int_t iTot=0; for(Int_t iCh=0;iCh<7;iCh++) iTot+=((TClonesArray*)fCluLst->At(iCh))->GetEntries();
132
133 Printf("totally %i clusters for event %i",iTot,fEvt);
8282f9d0 134}
135//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e9f11028 136void PrintEsd()
137{//prints a list of HMPID Esd for a given event
138 Printf("List of HMPID ESD summary for event %i",fEvt);
139 for(Int_t iTrk=0;iTrk<fEsd->GetNumberOfTracks();iTrk++){
140 AliESDtrack *pTrk = fEsd->GetTrack(iTrk);
141 Float_t x,y;Int_t q,nacc; pTrk->GetHMPIDmip(x,y,q,nacc);
142 Printf("Track %02i with p %7.2f with ThetaCer %5.3f with %i photons",iTrk,pTrk->GetP(),pTrk->GetHMPIDsignal(),nacc);
143 }
144}//PrintEsd()
145//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
146void DrawChamber(Int_t iCh)
147{//used by Draw() to Draw() chamber structure
45b05be5 148 gPad->Range(-10,-10,AliHMPIDParam::SizeAllX()+5,AliHMPIDParam::SizeAllY()+5);
e9f11028 149 if(iCh>=0){TLatex txt; txt.SetTextSize(0.1); txt.DrawLatex(-5,-5,Form("%i",iCh));}
150
ae5a42aa 151 for(Int_t iPc=AliHMPIDParam::kMinPc;iPc<=AliHMPIDParam::kMaxPc;iPc++){
152 TBox *pBox=new TBox(AliHMPIDParam::MinPcX(iPc),AliHMPIDParam::MinPcY(iPc),
153 AliHMPIDParam::MaxPcX(iPc),AliHMPIDParam::MaxPcY(iPc));
e9f11028 154 pBox->SetFillStyle(0); pBox->Draw();
155 }//PC loop
156}//DrawChamber()
157//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
158void DrawLegend()
159{//used by Draw() to draw legend
160 Int_t nTxC=0,nMip=0,nCko=0,nFee=0,nDig=0,nClu=0;
161 for(Int_t ch=0;ch<7;ch++){
45b05be5 162 nTxC+=fRenTxC[ch]->GetLastPoint()+1;
163 nMip+=fRenMip[ch]->GetLastPoint()+1;
164 nCko+=fRenCko[ch]->GetLastPoint()+1;
165 nFee+=fRenFee[ch]->GetLastPoint()+1;
45b05be5 166 nClu+=fRenClu[ch]->GetLastPoint()+1;
06a9f120 167 nDig+=nDigs[ch];
e9f11028 168 }
169 TLegend *pLeg=new TLegend(0.2,0.2,0.8,0.8);
170 pLeg->SetHeader(Form("Event %i Total %i",fEvt,fNevt));
06a9f120 171 pLeg->AddEntry(fRenTxC[0], Form("TRKxPC %i" ,nTxC),"p");
172 pLeg->AddEntry(fRenMip[0], Form("Mip hits %i" ,nMip),"p");
173 pLeg->AddEntry(fRenCko[0], Form("Ckov hits %i" ,nCko),"p");
174 pLeg->AddEntry(fRenFee[0], Form("Feed hits %i" ,nFee),"p");
175 pLeg->AddEntry(fRenDig[0][0],Form("Digs %i" ,nDig),"p");
176 pLeg->AddEntry(fRenClu[0], Form("Clus %i" ,nClu),"p");
e9f11028 177 pLeg->Draw();
178}//DrawLegend()
179//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
180void Draw()
181{//draws all the objects of current event in given canvas
45b05be5 182 Int_t iPadN[7]={9,8,6,5,4,2,1};
06a9f120 183 Int_t sampleCol = fMaxCharge/gStyle->GetNumberOfColors();
e9f11028 184 for(Int_t iCh=0;iCh<7;iCh++){//chambers loop
45b05be5 185 fCanvas->cd(iPadN[iCh]);
e9f11028 186 gPad->SetEditable(kTRUE); gPad->Clear(); DrawChamber(iCh);
06a9f120 187
188 if(fStDig =="ON") {
189 for(Int_t iDig=0;iDig<nDigs[iCh];iDig++) {
190 Int_t charge = fRenDig[iCh][iDig]->GetUniqueID();
191 Int_t color = charge/sampleCol;if(color>=fMaxCharge) color = gStyle->GetNumberOfColors()-1;
192 fRenDig[iCh][iDig]->SetFillColor(gStyle->GetColorPalette(color));
193 fRenDig[iCh][iDig]->Draw();
194 fBox[iCh][iDig]->Draw();
195 }
196 }
45b05be5 197 if(fStEsd =="ON") fRenTxC[iCh]->Draw();
198 if(fStHitMip=="ON") fRenMip[iCh]->Draw();
199 if(fStHitFee=="ON") fRenFee[iCh]->Draw();
200 if(fStHitCko=="ON") fRenCko[iCh]->Draw();
201 if(fStEsd =="ON") fRenRin[iCh]->Draw();
45b05be5 202 if(fStClu =="ON") fRenClu[iCh]->Draw();
e9f11028 203 gPad->SetEditable(kFALSE);
204 }//chambers loop
e9f11028 205 fCanvas->cd(3); gPad->Clear(); DrawLegend();
45b05be5 206
207 fCanvas->cd(7);
208
209 if(fHitFile){fHitMipBok->SetTitle(Form("Mips %s",fStHitMip.Data())); fHitMipBok->Modified();}
210 if(fHitFile){fHitCkoBok->SetTitle(Form("Ckov %s",fStHitCko.Data())); fHitCkoBok->Modified();}
211 if(fHitFile){fHitFeeBok->SetTitle(Form("Fdbk %s",fStHitFee.Data())); fHitFeeBok->Modified();}
212 if(fDigFile){fDigBok->SetTitle(fStDig); fDigBok->Modified();}
213 if(fCluFile){fCluBok->SetTitle(fStClu); fCluBok->Modified();}
214 if(fEsdFile){fEsdBok->SetTitle(fStEsd); fEsdBok->Modified();}
215
e9f11028 216}//Draw()
217//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
218void RenderHit(TClonesArray *pHitLst)
219{//used by ReadEvent() and SimulateEvent() to render hits to polymarker structures, one per chamber
220 for(Int_t iHit=0;iHit<pHitLst->GetEntries();iHit++){ //hits loop
221 AliHMPIDHit *pHit = (AliHMPIDHit*)pHitLst->At(iHit); Int_t ch=pHit->Ch(); Float_t x=pHit->LorsX(); Float_t y=pHit->LorsY(); //get current hit
222 switch(pHit->Pid()){
223 case 50000050: fRenCko[ch]->SetNextPoint(x,y);break;
224 case 50000051: fRenFee[ch]->SetNextPoint(x,y);break;
225 default: fRenMip[ch]->SetNextPoint(x,y);break;
226 }//switch hit PID
227 }//hits loop for this entry
228}//RenderHits()
229//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e4290ede 230void RenderDig(TObjArray *pDigLst)
231{//used by ReadEvent() and SimulateEvent() to render digs to Tbox structures, one per chamber
232 for(Int_t iCh=0;iCh<=6;iCh++){ //chambers loop
233 TClonesArray *pDigCham=(TClonesArray*)pDigLst->At(iCh); //get digs list for this chamber
06a9f120 234 nDigs[iCh] = 0;
e4290ede 235 for(Int_t iDig=0;iDig<pDigCham->GetEntries();iDig++){ //digs loop
236 AliHMPIDDigit *pDig = (AliHMPIDDigit*)pDigCham->At(iDig); Float_t x=pDig->LorsX(); Float_t y=pDig->LorsY(); //get current hit
06a9f120 237 fRenDig[iCh][iDig]->SetX1(x-0.5*AliHMPIDParam::SizePadX());
238 fRenDig[iCh][iDig]->SetX2(x+0.5*AliHMPIDParam::SizePadX());
239 fRenDig[iCh][iDig]->SetY1(y-0.5*AliHMPIDParam::SizePadY());
240 fRenDig[iCh][iDig]->SetY2(y+0.5*AliHMPIDParam::SizePadY());
241 fRenDig[iCh][iDig]->SetUniqueID((Int_t)pDig->Q());
242 fBox[iCh][iDig]->SetX1(x-0.5*AliHMPIDParam::SizePadX());
243 fBox[iCh][iDig]->SetX2(x+0.5*AliHMPIDParam::SizePadX());
244 fBox[iCh][iDig]->SetY1(y-0.5*AliHMPIDParam::SizePadY());
245 fBox[iCh][iDig]->SetY2(y+0.5*AliHMPIDParam::SizePadY());
246 nDigs[iCh]++;
45b05be5 247 }//Digit loop
e4290ede 248 }//hits loop for this entry
249}//RenderHits()
250//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
251void RenderClu(TObjArray *pClus)
e9f11028 252{//used by ReadEvent() and SimulateEvent() to render clusters to polymarker structures, one per chamber
253 for(Int_t iCh=0;iCh<=6;iCh++){ //chambers loop
254 TClonesArray *pClusCham=(TClonesArray*)pClus->At(iCh); //get clusters list for this chamber
255 for(Int_t iClu=0;iClu<pClusCham->GetEntries();iClu++){ //clusters loop
256 AliHMPIDCluster *pClu = (AliHMPIDCluster*)pClusCham->At(iClu); //get current cluster
e4290ede 257 fRenClu[iCh]->SetNextPoint(pClu->X(),pClu->Y());
45b05be5 258// Printf("RenderClu: ch %i x %f y %f",iCh,pClu->X(),pClu->Y());
259 }//cluster loop
260 }//chamber loop for this entry
e9f11028 261}//RenderClus()
262//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6e06db1d 263void RenderEsd(AliESDEvent *pEsd)
e9f11028 264{//used by ReadEvent() or SimulateEvent() to render ESD to polymarker structures for rings and intersections one per chamber
265 AliHMPIDRecon rec;
266 for(Int_t iTrk=0;iTrk<pEsd->GetNumberOfTracks();iTrk++){//tracks loop to collect cerenkov rings and intersection points
267 AliESDtrack *pTrk=pEsd->GetTrack(iTrk); Int_t ch=pTrk->GetHMPIDcluIdx(); //get track and chamber intersected by it
268 if(ch<0) continue; //this track does not intersect any chamber
269 Float_t thRa,phRa,xRa,yRa; pTrk->GetHMPIDtrk(xRa,yRa,thRa,phRa); //get info on current track
e4290ede 270 ch/=1000000;
e9f11028 271 Float_t xPc=0,yPc=0; AliHMPIDTracker::IntTrkCha(pTrk,xPc,yPc); //find again intersection of track with PC--> it is not stored in ESD!
272 fRenTxC[ch]->SetNextPoint(xPc,yPc); //add this intersection point
273 Float_t ckov=pTrk->GetHMPIDsignal(); //get ckov angle stored for this track
274 if(ckov>0){
275 rec.SetTrack(xRa,yRa,thRa,phRa);
06a9f120 276 for(Int_t j=0;j<500;j++){
277 TVector2 pos; pos=rec.TracePhot(ckov,j*6.28/500.);
ae5a42aa 278 if(!AliHMPIDParam::IsInDead(pos.X(),pos.Y())) fRenRin[ch]->SetNextPoint(pos.X(),pos.Y());
e9f11028 279 }
280 }//if ckov is valid
281 }//tracks loop
282}//RenEsd()
a1d55ff3 283//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6e06db1d 284void SimulateEsd(AliESDEvent *pEsd)
a1d55ff3 285{
286 TParticle part; TLorentzVector mom;
50e69536 287 for(Int_t iTrk=0;iTrk<100;iTrk++){//stack loop
45b05be5 288 Printf("SimulateEsd: kProton %i",kProton);
a1d55ff3 289 part.SetPdgCode(kProton);
50e69536 290 part.SetProductionVertex(0,0,0,0);
291 Double_t eta= -0.2+gRandom->Rndm()*0.4; //rapidity is random [-0.2,+0.2]
292 Double_t phi= gRandom->Rndm()*60.*TMath::DegToRad(); //phi is random [ 0 , 60 ] degrees
293 mom.SetPtEtaPhiM(5,eta,phi,part.GetMass());
a1d55ff3 294 part.SetMomentum(mom);
295 AliESDtrack trk(&part);
296 pEsd->AddTrack(&trk);
297 }//stack loop
298}//EsdFromStack()
299//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6e06db1d 300void SimulateHits(AliESDEvent *pEsd, TClonesArray *pHits)
e9f11028 301{//used by SimulateEvent to simulate hits out from provided ESD
50e69536 302 const Int_t kCerenkov=50000050;
303 const Int_t kFeedback=50000051;
f3bae3e2 304
a1d55ff3 305 AliHMPIDRecon rec;
e9f11028 306 Float_t eMip=200e-9,ePho=7.5e-9;
a591e55f 307 Int_t hc=0;
a1d55ff3 308 for(Int_t iTrk=0;iTrk<pEsd->GetNumberOfTracks();iTrk++){//tracks loop
309 AliESDtrack *pTrk=pEsd->GetTrack(iTrk);
e9f11028 310 Float_t xRa,yRa;
311 Int_t ch=AliHMPIDTracker::IntTrkCha(pTrk,xRa,yRa);
a1d55ff3 312 if(ch<0) continue; //this track does not hit HMPID
50e69536 313 Float_t beta = pTrk->GetP()/(TMath::Sqrt(pTrk->GetP()*pTrk->GetP()+0.938*0.938));
314 Float_t ckov=TMath::ACos(1./(beta*1.292));
a1d55ff3 315
e9f11028 316 Float_t theta,phi,xPc,yPc,; pTrk->GetHMPIDtrk(xPc,yPc,theta,phi); rec.SetTrack(xRa,yRa,theta,phi);
a1d55ff3 317
ae5a42aa 318 if(!AliHMPIDParam::IsInDead(xPc,yPc)) new((*pHits)[hc++]) AliHMPIDHit(ch,eMip,kProton ,iTrk,xPc,yPc); //mip hit
50e69536 319 Int_t nPhots = (Int_t)(20.*TMath::Power(TMath::Sin(ckov),2)/TMath::Power(TMath::Sin(TMath::ACos(1./1.292)),2));
320 for(int i=0;i<nPhots;i++){
a591e55f 321 TVector2 pos;
322 pos=rec.TracePhot(ckov,gRandom->Rndm()*TMath::TwoPi());
ae5a42aa 323 if(!AliHMPIDParam::IsInDead(pos.X(),pos.Y())) new((*pHits)[hc++]) AliHMPIDHit(ch,ePho,kCerenkov,iTrk,pos.X(),pos.Y());
a1d55ff3 324 } //photon hits
e9f11028 325 for(int i=0;i<3;i++){//feedback photons
326 Float_t x=gRandom->Rndm()*160; Float_t y=gRandom->Rndm()*150;
ae5a42aa 327 if(!AliHMPIDParam::IsInDead(x,y)) new((*pHits)[hc++]) AliHMPIDHit(ch,ePho,kFeedback,iTrk,x,y); //feedback hits
e9f11028 328 }//photon hits loop
a1d55ff3 329 }//tracks loop
e9f11028 330}//SimulateHits()
a1d55ff3 331//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e9f11028 332void DoZoom(Int_t evt, Int_t px, Int_t py, TObject *)
a1d55ff3 333{
06a9f120 334 Int_t iChamN[9]={6,5,-1,4,3,2,-1,1,0};
8282f9d0 335 if(evt!=5 && evt!=6) return; //5- zoom in 6-zoom out
336 const Int_t minZoom=64;
337 const Int_t maxZoom=2;
06a9f120 338 static Int_t zoom[7]={64,64,64,64,64,64,64}; //zoom level
8282f9d0 339
d73ece6a 340 // if(!obj->IsA()->InheritsFrom("TPad")) return; //current object is not pad
50e69536 341 TVirtualPad *pPad=gPad->GetSelectedPad();
06a9f120 342 Int_t padN = pPad->GetNumber()-1;
343 if(padN<0 || padN>8) return;
344
345 Int_t iCh = iChamN[padN];
346 if(iCh < 0) return;
347
348 if(evt==5&&zoom[iCh]==maxZoom) return;
349 if(evt==6&&zoom[iCh]==minZoom) return;
8282f9d0 350
351 Float_t x=pPad->AbsPixeltoX(px); Float_t y=pPad->AbsPixeltoY(py);
6ed6a312 352
06a9f120 353 if(evt==5){ zoom[iCh]=zoom[iCh]/2; pPad->Range(x-zoom[iCh]*2,y-zoom[iCh]*2,x+zoom[iCh]*2,y+zoom[iCh]*2);} //zoom in
354 else { zoom[iCh]=zoom[iCh]*2; pPad->Range(x-zoom[iCh]*2,y-zoom[iCh]*2,x+zoom[iCh]*2,y+zoom[iCh]*2);} //zoom out
355 if(zoom[iCh]==minZoom) pPad->Range(-10,-10,AliHMPIDParam::SizeAllX()+5,AliHMPIDParam::SizeAllY()+5);
356 ((TCanvas *)gTQSender)->SetTitle(Form("zoom x%i",minZoom/zoom[iCh]));
8282f9d0 357 pPad->Modified();
358 pPad->Update();
a1d55ff3 359}
8282f9d0 360//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e9f11028 361void ReadEvent()
362{//used by NextEvent() to read curent event and construct all render elements
363 if(fNevt && fEvt>=fNevt) fEvt=0; //loop over max event
45b05be5 364 if(fNevt && fEvt<0) fEvt=fNevt-1; //loop over max event
d73ece6a 365
e9f11028 366 if(fHitFile){
367 if(fHitTree) delete fHitTree; fHitTree=(TTree*)fHitFile->Get(Form("Event%i/TreeH",fEvt));
368
369 fHitTree->SetBranchAddress("HMPID",&fHitLst);
370 for(Int_t iEnt=0;iEnt<fHitTree->GetEntries();iEnt++){
371 fHitTree->GetEntry(iEnt);
372 RenderHit(fHitLst);
373 }//prim loop
374 }//if hits file
e4290ede 375
376 if(fDigFile){
377 if(fDigTree) delete fDigTree; fDigTree=(TTree*)fDigFile->Get(Form("Event%i/TreeD",fEvt));
378 for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) fDigTree->SetBranchAddress(Form("HMPID%i",iCh),&(*fDigLst)[iCh]);
379 fDigTree->GetEntry(0);
380 RenderDig(fDigLst);
381 }//if digs file
382
e9f11028 383 if(fCluFile){
384 if(fCluTree) delete fCluTree; fCluTree=(TTree*)fCluFile->Get(Form("Event%i/TreeR",fEvt));
ae5a42aa 385 for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) fCluTree->SetBranchAddress(Form("HMPID%i",iCh),&(*fCluLst)[iCh]);
e9f11028 386 fCluTree->GetEntry(0);
e4290ede 387 RenderClu(fCluLst);
e9f11028 388 }//if clus file
389
390 if(fEsdFile){//if ESD file open
391 fEsdTree->GetEntry(fEvt);
392 RenderEsd(fEsd);
393 }//if ESD file
394}//ReadEvent()
d73ece6a 395//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e9f11028 396void SimulateEvent()
397{// used by NextEvent() to simulate all info
398 AliCDBManager* pCDB = AliCDBManager::Instance(); pCDB->SetDefaultStorage("local://$HOME"); pCDB->SetRun(0);
399 AliCDBEntry *pNmeanEnt=pCDB->Get("HMPID/Calib/Nmean");
400
401 SimulateEsd(fEsd);
402 SimulateHits(fEsd,fHitLst);
45b05be5 403 AliHMPIDv2::Hit2Sdi(fHitLst,fSdiLst);
e9f11028 404 AliHMPIDDigitizer::Sdi2Dig(fSdiLst,fDigLst);
405 AliHMPIDReconstructor::Dig2Clu(fDigLst,fCluLst);
406 AliHMPIDTracker::Recon(fEsd,fCluLst,(TObjArray*)pNmeanEnt->GetObject());
407
408 RenderHit(fHitLst);
e4290ede 409 RenderClu(fCluLst);
e9f11028 410 RenderEsd(fEsd);
411}//SimulateEvent()
d73ece6a 412//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
45b05be5 413void GetEvent()
d73ece6a 414{
e9f11028 415 ClearRenders();
06a9f120 416 CheckStatus();
e9f11028 417 switch(fType){
418 case 1: ReadEvent();break;
419// case 2: ReadCosmic(); break;
420 case 3: SimulateEvent(); break;
421 default: return;
422 }
423 Draw();
d73ece6a 424}
425//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
45b05be5 426void NextEvent()
427{
428 fTimeArrow = 1;
429 fEvt+=fTimeArrow;
430 GetEvent();
431}
432//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
433void PrevEvent()
434{
435 fTimeArrow = -1;
436 fEvt+=fTimeArrow;
437 GetEvent();
438}
439//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
440void End()
441{
442 gSystem->Exit(0);
443}
444//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
e9f11028 445void Hdisp()
446{//display events from files if any in current directory or simulated events
b6eacec7 447 AliHMPIDParam::Instance(); // first invocation of AliHMPIDParam to initialize geometry...
e9f11028 448 CreateContainers();
449 CreateRenders();
d73ece6a 450
e9f11028 451 TString title="Session with";
452 if(gSystem->IsFileInIncludePath("HMPID.Hits.root")){// tries to open hits
453 fHitFile=TFile::Open("HMPID.Hits.root"); fNevt=fHitFile->GetNkeys(); fType=1; title+=Form(" HITS-%i ",fNevt);
454 }
6b155609 455
e9f11028 456 if(gSystem->IsFileInIncludePath("HMPID.Digits.root")){// tries to open clusters
e4290ede 457 fDigFile=TFile::Open("HMPID.Digits.root"); fNevt=fDigFile->GetNkeys(); fType=1; title+=Form(" DIGITS-%i ",fNevt);
458 }
6b155609 459
e9f11028 460 if(gSystem->IsFileInIncludePath("HMPID.RecPoints.root")){// tries to open clusters
461 fCluFile=TFile::Open("HMPID.RecPoints.root"); fNevt=fCluFile->GetNkeys(); fType=1; title+=Form(" CLUSTERS-%i ",fNevt);
e4290ede 462 }
50e69536 463
e9f11028 464 if(gSystem->IsFileInIncludePath("AliESDs.root")){
e4290ede 465 fEsdFile=TFile::Open("AliESDs.root");
466 fEsdTree=(TTree*)fEsdFile->Get("esdTree");
467 fEsd->ReadFromTree(fEsdTree); fEsd->GetStdContent(); //clm: new ESD schema: see Task Force meeting 20th June, 2007
468 fNevt=fEsdTree->GetEntries(); fType=1; title+=Form(" ESD-%i ",fNevt);
469
470 //clm: we need to set the magnetic field
471 if(gSystem->IsFileInIncludePath("galice.root")){
472 if(gAlice) delete gAlice;
473 gAL=AliRunLoader::Open();
474 gAL->LoadgAlice();
475 AliHMPIDTracker::SetFieldMap(gAL->GetAliRun()->Field(),kTRUE);
476 }else{
477 Printf("=============== NO galice file! Magnetic field for ESD tracking is: %f ===============",AliTracker::GetBz());
478 }
479
e9f11028 480 }
481
482 if(gSystem->IsFileInIncludePath("cosmic.root")){ //clm: Check if cosmic file is in the folder
483 fCosFile=TFile::Open("cosmic.root"); fCosTree=(TTree*)fCosFile->Get("cosmic"); fNevt=fCosTree->GetEntries(); fType=2;
484 fCosTree->SetBranchAddress("Digs",&fDigLst); fCosTree->SetBranchAddress("Clus",&fCluLst);
485 }
486
06a9f120 487 fCanvas=new TCanvas("all","",1024,768);fCanvas->SetWindowSize(1024,768);
488 fCanvas->ToggleEventStatus();
45b05be5 489 fCanvas->Divide(3,3,0,0);// pAll->ToggleEditor();
e9f11028 490 fCanvas->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",0,0,"DoZoom(Int_t,Int_t,Int_t,TObject*)");
491 fCanvas->cd(7);
06a9f120 492 gStyle->SetPalette(1,0);
e9f11028 493 switch(fType){
494 case 1: fCanvas->SetTitle(title.Data());
45b05be5 495 TButton *pNxtBtn = new TButton("Next" ,"NextEvent()" ,0.0,0.0,0.3,0.1); pNxtBtn->Draw();
496 TButton *pPrvBtn = new TButton("Previous" ,"PrevEvent()" ,0.3,0.0,0.6,0.1); pPrvBtn->Draw();
497 if(fHitFile){TButton *pHitBtn = new TButton("Print hits","PrintHits()" ,0.0,0.2,0.3,0.3); pHitBtn->Draw();}
498 if(fDigFile){TButton *pDigBtn = new TButton("Print digs","PrintDigs()" ,0.0,0.4,0.3,0.5); pDigBtn->Draw();}
499 if(fCluFile){TButton *pCluBtn = new TButton("Print clus","PrintClus()" ,0.0,0.6,0.3,0.7); pCluBtn->Draw();}
500 if(fEsdFile){TButton *pEsdBtn = new TButton("Print ESD ","PrintEsd()" ,0.0,0.8,0.3,0.9); pEsdBtn->Draw();}
06a9f120 501 if(fHitFile){ fHitMipBok = new TButton(Form("Mip %s",fStHitMip.Data()),"SwitchHitMip()",0.3,0.16,0.6,0.22); fHitMipBok->Draw();}
45b05be5 502 if(fHitFile){ fHitCkoBok = new TButton(Form("Ckov %s",fStHitCko.Data()),"SwitchHitCko()",0.3,0.22,0.6,0.28); fHitCkoBok->Draw();}
503 if(fHitFile){ fHitFeeBok = new TButton(Form("Fdbk %s",fStHitFee.Data()),"SwitchHitFee()",0.3,0.28,0.6,0.34); fHitFeeBok->Draw();}
504 if(fDigFile){ fDigBok = new TButton(fStDig ,"SwitchDigs()" ,0.3,0.4,0.6,0.5); fDigBok->Draw();}
505 if(fCluFile){ fCluBok = new TButton(fStClu ,"SwitchClus()" ,0.3,0.6,0.6,0.7); fCluBok->Draw();}
506 if(fEsdFile){ fEsdBok = new TButton(fStEsd ,"SwitchEsd()" ,0.3,0.8,0.6,0.9); fEsdBok->Draw();}
06a9f120 507
508 if(fHitFile){TButton *fHitMipOnly = new TButton(" Only ","OnlyHitMip()",0.6,0.16,0.9,0.22); fHitMipOnly->Draw();}
509 if(fHitFile){TButton *fHitCkoOnly = new TButton(" Only ","OnlyHitCko()",0.6,0.22,0.9,0.28); fHitCkoOnly->Draw();}
510 if(fHitFile){TButton *fHitFeeOnly = new TButton(" Only ","OnlyHitFee()",0.6,0.28,0.9,0.34); fHitFeeOnly->Draw();}
511 if(fDigFile){TButton *fDigOnly = new TButton(" Only ","OnlyDigs()" ,0.6,0.40,0.9,0.50); fDigOnly->Draw();}
512 if(fCluFile){TButton *fCluOnly = new TButton(" Only ","OnlyClus()" ,0.6,0.60,0.9,0.70); fCluOnly->Draw();}
513 if(fEsdFile){TButton *fEsdOnly = new TButton(" Only ","OnlyEsd()" ,0.6,0.80,0.9,0.90); fEsdOnly->Draw();}
514 TButton *fAll = new TButton(" ALL ","All()" ,0.5,0.90,0.7,1.00); fAll->Draw();
515
516 TButton *pEnd = new TButton("Quit" ,"End()" ,0.6,0.0,0.9,0.1); pEnd->Draw();
e9f11028 517 break;
518 case 2: fCanvas->SetTitle("COSMIC");
45b05be5 519 TButton *pCosBtn = new TButton("Next" ,"NextEvent()",0.0,0.0,0.3,0.1); pCosBtn->Draw();
e9f11028 520
521 break;
522 case 3: fCanvas->SetTitle("SIMULATION");
45b05be5 523 TButton *pSimBtn = new TButton("Simulate" ,"NextEvent()",0.0,0.0,0.3,0.1); pSimBtn->Draw();
524 TButton *pHitBtn = new TButton("Print hits","PrintHits()",0.0,0.2,0.3,0.3); pHitBtn->Draw();
525 TButton *pDigBtn = new TButton("Print digs","PrintDigs()",0.0,0.4,0.3,0.5); pDigBtn->Draw();
526 TButton *pCluBtn = new TButton("Print clus","PrintClus()",0.0,0.6,0.3,0.7); pCluBtn->Draw();
527 TButton *pEsdBtn = new TButton("Print ESD" ,"PrintEsd()" ,0.0,0.8,0.3,0.9); pEsdBtn->Draw();
528 if(fHitFile){ fHitMipBok = new TButton(Form("Mips %s",fStHitMip.Data()),"SwitchHitMip()",0.3,0.16,0.6,0.22); fHitMipBok->Draw();}
529 if(fHitFile){ fHitCkoBok = new TButton(Form("Ckov %s",fStHitCko.Data()),"SwitchHitCko()",0.3,0.22,0.6,0.28); fHitCkoBok->Draw();}
530 if(fHitFile){ fHitFeeBok = new TButton(Form("Fdbk %s",fStHitFee.Data()),"SwitchHitFee()",0.3,0.28,0.6,0.34); fHitFeeBok->Draw();}
531 if(fDigFile){ fDigBok = new TButton(fStDig ,"SwitchDigs()" ,0.3,0.4,0.6,0.5); fDigBok->Draw();}
532 if(fCluFile){ fCluBok = new TButton(fStClu ,"SwitchClus()" ,0.3,0.6,0.6,0.7); fCluBok->Draw();}
533 if(fEsdFile){ fEsdBok = new TButton(fStEsd ,"SwitchEsd()" ,0.3,0.8,0.6,0.9); fEsdBok->Draw();}
06a9f120 534
535 if(fHitFile){TButton *fHitMipOnly = new TButton(" Only ","OnlyHitMip()",0.6,0.16,0.9,0.22); fHitMipOnly->Draw();}
536 if(fHitFile){TButton *fHitCkoOnly = new TButton(" Only ","OnlyHitCko()",0.6,0.22,0.9,0.28); fHitCkoOnly->Draw();}
537 if(fHitFile){TButton *fHitFeeOnly = new TButton(" Only ","OnlyHitFee()",0.6,0.28,0.9,0.34); fHitFeeOnly->Draw();}
538 if(fDigFile){TButton *fDigOnly = new TButton(" Only ","OnlyDigs()" ,0.6,0.40,0.9,0.50); fDigOnly->Draw();}
539 if(fCluFile){TButton *fCluOnly = new TButton(" Only ","OnlyClus()" ,0.6,0.60,0.9,0.70); fCluOnly->Draw();}
540 if(fEsdFile){TButton *fEsdOnly = new TButton(" Only ","OnlyEsd()" ,0.6,0.80,0.9,0.90); fEsdOnly->Draw();}
e9f11028 541 break;
542 }
543
0112d781 544 NextEvent();
e9f11028 545
546}//Hdisp()
547//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
45b05be5 548void SwitchHitMip()
549{
550 fStHitMip=(fStHitMip=="OFF")? "ON":"OFF";
551 GetEvent();
552}
553//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
554void SwitchHitCko()
555{
556 fStHitCko=(fStHitCko=="OFF")? "ON":"OFF";
557 GetEvent();
558}
559//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
560void SwitchHitFee()
561{
562 fStHitFee=(fStHitFee=="OFF")? "ON":"OFF";
563 GetEvent();
564}
565//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
566void SwitchDigs()
567{
568 fStDig=(fStDig=="OFF")? "ON":"OFF";
569 GetEvent();
570}
571//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
572void SwitchClus()
573{
574 fStClu=(fStClu=="OFF")? "ON":"OFF";
575 GetEvent();
576}
577//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
578void SwitchEsd()
579{
580 fStEsd=(fStEsd=="OFF")? "ON":"OFF";
06a9f120 581 GetEvent();
582}
583//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
584void AllNo()
585{
586 fStHitMip = "OFF";
587 fStHitCko = "OFF";
588 fStHitFee = "OFF";
589 fStDig = "OFF";
590 fStClu = "OFF";
591 fStEsd = "OFF";
592}
593//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
594void AllYes()
595{
596 if(fHitFile) fStHitMip = "ON";
597 if(fHitFile) fStHitCko = "ON";
598 if(fHitFile) fStHitFee = "ON";
599 if(fDigFile) fStDig = "ON";
600 if(fCluFile) fStClu = "ON";
601 if(fEsdFile) fStEsd = "ON";
602}
603//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
604void All()
605{
606 AllYes();
45b05be5 607 GetEvent();
608}
609//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
06a9f120 610void OnlyHitMip()
611{
612 AllNo();
613 fStHitMip = "ON";
614 GetEvent();
615}
616//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
617void OnlyHitCko()
618{
619 AllNo();
620 fStHitCko = "ON";
621 GetEvent();
622}
623//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
624void OnlyHitFee()
625{
626 AllNo();
627 fStHitFee = "ON";
628 GetEvent();
629}
630//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
631void OnlyDigs()
632{
633 AllNo();
634 fStDig = "ON";
635 GetEvent();
636}
637//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
638void OnlyClus()
639{
640 AllNo();
641 fStClu = "ON";
642 GetEvent();
643}
644//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
645void OnlyEsd()
646{
647 AllNo();
648 fStEsd = "ON";
649 GetEvent();
650}
651//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
652void CheckStatus()
653{
654//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
655
656 if(fStHitMip=="OFF") {fHitMipBok->SetFillColor(kRed);} else {fHitMipBok->SetFillColor(18);}
657 if(fStHitCko=="OFF") {fHitCkoBok->SetFillColor(kRed);} else {fHitCkoBok->SetFillColor(18);}
658 if(fStHitFee=="OFF") {fHitFeeBok->SetFillColor(kRed);} else {fHitFeeBok->SetFillColor(18);}
659 if(fStDig =="OFF") {fDigBok->SetFillColor(kRed);} else {fDigBok->SetFillColor(18);}
660 if(fStClu =="OFF") {fCluBok->SetFillColor(kRed);} else {fCluBok->SetFillColor(18);}
661 if(fStEsd =="OFF") {fEsdBok->SetFillColor(kRed);} else {fEsdBok->SetFillColor(18);}
662}
663//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++