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

Add adjustment of fiducial volume limits of Shower counter to the

fly's eye part.
parent 93a087c5
No related branches found
No related tags found
No related merge requests found
...@@ -163,6 +163,19 @@ THaAnalysisObject::EStatus THcShower::Init( const TDatime& date ) ...@@ -163,6 +163,19 @@ THaAnalysisObject::EStatus THcShower::Init( const TDatime& date )
return kInitError; return kInitError;
} }
if(fHasArray) {
cout << "THcShower::Init: adjustment of fiducial volume limits to the fly's eye part." << endl;
cout << " Old limits:" << endl;
cout << " Xmin = " << fvXmin << " Xmax = " << fvXmax << endl;
cout << " Ymin = " << fvYmin << " Ymax = " << fvYmax << endl;
fvXmin = TMath::Max(fvXmin, fArray->fvXmin());
fvXmax = TMath::Min(fvXmax, fArray->fvXmax());
fvYmin = TMath::Max(fvYmin, fArray->fvYmin());
fvYmax = TMath::Min(fvYmax, fArray->fvYmax());
cout << " New limits:" << endl;
cout << " Xmin = " << fvXmin << " Xmax = " << fvXmax << endl;
cout << " Ymin = " << fvYmin << " Ymax = " << fvYmax << endl;
}
cout << "---------------------------------------------------------------\n"; cout << "---------------------------------------------------------------\n";
cout << "From THcShower::Init: initialized " << GetApparatus()->GetName() cout << "From THcShower::Init: initialized " << GetApparatus()->GetName()
......
...@@ -154,8 +154,8 @@ public: ...@@ -154,8 +154,8 @@ public:
Int_t GetNBlocks(Int_t NLayer) const { return fNBlocks[NLayer];} Int_t GetNBlocks(Int_t NLayer) const { return fNBlocks[NLayer];}
Double_t GetXPos(Int_t NLayer, Int_t NRaw) const { Double_t GetXPos(Int_t NLayer, Int_t NRow) const {
return fXPos[NLayer][NRaw]; return fXPos[NLayer][NRow];
} }
Double_t GetYPos(Int_t NLayer, Int_t Side) const { Double_t GetYPos(Int_t NLayer, Int_t Side) const {
...@@ -247,8 +247,8 @@ protected: ...@@ -247,8 +247,8 @@ protected:
Int_t fNclust; // Number of clusters Int_t fNclust; // Number of 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 association // cluster-to-track association
Double_t fEtot; // Total energy Double_t fEtot; // Total energy
Double_t fEtotNorm; // Total energy divided by spec central momentum Double_t fEtotNorm; // Total energy divided by spec central momentum
THcShowerClusterList* fClusterList; // List of hit clusters THcShowerClusterList* fClusterList; // List of hit clusters
......
...@@ -85,6 +85,9 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date ) ...@@ -85,6 +85,9 @@ Int_t THcShowerArray::ReadDatabase( const TDatime& date )
prefix[1]='\0'; prefix[1]='\0';
cout << "Parent name: " << GetParent()->GetPrefix() << endl; cout << "Parent name: " << GetParent()->GetPrefix() << endl;
fNRows=fNColumns=0;
fXFront=fYFront=fZFront=0.;
fXStep=fYStep=0.;
fUsingFADC=0; fUsingFADC=0;
fPedSampLow=0; fPedSampLow=0;
fPedSampHigh=9; fPedSampHigh=9;
...@@ -628,3 +631,31 @@ void THcShowerArray::InitializePedestals( ) ...@@ -628,3 +631,31 @@ void THcShowerArray::InitializePedestals( )
fPedCount[i] = 0; fPedCount[i] = 0;
} }
} }
//------------------------------------------------------------------------------
// Fiducial volume limits.
Double_t THcShowerArray::fvXmin() {
THcShower* fParent;
fParent = (THcShower*) GetParent();
return fXPos[0][0] - fXStep/2 + fParent->fvDelta;
}
Double_t THcShowerArray::fvYmax() {
THcShower* fParent;
fParent = (THcShower*) GetParent();
return fYPos[0][0] + fYStep/2 - fParent->fvDelta;
}
Double_t THcShowerArray::fvXmax() {
THcShower* fParent;
fParent = (THcShower*) GetParent();
return fXPos[fNRows-1][fNColumns-1] + fXStep/2 - fParent->fvDelta;
}
Double_t THcShowerArray::fvYmin() {
THcShower* fParent;
fParent = (THcShower*) GetParent();
return fYPos[fNRows-1][fNColumns-1] - fYStep/2 + fParent->fvDelta;
}
...@@ -56,6 +56,11 @@ public: ...@@ -56,6 +56,11 @@ public:
return 0.0; return 0.0;
}; };
// Fiducial volume limits.
Double_t fvXmin();
Double_t fvYmax();
Double_t fvXmax();
Double_t fvYmin();
protected: protected:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment