Skip to content
Snippets Groups Projects
Commit 4fe33ab7 authored by Carlos Yero's avatar Carlos Yero Committed by Mark Jones
Browse files

Updates to THcShowerPlane

  Add "Good" variables to calorimeter class
     occupancies and multiplicities
     required to pass time and threshold cut
  Change some variables from arrays to vectors
  Modify how thresholds are calculated
  Remove obsolete variables: posadchits, negadchits
  Add flash adc debug flag
  Correctly delete pointers in destructor
parent 589c8b27
No related branches found
No related tags found
No related merge requests found
...@@ -56,11 +56,23 @@ THcShowerArray::THcShowerArray( const char* name, ...@@ -56,11 +56,23 @@ THcShowerArray::THcShowerArray( const char* name,
THcShowerArray::~THcShowerArray() THcShowerArray::~THcShowerArray()
{ {
// Destructor // Destructor
delete fXPos;
delete fYPos; for (UInt_t i=0; i<fNRows; i++) {
delete fZPos; delete [] fXPos[i];
delete [] fYPos[i];
delete [] fZPos[i];
}
delete [] fPedLimit;
delete [] fGain;
delete [] fPedSum;
delete [] fPedSum2;
delete [] fPedCount;
delete [] fSig;
delete [] fPed;
delete [] fThresh;
delete fADCHits; delete fADCHits; fADCHits = NULL;
delete frAdcPedRaw; frAdcPedRaw = NULL; delete frAdcPedRaw; frAdcPedRaw = NULL;
delete frAdcErrorFlag; frAdcErrorFlag = NULL; delete frAdcErrorFlag; frAdcErrorFlag = NULL;
...@@ -72,11 +84,11 @@ THcShowerArray::~THcShowerArray() ...@@ -72,11 +84,11 @@ THcShowerArray::~THcShowerArray()
delete frAdcPulseInt; frAdcPulseInt = NULL; delete frAdcPulseInt; frAdcPulseInt = NULL;
delete frAdcPulseAmp; frAdcPulseAmp = NULL; delete frAdcPulseAmp; frAdcPulseAmp = NULL;
delete [] fA; // delete [] fA;
delete [] fP; //delete [] fP;
delete [] fA_p; // delete [] fA_p;
delete [] fE; //delete [] fE;
delete [] fBlock_ClusterID; delete [] fBlock_ClusterID;
} }
...@@ -135,9 +147,13 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date ) ...@@ -135,9 +147,13 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
{"cal_ped_sample_high", &fPedSampHigh, kInt, 0, 1}, {"cal_ped_sample_high", &fPedSampHigh, kInt, 0, 1},
{"cal_data_sample_low", &fDataSampLow, kInt, 0, 1}, {"cal_data_sample_low", &fDataSampLow, kInt, 0, 1},
{"cal_data_sample_high", &fDataSampHigh, kInt, 0, 1}, {"cal_data_sample_high", &fDataSampHigh, kInt, 0, 1},
{"cal_debug_adc", &fDebugAdc, kInt, 0, 1},
{0} {0}
}; };
gHcParms->LoadParmValues((DBRequest*)&list, prefix);
fDebugAdc = 0; // Set ADC debug parameter to false unless set in parameter file
gHcParms->LoadParmValues((DBRequest*)&list, prefix);
fADCMode=kADCDynamicPedestal; fADCMode=kADCDynamicPedestal;
fAdcTimeWindowMin=0; fAdcTimeWindowMin=0;
fAdcTimeWindowMax=10000; fAdcTimeWindowMax=10000;
...@@ -307,14 +323,24 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date ) ...@@ -307,14 +323,24 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
InitializePedestals(); InitializePedestals();
// Event by event amplitude and pedestal // Event by event amplitude and pedestal
fA = new Double_t[fNelem]; //fA = new Double_t[fNelem];
fP = new Double_t[fNelem]; //fP = new Double_t[fNelem];
fA_p = new Double_t[fNelem]; //fA_p = new Double_t[fNelem];
fE = vector<Double_t> (fNelem, 0.0);
fNumGoodAdcHits = vector<Int_t> (fNelem, 0.0);
fGoodAdcPulseIntRaw = vector<Double_t> (fNelem, 0.0);
fGoodAdcPed = vector<Double_t> (fNelem, 0.0);
fGoodAdcPulseInt = vector<Double_t> (fNelem, 0.0);
fGoodAdcPulseAmp = vector<Double_t> (fNelem, 0.0);
fGoodAdcPulseTime = vector<Double_t> (fNelem, 0.0);
fBlock_ClusterID = new Int_t[fNelem]; fBlock_ClusterID = new Int_t[fNelem];
// Energy depositions per block. // Energy depositions per block.
fE = new Double_t[fNelem]; //fE = new Double_t[fNelem];
#ifdef HITPIC #ifdef HITPIC
hitpic = new char*[fNRows]; hitpic = new char*[fNRows];
...@@ -345,35 +371,49 @@ Int_t THcShowerArray::DefineVariables( EMode mode ) ...@@ -345,35 +371,49 @@ Int_t THcShowerArray::DefineVariables( EMode mode )
fIsSetup = ( mode == kDefine ); fIsSetup = ( mode == kDefine );
// Register variables in global list // Register variables in global list
RVarDef vars[] = { vector<RVarDef> vars;
{"adchits", "List of ADC hits", "fADCHits.THcSignalHit.GetPaddleNumber()"},
{"a", "Raw ADC Amplitude", "fA"}, //{"adchits", "List of ADC hits", "fADCHits.THcSignalHit.GetPaddleNumber()"}, // appears an empty histogram in the root file
{"p", "Dynamic ADC Pedestal", "fP"},
{"a_p", "Sparsified, ped-subtracted ADC Amplitudes", "fA_p"}, vars.push_back(RVarDef{"adcErrorFlag", "Error Flag When FPGA Fails", "frAdcErrorFlag.THcSignalHit.GetData()"});
{ "nhits", "Number of hits", "fNhits" },
{ "nghits", "Number of good hits ( pass threshold on raw ADC)", "fNgoodhits" }, vars.push_back(RVarDef{"adcCounter", "List of ADC counter numbers.", "frAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"}); //raw occupancy
{ "nclust", "Number of clusters", "fNclust" }, vars.push_back(RVarDef{"numGoodAdcHits", "Number of Good ADC Hits per PMT", "fNumGoodAdcHits" }); //good occupancy
{"e", "Energy Depositions per block", "fE"},
{"block_clusterID", "Cluster ID number", "fBlock_ClusterID"}, vars.push_back(RVarDef{"totNumAdcHits", "Total Number of ADC Hits", "fTotNumAdcHits" }); // raw multiplicity
{"earray", "Energy Deposition in array", "fEarray"}, vars.push_back(RVarDef{"totNumGoodAdcHits", "Total Number of Good ADC Hits", "fTotNumGoodAdcHits" }); // good multiplicity
{ "ntracks", "Number of shower tracks", "fNtracks" },
{"adcCounter", "List of ADC counter numbers.", "frAdcPulseIntRaw.THcSignalHit.GetPaddleNumber()"}, vars.push_back(RVarDef{"goodAdcPulseIntRaw", "Good Raw ADC Pulse Integrals", "fGoodAdcPulseIntRaw"}); //this is defined as pulseIntRaw, NOT ADC Amplitude in FillADC_DynamicPedestal() method
vars.push_back(RVarDef{"goodAdcPed", "Good ADC Pedestals", "fGoodAdcPed"});
{"adcPedRaw", "List of raw ADC pedestals", "frAdcPedRaw.THcSignalHit.GetData()"}, vars.push_back(RVarDef{"goodAdcPulseInt", "Good ADC Pulse Integrals", "fGoodAdcPulseInt"}); //this is defined as pulseInt, which is the pedestal subtracted pulse integrals, and is defined if threshold is passed
{"adcErrorFlag", "List of raw ADC pedestals", "frAdcErrorFlag.THcSignalHit.GetData()"}, vars.push_back(RVarDef{"goodAdcPulseAmp", "Good ADC Pulse Amplitudes", "fGoodAdcPulseAmp"});
{"adcPulseIntRaw", "List of raw ADC pulse integrals.", "frAdcPulseIntRaw.THcSignalHit.GetData()"}, vars.push_back(RVarDef{"goodAdcPulseTime", "Good ADC Pulse Times", "fGoodAdcPulseTime"}); //this is defined as pulseInt, which is the pedestal subtracted pulse integrals, and is defined if threshold is passed
{"adcPulseAmpRaw", "List of raw ADC pulse amplitudes.", "frAdcPulseAmpRaw.THcSignalHit.GetData()"},
{"adcPulseTimeRaw", "List of raw ADC pulse times.", "frAdcPulseTimeRaw.THcSignalHit.GetData()"},
vars.push_back(RVarDef{"e", "Energy Depositions per block", "fE"}); //defined as fE = fA_p*fGain = pulseInt * Gain
{"adcPed", "List of ADC pedestals", "frAdcPed.THcSignalHit.GetData()"}, vars.push_back(RVarDef{"earray", "Energy Deposition in Shower Array", "fEarray"}); //defined as a Double_t and represents a sum of the total deposited energy in the shower counter
{"adcPulseInt", "List of ADC pulse integrals.", "frAdcPulseInt.THcSignalHit.GetData()"},
{"adcPulseAmp", "List of ADC pulse amplitudes.", "frAdcPulseAmp.THcSignalHit.GetData()"}, vars.push_back(RVarDef{"nclust", "Number of clusters", "fNclust" }); //what is the difference between nclust defined here and that in THcShower.cxx ?
vars.push_back(RVarDef{"block_clusterID", "Cluster ID number", "fBlock_ClusterID"}); // im NOT very clear about this. it is histogrammed at wither -1 or 0.
{ 0 } vars.push_back(RVarDef{"ntracks", "Number of shower tracks", "fNtracks" }); //number of cluster-to-track associations
};
if (fDebugAdc) {
vars.push_back(RVarDef{"adcPedRaw", "List of raw ADC pedestals", "frAdcPedRaw.THcSignalHit.GetData()"});
vars.push_back(RVarDef{"adcPulseIntRaw", "List of raw ADC pulse integrals.", "frAdcPulseIntRaw.THcSignalHit.GetData()"});
vars.push_back(RVarDef{"adcPulseAmpRaw", "List of raw ADC pulse amplitudes.", "frAdcPulseAmpRaw.THcSignalHit.GetData()"});
vars.push_back(RVarDef{"adcPulseTimeRaw", "List of raw ADC pulse times.", "frAdcPulseTimeRaw.THcSignalHit.GetData()"});
vars.push_back(RVarDef{"adcPed", "List of ADC pedestals", "frAdcPed.THcSignalHit.GetData()"});
vars.push_back(RVarDef{"adcPulseInt", "List of ADC pulse integrals.", "frAdcPulseInt.THcSignalHit.GetData()"});
vars.push_back(RVarDef{"adcPulseAmp", "List of ADC pulse amplitudes.", "frAdcPulseAmp.THcSignalHit.GetData()"});
}
return DefineVarsFromList( vars, mode ); RVarDef end {0};
vars.push_back(end);
return DefineVarsFromList(vars.data(), mode );
} }
//_____________________________________________________________________________ //_____________________________________________________________________________
...@@ -382,8 +422,8 @@ void THcShowerArray::Clear( Option_t* ) ...@@ -382,8 +422,8 @@ void THcShowerArray::Clear( Option_t* )
// Clears the hit lists // Clears the hit lists
fADCHits->Clear(); fADCHits->Clear();
fNhits = 0; fTotNumAdcHits = 0;
fNgoodhits = 0; fTotNumGoodAdcHits = 0;
fNclust = 0; fNclust = 0;
fClustSize = 0; fClustSize = 0;
fNtracks = 0; fNtracks = 0;
...@@ -408,6 +448,16 @@ void THcShowerArray::Clear( Option_t* ) ...@@ -408,6 +448,16 @@ void THcShowerArray::Clear( Option_t* )
frAdcPulseInt->Clear(); frAdcPulseInt->Clear();
frAdcPulseAmp->Clear(); frAdcPulseAmp->Clear();
for (UInt_t ielem = 0; ielem < fGoodAdcPed.size(); ielem++) {
fGoodAdcPulseIntRaw.at(ielem) = 0.0;
fGoodAdcPed.at(ielem) = 0.0;
fGoodAdcPulseInt.at(ielem) = 0.0;
fGoodAdcPulseAmp.at(ielem) = 0.0;
fGoodAdcPulseTime.at(ielem) = 0.0;
fNumGoodAdcHits.at(ielem) = 0.0;
fE.at(ielem) = 0.0;
}
} }
//_____________________________________________________________________________ //_____________________________________________________________________________
...@@ -424,7 +474,6 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks ) ...@@ -424,7 +474,6 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks )
// Fill set of unclustered shower array hits. // Fill set of unclustered shower array hits.
// Reuse hit class pertained to the HMS/SOS type calorimeters. // Reuse hit class pertained to the HMS/SOS type calorimeters.
// Save Y coordinate of the hit in Z parameter of the class.
// Save energy deposition in the module as hit mean energy, do not use // Save energy deposition in the module as hit mean energy, do not use
// positive and negative side energies. // positive and negative side energies.
...@@ -434,7 +483,7 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks ) ...@@ -434,7 +483,7 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks )
for(UInt_t j=0; j < fNColumns; j++) { for(UInt_t j=0; j < fNColumns; j++) {
for (UInt_t i=0; i<fNRows; i++) { for (UInt_t i=0; i<fNRows; i++) {
if (fA_p[k] > 0) { //hit if (fGoodAdcPulseInt.at(k) > 0) { //hit
THcShowerHit* hit = THcShowerHit* hit =
new THcShowerHit(i, j, fXPos[i][j], fYPos[i][j], fZPos[i][j], fE[k], 0., 0.); new THcShowerHit(i, j, fXPos[i][j], fYPos[i][j], fZPos[i][j], fE[k], 0., 0.);
...@@ -454,13 +503,22 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks ) ...@@ -454,13 +503,22 @@ Int_t THcShowerArray::CoarseProcess( TClonesArray& tracks )
cout << "Debug output from THcShowerArray::CoarseProcess for " << GetName() cout << "Debug output from THcShowerArray::CoarseProcess for " << GetName()
<< endl; << endl;
cout << " List of unclustered hits. Total hits: " << fNhits << endl; cout << " List of unclustered hits. Total hits: " << fTotNumAdcHits << endl;
THcShowerHitIt it = HitSet.begin(); //<set> version THcShowerHitIt it = HitSet.begin(); //<set> version
for (Int_t i=0; i!=fNgoodhits; i++) { for (Int_t i=0; i!=fTotNumGoodAdcHits; i++) {
cout << " hit " << i << ": "; cout << " hit " << i << ": ";
(*(it++))->show(); (*(it++))->show();
} }
} }
////Sanity check. (Vardan)
// if ((int)HitSet.size() != fTotNumGoodAdcHits) {
// cout << "***" << endl;
// cout << "*** THcShowerArray::CoarseProcess: HitSet.size = " << HitSet.size()
// << " != fTotNumGoodAdcHits = " << fTotNumGoodAdcHits << endl;
// cout << "***" << endl;
// }
// Cluster hits and fill list of clusters. // Cluster hits and fill list of clusters.
...@@ -718,7 +776,7 @@ Int_t THcShowerArray::CoarseProcessHits() ...@@ -718,7 +776,7 @@ Int_t THcShowerArray::CoarseProcessHits()
Int_t k=0; Int_t k=0;
for(UInt_t j=0; j < fNColumns; j++) { for(UInt_t j=0; j < fNColumns; j++) {
for (UInt_t i=0; i<fNRows; i++) { for (UInt_t i=0; i<fNRows; i++) {
if(fA[k] > fThresh[k]) { if(fGoodAdcPulseIntRaw.at(k) > fThresh[k]) {
cout << " counter = " << k cout << " counter = " << k
<< " E = " << fE[k] << " E = " << fE[k]
<< endl; << endl;
...@@ -763,19 +821,30 @@ void THcShowerArray::FillADC_DynamicPedestal() ...@@ -763,19 +821,30 @@ void THcShowerArray::FillADC_DynamicPedestal()
{ {
for (Int_t ielem=0;ielem<frAdcPulseInt->GetEntries();ielem++) { for (Int_t ielem=0;ielem<frAdcPulseInt->GetEntries();ielem++) {
Int_t npad = ((THcSignalHit*) frAdcPulseInt->ConstructedAt(ielem))->GetPaddleNumber() - 1; Int_t npad = ((THcSignalHit*) frAdcPulseInt->ConstructedAt(ielem))->GetPaddleNumber() - 1;
Double_t pulseInt = ((THcSignalHit*) frAdcPulseInt->ConstructedAt(ielem))->GetData();
Double_t pulseIntRaw = ((THcSignalHit*) frAdcPulseIntRaw->ConstructedAt(ielem))->GetData(); Double_t pulseIntRaw = ((THcSignalHit*) frAdcPulseIntRaw->ConstructedAt(ielem))->GetData();
Double_t pulsePed = ((THcSignalHit*) frAdcPed->ConstructedAt(ielem))->GetData();
Double_t pulseInt = ((THcSignalHit*) frAdcPulseInt->ConstructedAt(ielem))->GetData();
Double_t pulseAmp = ((THcSignalHit*) frAdcPulseAmp->ConstructedAt(ielem))->GetData();
Double_t pulseTime = ((THcSignalHit*) frAdcPulseTimeRaw->ConstructedAt(ielem))->GetData(); Double_t pulseTime = ((THcSignalHit*) frAdcPulseTimeRaw->ConstructedAt(ielem))->GetData();
Double_t errorflag = ((THcSignalHit*) frAdcErrorFlag->ConstructedAt(ielem))->GetData(); Bool_t errorflag = ((THcSignalHit*) frAdcErrorFlag->ConstructedAt(ielem))->GetData();
Bool_t pulseTimeCut = (pulseTime > fAdcTimeWindowMin) && (pulseTime < fAdcTimeWindowMax); Bool_t pulseTimeCut = (pulseTime > fAdcTimeWindowMin) && (pulseTime < fAdcTimeWindowMax);
if (errorflag==0 && pulseTimeCut) { if (!errorflag && pulseTimeCut) {
fNhits++; fTotNumAdcHits++;
fA[npad] =pulseIntRaw; fGoodAdcPulseIntRaw.at(npad) = pulseIntRaw;
if(fA[npad] > fThresh[npad]) {
fNgoodhits++; if(fGoodAdcPulseIntRaw.at(npad) > fThresh[npad]) {
fA_p[npad] =pulseInt ; fTotNumGoodAdcHits++;
fE[npad] = fA_p[npad]*fGain[npad]; fGoodAdcPulseInt.at(npad) = pulseInt;
fEarray += fE[npad]; fE.at(npad) = fGoodAdcPulseInt.at(npad)*fGain[npad];
fEarray += fE.at(npad);
fGoodAdcPed.at(npad) = pulsePed;
fGoodAdcPulseAmp.at(npad) = pulseAmp;
fGoodAdcPulseTime.at(npad) = pulseTime;
fNumGoodAdcHits.at(npad) = npad + 1;
} }
} }
} }
...@@ -804,9 +873,10 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit) ...@@ -804,9 +873,10 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
frAdcPulseAmp->Clear(); frAdcPulseAmp->Clear();
for(Int_t i=0;i<fNelem;i++) { for(Int_t i=0;i<fNelem;i++) {
fA[i] = 0; //fA[i] = 0;
fA_p[i] = 0; //fA_p[i] = 0;
fE[i] = 0; //fE[i] = 0;
fBlock_ClusterID[i] = -1; fBlock_ClusterID[i] = -1;
} }
...@@ -854,7 +924,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit) ...@@ -854,7 +924,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
} }
#if 0 #if 0
if(fNgoodhits > 0) { if(fTotNumGoodAdcHits > 0) {
cout << "+"; cout << "+";
for(Int_t column=0;column<fNColumns;column++) { for(Int_t column=0;column<fNColumns;column++) {
cout << "-"; cout << "-";
...@@ -864,7 +934,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit) ...@@ -864,7 +934,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
cout << "|"; cout << "|";
for(Int_t column=0;column<fNColumns;column++) { for(Int_t column=0;column<fNColumns;column++) {
Int_t counter = column*fNRows + row; Int_t counter = column*fNRows + row;
if(fA[counter]>threshold) { if(fGoodAdcPulseIntRaw.at(counter) > threshold) {
cout << "X"; cout << "X";
} else { } else {
cout << " "; cout << " ";
...@@ -875,14 +945,14 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit) ...@@ -875,14 +945,14 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
} }
#endif #endif
#ifdef HITPIC #ifdef HITPIC
if(fNgoodhits > 0) { if(fTotNumGoodAdcHits > 0) {
for(Int_t row=0;row<fNRows;row++) { for(Int_t row=0;row<fNRows;row++) {
if(piccolumn==0) { if(piccolumn==0) {
hitpic[row][0] = '|'; hitpic[row][0] = '|';
} }
for(Int_t column=0;column<fNColumns;column++) { for(Int_t column=0;column<fNColumns;column++) {
Int_t counter = column*fNRows+row; Int_t counter = column*fNRows+row;
if(fA[counter] > threshold) { if(fGoodAdcPulseIntRaw.at(counter) > threshold) {
hitpic[row][piccolumn*(fNColumns+1)+column+1] = 'X'; hitpic[row][piccolumn*(fNColumns+1)+column+1] = 'X';
} else { } else {
hitpic[row][piccolumn*(fNColumns+1)+column+1] = ' '; hitpic[row][piccolumn*(fNColumns+1)+column+1] = ' ';
...@@ -898,7 +968,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit) ...@@ -898,7 +968,7 @@ Int_t THcShowerArray::ProcessHits(TClonesArray* rawhits, Int_t nexthit)
cout << "-"; cout << "-";
} }
cout << "+"; cout << "+";
} 0 }
cout << endl; cout << endl;
for(Int_t row=0;row<fNRows;row++) { for(Int_t row=0;row<fNRows;row++) {
hitpic[row][(piccolumn+1)*(fNColumns+1)+1] = '\0'; hitpic[row][(piccolumn+1)*(fNColumns+1)+1] = '\0';
......
...@@ -95,11 +95,27 @@ protected: ...@@ -95,11 +95,27 @@ protected:
char **hitpic; char **hitpic;
Int_t piccolumn; Int_t piccolumn;
#endif #endif
Double_t* fA; // [fNelem] ADC amplitudes of blocks
Double_t* fP; // [fNelem] Event by event (FADC) pedestals
Double_t* fA_p; // [fNelem] sparsified, pedestal subtracted
// (FASTBUS) ADC amplitudes
//counting variables
Int_t fTotNumAdcHits; // Total number of ADC hits
Int_t fTotNumGoodAdcHits; // Total number of good ADC hits (pass threshold)
vector<Int_t> fNumGoodAdcHits; // shower good occupancy
vector<Double_t> fGoodAdcPulseIntRaw; // [fNelem] Good Raw ADC pulse Integrals of blocks
vector<Double_t> fGoodAdcPed; // [fNelem] Event by event (FADC) good pulse pedestals
vector<Double_t> fGoodAdcPulseInt; // [fNelem] good pedestal subtracted pulse integrals
vector<Double_t> fGoodAdcPulseAmp;
vector<Double_t> fGoodAdcPulseTime;
vector<Double_t> fE; //[fNelem] energy deposition in shower blocks
Int_t* fBlock_ClusterID; // [fNelem] Cluster ID of the block -1 then not in a cluster
Double_t fEarray; // Total Energy deposition in the array.
TClonesArray* fADCHits; // List of ADC hits TClonesArray* fADCHits; // List of ADC hits
// Parameters // Parameters
...@@ -128,7 +144,9 @@ protected: ...@@ -128,7 +144,9 @@ protected:
Double_t fAdcTimeWindowMin ; Double_t fAdcTimeWindowMin ;
Double_t fAdcTimeWindowMax ; Double_t fAdcTimeWindowMax ;
Double_t fAdcThreshold ; Double_t fAdcThreshold ;
Int_t fPedSampLow; // Sample range for
Int_t fDebugAdc;
Int_t fPedSampLow; // Sample range for
Int_t fPedSampHigh; // dynamic pedestal Int_t fPedSampHigh; // dynamic pedestal
Int_t fDataSampLow; // Sample range for Int_t fDataSampLow; // Sample range for
Int_t fDataSampHigh; // sample integration Int_t fDataSampHigh; // sample integration
...@@ -152,15 +170,7 @@ Int_t fPedSampLow; // Sample range for ...@@ -152,15 +170,7 @@ Int_t fPedSampLow; // Sample range for
Float_t *fThresh; // [fNelem] ADC thresholds Float_t *fThresh; // [fNelem] ADC thresholds
Double_t* fGain; // [fNelem] Gain constants from calibration Double_t* fGain; // [fNelem] Gain constants from calibration
//Energy depositions.
Double_t* fE; // [fNelem] energy depositions in the blocks.
Int_t* fBlock_ClusterID; // [fNelem] Cluster ID of the block -1 then not in a cluster
Double_t fEarray; // Total Energy deposition in the array.
Int_t fNhits; // Total number of hits
Int_t fNgoodhits; // Total number of good hits (pass threshold)
Int_t fNclust; // Number of hit clusters Int_t fNclust; // Number of hit clusters
Int_t fNtracks; // Number of shower tracks, i.e. number of Int_t fNtracks; // Number of shower tracks, i.e. number of
// cluster-to-track associations // cluster-to-track associations
......
This diff is collapsed.
...@@ -16,9 +16,11 @@ ...@@ -16,9 +16,11 @@
#include "TClonesArray.h" #include "TClonesArray.h"
#include <iostream> #include <iostream>
#include <vector>
#include <fstream> #include <fstream>
using namespace std;
class THaEvData; class THaEvData;
class THaSignalHit; class THaSignalHit;
...@@ -76,19 +78,19 @@ public: ...@@ -76,19 +78,19 @@ public:
}; };
Double_t GetAposP(Int_t i) { Double_t GetAposP(Int_t i) {
return fA_Pos_p[i]; return fGoodPosAdcPulseInt[i];
}; };
Double_t GetAnegP(Int_t i) { Double_t GetAnegP(Int_t i) {
return fA_Neg_p[i]; return fGoodNegAdcPulseInt[i];
}; };
Double_t GetApos(Int_t i) { Double_t GetApos(Int_t i) {
return fA_Pos[i]; return fGoodPosAdcPulseIntRaw[i];
}; };
Double_t GetAneg(Int_t i) { Double_t GetAneg(Int_t i) {
return fA_Neg[i]; return fGoodNegAdcPulseIntRaw[i];
}; };
Double_t GetPosThr(Int_t i) { Double_t GetPosThr(Int_t i) {
...@@ -114,28 +116,54 @@ protected: ...@@ -114,28 +116,54 @@ protected:
// 1 == Use the pulse int - pulse ped // 1 == Use the pulse int - pulse ped
// 2 == Use the sample integral - known ped // 2 == Use the sample integral - known ped
// 3 == Use the sample integral - sample ped // 3 == Use the sample integral - sample ped
static const Int_t kADCStandard=0; static const Int_t kADCStandard=0;
static const Int_t kADCDynamicPedestal=1; static const Int_t kADCDynamicPedestal=1;
static const Int_t kADCSampleIntegral=2; static const Int_t kADCSampleIntegral=2;
static const Int_t kADCSampIntDynPed=3; static const Int_t kADCSampIntDynPed=3;
Int_t fPedSampLow; // Sample range for
Int_t fDebugAdc; // fADC debug flag
Int_t fPedSampLow; // Sample range for
Int_t fPedSampHigh; // dynamic pedestal Int_t fPedSampHigh; // dynamic pedestal
Int_t fDataSampLow; // Sample range for Int_t fDataSampLow; // Sample range for
Int_t fDataSampHigh; // sample integration Int_t fDataSampHigh; // sample integration
Double_t fAdcNegThreshold; // Double_t fAdcNegThreshold; //
Double_t fAdcPosThreshold; // Double_t fAdcPosThreshold; //
Double_t* fA_Pos; // [fNelem] ADC amplitudes of blocks //counting variables
Double_t* fA_Neg; // [fNelem] ADC amplitudes of blocks Int_t fTotNumPosAdcHits;
Double_t* fA_Pos_p; // [fNelem] pedestal subtracted ADC amplitudes Int_t fTotNumNegAdcHits;
Double_t* fA_Neg_p; // [fNelem] pedestal subtracted ADC amplitudes Int_t fTotNumAdcHits;
Double_t* fEpos; // [fNelem] energy depositions seen by positive PMTs Int_t fTotNumGoodPosAdcHits;
Double_t* fEneg; // [fNelem] energy depositions seen by negative PMTs Int_t fTotNumGoodNegAdcHits;
Double_t* fEmean; // [fNelem] mean energy depositions (pos + neg) Int_t fTotNumGoodAdcHits;
Double_t fEplane; // Energy deposition in the plane
//individual pmt data objects
vector<Int_t> fNumGoodPosAdcHits;
vector<Int_t> fNumGoodNegAdcHits;
vector<Double_t> fGoodPosAdcPed;
vector<Double_t> fGoodPosAdcPulseInt;
vector<Double_t> fGoodPosAdcPulseAmp;
vector<Double_t> fGoodPosAdcPulseTime;
vector<Double_t> fGoodNegAdcPed;
vector<Double_t> fGoodNegAdcPulseInt;
vector<Double_t> fGoodNegAdcPulseAmp;
vector<Double_t> fGoodNegAdcPulseTime;
vector<Double_t> fGoodPosAdcPulseIntRaw;
vector<Double_t> fGoodNegAdcPulseIntRaw;
vector<Double_t> fEpos; // [fNelem] energy depositions seen by positive PMTs
vector<Double_t> fEneg; // [fNelem] energy depositions seen by negative PMTs
vector<Double_t> fEmean; // [fNelem] mean energy depositions (pos + neg)
Double_t fEplane_pos; // Energy deposition in the plane from positive PMTs Double_t fEplane_pos; // Energy deposition in the plane from positive PMTs
Double_t fEplane_neg; // Energy deposition in the plane from negative PMTs Double_t fEplane_neg; // Energy deposition in the plane from negative PMTs
Double_t fEplane;
// These lists are not used actively for now. // These lists are not used actively for now.
TClonesArray* fPosADCHits; // List of positive ADC hits TClonesArray* fPosADCHits; // List of positive ADC hits
...@@ -163,6 +191,7 @@ protected: ...@@ -163,6 +191,7 @@ protected:
TClonesArray* frPosAdcErrorFlag; TClonesArray* frPosAdcErrorFlag;
TClonesArray* frPosAdcPedRaw; TClonesArray* frPosAdcPedRaw;
TClonesArray* frPosAdcThreshold;
TClonesArray* frPosAdcPulseIntRaw; TClonesArray* frPosAdcPulseIntRaw;
TClonesArray* frPosAdcPulseAmpRaw; TClonesArray* frPosAdcPulseAmpRaw;
TClonesArray* frPosAdcPulseTimeRaw; TClonesArray* frPosAdcPulseTimeRaw;
...@@ -173,6 +202,7 @@ protected: ...@@ -173,6 +202,7 @@ protected:
TClonesArray* frNegAdcErrorFlag; TClonesArray* frNegAdcErrorFlag;
TClonesArray* frNegAdcPedRaw; TClonesArray* frNegAdcPedRaw;
TClonesArray* frNegAdcThreshold;
TClonesArray* frNegAdcPulseIntRaw; TClonesArray* frNegAdcPulseIntRaw;
TClonesArray* frNegAdcPulseAmpRaw; TClonesArray* frNegAdcPulseAmpRaw;
TClonesArray* frNegAdcPulseTimeRaw; TClonesArray* frNegAdcPulseTimeRaw;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment