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

Run3-alca182 Update some of the calibration code/scripts using IsoTracks for HCAL #33301

Merged
merged 3 commits into from Apr 8, 2021
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
6 changes: 3 additions & 3 deletions Calibration/HcalCalibAlgos/macros/CalibCorr.C
Expand Up @@ -179,9 +179,9 @@ double puFactor(int type, int ieta, double pmom, double eHcal, double ediff, boo
std::cout << " d2p " << d2p << ":" << DELTA_CUT << " coeff " << icor << ":" << CONST_COR_COEF[icor] << ":"
<< LINEAR_COR_COEF[icor] << ":" << SQUARE_COR_COEF[icor] << " Fac " << fac;
} else { // 21pu
const double CONST_COR_COEF[6] = {0.98555, 0.976956, 0.976892, 0.544262, 0.447506, 0.380405};
const double LINEAR_COR_COEF[6] = {-0.0452436, -0.140628, -0.229334, -0.0520421, -0.0892927, -0.0810484};
const double SQUARE_COR_COEF[6] = {0, 0, 0.0333082, 0.00426112, 0.00887433, 0.0085219};
const double CONST_COR_COEF[6] = {0.98913, 0.982008, 0.974011, 0.496234, 0.368110, 0.294053};
const double LINEAR_COR_COEF[6] = {-0.0491388, -0.124058, -0.249718, -0.0667390, -0.0770766, -0.0580492};
const double SQUARE_COR_COEF[6] = {0, 0, 0.0368657, 0.00656337, 0.00724508, 0.00568967};
const int PU_IETA_1 = 7;
const int PU_IETA_2 = 16;
const int PU_IETA_3 = 25;
Expand Down
47 changes: 14 additions & 33 deletions Calibration/HcalCalibAlgos/macros/CalibFitPlots.C
Expand Up @@ -952,45 +952,26 @@ void PlotHist(const char* infile,
std::string name1[5] = {"Z0", "Z1", "Z2", "Z3", "Z4"};
std::string name2[5] = {"L0", "L1", "L2", "L3", "L4"};
std::string name3[5] = {"V0", "V1", "V2", "V3", "V4"};
std::string name4[16] = {"etaB31",
"etaB32",
"etaB33",
"etaB34",
"etaB21",
"etaB22",
"etaB23",
"etaB24",
"etaB11",
"etaB12",
"etaB13",
"etaB14",
"etaB01",
"etaB02",
"etaB03",
"etaB04"};
std::string name4[20] = {"etaB41", "etaB42", "etaB43", "etaB44", "etaB31", "etaB32", "etaB33",
"etaB34", "etaB21", "etaB22", "etaB23", "etaB24", "etaB11", "etaB12",
"etaB13", "etaB14", "etaB01", "etaB02", "etaB03", "etaB04"};
std::string name5[5] = {"W0", "W1", "W2", "W3", "W4"};
std::string title[6] = {"Tracks with p = 10:20 GeV",
"Tracks with p = 20:30 GeV",
"Tracks with p = 30:40 GeV",
"Tracks with p = 40:60 GeV",
"Tracks with p = 60:100 GeV",
"Tracks with p = 20:100 GeV"};
std::string title1[16] = {"Tracks with p = 40:60 GeV (Barrel)",
"Tracks with p = 40:60 GeV (Transition)",
"Tracks with p = 40:60 GeV (Endcap)",
"Tracks with p = 40:60 GeV",
"Tracks with p = 30:40 GeV (Barrel)",
"Tracks with p = 30:40 GeV (Transition)",
"Tracks with p = 30:40 GeV (Endcap)",
"Tracks with p = 30:40 GeV",
"Tracks with p = 20:30 GeV (Barrel)",
"Tracks with p = 20:30 GeV (Transition)",
"Tracks with p = 20:30 GeV (Endcap)",
"Tracks with p = 20:30 GeV",
"Tracks with p = 10:20 GeV (Barrel)",
"Tracks with p = 10:20 GeV (Transition)",
"Tracks with p = 10:20 GeV (Endcap)",
"Tracks with p = 10:20 GeV"};
std::string title1[20] = {"Tracks with p = 60:100 GeV (Barrel)", "Tracks with p = 60:100 GeV (Transition)",
"Tracks with p = 60:100 GeV (Endcap)", "Tracks with p = 60:100 GeV",
"Tracks with p = 40:60 GeV (Barrel)", "Tracks with p = 40:60 GeV (Transition)",
"Tracks with p = 40:60 GeV (Endcap)", "Tracks with p = 40:60 GeV",
"Tracks with p = 30:40 GeV (Barrel)", "Tracks with p = 30:40 GeV (Transition)",
"Tracks with p = 30:40 GeV (Endcap)", "Tracks with p = 30:40 GeV",
"Tracks with p = 20:30 GeV (Barrel)", "Tracks with p = 20:30 GeV (Transition)",
"Tracks with p = 20:30 GeV (Endcap)", "Tracks with p = 20:30 GeV",
"Tracks with p = 10:20 GeV (Barrel)", "Tracks with p = 10:20 GeV (Transition)",
"Tracks with p = 10:20 GeV (Endcap)", "Tracks with p = 10:20 GeV"};
std::string xtitl[5] = {"E_{HCAL}/(p-E_{ECAL})", "i#eta", "d_{L1}", "# Vertex", "E_{HCAL}/(p-E_{ECAL})"};
std::string ytitl[5] = {
"Tracks", "MPV(E_{HCAL}/(p-E_{ECAL}))", "MPV(E_{HCAL}/(p-E_{ECAL}))", "MPV(E_{HCAL}/(p-E_{ECAL}))", "Tracks"};
Expand All @@ -1015,7 +996,7 @@ void PlotHist(const char* infile,
TFile* file = new TFile(infile);
TLine* line(0);
char name[100], namep[100];
int kmax = (mode == 4) ? 16 : (((mode < 1) && (mode > 5)) ? 6 : 5);
int kmax = (mode == 4) ? 20 : (((mode < 1) && (mode > 5)) ? 6 : 5);
for (int k = 0; k < kmax; ++k) {
if (mode == 1) {
sprintf(name, "%s%s", prefix.c_str(), name1[k].c_str());
Expand Down
2 changes: 1 addition & 1 deletion Calibration/HcalCalibAlgos/macros/CalibMonitor.C
Expand Up @@ -1242,7 +1242,7 @@ void CalibMonitor::Loop() {
fileout_.close();
std::cout << "Writes " << good << " events in the file " << outFileName_ << std::endl;
}
std::cout << "Finds " << duplicate << " Duplicate events out of " << kount << " evnts in this file with p>20 Gev"
std::cout << "Finds " << duplicate << " Duplicate events out of " << kount << " evnts in this file with p>10 Gev"
<< std::endl;
std::cout << "Number of selected events:" << std::endl;
for (unsigned int k = 1; k < ps_.size(); ++k)
Expand Down
5 changes: 4 additions & 1 deletion Calibration/HcalCalibAlgos/macros/CalibPlotProperties.C
Expand Up @@ -7,13 +7,16 @@
// phimin, phimax, zside, nvxlo, nvxhi, rbx, exclude,
// etamax);
// c1.Loop();
// c1.savePlot(histFileName,append,all,debug);
// c1.savePlot(histFileName, append, all, debug);
//
// This will prepare a set of histograms with properties of the tracks
// which can be displayed by the method in this file
//
// PlotHist(histFileName, prefix, flagC, etalo, etahi, save)
//
// This will plot the heistograms and save the canvases
//
//
// where:
//
// fname (std::string) = file name of the input ROOT tree
Expand Down
6 changes: 3 additions & 3 deletions Calibration/HcalCalibAlgos/macros/CalibTree.C
Expand Up @@ -42,7 +42,7 @@
// -1 loose, -2 flexible, > 0 for systematic
// puCorr (int) = PU correction to be applied or not: 0 no
// correction; < 0 use eDelta; > 0 rho dependent
// correction (-2)
// correction (-5: 2018 version)
// applyL1Cut (int) = Flag to see if closeness to L1 object to be
// applied: 0 no check; 1 only to events with
// datatype not equal to 1; 2 to all (1)
Expand Down Expand Up @@ -124,7 +124,7 @@ void Run(const char *inFileName = "Silver.root",
int ietaMax = 25,
int ietaTrack = -1,
int sysmode = -1,
int puCorr = -2,
int puCorr = -5,
int applyL1Cut = 1,
double l1Cut = 0.5,
int truncateFlag = 0,
Expand Down Expand Up @@ -339,7 +339,7 @@ void doIt(const char *infile, const char *dup) {
25,
-1,
-1,
-2,
-5,
1,
0.5,
0,
Expand Down
2 changes: 1 addition & 1 deletion Calibration/HcalCalibAlgos/plugins/HcalIsoTrkAnalyzer.cc
Expand Up @@ -849,7 +849,7 @@ void HcalIsoTrkAnalyzer::fillDescriptions(edm::ConfigurationDescriptions& descri
desc.add<int>("maxInMiss", 0);
desc.add<int>("maxOutMiss", 0);
// Minimum momentum of selected isolated track and signal zone
desc.add<double>("minimumTrackP", 20.0);
desc.add<double>("minimumTrackP", 10.0);
desc.add<double>("coneRadius", 34.98);
// signal zone in ECAL and MIP energy cutoff
desc.add<double>("coneRadiusMIP", 14.0);
Expand Down