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
272 // This algorithm is called during the reconstruction from digits
274 Int_t det = 0,smn = 0;
281 AliPMDcluster *pmdcl = 0x0;
283 TObjArray *pmdcont = new TObjArray();
284 AliPMDClustering *pmdclust = new AliPMDClusteringV1();
286 pmdclust->SetEdepCut(fEcut);
288 AliPMDdigit *pmddigit;
289 TBranch *branch = digitsTree->GetBranch("PMDDigit");
290 branch->SetAddress(&fDigits);
294 Int_t bufsize = 16000;
295 TBranch * branch1 = clustersTree->Branch("PMDRecpoint", &fRecpoints, bufsize);
296 TBranch * branch2 = clustersTree->Branch("PMDRechit", &fRechits, bufsize);
298 Int_t nmodules = (Int_t) digitsTree->GetEntries();
300 for (Int_t imodule = 0; imodule < nmodules; imodule++)
305 digitsTree->GetEntry(imodule);
306 Int_t nentries = fDigits->GetLast();
307 for (Int_t ient = 0; ient < nentries+1; ient++)
309 pmddigit = (AliPMDdigit*)fDigits->UncheckedAt(ient);
311 det = pmddigit->GetDetector();
312 smn = pmddigit->GetSMNumber();
313 xpos = pmddigit->GetRow();
314 ypos = pmddigit->GetColumn();
315 adc = pmddigit->GetADC();
316 if(xpos < 0 || xpos > 48 || ypos < 0 || ypos > 96)
318 AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
323 // Pedestal Subtraction
324 Int_t pedmeanrms = fCalibPed->GetPedMeanRms(det,smn,xpos,ypos);
325 Int_t pedrms1 = (Int_t) pedmeanrms%1000;
326 Float_t pedrms = (Float_t)pedrms1/10.;
327 Float_t pedmean = (Float_t) (pedmeanrms - pedrms1)/1000.0;
328 //printf("%f %f\n",pedmean, pedrms);
330 Float_t adc1 = adc - (pedmean + 3.0*pedrms);
333 Float_t gain = fCalibGain->GetGainFact(det,smn,xpos,ypos);
334 // printf("adc = %d gain = %f\n",adc,gain);
338 //Int_t trno = pmddigit->GetTrackNumber();
339 fCellADC[xpos][ypos] = (Double_t) adc;
348 if (totADCMod <= 0) continue;
350 pmdclust->DoClust(idet,ismn,fCellADC,pmdcont);
352 Int_t nentries1 = pmdcont->GetEntries();
354 AliDebug(1,Form("Total number of clusters/module = %d",nentries1));
356 for (Int_t ient1 = 0; ient1 < nentries1; ient1++)
358 pmdcl = (AliPMDcluster*)pmdcont->UncheckedAt(ient1);
359 idet = pmdcl->GetDetector();
360 ismn = pmdcl->GetSMN();
361 clusdata[0] = pmdcl->GetClusX();
362 clusdata[1] = pmdcl->GetClusY();
363 clusdata[2] = pmdcl->GetClusADC();
364 clusdata[3] = pmdcl->GetClusCells();
365 clusdata[4] = pmdcl->GetClusSigmaX();
366 clusdata[5] = pmdcl->GetClusSigmaY();
368 AddRecPoint(idet,ismn,clusdata);
370 Int_t ncell = (Int_t) clusdata[3];
371 for(Int_t ihit = 0; ihit < ncell; ihit++)
373 Int_t celldataX = pmdcl->GetClusCellX(ihit);
374 Int_t celldataY = pmdcl->GetClusCellY(ihit);
375 AddRecHit(celldataX, celldataY);
389 // delete the pointers
394 // ------------------------------------------------------------------------- //
396 void AliPMDClusterFinder::Digits2RecPoints(AliRawReader *rawReader,
399 // Converts RAW data to recpoints after running clustering
400 // algorithm on CPV and PREshower plane
402 // This method is called at the time of reconstruction
405 AliPMDddldata *pmdddl = 0x0;
406 AliPMDcluster *pmdcl = 0x0;
410 TObjArray pmdddlcont;
412 TObjArray *pmdcont = new TObjArray();
414 AliPMDClustering *pmdclust = new AliPMDClusteringV1();
416 pmdclust->SetEdepCut(fEcut);
420 Int_t bufsize = 16000;
421 TBranch *branch1 = clustersTree->Branch("PMDRecpoint", &fRecpoints, bufsize);
423 TBranch * branch2 = clustersTree->Branch("PMDRechit", &fRechits, bufsize);
425 const Int_t kRow = 48;
426 const Int_t kCol = 96;
432 AliPMDRawStream pmdinput(rawReader);
434 while ((indexDDL = pmdinput.DdlData(&pmdddlcont)) >=0)
440 else if (indexDDL >= 4)
445 precpvADC = new int **[iSMN];
446 for (Int_t i=0; i<iSMN; i++) precpvADC[i] = new int *[kRow];
447 for (Int_t i=0; i<iSMN;i++)
449 for (Int_t j=0; j<kRow; j++) precpvADC[i][j] = new int [kCol];
451 for (Int_t i = 0; i < iSMN; i++)
453 for (Int_t j = 0; j < kRow; j++)
455 for (Int_t k = 0; k < kCol; k++)
457 precpvADC[i][j][k] = 0;
464 Int_t ientries = pmdddlcont.GetEntries();
465 for (Int_t ient = 0; ient < ientries; ient++)
467 pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient);
469 Int_t det = pmdddl->GetDetector();
470 Int_t smn = pmdddl->GetSMN();
471 //Int_t mcm = pmdddl->GetMCM();
472 //Int_t chno = pmdddl->GetChannel();
473 Int_t row = pmdddl->GetRow();
474 Int_t col = pmdddl->GetColumn();
475 Int_t sig = pmdddl->GetSignal();
476 if(row < 0 || row > 48 || col < 0 || col > 96)
478 AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
482 // Pedestal Subtraction
483 Int_t pedmeanrms = fCalibPed->GetPedMeanRms(det,smn,row,col);
484 Int_t pedrms1 = (Int_t) pedmeanrms%1000;
485 Float_t pedrms = (Float_t)pedrms1/10.;
486 Float_t pedmean = (Float_t) (pedmeanrms - pedrms1)/1000.0;
488 //printf("%f %f\n",pedmean, pedrms);
490 // Float_t sig1 = (Float_t) sig;
491 Float_t sig1 = (Float_t) sig - (pedmean + 3.0*pedrms);
494 Float_t gain = fCalibGain->GetGainFact(det,smn,row,col);
495 //printf("sig = %d gain = %f\n",sig,gain);
496 sig = (Int_t) (sig1*gain);
501 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
503 indexsmn = smn - indexDDL * 6;
505 else if (indexDDL == 4)
508 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
514 else if (smn >= 18 && smn < 24)
519 else if (indexDDL == 5)
522 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
524 if (smn >= 6 && smn < 12)
528 else if (smn >= 12 && smn < 18)
533 precpvADC[indexsmn][row][col] = sig;
541 for (indexsmn = 0; indexsmn < iSMN; indexsmn++)
545 for (Int_t irow = 0; irow < kRow; irow++)
547 for (Int_t icol = 0; icol < kCol; icol++)
549 fCellADC[irow][icol] =
550 (Double_t) precpvADC[indexsmn][irow][icol];
551 totAdcMod += precpvADC[indexsmn][irow][icol];
557 ismn = indexsmn + indexDDL * 6;
560 else if (indexDDL == 4)
566 else if (indexsmn >= 6 && indexsmn < 12)
568 ismn = indexsmn + 12;
572 else if (indexDDL == 5)
578 else if (indexsmn >= 6 && indexsmn < 12)
585 if (totAdcMod <= 0) continue;
586 pmdclust->DoClust(idet,ismn,fCellADC,pmdcont);
587 Int_t nentries1 = pmdcont->GetEntries();
589 AliDebug(1,Form("Total number of clusters/module = %d",nentries1));
591 for (Int_t ient1 = 0; ient1 < nentries1; ient1++)
593 pmdcl = (AliPMDcluster*)pmdcont->UncheckedAt(ient1);
594 idet = pmdcl->GetDetector();
595 ismn = pmdcl->GetSMN();
596 clusdata[0] = pmdcl->GetClusX();
597 clusdata[1] = pmdcl->GetClusY();
598 clusdata[2] = pmdcl->GetClusADC();
599 clusdata[3] = pmdcl->GetClusCells();
600 clusdata[4] = pmdcl->GetClusSigmaX();
601 clusdata[5] = pmdcl->GetClusSigmaY();
603 AddRecPoint(idet,ismn,clusdata);
605 Int_t ncell = (Int_t) clusdata[3];
606 for(Int_t ihit = 0; ihit < ncell; ihit++)
608 Int_t celldataX = pmdcl->GetClusCellX(ihit);
609 Int_t celldataY = pmdcl->GetClusCellY(ihit);
610 AddRecHit(celldataX, celldataY);
624 for (Int_t i=0; i<iSMN; i++)
626 for (Int_t j=0; j<kRow; j++) delete [] precpvADC[i][j];
628 for (Int_t i=0; i<iSMN; i++) delete [] precpvADC[i];
635 // delete the pointers
640 // ------------------------------------------------------------------------- //
642 void AliPMDClusterFinder::Digits2RecPoints(Int_t ievt, AliRawReader *rawReader)
644 // Converts RAW data to recpoints after running clustering
645 // algorithm on CPV and PREshower plane
649 TObjArray pmdddlcont;
650 TObjArray *pmdcont = new TObjArray();
652 AliPMDClustering *pmdclust = new AliPMDClusteringV1();
654 pmdclust->SetEdepCut(fEcut);
656 fRunLoader->GetEvent(ievt);
660 fTreeR = fPMDLoader->TreeR();
663 fPMDLoader->MakeTree("R");
664 fTreeR = fPMDLoader->TreeR();
666 Int_t bufsize = 16000;
667 TBranch *branch1 = fTreeR->Branch("PMDRecpoint", &fRecpoints, bufsize);
668 TBranch *branch2 = fTreeR->Branch("PMDRechit", &fRechits, bufsize);
670 const Int_t kRow = 48;
671 const Int_t kCol = 96;
676 AliPMDRawStream pmdinput(rawReader);
679 while ((indexDDL = pmdinput.DdlData(&pmdddlcont)) >=0) {
685 else if (indexDDL >= 4)
690 precpvADC = new int **[iSMN];
691 for (Int_t i=0; i<iSMN; i++) precpvADC[i] = new int *[kRow];
692 for (Int_t i=0; i<iSMN;i++)
694 for (Int_t j=0; j<kRow; j++) precpvADC[i][j] = new int [kCol];
696 for (Int_t i = 0; i < iSMN; i++)
698 for (Int_t j = 0; j < kRow; j++)
700 for (Int_t k = 0; k < kCol; k++)
702 precpvADC[i][j][k] = 0;
710 Int_t ientries = pmdddlcont.GetEntries();
711 for (Int_t ient = 0; ient < ientries; ient++)
713 AliPMDddldata *pmdddl = (AliPMDddldata*)pmdddlcont.UncheckedAt(ient);
715 Int_t det = pmdddl->GetDetector();
716 Int_t smn = pmdddl->GetSMN();
717 //Int_t mcm = pmdddl->GetMCM();
718 //Int_t chno = pmdddl->GetChannel();
719 Int_t row = pmdddl->GetRow();
720 Int_t col = pmdddl->GetColumn();
721 Int_t sig = pmdddl->GetSignal();
722 if(row < 0 || row > 48 || col < 0 || col > 96)
724 AliError(Form("*Row %d and Column NUMBER %d NOT Valid *",
728 // Pedestal Subtraction
729 Int_t pedmeanrms = fCalibPed->GetPedMeanRms(det,smn,row,col);
730 Int_t pedrms1 = (Int_t) pedmeanrms%1000;
731 Float_t pedrms = (Float_t)pedrms1/10.;
732 Float_t pedmean = (Float_t) (pedmeanrms - pedrms1)/1000.0;
734 //printf("%f %f\n",pedmean, pedrms);
736 //Float_t sig1 = (Float_t) sig;
737 Float_t sig1 = (Float_t) sig - (pedmean + 3.0*pedrms);
739 Float_t gain = fCalibGain->GetGainFact(det,smn,row,col);
741 //printf("sig = %d gain = %f\n",sig,gain);
742 sig = (Int_t) (sig1*gain);
748 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
750 indexsmn = smn - indexDDL * 6;
752 else if (indexDDL == 4)
755 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
761 else if (smn >= 18 && smn < 24)
766 else if (indexDDL == 5)
769 AliError(Form("*DDL %d and Detector NUMBER %d NOT MATCHING *",
771 if (smn >= 6 && smn < 12)
775 else if (smn >= 12 && smn < 18)
780 precpvADC[indexsmn][row][col] = sig;
787 for (indexsmn = 0; indexsmn < iSMN; indexsmn++)
790 for (Int_t irow = 0; irow < kRow; irow++)
792 for (Int_t icol = 0; icol < kCol; icol++)
794 fCellADC[irow][icol] =
795 (Double_t) precpvADC[indexsmn][irow][icol];
802 ismn = indexsmn + indexDDL * 6;
805 else if (indexDDL == 4)
811 else if (indexsmn >= 6 && indexsmn < 12)
813 ismn = indexsmn + 12;
817 else if (indexDDL == 5)
823 else if (indexsmn >= 6 && indexsmn < 12)
830 pmdclust->DoClust(idet,ismn,fCellADC,pmdcont);
831 Int_t nentries1 = pmdcont->GetEntries();
833 AliDebug(1,Form("Total number of clusters/module = %d",nentries1));
835 for (Int_t ient1 = 0; ient1 < nentries1; ient1++)
837 AliPMDcluster *pmdcl =
838 (AliPMDcluster*)pmdcont->UncheckedAt(ient1);
839 idet = pmdcl->GetDetector();
840 ismn = pmdcl->GetSMN();
841 clusdata[0] = pmdcl->GetClusX();
842 clusdata[1] = pmdcl->GetClusY();
843 clusdata[2] = pmdcl->GetClusADC();
844 clusdata[3] = pmdcl->GetClusCells();
845 clusdata[4] = pmdcl->GetClusSigmaX();
846 clusdata[5] = pmdcl->GetClusSigmaY();
848 AddRecPoint(idet,ismn,clusdata);
850 Int_t ncell = (Int_t) clusdata[3];
851 for(Int_t ihit = 0; ihit < ncell; ihit++)
853 Int_t celldataX = pmdcl->GetClusCellX(ihit);
854 Int_t celldataY = pmdcl->GetClusCellY(ihit);
855 AddRecHit(celldataX, celldataY);
869 for (Int_t i=0; i<iSMN; i++)
871 for (Int_t j=0; j<kRow; j++) delete [] precpvADC[i][j];
873 for (Int_t i=0; i<iSMN; i++) delete [] precpvADC[i];
879 fPMDLoader = fRunLoader->GetLoader("PMDLoader");
880 fPMDLoader->WriteRecPoints("OVERWRITE");
882 // delete the pointers
887 // ------------------------------------------------------------------------- //
888 void AliPMDClusterFinder::SetCellEdepCut(Float_t ecut)
892 // ------------------------------------------------------------------------- //
893 void AliPMDClusterFinder::AddRecPoint(Int_t idet,Int_t ismn,Float_t *clusdata)
895 // Add Reconstructed points
897 TClonesArray &lrecpoints = *fRecpoints;
898 AliPMDrecpoint1 *newrecpoint;
899 newrecpoint = new AliPMDrecpoint1(idet, ismn, clusdata);
900 new(lrecpoints[fNpoint++]) AliPMDrecpoint1(newrecpoint);
903 // ------------------------------------------------------------------------- //
904 void AliPMDClusterFinder::AddRecHit(Int_t celldataX,Int_t celldataY)
906 // Add associated cell hits to the Reconstructed points
908 TClonesArray &lrechits = *fRechits;
909 AliPMDrechit *newrechit;
910 newrechit = new AliPMDrechit(celldataX, celldataY);
911 new(lrechits[fNhit++]) AliPMDrechit(newrechit);
914 // ------------------------------------------------------------------------- //
915 void AliPMDClusterFinder::ResetCellADC()
917 // Reset the individual cell ADC value to zero
919 for(Int_t irow = 0; irow < fgkRow; irow++)
921 for(Int_t icol = 0; icol < fgkCol; icol++)
923 fCellADC[irow][icol] = 0.;
927 // ------------------------------------------------------------------------- //
929 void AliPMDClusterFinder::ResetRecpoint()
931 // Clear the list of reconstructed points
933 if (fRecpoints) fRecpoints->Clear();
935 // ------------------------------------------------------------------------- //
936 void AliPMDClusterFinder::ResetRechit()
938 // Clear the list of reconstructed points
940 if (fRechits) fRechits->Clear();
942 // ------------------------------------------------------------------------- //
943 void AliPMDClusterFinder::Load()
945 // Load all the *.root files
947 fPMDLoader->LoadDigits("READ");
948 fPMDLoader->LoadRecPoints("recreate");
950 // ------------------------------------------------------------------------- //
951 void AliPMDClusterFinder::LoadClusters()
953 // Load all the *.root files
955 fPMDLoader->LoadRecPoints("recreate");
957 // ------------------------------------------------------------------------- //
958 void AliPMDClusterFinder::UnLoad()
960 // Unload all the *.root files
962 fPMDLoader->UnloadDigits();
963 fPMDLoader->UnloadRecPoints();
965 // ------------------------------------------------------------------------- //
966 void AliPMDClusterFinder::UnLoadClusters()
968 // Unload all the *.root files
970 fPMDLoader->UnloadRecPoints();
972 // ------------------------------------------------------------------------- //
974 AliPMDCalibData* AliPMDClusterFinder::GetCalibGain() const
976 // The run number will be centralized in AliCDBManager,
977 // you don't need to set it here!
979 AliCDBEntry *entry = AliCDBManager::Instance()->Get("PMD/Calib/Gain");
981 if(!entry) AliFatal("Calibration object retrieval failed! ");
983 AliPMDCalibData *calibdata=0;
984 if (entry) calibdata = (AliPMDCalibData*) entry->GetObject();
986 if (!calibdata) AliFatal("No calibration data from calibration database !");
991 // ------------------------------------------------------------------------- //
993 AliPMDPedestal* AliPMDClusterFinder::GetCalibPed() const
995 // The run number will be centralized in AliCDBManager,
996 // you don't need to set it here!
997 AliCDBEntry *entry = AliCDBManager::Instance()->Get("PMD/Calib/Ped");
999 if(!entry) AliFatal("Pedestal object retrieval failed!");
1001 AliPMDPedestal *pedestal = 0;
1002 if (entry) pedestal = (AliPMDPedestal*) entry->GetObject();
1004 if (!pedestal) AliFatal("No pedestal data from pedestal database !");