Updated to display cosmic runs (L. Molnar)
[u/mrichter/AliRoot.git] / HMPID / Hdisp.C
CommitLineData
8282f9d0 1TCanvas *pAll=0;
2AliRunLoader *gAL=0; AliLoader *gHL=0; AliESD *gEsd=0; TTree *gEsdTr=0; AliHMPID *gH=0;
3Int_t gEvt=0; Int_t gMaxEvt=0;
bd73b83f 4TObjArray *pNmean;
126b3e0e 5
6TChain *pCosCh=new TChain("cosmic"); //clm: Define TChain for cosmic
7TObjArray *pCosDigAll=0; //clm: Define global Digits
8TObjArray *pCosCluAll=0; //clm: Define global Clusters
9Int_t gCosRun=0; //clm: global cosmic event number
8282f9d0 10//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
126b3e0e 11void Hdisp(Int_t cosRun=44) //clm: Select cosmic file for display
8282f9d0 12{//display events from files if any in current directory or simulated events
50e69536 13 pAll=new TCanvas("all","",1300,900); pAll->Divide(3,3,0,0);
14// pAll->ToggleEditor();
8282f9d0 15 pAll->Connect("ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",0,"","DoZoom(Int_t,Int_t,Int_t,TObject*)");
bd73b83f 16
17 OpenCalib();
126b3e0e 18 if(gSystem->IsFileInIncludePath("galice.root")){// tries to open session
19 if(gAlice) delete gAlice; //in case we execute this in aliroot delete default AliRun object
20 gAL=AliRunLoader::Open(); //try to open galice.root from current dir
21 gAL->LoadgAlice(); //take new AliRun object from galice.root
22 gHL=gAL->GetDetectorLoader("HMPID"); gH=(AliHMPID*)gAL->GetAliRun()->GetDetector("HMPID"); //get HMPID object from galice.root
23 gMaxEvt=gAL->GetNumberOfEvents()-1;
24 gHL->LoadHits(); gHL->LoadSDigits(); gHL->LoadDigits(); gHL->LoadRecPoints();
8282f9d0 25
126b3e0e 26 TFile *pEsdFl=TFile::Open("AliESDs.root"); gEsdTr=(TTree*) pEsdFl->Get("esdTree"); gEsdTr->SetBranchAddress("ESD", &gEsd);
27 pAll->cd(7); TButton *pBtn=new TButton("Next","ReadEvt()",0,0,0.2,0.1); pBtn->Draw();
28 TButton *pHitBtn=new TButton("Print hits","PrintHits()",0,0.2,0.3,0.3); pHitBtn->Draw();
29 TButton *pSdiBtn=new TButton("Print sdis","PrintSdis()",0,0.4,0.3,0.5); pSdiBtn->Draw();
30 TButton *pDigBtn=new TButton("Print digs","PrintDigs()",0,0.6,0.3,0.7); pDigBtn->Draw();
31 TButton *pCluBtn=new TButton("Print clus","PrintClus()",0,0.8,0.3,0.9); pCluBtn->Draw();
32 ReadEvt();
33 }
34 else if ( gSystem->IsFileInIncludePath(Form("cosmic%d.root",cosRun))){ //clm: Check if cosmic file is in the folder
35 gCosRun=cosRun;
36 pCosCh->Add(Form("cosmic%d.root",gCosRun)); //clm: Add cosmic file to chain
37 pCosCh->SetBranchAddress("Digs",&pCosDigAll); //clm: Set digit branch address
38 pCosCh->SetBranchAddress("Clus",&pCosCluAll); //clm: Set cluster branch address
39 gMaxEvt=pCosCh->GetEntries()-1; //clm: Get number of events from the cosmic chain
40 pAll->cd(7); TButton *pCosBtn=new TButton("Next Cosmic","ReadCosEvt()",0,0,0.3,0.1); pCosBtn->Draw(); //clm: define next button
41 ReadCosEvt(); //clm: Read first cosmic event
42 }
43 else{
44 pAll->cd(7); TButton *pBtn=new TButton("Next","SimEvt()",0,0,0.2,0.1); pBtn->Draw();
45 SimEvt();
46 }
47}
48
49//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
50void ReadCosEvt()
51{// Read curent cosmic event and display it assumes that session is alredy opened
52 if(gEvt>gMaxEvt) gEvt=0; if(gEvt<0) gEvt=gMaxEvt; //clm: set event limits
53 pCosCh->GetEntry(gEvt); //clm: read event from chain
54 DrawCosEvt(pCosDigAll,pCosCluAll); //clm: draw cosmic event
55 gEvt++;
8282f9d0 56}
57//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
58void ReadEvt()
59{// Read curent event and display it assumes that session is alredy opened
60 TClonesArray hits("AliHMPIDHit");
61 if(gEvt>gMaxEvt) gEvt=0; if(gEvt<0) gEvt=gMaxEvt;
62
63 gEsdTr->GetEntry(gEvt); gAL->GetEvent(gEvt);
d73ece6a 64 ReadHits(&hits); gHL->TreeS()->GetEntry(0); gHL->TreeD()->GetEntry(0); gHL->TreeR()->GetEntry(0);
126b3e0e 65
8282f9d0 66 DrawEvt(&hits,gH->DigLst(),gH->CluLst(),gEsd);
67 gEvt++;
68}
69//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
70void SimEvt()
71{
72 TClonesArray hits("AliHMPIDHit");
73 TClonesArray sdig("AliHMPIDDigit");
74 TObjArray digs(7); for(Int_t i=0;i<7;i++) digs.AddAt(new TClonesArray("AliHMPIDDigit"),i);
75 TObjArray clus(7); for(Int_t i=0;i<7;i++) clus.AddAt(new TClonesArray("AliHMPIDCluster"),i);
76 AliESD esd;
27311693 77 AliHMPIDDigit::fSigmas=4;
78 AliHMPIDDigitizer::DoNoise(kFALSE);
8282f9d0 79 SimEsd(&esd);
80 SimHits(&esd,&hits);
81 AliHMPIDv1::Hit2Sdi(&hits,&sdig);
82 AliHMPIDDigitizer::Sdi2Dig(&sdig,&digs);
50e69536 83 AliHMPIDReconstructor::Dig2Clu(&digs,&clus);
bd73b83f 84 AliHMPIDTracker::Recon(&esd,&clus,pNmean);
8282f9d0 85
86 pAll->cd(3); gPad->Clear(); TLatex txt;txt.DrawLatex(0.2,0.2,Form("Simulated event %i",gEvt));
87 DrawEvt(&hits,&digs,&clus,&esd);
88 gEvt++;
89}//SimEvt()
a1d55ff3 90//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
91void SimEsd(AliESD *pEsd)
92{
93 TParticle part; TLorentzVector mom;
50e69536 94 for(Int_t iTrk=0;iTrk<100;iTrk++){//stack loop
a1d55ff3 95 part.SetPdgCode(kProton);
50e69536 96 part.SetProductionVertex(0,0,0,0);
97 Double_t eta= -0.2+gRandom->Rndm()*0.4; //rapidity is random [-0.2,+0.2]
98 Double_t phi= gRandom->Rndm()*60.*TMath::DegToRad(); //phi is random [ 0 , 60 ] degrees
99 mom.SetPtEtaPhiM(5,eta,phi,part.GetMass());
a1d55ff3 100 part.SetMomentum(mom);
101 AliESDtrack trk(&part);
102 pEsd->AddTrack(&trk);
103 }//stack loop
104}//EsdFromStack()
105//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8282f9d0 106void SimHits(AliESD *pEsd, TClonesArray *pHits)
a1d55ff3 107{
50e69536 108 const Int_t kCerenkov=50000050;
109 const Int_t kFeedback=50000051;
f3bae3e2 110
a1d55ff3 111 AliHMPIDRecon rec;
f3bae3e2 112
a591e55f 113 Int_t hc=0;
a1d55ff3 114 for(Int_t iTrk=0;iTrk<pEsd->GetNumberOfTracks();iTrk++){//tracks loop
115 AliESDtrack *pTrk=pEsd->GetTrack(iTrk);
116 Float_t xRa,yRa;
117 Int_t ch=AliHMPIDTracker::IntTrkCha(pTrk,xRa,yRa);
118 if(ch<0) continue; //this track does not hit HMPID
50e69536 119 Float_t beta = pTrk->GetP()/(TMath::Sqrt(pTrk->GetP()*pTrk->GetP()+0.938*0.938));
120 Float_t ckov=TMath::ACos(1./(beta*1.292));
a1d55ff3 121
50e69536 122 Float_t theta,phi,xPc,yPc,;
123 pTrk->GetHMPIDtrk(xPc,yPc,theta,phi);
124 rec.SetTrack(xRa,yRa,theta,phi);
a1d55ff3 125
8282f9d0 126 if(!AliHMPIDDigit::IsInDead(xPc,yPc)) new((*pHits)[hc++]) AliHMPIDHit(ch,200e-9,kProton ,iTrk,xPc,yPc); //mip hit
50e69536 127 Int_t nPhots = (Int_t)(20.*TMath::Power(TMath::Sin(ckov),2)/TMath::Power(TMath::Sin(TMath::ACos(1./1.292)),2));
128 for(int i=0;i<nPhots;i++){
a591e55f 129 TVector2 pos;
130 pos=rec.TracePhot(ckov,gRandom->Rndm()*TMath::TwoPi());
50e69536 131 if(!AliHMPIDDigit::IsInDead(pos.X(),pos.Y())) new((*pHits)[hc++]) AliHMPIDHit(ch,7.5e-9,kCerenkov,iTrk,pos.X(),pos.Y());
a1d55ff3 132 } //photon hits
133 }//tracks loop
8282f9d0 134}//SimHits()
a1d55ff3 135//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8282f9d0 136void ReadHits(TClonesArray *pHitLst)
a1d55ff3 137{
8282f9d0 138 pHitLst->Delete(); Int_t cnt=0;
139 for(Int_t iEnt=0;iEnt<gHL->TreeH()->GetEntries();iEnt++){ //TreeH loop
140 gHL->TreeH()->GetEntry(iEnt); //get current entry (prim)
141 for(Int_t iHit=0;iHit<gH->Hits()->GetEntries();iHit++){ //hits loop
142 AliHMPIDHit *pHit = (AliHMPIDHit*)gH->Hits()->At(iHit); //get current hit
143 new((*pHitLst)[cnt++]) AliHMPIDHit(*pHit);
144 }//hits loop for this entry
145 }//tree entries loop
146
147}//ReadHits()
a1d55ff3 148//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8282f9d0 149void DrawCh(Int_t iCh)
a1d55ff3 150{
151 gPad->Range(-10,-10,AliHMPIDDigit::SizeAllX()+5,AliHMPIDDigit::SizeAllY()+5);
f3bae3e2 152 if(iCh>=0){TLatex txt; txt.SetTextSize(0.1); txt.DrawLatex(-5,-5,Form("%i",iCh));}
a1d55ff3 153
154 for(Int_t iPc=AliHMPIDDigit::kMinPc;iPc<=AliHMPIDDigit::kMaxPc;iPc++){
155 TBox *pBox=new TBox(AliHMPIDDigit::fMinPcX[iPc],AliHMPIDDigit::fMinPcY[iPc],
156 AliHMPIDDigit::fMaxPcX[iPc],AliHMPIDDigit::fMaxPcY[iPc]);
157
8282f9d0 158 pBox->SetFillStyle(0);
a1d55ff3 159 pBox->Draw();
160
a1d55ff3 161 }//PC loop
8282f9d0 162}//DrawCh()
a1d55ff3 163//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8282f9d0 164void DrawEvt(TClonesArray *pHitLst,TObjArray *pDigLst,TObjArray *pCluLst,AliESD *pEsd)
a1d55ff3 165{//draws all the objects of current event in given canvas
a1d55ff3 166 AliHMPIDRecon rec;
d73ece6a 167 TPolyMarker *pTxC[7], *pRin[7]; TMarker *pMip,*pCko,*pFee,*pDig,*pClu;
168 pMip=new TMarker; pMip->SetMarkerColor(kRed); pMip->SetMarkerStyle(kOpenTriangleUp);
169 pCko=new TMarker; pCko->SetMarkerColor(kRed); pCko->SetMarkerStyle(kOpenCircle);
170 pFee=new TMarker; pFee->SetMarkerColor(kRed); pFee->SetMarkerStyle(kOpenDiamond);
171 pDig=new TMarker; pDig->SetMarkerColor(kGreen);pDig->SetMarkerStyle(kOpenSquare);
172 pClu=new TMarker; pClu->SetMarkerColor(kBlue); pClu->SetMarkerStyle(kStar);
a1d55ff3 173 for(Int_t ch=0;ch<7;ch++){
174 pTxC[ch]=new TPolyMarker; pTxC[ch]->SetMarkerStyle(2); pTxC[ch]->SetMarkerColor(kRed); pTxC[ch]->SetMarkerSize(3);
175 pRin[ch]=new TPolyMarker; pRin[ch]->SetMarkerStyle(6); pRin[ch]->SetMarkerColor(kMagenta);
176 }
177
a1d55ff3 178 for(Int_t iTrk=0;iTrk<pEsd->GetNumberOfTracks();iTrk++){//tracks loop to collect cerenkov rings and intersection points
179 AliESDtrack *pTrk=pEsd->GetTrack(iTrk);
180 Int_t ch=pTrk->GetHMPIDcluIdx();
181 if(ch<0) continue; //this track does not hit HMPID
182 ch/=1000000;
a591e55f 183 Float_t th,ph,xRad,yRad; pTrk->GetHMPIDtrk(xRad,yRad,th,ph);//get info on current track
184// pTxC[ch]->SetNextPoint(xPc,yPc); //add new intersection point TEMPORARLY DISABLED...no more available in ESD!
a1d55ff3 185
186 Float_t ckov=pTrk->GetHMPIDsignal(); Float_t err=TMath::Sqrt(pTrk->GetHMPIDchi2());
a1d55ff3 187 if(ckov>0){
394d35c1 188 Printf("theta %f phi %f ckov %f",th*TMath::RadToDeg(),ph*TMath::RadToDeg(),ckov);
b4ad85e9 189 rec.SetTrack(xRad,yRad,th,ph);
a591e55f 190 for(Int_t j=0;j<100;j++){
191 TVector2 pos;
192 pos=rec.TracePhot(ckov,j*0.0628);
50e69536 193 if(!AliHMPIDDigit::IsInDead(pos.X(),pos.Y())) pRin[ch]->SetNextPoint(pos.X(),pos.Y());
194 }
a1d55ff3 195 }
196 }//tracks loop
197
b08ebbb0 198 Int_t totHit=pHitLst->GetEntriesFast(),totDig=0,totClu=0,totTxC=0;
199 Int_t totCkov=0, totFeed=0,totMip=0;
a1d55ff3 200 for(Int_t iCh=0;iCh<7;iCh++){//chambers loop
d73ece6a 201 totTxC+=pTxC[iCh]->GetN();
202 totDig+=((TClonesArray*)pDigLst->At(iCh))->GetEntriesFast();
203 totClu+=((TClonesArray*)pCluLst->At(iCh))->GetEntriesFast();
204
a1d55ff3 205 switch(iCh){
8282f9d0 206 case 6: pAll->cd(1); break; case 5: pAll->cd(2); break;
207 case 4: pAll->cd(4); break; case 3: pAll->cd(5); break; case 2: pAll->cd(6); break;
208 case 1: pAll->cd(8); break; case 0: pAll->cd(9); break;
a1d55ff3 209 }
210 gPad->SetEditable(kTRUE); gPad->Clear();
8282f9d0 211 DrawCh(iCh);
d73ece6a 212
8c1bbb8a 213 ((TClonesArray*)pDigLst->At(iCh))->Draw(); //draw digits
214
b08ebbb0 215 totCkov=0;totFeed=0;totMip=0;
8c1bbb8a 216 for(Int_t iHit=0;iHit<pHitLst->GetEntriesFast();iHit++){ // Draw hits
a1d55ff3 217 AliHMPIDHit *pHit=(AliHMPIDHit*)pHitLst->At(iHit);
d73ece6a 218 if(pHit->Ch()==iCh) pHit->Draw();
b08ebbb0 219 if(pHit->Pid()==50000050) totCkov++;
220 else if(pHit->Pid()==50000051) totFeed++;
221 else totMip++;
d73ece6a 222 }
223
8c1bbb8a 224 ((TClonesArray*)pCluLst->At(iCh))->Draw(); //draw clusters
225 pTxC[iCh]->Draw(); //draw intersections
226 pRin[iCh]->Draw("CLP"); //draw rings
a1d55ff3 227 gPad->SetEditable(kFALSE);
228 }//chambers loop
d73ece6a 229
230 pAll->cd(3); gPad->Clear(); TLegend *pLeg=new TLegend(0.2,0.2,0.8,0.8);
231 pLeg->SetHeader(Form("Event %i Total %i",gEvt,gMaxEvt+1));
232 pLeg->AddEntry(pTxC[0],Form("TRKxPC %i" ,totTxC),"p");
b08ebbb0 233 pLeg->AddEntry(pMip ,Form("Mip hits %i" ,totMip),"p");
234 pLeg->AddEntry(pCko ,Form("Ckov hits %i" ,totCkov),"p");
235 pLeg->AddEntry(pFee ,Form("Feed hits %i" ,totFeed),"p");
d73ece6a 236 pLeg->AddEntry(pDig ,Form("Digs %i" ,totDig),"p");
237 pLeg->AddEntry(pClu ,Form("Clus %i" ,totClu),"p");
238 pLeg->Draw();
a1d55ff3 239}//DrawEvt()
8282f9d0 240//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
126b3e0e 241void DrawCosEvt(TObjArray *pCosDigLst,TObjArray *pCosCluLst) //clm: new method to read and display cosmic events
242{//draws all the objects of current event in given canvas
243 TMarker *pDig,*pClu;
244 pDig=new TMarker; pDig->SetMarkerColor(kGreen);pDig->SetMarkerStyle(kOpenSquare);
245 pClu=new TMarker; pClu->SetMarkerColor(kBlue); pClu->SetMarkerStyle(kStar);
246
247
248 Int_t totDig=0,totClu=0;
249 for(Int_t iCh=0;iCh<7;iCh++){//chambers loop //clm: chambers loop is now not needed since iCh=0 but kept for provision
250 totDig+=((TClonesArray*)pCosDigLst->At(iCh))->GetEntriesFast();
251 totClu+=((TClonesArray*)pCosCluLst->At(iCh))->GetEntriesFast();
252
253 switch(iCh){
254 case 6: pAll->cd(1); break; case 5: pAll->cd(2); break;
255 case 4: pAll->cd(4); break; case 3: pAll->cd(5); break; case 2: pAll->cd(6); break;
256 case 1: pAll->cd(8); break; case 0: pAll->cd(9); break;
257 }
258 gPad->SetEditable(kTRUE); gPad->Clear();
259 DrawCh(iCh);
260 if(gCosRun < 500 && iCh == 6) { //clm: hard coded selection since raw data does not contain ch info which is set to 0
261 ((TClonesArray*)pCosDigLst->At(0))->Draw(); //draw digits
262 ((TClonesArray*)pCosCluLst->At(0))->Draw(); //draw clusters
263 }
264 if (gCosRun >= 500 && iCh == 5) {
265 ((TClonesArray*)pCosDigLst->At(0))->Draw(); //draw digits
266 ((TClonesArray*)pCosCluLst->At(0))->Draw(); //draw clusters
267 }
268
269 gPad->SetEditable(kFALSE);
270 }//chambers loop
271 pAll->cd(3); gPad->Clear(); TLegend *pLeg=new TLegend(0.2,0.2,0.8,0.8);
272 pLeg->SetHeader(Form("Cosmic Run %i Event %i Total %i",gCosRun,gEvt,gMaxEvt+1));
273 pLeg->AddEntry(pDig ,Form("Digs %i" ,totDig),"p");
274 pLeg->AddEntry(pClu ,Form("Clus %i" ,totClu),"p");
275 pLeg->Draw();
276}//DrawCosEvt()
277//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
8282f9d0 278void DoZoom(Int_t evt, Int_t px, Int_t py, TObject *obj)
a1d55ff3 279{
8282f9d0 280 if(evt!=5 && evt!=6) return; //5- zoom in 6-zoom out
281 const Int_t minZoom=64;
282 const Int_t maxZoom=2;
283 static Int_t zoom=minZoom; //zoom level
284 if(evt==5&&zoom==maxZoom) return;
285 if(evt==6&&zoom==minZoom) return;
286
d73ece6a 287 // if(!obj->IsA()->InheritsFrom("TPad")) return; //current object is not pad
50e69536 288 TVirtualPad *pPad=gPad->GetSelectedPad();
8282f9d0 289 if(pPad->GetNumber()==3 || pPad->GetNumber()==7) return; //current pad is wrong
290
291 // Printf("evt=%i (%i,%i) %s",evt,px,py,obj->GetName());
292
293 Float_t x=pPad->AbsPixeltoX(px); Float_t y=pPad->AbsPixeltoY(py);
6ed6a312 294
295 if(evt==5){ zoom=zoom/2; pPad->Range(x-zoom*2,y-zoom*2,x+zoom*2,y+zoom*2);} //zoom in
296 else { zoom=zoom*2; pPad->Range(x-zoom*2,y-zoom*2,x+zoom*2,y+zoom*2);} //zoom out
297 if(zoom==minZoom) pPad->Range(-10,-10,AliHMPIDDigit::SizeAllX()+5,AliHMPIDDigit::SizeAllY()+5);
8282f9d0 298 ((TCanvas *)gTQSender)->SetTitle(Form("zoom x%i",minZoom/zoom));
299 pPad->Modified();
300 pPad->Update();
a1d55ff3 301}
8282f9d0 302//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
d73ece6a 303void PrintHits()
304{
305//Prints a list of HMPID hits for a given event. Default is event number 0.
306 Printf("List of HMPID hits for event %i",gEvt);
307
308 Int_t iTotHits=0;
309 for(Int_t iPrim=0;iPrim<gHL->TreeH()->GetEntries();iPrim++){//prims loop
310 gHL->TreeH()->GetEntry(iPrim);
311 gH->Hits()->Print();
312 iTotHits+=gH->Hits()->GetEntries();
313 }
314 Printf("totally %i hits for event %i",iTotHits,gEvt);
315}
316//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
317void PrintSdis()
318{
319//prints a list of HMPID sdigits for a given event
320 Printf("List of HMPID sdigits for event %i",gEvt);
321 gH->SdiLst()->Print();
322 Printf("totally %i sdigits for event %i",gH->SdiLst()->GetEntries(),gEvt);
323}
324//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
325void PrintDigs()
326{
327//prints a list of HMPID digits
328 Printf("List of HMPID digits for event %i",gEvt);
329 gH->DigLst()->Print();
330 Int_t totDigs=0; for(Int_t i=0;i<7;i++) {totDigs+=gH->DigLst(i)->GetEntries();}
331 Printf("totally %i digits for event %i",totDigs,gEvt);
332}
333//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
334void PrintClus()
335{//prints a list of HMPID clusters for a given event
336 Printf("List of HMPID clusters for event %i",gEvt);
337 gH->CluLst()->Print();
338
339 Int_t iCluCnt=0; for(Int_t iCh=0;iCh<7;iCh++) iCluCnt+=gH->CluLst(iCh)->GetEntries();
340
341 Printf("totally %i clusters for event %i",iCluCnt,gEvt);
342}
50e69536 343//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
bd73b83f 344void OpenCalib()
50e69536 345{
346 AliCDBManager* pCDB = AliCDBManager::Instance();
347 pCDB->SetDefaultStorage("local://$HOME");
348 AliCDBEntry *pQthreEnt=pCDB->Get("HMPID/Calib/Qthre",0);
349 AliCDBEntry *pNmeanEnt=pCDB->Get("HMPID/Calib/Nmean",0);
350
351 if(!pQthreEnt || ! pNmeanEnt) return;
352
bd73b83f 353 pNmean=(TObjArray*)pNmeanEnt->GetObject();
50e69536 354}