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

HCAL MC: adding pulse shape 208 for signal reconstruction (11_1_X) #31062

Merged
merged 2 commits into from Aug 6, 2020
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
3 changes: 2 additions & 1 deletion CalibCalorimetry/HcalAlgos/interface/HcalPulseShapes.h
Expand Up @@ -106,8 +106,9 @@ class HcalPulseShapes {
const HcalPulseShape& computeSiPMShapeHE206();
void computeSiPMShapeData2017();
void computeSiPMShapeData2018();
void computeSiPMShapeMCRecoRun3();
Shape hpdShape_, hfShape_, siPMShapeHO_;
Shape siPMShapeData2017_, siPMShapeData2018_;
Shape siPMShapeData2017_, siPMShapeData2018_, siPMShapeMCRecoRun3_;
Shape hpdShape_v2, hpdShapeMC_v2;
Shape hpdShape_v3, hpdShapeMC_v3;
Shape hpdBV30Shape_v2, hpdBV30ShapeMC_v2;
Expand Down
53 changes: 53 additions & 0 deletions CalibCalorimetry/HcalAlgos/src/HcalPulseShapes.cc
Expand Up @@ -27,6 +27,7 @@ Reco MC
202 202 =201, SiPMs Hamamatsu shape (HO)
205 203 siPMShapeData2017_,siPMShapeMC2017_ SiPMs from Data, Hamamatsu shape (HE 2017)
207 206 siPMShapeData2018_,siPMShapeMC2018_ SiPMs from Data, Hamamatsu shape (HE 2018)
207 208 siPMShapeData2018_,siPMShapeMCRecoRun3_ SiPMs from Data, 2021 MC phase scan
301 301 hfShape_ regular HF PMT shape
401 401 regular ZDC shape
-------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -124,13 +125,15 @@ Reco MC
computeSiPMShapeHO();
computeSiPMShapeData2017();
computeSiPMShapeData2018();
computeSiPMShapeMCRecoRun3();

theShapes[201] = &siPMShapeHO_;
theShapes[202] = theShapes[201];
theShapes[203] = &(computeSiPMShapeHE203());
theShapes[205] = &siPMShapeData2017_;
theShapes[206] = &(computeSiPMShapeHE206());
theShapes[207] = &siPMShapeData2018_;
theShapes[208] = &siPMShapeMCRecoRun3_;
theShapes[301] = &hfShape_;
//theShapes[401] = new CaloCachedShapeIntegrator(&theZDCShape);
}
Expand Down Expand Up @@ -271,6 +274,56 @@ void HcalPulseShapes::computeHFShape() {
hfShape_.setShapeBin(j, ntmp[j]);
}
}
void HcalPulseShapes::computeSiPMShapeMCRecoRun3() {
//modified shape 206
//7.2 ns shift in 206
unsigned int nbin = 250;
std::array<float, 250> nt{
{0, 0, 0, 0, 0, 0, 0, 0.000117468,
0.0031549, 0.0117368, 0.0219974, 0.0305776, 0.0365429, 0.0400524, 0.0415915, 0.0416765,
0.0408111, 0.0394627, 0.0379353, 0.0363688, 0.0348152, 0.0332891, 0.0317923, 0.0303237,
0.028883, 0.0274714, 0.0260914, 0.0247462, 0.0234392, 0.0221738, 0.0209531, 0.0197793,
0.0186544, 0.0175796, 0.0165556, 0.0155823, 0.0146596, 0.0137866, 0.0129623, 0.0121853,
0.0114539, 0.0107665, 0.0101213, 0.0095162, 0.00894934, 0.00841873, 0.0079224, 0.00745841,
0.00702487, 0.00661995, 0.00624189, 0.00588898, 0.00555961, 0.00525223, 0.00496539, 0.0046977,
0.00444786, 0.00421464, 0.00399689, 0.00379353, 0.00360355, 0.00342602, 0.00326004, 0.0031048,
0.00295954, 0.00282355, 0.00269616, 0.00257676, 0.00246479, 0.00235972, 0.00226106, 0.00216834,
0.00208117, 0.00199914, 0.00192189, 0.0018491, 0.00178044, 0.00171565, 0.00165445, 0.00159659,
0.00154186, 0.00149003, 0.00144092, 0.00139435, 0.00135015, 0.00130816, 0.00126825, 0.00123027,
0.00119412, 0.00115966, 0.0011268, 0.00109544, 0.00106548, 0.00103685, 0.00100946, 0.000983242,
0.000958125, 0.000934047, 0.000910949, 0.000888775, 0.000867475, 0.000847, 0.000827306, 0.000808352,
0.000790097, 0.000772506, 0.000755545, 0.000739182, 0.000723387, 0.000708132, 0.00069339, 0.000679138,
0.000665352, 0.00065201, 0.000639091, 0.000626577, 0.00061445, 0.000602692, 0.000591287, 0.00058022,
0.000569477, 0.000559044, 0.000548908, 0.000539058, 0.000529481, 0.000520167, 0.000511106, 0.000502288,
0.000493704, 0.000485344, 0.000477201, 0.000469266, 0.000459912, 0.000448544, 0.000437961, 0.000428079,
0.000418825, 0.000410133, 0.000401945, 0.00039421, 0.000386883, 0.000379924, 0.000373298, 0.000366973,
0.000360922, 0.00035512, 0.000349545, 0.000344179, 0.000339003, 0.000334002, 0.000329163, 0.000324475,
0.000319925, 0.000315504, 0.000311204, 0.000307017, 0.000302935, 0.000298954, 0.000295066, 0.000291267,
0.000287553, 0.000283919, 0.000280361, 0.000276877, 0.000273462, 0.000270114, 0.000266831, 0.000263609,
0.000260447, 0.000257343, 0.000254295, 0.0002513, 0.000248358, 0.000245467, 0.000242625, 0.000239831,
0.000237083, 0.000234381, 0.000231723, 0.000229109, 0.000226536, 0.000224005, 0.000221514, 0.000219062,
0.000216648, 0.000214272, 0.000211933, 0.00020963, 0.000207362, 0.000205129, 0.000202929, 0.000200763,
0.000198629, 0.000196526, 0.000194455, 0.000192415, 0.000190405, 0.000188424, 0.000186472, 0.000184548,
0.000182653, 0.000180784, 0.000178943, 0.000177127, 0.000175338, 0.000173574, 0.000171835, 0.00017012,
0.000168429, 0.000166762, 0.000165119, 0.000163498, 0.000161899, 0.000160322, 0.000158767, 0.000157233,
0.000155721, 0.000154228, 0.000152756, 0.000151304, 0.000149871, 0.000148457, 0.000147062, 0.000145686,
0.000144327, 0.000142987, 0.000141664, 0.000140359, 0.000139071, 0.000137799, 0.000136544, 0.000135305,
0.000134082, 0.000132874, 0.000131682, 0.000130505, 0.000129344, 0.000128196, 0.000127064, 0.000125945,
0.00012484, 0.00012375, 0.000122672, 0.000121608, 0.000120558, 0.00011952, 0.000118495, 0.000117482,
0.000116482, 0.000115493}};

siPMShapeMCRecoRun3_.setNBin(nbin);

double norm = 0.;
for (unsigned int j = 0; j < nbin; ++j) {
norm += (nt[j] > 0) ? nt[j] : 0.;
}

for (unsigned int j = 0; j < nbin; ++j) {
nt[j] /= norm;
siPMShapeMCRecoRun3_.setShapeBin(j, nt[j]);
}
}

void HcalPulseShapes::computeSiPMShapeData2018() {
//Combination of all phase scan data (May,Jul,Oct2017)
Expand Down
3 changes: 2 additions & 1 deletion SimCalorimetry/HcalSimAlgos/src/HcalShapes.cc
Expand Up @@ -20,11 +20,12 @@ HcalShapes::HcalShapes() : theDbService(nullptr) {
205 - SiPMs from Data (HE data 2017)
206 - SiPMs Hamamatsu shape (HE 2018)
207 - SiPMs from Data (HE 2017)
208 - SiPMs from Data, 2021 MC phase scan
301 - regular HF PMT shape
401 - regular ZDC shape
*/

std::vector<int> theHcalShapeNums = {101, 102, 103, 104, 105, 123, 124, 125, 201, 202, 203, 205, 206, 207, 301};
std::vector<int> theHcalShapeNums = {101, 102, 103, 104, 105, 123, 124, 125, 201, 202, 203, 205, 206, 207, 208, 301};
// use resize so vector won't invalidate pointers by reallocating memory while filling
theHcalShapes.resize(theHcalShapeNums.size());
for (unsigned inum = 0; inum < theHcalShapeNums.size(); ++inum) {
Expand Down