Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New background model for GEM digitizer #3185

Merged
merged 5 commits into from Apr 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 23 additions & 1 deletion Geometry/CaloTopology/src/HcalTopology.cc
Expand Up @@ -11,6 +11,7 @@
#include "CLHEP/Units/GlobalPhysicalConstants.h"

static const int IPHI_MAX=72;
//#define DebugLog

HcalTopology::HcalTopology(const HcalDDDRecConstants* hcons, HcalTopologyMode::TriggerMode tmode) :
hcons_(hcons),
Expand Down Expand Up @@ -95,7 +96,28 @@ HcalTopology::HcalTopology(const HcalDDDRecConstants* hcons, HcalTopologyMode::T
int units = (int)(dPhiTableHF[k]/fiveDegInRad+0.5);
unitPhiHF.push_back(units);
}
std::cout << "Constants in HcalTopology " << firstHBRing_ << ":" << lastHBRing_ << " " << firstHERing_ << ":" << lastHERing_ << ":" << firstHEDoublePhiRing_ << ":" << firstHEQuadPhiRing_ << ":" << firstHETripleDepthRing_ << " " << firstHFRing_ << ":" << lastHFRing_ << ":" << firstHFQuadPhiRing_ << " " << firstHORing_ << ":" << lastHORing_ << " " << maxDepthHB_ << ":" << maxDepthHE_ << " " << nEtaHB_ << ":" << nEtaHE_ << " " << etaHE2HF_ << ":" << etaHF2HE_ << std::endl;
int nEta = hcons_->getNEta();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dildick - I'm not sure you do want to modify HcalTopolgy for GEM.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dildick and @ianna - It looks like these are the exact same things that @bsunanda committed and were merged yesterday and not things that Sven added himself. Maybe you had merged his commit and not rebased. I'm working on the calotower PR right now. Then I'll try the merge and see if there are conflicts.

for (int ring=1; ring<=nEta; ++ring) {
std::vector<int> segmentation = hcons_->getDepth(ring-1);
setDepthSegmentation(ring,segmentation);
#ifdef DebugLog
std::cout << "Set segmentation for ring " << ring << " with "
<< segmentation.size() << " elements:";
for (unsigned int k=0; k<segmentation.size(); ++k)
std::cout << " " << segmentation[k];
std::cout << std::endl;
#endif
}
#ifdef DebugLog
std::cout << "Constants in HcalTopology " << firstHBRing_ << ":"
<< lastHBRing_ << " " << firstHERing_ << ":" << lastHERing_ << ":"
<< firstHEDoublePhiRing_ << ":" << firstHEQuadPhiRing_ << ":"
<< firstHETripleDepthRing_ << " " << firstHFRing_ << ":"
<< lastHFRing_ << ":" << firstHFQuadPhiRing_ << " " << firstHORing_
<< ":" << lastHORing_ << " " << maxDepthHB_ << ":" << maxDepthHE_
<< " " << nEtaHB_ << ":" << nEtaHE_ << " " << etaHE2HF_ << ":"
<< etaHF2HE_ << std::endl;
#endif
}

HcalTopology::HcalTopology(HcalTopologyMode::Mode mode, int maxDepthHB, int maxDepthHE, HcalTopologyMode::TriggerMode tmode) :
Expand Down
21 changes: 15 additions & 6 deletions SimMuon/GEMDigitizer/interface/GEMSimpleModel.h
Expand Up @@ -13,6 +13,7 @@
#include "SimMuon/GEMDigitizer/interface/GEMDigiModel.h"

class GEMGeometry;

namespace CLHEP
{
class HepRandomEngine;
Expand Down Expand Up @@ -49,26 +50,32 @@ class GEMSimpleModel: public GEMDigiModel
double averageShapingTime_;
double timeResolution_;
double timeJitter_;
double timeCalibrationOffset1_;
double timeCalibrationOffset23_;
double averageNoiseRate_;
double averageClusterSize_;
// double averageClusterSize_;
std::vector<double> clsParametrization_;
double signalPropagationSpeed_;
bool cosmics_;
int bxwidth_;
int minBunch_;
int maxBunch_;
bool digitizeOnlyMuons_;
std::vector<double> neutronGammaRoll1_;
std::vector<double> neutronGammaRoll2_;
std::vector<double> neutronGammaRoll3_;
bool doBkgNoise_;
bool doNoiseCLS_;
bool fixedRollRadius_;
double minPabsNoiseCLS_;
bool simulateIntrinsicNoise_;
double scaleLumi_;
bool simulateElectronBkg_;
double constNeuGE11_;
double slopeNeuGE11_;
std::vector<double> GE21NeuBkgParams_;
std::vector<double> GE11ElecBkgParams_;
std::vector<double> GE21ElecBkgParams_;

CLHEP::RandFlat* flat1_;
CLHEP::RandFlat* flat2_;
CLHEP::RandFlat* flat3_;
CLHEP::RandFlat* flat4_;
CLHEP::RandPoissonQ* poisson_;
CLHEP::RandGaussQ* gauss1_;
CLHEP::RandGaussQ* gauss2_;
Expand All @@ -78,3 +85,5 @@ class GEMSimpleModel: public GEMDigiModel
#endif




32 changes: 22 additions & 10 deletions SimMuon/GEMDigitizer/python/muonGEMDigis_cfi.py
Expand Up @@ -7,24 +7,36 @@
timeResolution = cms.double(5),
timeJitter = cms.double(1.0),
averageShapingTime = cms.double(50.0),
timeCalibrationOffset1 = cms.double(19.9),
timeCalibrationOffset23 = cms.double(27.7),
averageClusterSize = cms.double(1.5),
# averageClusterSize = cms.double(1.5),#1.5
#cumulative cls distribution at 771 mkA; experimental results from test pion beam
clsParametrization = cms.vdouble(0.455091, 0.865613, 0.945891, 0.973286, 0.986234, 0.991686, 0.996865, 0.998501, 1.),
#cumulative cls distribution at 752 mkA; experimental results from test pion beam
# clsParametrization = cms.vdouble(0.663634, 0.928571, 0.967544, 0.982665, 0.990288, 0.994222, 0.997541, 0.999016, 1.),
averageEfficiency = cms.double(0.98),
averageNoiseRate = cms.double(0.001), #intrinsic noise
# numberOfStripsPerPartition = cms.int32(384),
bxwidth = cms.int32(25),
minBunch = cms.int32(-5), ## in terms of 25 ns
maxBunch = cms.int32(3),
inputCollection = cms.string('g4SimHitsMuonGEMHits'),
digiModelString = cms.string('Simple'),
digitizeOnlyMuons = cms.bool(False),
# neutronGammaRoll = cms.vdouble(18., 23., 30., 39., 45., 52., 62., 76)#, #n and gamma bkg per roll
neutronGammaRoll1 = cms.vdouble(69.3, 74.0, 101.7, 121.1, 145.5, 143.8, 199.1, 314.1), #n, gamma and charged prtcls bkg per roll of station1
neutronGammaRoll2 = cms.vdouble(69.3, 74.0, 101.7, 121.1, 145.5, 143.8, 199.1, 314.1), #n, gamma and charged prtcls bkg per roll of station2
neutronGammaRoll3 = cms.vdouble(69.3, 74.0, 101.7, 121.1, 145.5, 143.8, 199.1, 314.1, 314.1, 314.1, 314.1, 314.1), # bkg/roll of station3
digitizeOnlyMuons = cms.bool(True),
doBkgNoise = cms.bool(True), #False == No background simulation
doNoiseCLS = cms.bool(True),
fixedRollRadius = cms.bool(True), #Uses fixed radius in the center of the roll
minPabsNoiseCLS = cms.double(0.),
simulateIntrinsicNoise = cms.bool(False),
scaleLumi = cms.double(1.)
scaleLumi = cms.double(1.),
#Parameters for background model
simulateElectronBkg = cms.bool(False), #False=simulate only neutral Bkg
#const and slope for the expo model of neutral bkg for GE1/1:
constNeuGE11 = cms.double(807.1),
slopeNeuGE11 = cms.double(-0.01443),
#params for the simple pol5 model of neutral bkg for GE2/1:
GE21NeuBkgParams = cms.vdouble(2954.04, -58.7558, 0.473481, -0.00188292, 3.67041e-06, -2.80261e-09),
#params for the simple pol3 model of electron bkg for GE1/1:
GE11ElecBkgParams = cms.vdouble(2135.93, -33.1251, 0.177738, -0.000319334),
#params for the simple pol6 model of electron bkg for GE2/1:
GE21ElecBkgParams = cms.vdouble(-43642.2, 1335.98, -16.476, 0.105281, -0.000368758, 6.72937e-07, -5.00872e-10)

)