Skip to content

Commit

Permalink
Merge pull request #589 from bechenard/Mu2eII_SM21
Browse files Browse the repository at this point in the history
BaF2 calorimeter
  • Loading branch information
kutschke authored Sep 28, 2021
2 parents 8db6877 + 02923b5 commit 5bc9d27
Show file tree
Hide file tree
Showing 12 changed files with 277 additions and 196 deletions.
2 changes: 1 addition & 1 deletion CaloMC/fcl/common.fcl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BEGIN_PROLOG
HitMakerBlindTime : 500.
HitMakerDigiSampling : 5
HitMakerDigiSampling : 1
HitMakerMinPeakADC : 16
END_PROLOG

6 changes: 3 additions & 3 deletions CaloMC/fcl/prolog.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ CaloShowerStepMaker :
caloStepPointCollection : ["g4run:calorimeter"]
usePhysVolInfo : false
physVolInfoInput : "g4run"
caloMaterial : ["G4_CESIUM_IODIDE", "Polyethylene092","CarbonFiber"]
caloMaterial : ["G4_BARIUM_FLUORIDE", "Polyethylene092","CarbonFiber"]
compressData : true
eDepThreshold : 0
diagLevel : 0
Expand All @@ -41,7 +41,7 @@ CaloShowerROMaker :
#See doc-db 35519 for noise level discussion
NoiseGenerator :
{
noiseWFSize : 10000
noiseWFSize : 2000
elecNphotPerNs : 0.18
rinNphotPerNs : 0.36
darkNphotPerNs : 0.60
Expand All @@ -68,7 +68,7 @@ CaloDigiMaker :
minPeakADC : @local::HitMakerMinPeakADC
nBinsPeak : 2
endTimeBuffer : 80
bufferDigi : 16
bufferDigi : 20
diagLevel : 0
}

Expand Down
15 changes: 11 additions & 4 deletions CaloMC/src/CaloDigiMaker_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,17 @@ namespace mu2e {
{
std::vector<double> waveform(waveformSize,0.0);
fillROHits(iRO, waveform, CaloShowerROs, calorimeterCalibrations);
if (addNoise_ && generateSpotNoise_) generateNoise(waveform, iRO, calorimeterCalibrations);
if (addNoise_ && !generateSpotNoise_) noiseGenerator_.addFullNoise(waveform, false);
buildOutputDigi(iRO, waveform, noiseGenerator_.pedestal(), caloDigiColl);
}
if (addNoise_)
{
if (generateSpotNoise_) generateNoise(waveform, iRO, calorimeterCalibrations);
else noiseGenerator_.addFullNoise(waveform, false);
buildOutputDigi(iRO, waveform, noiseGenerator_.pedestal(), caloDigiColl);
}
else
{
buildOutputDigi(iRO, waveform, 0, caloDigiColl);
}
}
}


Expand Down
6 changes: 3 additions & 3 deletions CaloReco/fcl/prolog.fcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ TemplateProcessor :
{
windowPeak : 3
minPeakAmplitude : 24
numNoiseBins : 5
minDTPeaks : 20
numNoiseBins : 4
minDTPeaks : 10
psdThreshold : 0.1
chiThreshold : 1.0
refitLeadingEdge : false
Expand All @@ -38,7 +38,7 @@ CaloRecoDigiMaker :
TemplateProcessor : { @table::TemplateProcessor }
processorStrategy : "TemplateFit"
digiSampling : @local::HitMakerDigiSampling
maxChi2Cut : 2.0
maxChi2Cut : 7.0
maxPlots : 50
diagLevel : 0
}
Expand Down
1 change: 1 addition & 0 deletions CaloReco/inc/CaloTemplateWFUtil.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace mu2e {
double peakNorm (const std::vector<double>& xvalues, const std::vector<double>& yvalues, double x0, unsigned i0, unsigned i1);
double peakToFunc (unsigned ip, double xmax, double ymax);
void plotFit (const std::string& pname) const;
void printResiduals();

void setStrategy (int val) {fitStrategy_ = val;}
void setPrintLevel (int val) {printLevel_ = val;}
Expand Down
2 changes: 2 additions & 0 deletions CaloReco/src/CaloRecoDigiMaker_module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ namespace mu2e {
double chi2 = waveformProcessor_->chi2();
int ndf = waveformProcessor_->ndf();

if (diagLevel_ > 2) std::cout<<"Reco hit id="<<SiPMID<<" eDep= "<<eDep<<" time="<<time<<" chi2="<<chi2/float(ndf)<<std::endl;

if (chi2/float(ndf) > maxChi2Cut_) continue;

if (SiPMID%2==0) totEnergyReco += eDep;
Expand Down
Loading

0 comments on commit 5bc9d27

Please sign in to comment.