Skip to content
Snippets Groups Projects
Commit 1d90bdca authored by Vardan Tadevosyan's avatar Vardan Tadevosyan
Browse files

Added read in min. pedestal number fMinPeds in ShowerPlane

parent c37fb81d
Branches
Tags
No related merge requests found
......@@ -65,8 +65,8 @@
// the pedestal events
// run->SetEventRange(1,2000);// Physics Event number, does not
// include scaler or control events
run->SetEventRange(1,999999);
// run->SetEventRange(1,1);
// run->SetEventRange(1,999999);
run->SetEventRange(1,1);
// Define the analysis parameters
analyzer->SetEvent( event );
......
......@@ -235,6 +235,7 @@ Int_t THcShower::ReadDatabase( const TDatime& date )
// {"cal_neg_gain_cur", hcal_neg_gain_cur, kDouble, fNtotBlocks},
{"cal_neg_ped_limit", fShNegPedLimit, kInt, fNtotBlocks},
{"cal_neg_gain_cor", hcal_neg_gain_cor, kDouble, fNtotBlocks},
{"cal_min_peds", &fShMinPeds, kInt},
{0}
};
gHcParms->LoadParmValues((DBRequest*)&list, prefix);
......
......@@ -46,6 +46,10 @@ public:
return ( Side == 0 ? fShPosPedLimit[nelem] : fShNegPedLimit[nelem]);
}
Int_t fGetMinPeds() {
return fShMinPeds;
}
THcShower(); // for ROOT I/O
protected:
......@@ -56,6 +60,8 @@ protected:
Int_t* fShPosPedLimit;
Int_t* fShNegPedLimit;
Int_t fShMinPeds; //Min.number of events to analize/update pedestals.
// Calibration constants
Double_t* fPosCalConst;
Double_t* fNegCalConst;
......
......@@ -146,6 +146,9 @@ Int_t THcShowerPlane::ReadDatabase( const TDatime& date )
for(Int_t i=0;i<fNelem;i++) cout << " " << fNegPedLimit[i];
cout << endl;
fMinPeds = fParent->fGetMinPeds();
cout << " fMinPeds = " << fMinPeds << endl;
InitializePedestals();
return kOK;
......@@ -337,14 +340,11 @@ void THcShowerPlane::CalculatePedestals( )
void THcShowerPlane::InitializePedestals( )
{
fNPedestalEvents = 0;
fMinPeds = 500; // In engine, this is set in parameter file
fPosPedSum = new Int_t [fNelem];
fPosPedSum2 = new Int_t [fNelem];
// fPosPedLimit = new Int_t [fNelem];
fPosPedCount = new Int_t [fNelem];
fNegPedSum = new Int_t [fNelem];
fNegPedSum2 = new Int_t [fNelem];
// fNegPedLimit = new Int_t [fNelem];
fNegPedCount = new Int_t [fNelem];
fPosSig = new Double_t [fNelem];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment