1 /***************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 //-----------------------------------------------------//
18 // Date : August 05 2003 //
19 // This reads the file PMD.digits.root(TreeD), //
20 // calls the Clustering algorithm and stores the //
21 // clustering output in PMD.RecPoints.root(TreeR) //
23 //-----------------------------------------------------//
25 #include <Riostream.h>
27 #include <TObjArray.h>
28 #include <TClonesArray.h>
31 #include "AliRunLoader.h"
32 #include "AliLoader.h"
33 #include "AliRawReader.h"
35 #include "AliPMDdigit.h"
36 #include "AliPMDClusterFinder.h"
37 #include "AliPMDClustering.h"
38 #include "AliPMDClusteringV1.h"
39 #include "AliPMDcluster.h"
40 #include "AliPMDrecpoint1.h"
41 #include "AliPMDrechit.h"
42 #include "AliPMDRawStream.h"
43 #include "AliPMDCalibData.h"
44 #include "AliPMDPedestal.h"
45 #include "AliPMDddldata.h"
48 #include "AliCDBManager.h"
49 #include "AliCDBEntry.h"
53 ClassImp(AliPMDClusterFinder)
55 AliPMDClusterFinder::AliPMDClusterFinder():
58 fCalibGain(GetCalibGain()),
59 fCalibPed(GetCalibPed()),
62 fDigits(new TClonesArray("AliPMDdigit", 1000)),
63 fRecpoints(new TClonesArray("AliPMDrecpoint1", 1000)),
64 fRechits(new TClonesArray("AliPMDrechit", 1000)),
74 // ------------------------------------------------------------------------- //
75 AliPMDClusterFinder::AliPMDClusterFinder(AliRunLoader* runLoader):
76 fRunLoader(runLoader),
77 fPMDLoader(runLoader->GetLoader("PMDLoader")),
78 fCalibGain(GetCalibGain()),
79 fCalibPed(GetCalibPed()),
82 fDigits(new TClonesArray("AliPMDdigit", 1000)),
83 fRecpoints(new TClonesArray("AliPMDrecpoint1", 1000)),
84 fRechits(new TClonesArray("AliPMDrechit", 1000)),
94 // ------------------------------------------------------------------------- //
95 AliPMDClusterFinder::AliPMDClusterFinder(const AliPMDClusterFinder & finder):
99 fCalibGain(GetCalibGain()),
100 fCalibPed(GetCalibPed()),
112 AliError("Copy constructor not allowed");
114 // ------------------------------------------------------------------------- //
115 AliPMDClusterFinder &AliPMDClusterFinder::operator=(const AliPMDClusterFinder & /*finder*/)
118 AliError("Assignment Operator not allowed");
121 // ------------------------------------------------------------------------- //
122 AliPMDClusterFinder::~AliPMDClusterFinder()
139 // ------------------------------------------------------------------------- //
141 void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt)
143 // Converts digits to recpoints after running clustering
144 // algorithm on CPV plane and PREshower plane
147 Int_t det = 0,smn = 0;
154 TObjArray *pmdcont = new TObjArray();
155 AliPMDClustering *pmdclust = new AliPMDClusteringV1();
157 pmdclust->SetEdepCut(fEcut);
159 fRunLoader->GetEvent(ievt);
162 fTreeD = fPMDLoader->TreeD();
165 AliFatal("AliPMDClusterFinder: Can not get TreeD");
168 AliPMDdigit *pmddigit;
169 TBranch *branch = fTreeD->GetBranch("PMDDigit");
170 branch->SetAddress(&fDigits);
174 fTreeR = fPMDLoader->TreeR();
177 fPMDLoader->MakeTree("R");
178 fTreeR = fPMDLoader->TreeR();
181 Int_t bufsize = 16000;
182 TBranch * branch1 = fTreeR->Branch("PMDRecpoint", &fRecpoints, bufsize);
183 TBranch * branch2 = fTreeR->Branch("PMDRechit", &fRechits, bufsize);
185 Int_t nmodules = (Int_t) fTreeD->GetEntries();
187 for (Int_t imodule = 0; imodule < nmodules; imodule++)
190 fTreeD->GetEntry(imodule);
191 Int_t nentries = fDigits->GetLast();
192 for (Int_t ient = 0; ient < nentries+1; ient++)
194 pmddigit = (AliPMDdigit*)fDigits->UncheckedAt(ient);
196 det = pmddigit->GetDetector();
197 smn = pmddigit->GetSMNumber();
198 xpos = pmddigit->GetRow();
199 ypos = pmddigit->GetColumn();
200 adc = pmddigit->GetADC();
201 if(xpos < 0 || xpos > 48 || ypos < 0 || ypos > 96)
203 AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
208 Float_t gain = fCalibGain->GetGainFact(det,smn,xpos,ypos);
209 // printf("adc = %d gain = %f\n",adc,gain);
213 //Int_t trno = pmddigit->GetTrackNumber();
214 fCellADC[xpos][ypos] = (Double_t) adc;
219 pmdclust->DoClust(idet,ismn,fCellADC,pmdcont);
221 Int_t nentries1 = pmdcont->GetEntries();
223 AliDebug(1,Form("Total number of clusters/module = %d",nentries1));
225 for (Int_t ient1 = 0; ient1 < nentries1; ient1++)
227 AliPMDcluster *pmdcl = (AliPMDcluster*)pmdcont->UncheckedAt(ient1);
228 idet = pmdcl->GetDetector();
229 ismn = pmdcl->GetSMN();
230 clusdata[0] = pmdcl->GetClusX();
231 clusdata[1] = pmdcl->GetClusY();
232 clusdata[2] = pmdcl->GetClusADC();
233 clusdata[3] = pmdcl->GetClusCells();
234 clusdata[4] = pmdcl->GetClusSigmaX();
235 clusdata[5] = pmdcl->GetClusSigmaY();
237 AddRecPoint(idet,ismn,clusdata);
239 Int_t ncell = (Int_t) clusdata[3];
240 for(Int_t ihit = 0; ihit < ncell; ihit++)
242 Int_t celldataX = pmdcl->GetClusCellX(ihit);
243 Int_t celldataY = pmdcl->GetClusCellY(ihit);
244 AddRecHit(celldataX, celldataY);
257 fPMDLoader = fRunLoader->GetLoader("PMDLoader");
258 fPMDLoader->WriteRecPoints("OVERWRITE");
260 // delete the pointers
265 // ------------------------------------------------------------------------- //
267 void AliPMDClusterFinder::Digits2RecPoints(TTree *digitsTree,
270 // Converts digits to recpoints after running clustering
271 // algorithm on CPV plane and PREshower plane
273 // This algorithm is called during the reconstruction from digits
275 Int_t det = 0,smn = 0;
282 AliPMDcluster *pmdcl = 0x0;
284 TObjArray *pmdcont = new TObjArray();
285 AliPMDClustering *pmdclust = new AliPMDClusteringV1();
287 pmdclust->SetEdepCut(fEcut);
289 AliPMDdigit *pmddigit;
290 TBranch *branch = digitsTree->GetBranch("PMDDigit");
291 branch->SetAddress(&fDigits);
295 Int_t bufsize = 16000;
296 TBranch * branch1 = clustersTree->Branch("PMDRecpoint", &fRecpoints, bufsize);
297 TBranch * branch2 = clustersTree->Branch("PMDRechit", &fRechits, bufsize);
299 Int_t nmodules = (Int_t) digitsTree->GetEntries();
301 for (Int_t imodule = 0; imodule < nmodules; imodule++)
306 digitsTree->GetEntry(imodule);
307 Int_t nentries = fDigits->GetLast();
308 for (Int_t ient = 0; ient < nentries+1; ient++)
310 pmddigit = (AliPMDdigit*)fDigits->UncheckedAt(ient);
312 det = pmddigit->GetDetector();
313 smn = pmddigit->GetSMNumber();
314 xpos = pmddigit->GetRow();
315 ypos = pmddigit->GetColumn();
316 adc = pmddigit->GetADC();
317 if(xpos < 0 || xpos > 48 || ypos < 0 || ypos > 96)
319 AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
324 // Pedestal Subtraction
325 Int_t pedmeanrms = fCalibPed->GetPedMeanRms(det,smn,xpos,ypos);
326 Int_t pedrms1 = (Int_t) pedmeanrms%1000;
327 Float_t pedrms = (Float_t)pedrms1/10.;
328 Float_t pedmean = (Float_t) (pedmeanrms - pedrms1)/1000.0;
329 //printf("%f %f\n",pedmean, pedrms);
331 Float_t adc1 = adc - (pedmean + 3.0*pedrms);
334 Float_t gain = fCalibGain->GetGainFact(det,smn,xpos,ypos);
335 // printf("adc = %d gain = %f\n",adc,gain);
339 //Int_t trno = pmddigit->GetTrackNumber();
340 fCellADC[xpos][ypos] = (Double_t) adc;
349 if (totADCMod <= 0) continue;
351 pmdclust->DoClust(idet,ismn,fCellADC,pmdcont);
353 Int_t nentries1 = pmdcont->GetEntries();
355 AliDebug(1,Form("Total number of clusters/module = %d",nentries1));
357 for (Int_t ient1 = 0; ient1 < nentries1; ient1++)
359 pmdcl = (AliPMDcluster*)pmdcont->UncheckedAt(ient1);
360 idet = pmdcl->GetDetector();
361 ismn = pmdcl->GetSMN();
362 clusdata[0] = pmdcl->GetClusX();
363 clusdata[1] = pmdcl->GetClusY();
364 clusdata[2] = pmdcl->GetClusADC();
365 clusdata[3] = pmdcl->GetClusCells();
366 clusdata[4] = pmdcl->GetClusSigmaX();
367 clusdata[5] = pmdcl->GetClusSigmaY();
369 AddRecPoint(idet,ismn,clusdata);
371 Int_t ncell = (Int_t) clusdata[3];
372 for(Int_t ihit = 0; ihit < ncell; ihit++)
374 Int_t celldataX = pmdcl->GetClusCellX(ihit);
375 Int_t celldataY = pmdcl->GetClusCellY(ihit);
376 AddRecHit(celldataX, celldataY);
390 // delete the pointers
395 // ------------------------------------------------------------------------- //
397 void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
400 // Converts RAW data to recpoints after running clustering
401 // algorithm on CPV and PREshower plane
403 // This method is called at the time of reconstruction from RAW data
406 AliPMDddldata *pmdddl = 0x0;
407 AliPMDcluster *pmdcl = 0x0;
411 TObjArray pmdddlcont;
413 TObjArray *pmdcont = new TObjArray();
415 AliPMDClustering *pmdclust = new AliPMDClusteringV1();
417 pmdclust->SetEdepCut(fEcut);
421 Int_t bufsize = 16000;
422 TBranch *branch1 = clustersTree->Branch("PMDRecpoint", &fRecpoints, bufsize);
424 TBranch * branch2 = clustersTree->Branch("PMDRechit", &fRechits, bufsize);
426 const Int_t kRow = 48;
427 const Int_t kCol = 96;
433 AliPMDRawStream pmdinput(rawReader);
435 while ((indexDDL = pmdinput.DdlData(&pmdddlcont)) >=0)
441 else if (indexDDL >= 4)
446 precpvADC = new int **[iSMN];
447 for (Int_t i=0; i<iSMN; i++) precpvADC[i] = new int *[kRow];
448 for (Int_t i=0; i<iSMN;i++)
450 for (Int_t j=0; j<kRow; j++) precpvADC[i][j] = new int [kCol];
452 for (Int_t i = 0; i < iSMN; i++)
454 for (Int_t j = 0; j < kRow; j++)
456 for (Int_t k = 0; k < kCol; k++)
458 precpvADC[i][j][k] = 0;
465 Int_t ientries = pmdddlcont.GetEntries();
466 for (Int_t ient = 0; ient < ientries; ient++)
468 pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient);
470 Int_t det = pmdddl->GetDetector();
471 Int_t smn = pmdddl->GetSMN();
472 //Int_t mcm = pmdddl->GetMCM();
473 //Int_t chno = pmdddl->GetChannel();
474 Int_t row = pmdddl->GetRow();
475 Int_t col = pmdddl->GetColumn();
476 Int_t sig = pmdddl->GetSignal();
480 AliError(Form("*MODULE NUMBER WRONG %d *",smn));
483 if(row < 0 || row > 48 || col < 0 || col > 96)
485 AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
490 // Pedestal Subtraction
491 Int_t pedmeanrms = fCalibPed->GetPedMeanRms(det,smn,row,col);
492 Int_t pedrms1 = (Int_t) pedmeanrms%1000;
493 Float_t pedrms = (Float_t)pedrms1/10.;
494 Float_t pedmean = (Float_t) (pedmeanrms - pedrms1)/1000.0;
496 //printf("%f %f\n",pedmean, pedrms);
498 // Float_t sig1 = (Float_t) sig;
499 Float_t sig1 = (Float_t) sig - (pedmean + 3.0*pedrms);
502 Float_t gain = fCalibGain->GetGainFact(det,smn,row,col);
503 //printf("sig = %d gain = %f\n",sig,gain);
504 sig = (Int_t) (sig1*gain);
509 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
511 indexsmn = smn - indexDDL * 6;
513 else if (indexDDL == 4)
516 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
522 else if (smn >= 18 && smn < 24)
527 else if (indexDDL == 5)
530 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
532 if (smn >= 6 && smn < 12)
536 else if (smn >= 12 && smn < 18)
541 precpvADC[indexsmn][row][col] = sig;
549 for (indexsmn = 0; indexsmn < iSMN; indexsmn++)
553 for (Int_t irow = 0; irow < kRow; irow++)
555 for (Int_t icol = 0; icol < kCol; icol++)
557 fCellADC[irow][icol] =
558 (Double_t) precpvADC[indexsmn][irow][icol];
559 totAdcMod += precpvADC[indexsmn][irow][icol];
565 ismn = indexsmn + indexDDL * 6;
568 else if (indexDDL == 4)
574 else if (indexsmn >= 6 && indexsmn < 12)
576 ismn = indexsmn + 12;
580 else if (indexDDL == 5)
586 else if (indexsmn >= 6 && indexsmn < 12)
593 if (totAdcMod <= 0) continue;
594 pmdclust->DoClust(idet,ismn,fCellADC,pmdcont);
595 Int_t nentries1 = pmdcont->GetEntries();
597 AliDebug(1,Form("Total number of clusters/module = %d",nentries1));
599 for (Int_t ient1 = 0; ient1 < nentries1; ient1++)
601 pmdcl = (AliPMDcluster*)pmdcont->UncheckedAt(ient1);
602 idet = pmdcl->GetDetector();
603 ismn = pmdcl->GetSMN();
604 clusdata[0] = pmdcl->GetClusX();
605 clusdata[1] = pmdcl->GetClusY();
606 clusdata[2] = pmdcl->GetClusADC();
607 clusdata[3] = pmdcl->GetClusCells();
608 clusdata[4] = pmdcl->GetClusSigmaX();
609 clusdata[5] = pmdcl->GetClusSigmaY();
611 AddRecPoint(idet,ismn,clusdata);
613 Int_t ncell = (Int_t) clusdata[3];
614 for(Int_t ihit = 0; ihit < ncell; ihit++)
616 Int_t celldataX = pmdcl->GetClusCellX(ihit);
617 Int_t celldataY = pmdcl->GetClusCellY(ihit);
618 AddRecHit(celldataX, celldataY);
632 for (Int_t i=0; i<iSMN; i++)
634 for (Int_t j=0; j<kRow; j++) delete [] precpvADC[i][j];
636 for (Int_t i=0; i<iSMN; i++) delete [] precpvADC[i];
643 // delete the pointers
648 // ------------------------------------------------------------------------- //
650 void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt, AliRawReader *rawReader)
652 // Converts RAW data to recpoints after running clustering
653 // algorithm on CPV and PREshower plane
657 TObjArray pmdddlcont;
658 TObjArray *pmdcont = new TObjArray();
660 AliPMDClustering *pmdclust = new AliPMDClusteringV1();
662 pmdclust->SetEdepCut(fEcut);
664 fRunLoader->GetEvent(ievt);
668 fTreeR = fPMDLoader->TreeR();
671 fPMDLoader->MakeTree("R");
672 fTreeR = fPMDLoader->TreeR();
674 Int_t bufsize = 16000;
675 TBranch *branch1 = fTreeR->Branch("PMDRecpoint", &fRecpoints, bufsize);
676 TBranch *branch2 = fTreeR->Branch("PMDRechit", &fRechits, bufsize);
678 const Int_t kRow = 48;
679 const Int_t kCol = 96;
684 AliPMDRawStream pmdinput(rawReader);
687 while ((indexDDL = pmdinput.DdlData(&pmdddlcont)) >=0) {
693 else if (indexDDL >= 4)
698 precpvADC = new int **[iSMN];
699 for (Int_t i=0; i<iSMN; i++) precpvADC[i] = new int *[kRow];
700 for (Int_t i=0; i<iSMN;i++)
702 for (Int_t j=0; j<kRow; j++) precpvADC[i][j] = new int [kCol];
704 for (Int_t i = 0; i < iSMN; i++)
706 for (Int_t j = 0; j < kRow; j++)
708 for (Int_t k = 0; k < kCol; k++)
710 precpvADC[i][j][k] = 0;
718 Int_t ientries = pmdddlcont.GetEntries();
719 for (Int_t ient = 0; ient < ientries; ient++)
721 AliPMDddldata *pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient);
723 Int_t det = pmdddl->GetDetector();
724 Int_t smn = pmdddl->GetSMN();
725 //Int_t mcm = pmdddl->GetMCM();
726 //Int_t chno = pmdddl->GetChannel();
727 Int_t row = pmdddl->GetRow();
728 Int_t col = pmdddl->GetColumn();
729 Int_t sig = pmdddl->GetSignal();
730 if(row < 0 || row > 48 || col < 0 || col > 96)
732 AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
736 // Pedestal Subtraction
737 Int_t pedmeanrms = fCalibPed->GetPedMeanRms(det,smn,row,col);
738 Int_t pedrms1 = (Int_t) pedmeanrms%1000;
739 Float_t pedrms = (Float_t)pedrms1/10.;
740 Float_t pedmean = (Float_t) (pedmeanrms - pedrms1)/1000.0;
742 //printf("%f %f\n",pedmean, pedrms);
744 //Float_t sig1 = (Float_t) sig;
745 Float_t sig1 = (Float_t) sig - (pedmean + 3.0*pedrms);
747 Float_t gain = fCalibGain->GetGainFact(det,smn,row,col);
749 //printf("sig = %d gain = %f\n",sig,gain);
750 sig = (Int_t) (sig1*gain);
756 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
758 indexsmn = smn - indexDDL * 6;
760 else if (indexDDL == 4)
763 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
769 else if (smn >= 18 && smn < 24)
774 else if (indexDDL == 5)
777 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
779 if (smn >= 6 && smn < 12)
783 else if (smn >= 12 && smn < 18)
788 precpvADC[indexsmn][row][col] = sig;
795 for (indexsmn = 0; indexsmn < iSMN; indexsmn++)
798 for (Int_t irow = 0; irow < kRow; irow++)
800 for (Int_t icol = 0; icol < kCol; icol++)
802 fCellADC[irow][icol] =
803 (Double_t) precpvADC[indexsmn][irow][icol];
810 ismn = indexsmn + indexDDL * 6;
813 else if (indexDDL == 4)
819 else if (indexsmn >= 6 && indexsmn < 12)
821 ismn = indexsmn + 12;
825 else if (indexDDL == 5)
831 else if (indexsmn >= 6 && indexsmn < 12)
838 pmdclust->DoClust(idet,ismn,fCellADC,pmdcont);
839 Int_t nentries1 = pmdcont->GetEntries();
841 AliDebug(1,Form("Total number of clusters/module = %d",nentries1));
843 for (Int_t ient1 = 0; ient1 < nentries1; ient1++)
845 AliPMDcluster *pmdcl =
846 (AliPMDcluster*)pmdcont->UncheckedAt(ient1);
847 idet = pmdcl->GetDetector();
848 ismn = pmdcl->GetSMN();
849 clusdata[0] = pmdcl->GetClusX();
850 clusdata[1] = pmdcl->GetClusY();
851 clusdata[2] = pmdcl->GetClusADC();
852 clusdata[3] = pmdcl->GetClusCells();
853 clusdata[4] = pmdcl->GetClusSigmaX();
854 clusdata[5] = pmdcl->GetClusSigmaY();
856 AddRecPoint(idet,ismn,clusdata);
858 Int_t ncell = (Int_t) clusdata[3];
859 for(Int_t ihit = 0; ihit < ncell; ihit++)
861 Int_t celldataX = pmdcl->GetClusCellX(ihit);
862 Int_t celldataY = pmdcl->GetClusCellY(ihit);
863 AddRecHit(celldataX, celldataY);
877 for (Int_t i=0; i<iSMN; i++)
879 for (Int_t j=0; j<kRow; j++) delete [] precpvADC[i][j];
881 for (Int_t i=0; i<iSMN; i++) delete [] precpvADC[i];
887 fPMDLoader = fRunLoader->GetLoader("PMDLoader");
888 fPMDLoader->WriteRecPoints("OVERWRITE");
890 // delete the pointers
895 // ------------------------------------------------------------------------- //
896 void AliPMDClusterFinder::SetCellEdepCut(Float_t ecut)
900 // ------------------------------------------------------------------------- //
901 void AliPMDClusterFinder::AddRecPoint(Int_t idet,Int_t ismn,Float_t *clusdata)
903 // Add Reconstructed points
905 TClonesArray &lrecpoints = *fRecpoints;
906 AliPMDrecpoint1 *newrecpoint;
907 newrecpoint = new AliPMDrecpoint1(idet, ismn, clusdata);
908 new(lrecpoints[fNpoint++]) AliPMDrecpoint1(newrecpoint);
911 // ------------------------------------------------------------------------- //
912 void AliPMDClusterFinder::AddRecHit(Int_t celldataX,Int_t celldataY)
914 // Add associated cell hits to the Reconstructed points
916 TClonesArray &lrechits = *fRechits;
917 AliPMDrechit *newrechit;
918 newrechit = new AliPMDrechit(celldataX, celldataY);
919 new(lrechits[fNhit++]) AliPMDrechit(newrechit);
922 // ------------------------------------------------------------------------- //
923 void AliPMDClusterFinder::ResetCellADC()
925 // Reset the individual cell ADC value to zero
927 for(Int_t irow = 0; irow < fgkRow; irow++)
929 for(Int_t icol = 0; icol < fgkCol; icol++)
931 fCellADC[irow][icol] = 0.;
935 // ------------------------------------------------------------------------- //
937 void AliPMDClusterFinder::ResetRecpoint()
939 // Clear the list of reconstructed points
941 if (fRecpoints) fRecpoints->Clear();
943 // ------------------------------------------------------------------------- //
944 void AliPMDClusterFinder::ResetRechit()
946 // Clear the list of reconstructed points
948 if (fRechits) fRechits->Clear();
950 // ------------------------------------------------------------------------- //
951 void AliPMDClusterFinder::Load()
953 // Load all the *.root files
955 fPMDLoader->LoadDigits("READ");
956 fPMDLoader->LoadRecPoints("recreate");
958 // ------------------------------------------------------------------------- //
959 void AliPMDClusterFinder::LoadClusters()
961 // Load all the *.root files
963 fPMDLoader->LoadRecPoints("recreate");
965 // ------------------------------------------------------------------------- //
966 void AliPMDClusterFinder::UnLoad()
968 // Unload all the *.root files
970 fPMDLoader->UnloadDigits();
971 fPMDLoader->UnloadRecPoints();
973 // ------------------------------------------------------------------------- //
974 void AliPMDClusterFinder::UnLoadClusters()
976 // Unload all the *.root files
978 fPMDLoader->UnloadRecPoints();
980 // ------------------------------------------------------------------------- //
982 AliPMDCalibData* AliPMDClusterFinder::GetCalibGain() const
984 // The run number will be centralized in AliCDBManager,
985 // you don't need to set it here!
987 AliCDBEntry *entry = AliCDBManager::Instance()->Get("PMD/Calib/Gain");
989 if(!entry) AliFatal("Calibration object retrieval failed! ");
991 AliPMDCalibData *calibdata=0;
992 if (entry) calibdata = (AliPMDCalibData*) entry->GetObject();
994 if (!calibdata) AliFatal("No calibration data from calibration database !");
999 // ------------------------------------------------------------------------- //
1001 AliPMDPedestal* AliPMDClusterFinder::GetCalibPed() const
1003 // The run number will be centralized in AliCDBManager,
1004 // you don't need to set it here!
1005 AliCDBEntry *entry = AliCDBManager::Instance()->Get("PMD/Calib/Ped");
1007 if(!entry) AliFatal("Pedestal object retrieval failed!");
1009 AliPMDPedestal *pedestal = 0;
1010 if (entry) pedestal = (AliPMDPedestal*) entry->GetObject();
1012 if (!pedestal) AliFatal("No pedestal data from pedestal database !");