21 : ebRecHitLabel_(iConfig.getParameter<
edm::
InputTag>(
"ebRecHitsLabel")),
22 eeRecHitLabel_(iConfig.getParameter<
edm::
InputTag>(
"eeRecHitsLabel")),
23 electronLabel_(iConfig.getParameter<
edm::
InputTag>(
"electronLabel")),
24 rootfile_(iConfig.getParameter<
std::
string>(
"rootfile")),
25 calibAlgo_(iConfig.getParameter<
std::
string>(
"CALIBRATION_ALGO")),
26 miscalibfile_(iConfig.getParameter<
std::
string>(
"miscalibfile")),
27 miscalibfileEndCap_(iConfig.getParameter<
std::
string>(
"miscalibfileEndCap")),
28 keventweight_(iConfig.getParameter<
int>(
"keventweight")),
29 elePt_(iConfig.getParameter<double>(
"ElePt")),
30 maxeta_(iConfig.getParameter<
int>(
"maxeta")),
31 mineta_(iConfig.getParameter<
int>(
"mineta")),
32 maxphi_(iConfig.getParameter<
int>(
"maxphi")),
33 minphi_(iConfig.getParameter<
int>(
"minphi")),
34 cut1_(iConfig.getParameter<double>(
"cut1")),
35 cut2_(iConfig.getParameter<double>(
"cut2")),
36 cut3_(iConfig.getParameter<double>(
"cut3")),
37 numevent_(iConfig.getParameter<
int>(
"numevent")),
38 cutEPCalo1_(iConfig.getParameter<double>(
"cutEPCaloMin")),
39 cutEPCalo2_(iConfig.getParameter<double>(
"cutEPCaloMax")),
40 cutEPin1_(iConfig.getParameter<double>(
"cutEPinMin")),
41 cutEPin2_(iConfig.getParameter<double>(
"cutEPinMax")),
42 cutCalo1_(iConfig.getParameter<double>(
"cutCaloMin")),
43 cutCalo2_(iConfig.getParameter<double>(
"cutCaloMax")),
44 cutESeed_(iConfig.getParameter<double>(
"cutESeed")),
45 clusterSize_(iConfig.getParameter<
int>(
"Clustersize")),
46 elecclass_(iConfig.getParameter<
int>(
"elecclass")),
59 EventsAfterCuts =
new TH1F(
"EventsAfterCuts",
"Events After Cuts", 30, 0, 30);
62 e9 =
new TH1F(
"e9",
"E9 energy", 300, 0., 150.);
63 e25 =
new TH1F(
"e25",
"E25 energy", 300, 0., 150.);
64 scE =
new TH1F(
"scE",
"SC energy", 300, 0., 150.);
65 trP =
new TH1F(
"trP",
"Trk momentum", 300, 0., 150.);
66 EoP =
new TH1F(
"EoP",
"EoP", 600, 0., 3.);
67 EoP_all =
new TH1F(
"EoP_all",
"EoP_all", 600, 0., 3.);
69 calibs =
new TH1F(
"calib",
"Calibration constants", 800, 0.5, 2.);
70 calibsEndCapMinus =
new TH1F(
"calibEndCapMinus",
"Calibration constants EE-", 800, 0.5, 2.);
71 calibsEndCapPlus =
new TH1F(
"calibEndCapPlus",
"Calibration constants EE+", 800, 0.5, 2.);
73 e25OverScE =
new TH1F(
"e25OverscE",
"E25 / SC energy", 400, 0., 2.);
74 E25oP =
new TH1F(
"E25oP",
"E25 / P", 750, 0., 1.5);
76 Map =
new TH2F(
"Map",
"Nb Events in Crystal", 173, -86, 86, 362, 0, 361);
77 e9Overe25 =
new TH1F(
"e9Overe25",
"E9 / E25", 400, 0., 2.);
78 Map3Dcalib =
new TH2F(
"3Dcalib",
"3Dcalib", 173, -86, 86, 362, 0, 361);
82 MapCor1 =
new TH2F(
"MapCor1",
"Correlation E25/Pcalo versus E25/Pin", 100, 0., 5., 100, 0., 5.);
83 MapCor2 =
new TH2F(
"MapCor2",
"Correlation E25/Pcalo versus E/P", 100, 0., 5., 100, 0., 5.);
84 MapCor3 =
new TH2F(
"MapCor3",
"Correlation E25/Pcalo versus Pout/Pin", 100, 0., 5., 100, 0., 5.);
85 MapCor4 =
new TH2F(
"MapCor4",
"Correlation E25/Pcalo versus E25/highestP", 100, 0., 5., 100, 0., 5.);
86 MapCor5 =
new TH2F(
"MapCor5",
"Correlation E25/Pcalo versus Pcalo/Pout", 100, 0., 5., 100, 0., 5.);
87 MapCor6 =
new TH2F(
"MapCor6",
"Correlation Pout/Pin versus E25/Pin", 100, 0., 5., 100, 0., 5.);
88 MapCor7 =
new TH2F(
"MapCor7",
"Correlation Pout/Pin versus Pcalo/Pout", 100, 0., 5., 100, 0., 5.);
89 MapCor8 =
new TH2F(
"MapCor8",
"Correlation E25/Pin versus Pcalo/Pout", 100, 0., 5., 100, 0., 5.);
90 MapCor9 =
new TH2F(
"MapCor9",
"Correlation E25/Pcalo versus Eseed/Pout", 100, 0., 5., 100, 0., 5.);
91 MapCor10 =
new TH2F(
"MapCor10",
"Correlation Eseed/Pout versus Pout/Pin", 100, 0., 5., 100, 0., 5.);
92 MapCor11 =
new TH2F(
"MapCor11",
"Correlation Eseed/Pout versus E25/Pin", 100, 0., 5., 100, 0., 5.);
95 E25oPvsEta =
new TH2F(
"E25oPvsEta",
"E/P vs Eta", 173, -86, 86, 600, 0.7, 1.3);
96 E25oPvsEtaEndCapMinus =
new TH2F(
"E25oPvsEtaEndCapMinus",
"E/P vs R EE-", 100, 0, 100, 600, 0.7, 1.3);
97 E25oPvsEtaEndCapPlus =
new TH2F(
"E25oPvsEtaEndCapPlus",
"E/P vs R EE+", 100, 0, 100, 600, 0.7, 1.3);
99 PinMinPout =
new TH1F(
"PinMinPout",
"(Pin - Pout)/Pin", 600, -2.0, 2.0);
101 calibinter =
new TH1F(
"calibinter",
"internal calibration constants", 800, 0.5, 2.);
102 PinOverPout =
new TH1F(
"PinOverPout",
"pinOverpout", 600, 0., 3.);
103 eSeedOverPout =
new TH1F(
"eSeedOverPout",
"eSeedOverpout ", 600, 0., 3.);
107 calibinterEndCapMinus =
new TH1F(
"calibinterEndCapMinus",
"internal calibration constants", 800, 0.5, 2.);
108 calibinterEndCapPlus =
new TH1F(
"calibinterEndCapPlus",
"internal calibration constants", 800, 0.5, 2.);
115 Error1 =
new TH1F(
"Error1",
"DeltaP/Pin", 800, -1.0, 1.0);
116 Error2 =
new TH1F(
"Error2",
"DeltaP/Pout", 800, -1.0, 1.0);
117 Error3 =
new TH1F(
"Error3",
"DeltaP/Pcalo", 800, -1.0, 1.0);
118 eSeedOverPout2 =
new TH1F(
"eSeedOverPout2",
"eSeedOverpout (No Supercluster)", 600, 0., 4.);
119 hadOverEm =
new TH1F(
"hadOverEm",
"Had/EM distribution", 600, -2., 2.);
122 Map3DcalibNoCuts =
new TH2F(
"3DcalibNoCuts",
"3Dcalib (Before Cuts)", 173, -86, 86, 362, 0, 361);
123 e9NoCuts =
new TH1F(
"e9NoCuts",
"E9 energy (Before Cuts)", 300, 0., 150.);
124 e25NoCuts =
new TH1F(
"e25NoCuts",
"E25 energy (Before Cuts)", 300, 0., 150.);
125 scENoCuts =
new TH1F(
"scENoCuts",
"SC energy (Before Cuts)", 300, 0., 150.);
126 trPNoCuts =
new TH1F(
"trPNoCuts",
"Trk momentum (Before Cuts)", 300, 0., 150.);
127 EoPNoCuts =
new TH1F(
"EoPNoCuts",
"EoP (Before Cuts)", 600, 0., 3.);
128 calibsNoCuts =
new TH1F(
"calibNoCuts",
"Calibration constants (Before Cuts)", 800, 0., 2.);
129 e25OverScENoCuts =
new TH1F(
"e25OverscENoCuts",
"E25 / SC energy (Before Cuts)", 400, 0., 2.);
130 E25oPNoCuts =
new TH1F(
"E25oPNoCuts",
"E25 / P (Before Cuts)", 750, 0., 1.5);
131 MapEndCapMinus =
new TH2F(
"MapEndCapMinus",
"Nb Events in Crystal (EndCap)", 100, 0, 100, 100, 0, 100);
132 MapEndCapPlus =
new TH2F(
"MapEndCapPlus",
"Nb Events in Crystal (EndCap)", 100, 0, 100, 100, 0, 100);
133 e9Overe25NoCuts =
new TH1F(
"e9Overe25NoCuts",
"E9 / E25 (Before Cuts)", 400, 0., 2.);
134 PinOverPoutNoCuts =
new TH1F(
"PinOverPoutNoCuts",
"pinOverpout (Before Cuts)", 600, 0., 3.);
135 eSeedOverPoutNoCuts =
new TH1F(
" eSeedOverPoutNoCuts",
"eSeedOverpout (Before Cuts) ", 600, 0., 4.);
136 PinMinPoutNoCuts =
new TH1F(
"PinMinPoutNoCuts",
"(Pin - Pout)/Pin (Before Cuts)", 600, -2.0, 2.0);
140 calibinterNoCuts =
new TH1F(
"calibinterNoCuts",
"internal calibration constants", 2000, 0.5, 2.);
143 new TH2F(
"MapCor1NoCuts",
"Correlation E25/PatCalo versus E25/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
145 new TH2F(
"MapCor2NoCuts",
"Correlation E25/PatCalo versus E/P (Before Cuts)", 100, 0., 5., 100, 0., 5.);
147 new TH2F(
"MapCor3NoCuts",
"Correlation E25/PatCalo versus Pout/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
149 new TH2F(
"MapCor4NoCuts",
"Correlation E25/PatCalo versus E25/highestP (Before Cuts)", 100, 0., 5., 100, 0., 5.);
151 new TH2F(
"MapCor5NoCuts",
"Correlation E25/Pcalo versus Pcalo/Pout (Before Cuts)", 100, 0., 5., 100, 0., 5.);
153 new TH2F(
"MapCor6NoCuts",
"Correlation Pout/Pin versus E25/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
155 new TH2F(
"MapCor7NoCuts",
"Correlation Pout/Pin versus Pcalo/Pout (Before Cuts)", 100, 0., 5., 100, 0., 5.);
157 new TH2F(
"MapCor8NoCuts",
"Correlation E25/Pin versus Pcalo/Pout (Before Cuts)", 100, 0., 5., 100, 0., 5.);
159 new TH2F(
"MapCor9NoCuts",
"Correlation E25/Pcalo versus Eseed/Pout (Before Cuts)", 100, 0., 5., 100, 0., 5.);
161 new TH2F(
"MapCor10NoCuts",
"Correlation Eseed/Pout versus Pout/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
163 new TH2F(
"MapCor11NoCuts",
"Correlation Eseed/Pout versus E25/Pin (Before Cuts)", 100, 0., 5., 100, 0., 5.);
167 Error1NoCuts =
new TH1F(
"Eror1NoCuts",
"DeltaP/Pin (Before Cuts)", 800, -1.0, 1.0);
168 Error2NoCuts =
new TH1F(
"Error2NoCuts",
"DeltaP/Pout (Before Cuts)", 800, -1.0, 1.0);
169 Error3NoCuts =
new TH1F(
"Error3NoCuts",
"DeltaP/Pcalo (Before Cuts)", 800, -1.0, 1.0);
170 eSeedOverPout2NoCuts =
new TH1F(
"eSeedOverPout2NoCuts",
"eSeedOverpout (No Supercluster, Before Cuts)", 600, 0., 4.);
171 hadOverEmNoCuts =
new TH1F(
"hadOverEmNoCuts",
"Had/EM distribution (Before Cuts)", 600, -2., 2.);
175 new TH2F(
"MapCor1ESeed",
"Correlation E25/Pcalo versus E25/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
177 new TH2F(
"MapCor2ESeed",
"Correlation E25/Pcalo versus E/P (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
179 "MapCor3ESeed",
"Correlation E25/Pcalo versus Pout/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
181 "MapCor4ESeed",
"Correlation E25/Pcalo versus E25/highestP (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
183 "MapCor5ESeed",
"Correlation E25/Pcalo versus Pcalo/Pout (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
185 new TH2F(
"MapCor6ESeed",
"Correlation Pout/Pin versus E25/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
187 "MapCor7ESeed",
"Correlation Pout/Pin versus Pcalo/Pout (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
189 "MapCor8ESeed",
"Correlation E25/Pin versus Pcalo/Pout (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
191 "MapCor9ESeed",
"Correlation E25/Pcalo versus Eseed/Pout (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
193 "MapCor10ESeed",
"Correlation Eseed/Pout versus Pout/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
195 "MapCor11ESeed",
"Correlation Eseed/Pout versus E25/Pin (after Eseed/Pout cut)", 100, 0., 5., 100, 0., 5.);
198 new TH1F(
"eSeedOverPout2ESeed",
"eSeedOverpout (No Supercluster, after Eseed/Pout cut)", 600, 0., 4.);
200 hadOverEmESeed =
new TH1F(
"hadOverEmESeed",
"Had/EM distribution (after Eseed/Pout cut)", 600, -2., 2.);
203 GeneralMap =
new TH2F(
"GeneralMap",
"Map without any cuts", 173, -86, 86, 362, 0, 361);
204 GeneralMapEndCapMinus =
new TH2F(
"GeneralMapEndCapMinus",
"Map without any cuts", 100, 0, 100, 100, 0, 100);
205 GeneralMapEndCapPlus =
new TH2F(
"GeneralMapEndCapPlus",
"Map without any cuts", 100, 0, 100, 100, 0, 100);
206 GeneralMapBeforePt =
new TH2F(
"GeneralMapBeforePt",
"Map without any cuts", 173, -86, 86, 362, 0, 361);
208 new TH2F(
"GeneralMapEndCapMinusBeforePt",
"Map without any cuts", 100, 0, 100, 100, 0, 100);
210 new TH2F(
"GeneralMapEndCapPlusBeforePt",
"Map without any cuts", 100, 0, 100, 100, 0, 100);
227 <<
" Should be either L3, HH or HHReg. Abort! " << std::endl;
253 time_t cpu_time_used;
257 int nIterations = 10;
273 std::cout <<
" Calibration not run due to problem in Algo Choice..." << std::endl;
294 std::map<EBDetId, float> OldCoeff;
313 std::map<EEDetId, float> OldCoeffEndCap;
326 std::map<DetId, float>::const_iterator itmap;
328 const DetId Id(itmap->first);
330 const EBDetId IChannelDetId(itmap->first);
347 calibs->Fill(itmap->second);
362 write_calibrations.
writeLine(IChannelDetId, itmap->second);
368 const EEDetId IChannelDetId(itmap->first);
376 if (IChannelDetId.
zside() < 0) {
391 write_calibrations.
writeLine(IChannelDetId, itmap->second);
525 std::cout <<
"************* STATISTICS **************" << std::endl;
527 std::cout <<
"Timing info:" << std::endl;
528 std::cout <<
"CPU time usage -- calibrating: " << cpu_time_used <<
" sec." << std::endl;
538 double currEnergy = 0.;
541 for (std::vector<DetId>::const_iterator idsIt = v1.begin(); idsIt != v1.end(); ++idsIt) {
542 if (idsIt->subdetId() == 1) {
544 itrechit = EBhits->
find(*idsIt);
545 if (itrechit == EBhits->
end()) {
546 std::cout <<
"ElectronCalibration::findMaxHit: rechit not found! " << (
EBDetId)(*idsIt) << std::endl;
549 if (itrechit->energy() > currEnergy) {
550 currEnergy = itrechit->energy();
555 itrechit = EEhits->
find(*idsIt);
556 if (itrechit == EEhits->
end()) {
557 std::cout <<
"ElectronCalibration::findMaxHit: rechit not found! idsIt = " << (
EEDetId)(*idsIt) << std::endl;
561 if (itrechit->energy() > currEnergy) {
562 currEnergy = itrechit->energy();
573 if (crystal_ix < 1 || crystal_ix > 100 || crystal_iy < 1 || crystal_iy > 100 ||
abs(iz) != 1) {
576 if ((crystal_ix >= 1 && crystal_ix <= 3 && (crystal_iy <= 40 || crystal_iy > 60)) ||
577 (crystal_ix >= 4 && crystal_ix <= 5 && (crystal_iy <= 35 || crystal_iy > 65)) ||
578 (crystal_ix >= 6 && crystal_ix <= 8 && (crystal_iy <= 25 || crystal_iy > 75)) ||
579 (crystal_ix >= 9 && crystal_ix <= 13 && (crystal_iy <= 20 || crystal_iy > 80)) ||
580 (crystal_ix >= 14 && crystal_ix <= 15 && (crystal_iy <= 15 || crystal_iy > 85)) ||
581 (crystal_ix >= 16 && crystal_ix <= 20 && (crystal_iy <= 13 || crystal_iy > 87)) ||
582 (crystal_ix >= 21 && crystal_ix <= 25 && (crystal_iy <= 8 || crystal_iy > 92)) ||
583 (crystal_ix >= 26 && crystal_ix <= 35 && (crystal_iy <= 5 || crystal_iy > 95)) ||
584 (crystal_ix >= 36 && crystal_ix <= 39 && (crystal_iy <= 3 || crystal_iy > 97)) ||
585 (crystal_ix >= 98 && crystal_ix <= 100 && (crystal_iy <= 40 || crystal_iy > 60)) ||
586 (crystal_ix >= 96 && crystal_ix <= 97 && (crystal_iy <= 35 || crystal_iy > 65)) ||
587 (crystal_ix >= 93 && crystal_ix <= 95 && (crystal_iy <= 25 || crystal_iy > 75)) ||
588 (crystal_ix >= 88 && crystal_ix <= 92 && (crystal_iy <= 20 || crystal_iy > 80)) ||
589 (crystal_ix >= 86 && crystal_ix <= 87 && (crystal_iy <= 15 || crystal_iy > 85)) ||
590 (crystal_ix >= 81 && crystal_ix <= 85 && (crystal_iy <= 13 || crystal_iy > 87)) ||
591 (crystal_ix >= 76 && crystal_ix <= 80 && (crystal_iy <= 8 || crystal_iy > 92)) ||
592 (crystal_ix >= 66 && crystal_ix <= 75 && (crystal_iy <= 5 || crystal_iy > 95)) ||
593 (crystal_ix >= 62 && crystal_ix <= 65 && (crystal_iy <= 3 || crystal_iy > 97)) ||
594 ((crystal_ix == 40 || crystal_ix == 61) &&
595 ((crystal_iy >= 46 && crystal_iy <= 55) || crystal_iy <= 3 || crystal_iy > 97)) ||
596 ((crystal_ix == 41 || crystal_ix == 60) && crystal_iy >= 44 && crystal_iy <= 57) ||
597 ((crystal_ix == 42 || crystal_ix == 59) && crystal_iy >= 43 && crystal_iy <= 58) ||
598 ((crystal_ix == 43 || crystal_ix == 58) && crystal_iy >= 42 && crystal_iy <= 59) ||
599 ((crystal_ix == 44 || crystal_ix == 45 || crystal_ix == 57 || crystal_ix == 56) && crystal_iy >= 41 &&
601 (crystal_ix >= 46 && crystal_ix <= 55 && crystal_iy >= 40 && crystal_iy <= 61)) {
617 std::cerr <<
"Error! can't get the product EBRecHitCollection: " << std::endl;
626 std::cerr <<
"Error! can't get the product EERecHitCollection: " << std::endl;
634 std::cerr <<
"Error! can't get the product ElectronCollection: " << std::endl;
642 if (!EBhits || !EEhits)
664 float highestElePt = 0.;
667 if (fabs(eleIt->eta()) > 2.4)
671 if (eleIt->pt() > highestElePt) {
672 highestElePt = eleIt->pt();
673 highPtElectron = *eleIt;
686 std::vector<DetId> v1;
691 v1.push_back(idsIt->first);
696 maxHitId =
findMaxHit(v1, (EBhits), (EEhits));
700 if (maxHitId.
null()) {
709 maxCC_Eta = ((
EEDetId)maxHitId).ix();
710 maxCC_Phi = ((
EEDetId)maxHitId).iy();
711 Zside = ((
EEDetId)maxHitId).zside();
714 maxCC_Eta = ((
EBDetId)maxHitId).ieta();
715 maxCC_Phi = ((
EBDetId)maxHitId).iphi();
726 std::vector<float>
energy;
727 float energy3x3 = 0.;
728 float energy5x5 = 0.;
735 std::vector<DetId> S9aroundMax = topology->
getWindow(maxHitId, 3, 3);
741 if (S9aroundMax.size() != 9)
748 if (NxNaroundMax[icry].subdetId() ==
EcalBarrel) {
750 itrechit = EBhits->
find(NxNaroundMax[icry]);
751 if (itrechit == EBhits->
end()) {
759 std::cout <<
" nan energy " << std::endl;
762 energy.push_back(itrechit->energy());
763 energy5x5 += itrechit->energy();
766 for (
int tt = 0;
tt < 9;
tt++) {
767 if (NxNaroundMax[icry] == S9aroundMax[
tt])
768 energy3x3 += itrechit->energy();
773 itrechit = EEhits->
find(NxNaroundMax[icry]);
775 if (itrechit == EEhits->
end()) {
784 std::cout <<
" nan energy " << std::endl;
787 energy.push_back(itrechit->energy());
788 energy5x5 += itrechit->energy();
791 for (
int tt = 0;
tt < 9;
tt++) {
792 if (NxNaroundMax[icry] == S9aroundMax[
tt])
793 energy3x3 += itrechit->energy();
815 if (highestElePt <
elePt_)
836 float UncorrectedPatCalo =
863 MapCor1NoCuts->Fill(energy5x5 / UncorrectedPatCalo, energy5x5 / Ptrack_in);
865 MapCor3NoCuts->Fill(energy5x5 / UncorrectedPatCalo, Ptrack_out / Ptrack_in);
866 MapCor4NoCuts->Fill(energy5x5 / UncorrectedPatCalo, energy5x5 / highPtElectron.
p());
867 MapCor5NoCuts->Fill(energy5x5 / UncorrectedPatCalo, UncorrectedPatCalo / Ptrack_out);
868 MapCor6NoCuts->Fill(Ptrack_out / Ptrack_in, energy5x5 / Ptrack_in);
869 MapCor7NoCuts->Fill(Ptrack_out / Ptrack_in, UncorrectedPatCalo / Ptrack_out);
870 MapCor8NoCuts->Fill(energy5x5 / Ptrack_in, UncorrectedPatCalo / Ptrack_out);
885 if ((energy3x3 / energy5x5) <
cut1_)
887 if ((Ptrack_out / Ptrack_in) <
cut2_ || (Ptrack_out / Ptrack_in) >
cut3_)
962 E25oPvsEta->Fill(maxCC_Eta, energy5x5 / UncorrectedPatCalo);
964 float Radius =
sqrt((maxCC_Eta) * (maxCC_Eta) + (maxCC_Phi) * (maxCC_Phi));
972 e25->Fill(energy5x5);
975 trP->Fill(UncorrectedPatCalo);
980 E25oP->Fill(energy5x5 / UncorrectedPatCalo);
983 Map->Fill(maxCC_Eta, maxCC_Phi);
999 MapCor1->Fill(energy5x5 / UncorrectedPatCalo, energy5x5 / Ptrack_in);
1001 MapCor3->Fill(energy5x5 / UncorrectedPatCalo, Ptrack_out / Ptrack_in);
1002 MapCor4->Fill(energy5x5 / UncorrectedPatCalo, energy5x5 / highPtElectron.
p());
1003 MapCor5->Fill(energy5x5 / UncorrectedPatCalo, UncorrectedPatCalo / Ptrack_out);
1004 MapCor6->Fill(Ptrack_out / Ptrack_in, energy5x5 / Ptrack_in);
1005 MapCor7->Fill(Ptrack_out / Ptrack_in, UncorrectedPatCalo / Ptrack_out);
1006 MapCor8->Fill(energy5x5 / Ptrack_in, UncorrectedPatCalo / Ptrack_out);
1011 PinMinPout->Fill((Ptrack_in - Ptrack_out) / Ptrack_in);
TH2F * GeneralMapEndCapMinus
ElectronCalibrationUniv(const edm::ParameterSet &)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
bool ecalDrivenSeed() const
const edm::ESGetToken< CaloTopology, CaloTopologyRecord > topologyToken_
TH2F * E25oPvsEtaEndCapPlus
std::vector< std::vector< float > > EventMatrix
constexpr bool isNotFinite(T x)
TH2F * GeneralMapEndCapPlus
TH2F * E25oPvsEtaEndCapMinus
#define DEFINE_FWK_MODULE(type)
int iphi() const
get the crystal iphi
float trackMomentumError() const
T const * product() const
std::vector< int > MaxCCeta
std::vector< EcalRecHit >::const_iterator const_iterator
void analyze(const edm::Event &, const edm::EventSetup &) override
TH2F * Map3DcalibEndCapMinus
MinL3AlgoUniv< DetId > * UnivL3
TH1F * eSeedOverPout2NoCuts
TH2F * GeneralMapBeforePt
const CaloTopology * theCaloTopology_
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
std::vector< std::vector< DetId > > UnivEventIds
const std::string calibAlgo_
float eSuperClusterOverP() const
Classification classification() const
int ieta() const
get the crystal ieta
const edm::EDGetTokenT< EBRecHitCollection > ebRecHitToken_
math::XYZVectorF trackMomentumAtCalo() const
float eSeedClusterOverPout() const
TH1F * eSeedOverPout2ESeed
constexpr bool null() const
is this a null id ?
std::vector< float > solution
math::XYZVectorF trackMomentumOut() const
bool TestEEvalidDetId(int crystal_ix, int crystal_iy, int iz)
TH1F * eSeedOverPoutNoCuts
double p() const final
magnitude of momentum vector
TH2F * Map3DcalibEndCapPlus
std::vector< float > iterate(const std::vector< std::vector< float > > &eventMatrix, const std::vector< int > &VmaxCeta, const std::vector< int > &VmaxCphi, const std::vector< float > &energyVector, const int &nIter, const bool &normalizeFlag=false)
Abs< T >::type abs(const T &t)
MinL3Algorithm * MyL3Algo1
math::XYZVectorF trackMomentumAtVtx() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool getData(T &iHolder) const
virtual std::vector< DetId > getWindow(const DetId &id, const int &northSouthSize, const int &eastWestSize) const
std::map< DetId, float > Univsolution
HouseholderDecomposition * MyHH
std::vector< int > MaxCCphi
const_iterator end() const
double energy() const
cluster energy
std::vector< float > runRegional(const std::vector< std::vector< float > > &eventMatrix, const std::vector< int > &VmaxCeta, const std::vector< int > &VmaxCphi, const std::vector< float > &energyVector, const int &nIter, const int ®Length=5)
const CaloSubdetectorTopology * getSubdetectorTopology(const DetId &id) const
access the subdetector Topology for the given subdetector directly
const edm::EDGetTokenT< reco::GsfElectronCollection > gsfElectronToken_
const std::string rootfile_
TH2F * GeneralMapEndCapMinusBeforePt
void endRun(edm::Run const &, edm::EventSetup const &) override
void writeLine(EBDetId const &, float)
iterator find(key_type k)
TH1F * calibinterEndCapPlus
TH2F * GeneralMapEndCapPlusBeforePt
IDmap iterate(const std::vector< std::vector< float > > &eventMatrix, const std::vector< std::vector< IDdet > > &idMatrix, const std::vector< float > &energyVector, const int &nIter, const bool &normalizeFlag=false)
~ElectronCalibrationUniv() override
std::vector< float > EnergyVector
Power< A, B >::type pow(const A &a, const B &b)
float hadronicOverEm() const
SuperClusterRef superCluster() const override
reference to a SuperCluster
std::vector< float > iterate(const std::vector< std::vector< float > > &eventMatrix, const std::vector< int > &VmaxCeta, const std::vector< int > &VmaxCphi, const std::vector< float > &energyVector, const int &nIter, const bool &normalizeFlag=false)
const edm::EDGetTokenT< EERecHitCollection > eeRecHitToken_
void beginRun(edm::Run const &, edm::EventSetup const &) override
TH1F * calibinterEndCapMinus
DetId findMaxHit(const std::vector< DetId > &v1, const EBRecHitCollection *EBhits, const EERecHitCollection *EEhits)