- TFile *pedfile = new TFile("PMD_PED.root");
-
- if(!pedfile)
- {
- printf("ERROR --- NO PEDESTAL (PMD_PED.root) FILE IS FOUND IN THE CURRENT DIRECTORY--- STOP GAIN DA\n");
- return -3;
- }
-
-
- Float_t fPedMeanRMS[2][24][48][96];
-
- for(Int_t i = 0; i < 2; i++)
- {
- for(Int_t j = 0; j < 24; j++)
- {
- for(Int_t k = 0; k < 48; k++)
- {
- for(Int_t l = 0; l < 96; l++)
- {
- fPedMeanRMS[i][j][k][l] = 0.;
- }
- }
- }
- }
-
- Int_t det, sm, row, col;
- Float_t mean, rms;
-
- TTree *ped =(TTree*)pedfile->Get("ped");
-
- ped->SetBranchAddress("det",&det);
- ped->SetBranchAddress("sm",&sm);
- ped->SetBranchAddress("row",&row);
- ped->SetBranchAddress("col",&col);
- ped->SetBranchAddress("mean",&mean);
- ped->SetBranchAddress("rms",&rms);
-
- Int_t nentries = (Int_t)ped->GetEntries();
-
- for (Int_t ient = 0; ient < nentries; ient++)
- {
- ped->GetEntry(ient);
- fPedMeanRMS[det][sm][row][col] = mean + 10.*rms;
- //printf("Mean= %f, RMS= %f, PedMeanRMS=%f\n",mean,rms,fPedMeanRMS[det][sm][row][col]);
-
- }
-
-
- pedfile->Close();
- delete pedfile;
- pedfile = 0x0;
-
-
-