80 EventsAfterCuts =
new TH1F(
"EventsAfterCuts",
"Events After Cuts",30,0,30);
83 e9 =
new TH1F(
"e9",
"E9 energy", 300, 0., 150.);
84 e25 =
new TH1F(
"e25",
"E25 energy", 300, 0., 150.);
85 scE =
new TH1F(
"scE",
"SC energy", 300, 0., 150.);
86 trP =
new TH1F(
"trP",
"Trk momentum", 300, 0., 150.);
87 EoP =
new TH1F(
"EoP",
"EoP", 600, 0., 3.);
88 EoP_all =
new TH1F(
"EoP_all",
"EoP_all",600, 0., 3.);
90 calibs =
new TH1F(
"calib",
"Calibration constants", 800, 0.5, 2.);
91 calibsEndCapMinus =
new TH1F(
"calibEndCapMinus",
"Calibration constants EE-", 800, 0.5, 2.);
92 calibsEndCapPlus =
new TH1F(
"calibEndCapPlus",
"Calibration constants EE+", 800, 0.5, 2.);
94 e25OverScE =
new TH1F(
"e25OverscE",
"E25 / SC energy", 400, 0., 2.);
95 E25oP =
new TH1F(
"E25oP",
"E25 / P", 750, 0., 1.5);
97 Map =
new TH2F(
"Map",
"Nb Events in Crystal",173 ,-86 ,86,362, 0, 361 );
98 e9Overe25 =
new TH1F(
"e9Overe25",
"E9 / E25", 400, 0., 2.);
99 Map3Dcalib =
new TH2F(
"3Dcalib",
"3Dcalib",173 ,-86 ,86,362, 0, 361 );
103 MapCor1 =
new TH2F (
"MapCor1",
"Correlation E25/Pcalo versus E25/Pin",100 ,0. ,5. ,100,0.,5. );
104 MapCor2 =
new TH2F (
"MapCor2",
"Correlation E25/Pcalo versus E/P",100 ,0. ,5. ,100,0.,5. );
105 MapCor3 =
new TH2F (
"MapCor3",
"Correlation E25/Pcalo versus Pout/Pin",100 ,0. ,5. ,100,0.,5. );
106 MapCor4 =
new TH2F (
"MapCor4",
"Correlation E25/Pcalo versus E25/highestP",100 ,0. ,5. ,100,0.,5. );
107 MapCor5 =
new TH2F (
"MapCor5",
"Correlation E25/Pcalo versus Pcalo/Pout",100 ,0. ,5. ,100,0.,5. );
108 MapCor6 =
new TH2F (
"MapCor6",
"Correlation Pout/Pin versus E25/Pin",100 ,0. ,5. ,100,0.,5. );
109 MapCor7 =
new TH2F (
"MapCor7",
"Correlation Pout/Pin versus Pcalo/Pout",100 ,0. ,5. ,100,0.,5. );
110 MapCor8 =
new TH2F (
"MapCor8",
"Correlation E25/Pin versus Pcalo/Pout",100 ,0. ,5. ,100,0.,5. );
111 MapCor9 =
new TH2F (
"MapCor9",
"Correlation E25/Pcalo versus Eseed/Pout",100 ,0. ,5. ,100,0.,5. );
112 MapCor10 =
new TH2F (
"MapCor10",
"Correlation Eseed/Pout versus Pout/Pin",100 ,0. ,5. ,100,0.,5. );
113 MapCor11 =
new TH2F (
"MapCor11",
"Correlation Eseed/Pout versus E25/Pin",100 ,0. ,5. ,100,0.,5. );
116 E25oPvsEta =
new TH2F (
"E25oPvsEta",
"E/P vs Eta", 173, -86, 86, 600, 0.7,1.3);
117 E25oPvsEtaEndCapMinus =
new TH2F (
"E25oPvsEtaEndCapMinus",
"E/P vs R EE-", 100, 0, 100, 600, 0.7,1.3);
118 E25oPvsEtaEndCapPlus =
new TH2F (
"E25oPvsEtaEndCapPlus",
"E/P vs R EE+", 100, 0, 100, 600, 0.7,1.3);
120 PinMinPout =
new TH1F(
"PinMinPout",
"(Pin - Pout)/Pin",600,-2.0,2.0);
122 calibinter =
new TH1F(
"calibinter",
"internal calibration constants", 800 , 0.5,2.);
123 PinOverPout=
new TH1F(
"PinOverPout",
"pinOverpout", 600,0., 3.);
124 eSeedOverPout=
new TH1F(
"eSeedOverPout",
"eSeedOverpout ", 600, 0., 3.);
128 calibinterEndCapMinus =
new TH1F(
"calibinterEndCapMinus",
"internal calibration constants", 800 , 0.5,2.);
129 calibinterEndCapPlus =
new TH1F(
"calibinterEndCapPlus",
"internal calibration constants", 800 , 0.5,2.);
136 Error1 =
new TH1F (
"Error1",
"DeltaP/Pin",800 ,-1.0,1.0 );
137 Error2 =
new TH1F (
"Error2",
"DeltaP/Pout",800 ,-1.0,1.0 );
138 Error3 =
new TH1F (
"Error3",
"DeltaP/Pcalo",800 ,-1.0,1.0 );
139 eSeedOverPout2=
new TH1F(
"eSeedOverPout2",
"eSeedOverpout (No Supercluster)", 600, 0., 4.);
140 hadOverEm=
new TH1F(
"hadOverEm",
"Had/EM distribution", 600, -2., 2.);
143 Map3DcalibNoCuts =
new TH2F(
"3DcalibNoCuts",
"3Dcalib (Before Cuts)",173 ,-86 ,86,362, 0, 361 );
144 e9NoCuts =
new TH1F(
"e9NoCuts",
"E9 energy (Before Cuts)",300, 0., 150.);
145 e25NoCuts =
new TH1F(
"e25NoCuts",
"E25 energy (Before Cuts)", 300, 0., 150.);
146 scENoCuts =
new TH1F(
"scENoCuts",
"SC energy (Before Cuts)", 300, 0., 150.);
147 trPNoCuts =
new TH1F(
"trPNoCuts",
"Trk momentum (Before Cuts)", 300, 0., 150.);
148 EoPNoCuts =
new TH1F(
"EoPNoCuts",
"EoP (Before Cuts)", 600, 0., 3.);
149 calibsNoCuts =
new TH1F(
"calibNoCuts",
"Calibration constants (Before Cuts)", 800, 0., 2.);
150 e25OverScENoCuts =
new TH1F(
"e25OverscENoCuts",
"E25 / SC energy (Before Cuts)", 400, 0., 2.);
151 E25oPNoCuts =
new TH1F(
"E25oPNoCuts",
"E25 / P (Before Cuts)", 750, 0., 1.5);
152 MapEndCapMinus =
new TH2F(
"MapEndCapMinus",
"Nb Events in Crystal (EndCap)",100 ,0 ,100,100, 0, 100 );
153 MapEndCapPlus =
new TH2F(
"MapEndCapPlus",
"Nb Events in Crystal (EndCap)",100 ,0 ,100,100, 0, 100 );
154 e9Overe25NoCuts =
new TH1F(
"e9Overe25NoCuts",
"E9 / E25 (Before Cuts)", 400, 0., 2.);
155 PinOverPoutNoCuts =
new TH1F(
"PinOverPoutNoCuts",
"pinOverpout (Before Cuts)", 600,0., 3.);
156 eSeedOverPoutNoCuts =
new TH1F(
" eSeedOverPoutNoCuts",
"eSeedOverpout (Before Cuts) ", 600, 0., 4.);
157 PinMinPoutNoCuts =
new TH1F(
"PinMinPoutNoCuts",
"(Pin - Pout)/Pin (Before Cuts)",600,-2.0,2.0);
161 calibinterNoCuts =
new TH1F(
"calibinterNoCuts",
"internal calibration constants", 2000 , 0.5,2.);
163 MapCor1NoCuts =
new TH2F (
"MapCor1NoCuts",
"Correlation E25/PatCalo versus E25/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
164 MapCor2NoCuts =
new TH2F (
"MapCor2NoCuts",
"Correlation E25/PatCalo versus E/P (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
165 MapCor3NoCuts =
new TH2F (
"MapCor3NoCuts",
"Correlation E25/PatCalo versus Pout/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
166 MapCor4NoCuts =
new TH2F (
"MapCor4NoCuts",
"Correlation E25/PatCalo versus E25/highestP (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
167 MapCor5NoCuts =
new TH2F (
"MapCor5NoCuts",
"Correlation E25/Pcalo versus Pcalo/Pout (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
168 MapCor6NoCuts =
new TH2F (
"MapCor6NoCuts",
"Correlation Pout/Pin versus E25/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
169 MapCor7NoCuts =
new TH2F (
"MapCor7NoCuts",
"Correlation Pout/Pin versus Pcalo/Pout (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
170 MapCor8NoCuts =
new TH2F (
"MapCor8NoCuts",
"Correlation E25/Pin versus Pcalo/Pout (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
171 MapCor9NoCuts =
new TH2F (
"MapCor9NoCuts",
"Correlation E25/Pcalo versus Eseed/Pout (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
172 MapCor10NoCuts =
new TH2F (
"MapCor10NoCuts",
"Correlation Eseed/Pout versus Pout/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
173 MapCor11NoCuts =
new TH2F (
"MapCor11NoCuts",
"Correlation Eseed/Pout versus E25/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
177 Error1NoCuts =
new TH1F (
"Eror1NoCuts",
"DeltaP/Pin (Before Cuts)",800 ,-1.0,1.0 );
178 Error2NoCuts =
new TH1F (
"Error2NoCuts",
"DeltaP/Pout (Before Cuts)",800 ,-1.0,1.0 );
179 Error3NoCuts =
new TH1F (
"Error3NoCuts",
"DeltaP/Pcalo (Before Cuts)",800 ,-1.0, 1.0);
180 eSeedOverPout2NoCuts=
new TH1F(
"eSeedOverPout2NoCuts",
"eSeedOverpout (No Supercluster, Before Cuts)", 600, 0., 4.);
181 hadOverEmNoCuts=
new TH1F(
"hadOverEmNoCuts",
"Had/EM distribution (Before Cuts)", 600, -2., 2.);
184 MapCor1ESeed =
new TH2F (
"MapCor1ESeed",
"Correlation E25/Pcalo versus E25/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
185 MapCor2ESeed =
new TH2F (
"MapCor2ESeed",
"Correlation E25/Pcalo versus E/P (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
186 MapCor3ESeed =
new TH2F (
"MapCor3ESeed",
"Correlation E25/Pcalo versus Pout/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
187 MapCor4ESeed =
new TH2F (
"MapCor4ESeed",
"Correlation E25/Pcalo versus E25/highestP (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
188 MapCor5ESeed =
new TH2F (
"MapCor5ESeed",
"Correlation E25/Pcalo versus Pcalo/Pout (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
189 MapCor6ESeed =
new TH2F (
"MapCor6ESeed",
"Correlation Pout/Pin versus E25/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
190 MapCor7ESeed =
new TH2F (
"MapCor7ESeed",
"Correlation Pout/Pin versus Pcalo/Pout (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
191 MapCor8ESeed =
new TH2F (
"MapCor8ESeed",
"Correlation E25/Pin versus Pcalo/Pout (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
192 MapCor9ESeed =
new TH2F (
"MapCor9ESeed",
"Correlation E25/Pcalo versus Eseed/Pout (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
193 MapCor10ESeed =
new TH2F (
"MapCor10ESeed",
"Correlation Eseed/Pout versus Pout/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
194 MapCor11ESeed =
new TH2F (
"MapCor11ESeed",
"Correlation Eseed/Pout versus E25/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
196 eSeedOverPout2ESeed=
new TH1F(
"eSeedOverPout2ESeed",
"eSeedOverpout (No Supercluster, after Eseed/Pout cut)", 600, 0., 4.);
198 hadOverEmESeed=
new TH1F(
"hadOverEmESeed",
"Had/EM distribution (after Eseed/Pout cut)", 600, -2., 2.);
201 GeneralMap =
new TH2F(
"GeneralMap",
"Map without any cuts",173 ,-86 ,86,362, 0, 361 );
202 GeneralMapEndCapMinus =
new TH2F(
"GeneralMapEndCapMinus",
"Map without any cuts",100 ,0 ,100,100, 0, 100 );
203 GeneralMapEndCapPlus =
new TH2F(
"GeneralMapEndCapPlus",
"Map without any cuts",100 ,0 ,100,100, 0, 100 );
204 GeneralMapBeforePt =
new TH2F(
"GeneralMapBeforePt",
"Map without any cuts",173 ,-86 ,86,362, 0, 361 );
222 std::cout<<
" Name of Algorithm is not recognize "<<
calibAlgo_<<
" Should be either L3, HH or HHReg. Abort! "<<std::endl;
249 time_t cpu_time_used;
269 std::cout<<
" Calibration not run due to problem in Algo Choice..."<<std::endl;
276 cpu_time_used = end -
start;
292 std::map<EBDetId,float> OldCoeff;
311 std::map<EEDetId,float> OldCoeffEndCap;
324 std::map<DetId,float>::const_iterator itmap;
326 const DetId Id(itmap->first);
328 const EBDetId IChannelDetId(itmap->first);
337 calibs->Fill(itmap->second);
344 write_calibrations.
writeLine(IChannelDetId,itmap->second);
350 const EEDetId IChannelDetId(itmap->first);
358 if(IChannelDetId.
zside()<0){
373 write_calibrations.
writeLine(IChannelDetId,itmap->second);
507 std::cout <<
"************* STATISTICS **************" << std::endl;
509 std::cout <<
"Timing info:" << std::endl;
510 std::cout <<
"CPU time usage -- calibrating: " << cpu_time_used <<
" sec." << std::endl;
519 double currEnergy = 0.;
522 for( std::vector<DetId>::const_iterator idsIt = v1.begin(); idsIt != v1.end(); ++idsIt) {
523 if(idsIt->subdetId()==1){
525 itrechit = EBhits->
find(*idsIt);
526 if(itrechit==EBhits->
end()){
527 std::cout <<
"ElectronCalibration::findMaxHit: rechit not found! " << (
EBDetId)(*idsIt)<<std::endl;
530 if(itrechit->energy() > currEnergy) {
531 currEnergy=itrechit->energy();
536 itrechit = EEhits->
find(*idsIt);
537 if(itrechit==EEhits->
end()){
538 std::cout <<
"ElectronCalibration::findMaxHit: rechit not found! idsIt = " << (
EEDetId)(*idsIt)<< std::endl;
542 if(itrechit->energy() > currEnergy) {
543 currEnergy=itrechit->energy();
556 if (crystal_ix < 1 || crystal_ix > 100 ||
557 crystal_iy < 1 || crystal_iy > 100 ||
abs(iz) != 1 )
559 if ( (crystal_ix >= 1 && crystal_ix <= 3 && (crystal_iy <= 40 || crystal_iy > 60) ) ||
560 (crystal_ix >= 4 && crystal_ix <= 5 && (crystal_iy <= 35 || crystal_iy > 65) ) ||
561 (crystal_ix >= 6 && crystal_ix <= 8 && (crystal_iy <= 25 || crystal_iy > 75) ) ||
562 (crystal_ix >= 9 && crystal_ix <= 13 && (crystal_iy <= 20 || crystal_iy > 80) ) ||
563 (crystal_ix >= 14 && crystal_ix <= 15 && (crystal_iy <= 15 || crystal_iy > 85) ) ||
564 (crystal_ix >= 16 && crystal_ix <= 20 && (crystal_iy <= 13 || crystal_iy > 87) ) ||
565 (crystal_ix >= 21 && crystal_ix <= 25 && (crystal_iy <= 8 || crystal_iy > 92) ) ||
566 (crystal_ix >= 26 && crystal_ix <= 35 && (crystal_iy <= 5 || crystal_iy > 95) ) ||
567 (crystal_ix >= 36 && crystal_ix <= 39 && (crystal_iy <= 3 || crystal_iy > 97) ) ||
568 (crystal_ix >= 98 && crystal_ix <= 100 && (crystal_iy <= 40 || crystal_iy > 60) ) ||
569 (crystal_ix >= 96 && crystal_ix <= 97 && (crystal_iy <= 35 || crystal_iy > 65) ) ||
570 (crystal_ix >= 93 && crystal_ix <= 95 && (crystal_iy <= 25 || crystal_iy > 75) ) ||
571 (crystal_ix >= 88 && crystal_ix <= 92 && (crystal_iy <= 20 || crystal_iy > 80) ) ||
572 (crystal_ix >= 86 && crystal_ix <= 87 && (crystal_iy <= 15 || crystal_iy > 85) ) ||
573 (crystal_ix >= 81 && crystal_ix <= 85 && (crystal_iy <= 13 || crystal_iy > 87) ) ||
574 (crystal_ix >= 76 && crystal_ix <= 80 && (crystal_iy <= 8 || crystal_iy > 92) ) ||
575 (crystal_ix >= 66 && crystal_ix <= 75 && (crystal_iy <= 5 || crystal_iy > 95) ) ||
576 (crystal_ix >= 62 && crystal_ix <= 65 && (crystal_iy <= 3 || crystal_iy > 97) ) ||
577 ( (crystal_ix == 40 || crystal_ix == 61) && ( (crystal_iy >= 46 && crystal_iy <= 55 ) || crystal_iy <= 3 || crystal_iy > 97 )) ||
578 ( (crystal_ix == 41 || crystal_ix == 60) && crystal_iy >= 44 && crystal_iy <= 57 ) ||
579 ( (crystal_ix == 42 || crystal_ix == 59) && crystal_iy >= 43 && crystal_iy <= 58 ) ||
580 ( (crystal_ix == 43 || crystal_ix == 58) && crystal_iy >= 42 && crystal_iy <= 59 ) ||
581 ( (crystal_ix == 44 || crystal_ix == 45 || crystal_ix == 57 || crystal_ix == 56) && crystal_iy >= 41 && crystal_iy <= 60 ) ||
582 ( crystal_ix >= 46 && crystal_ix <= 55 && crystal_iy >= 40 && crystal_iy <= 61 )
600 if (!EBphits.isValid()) {
601 std::cerr <<
"Error! can't get the product EBRecHitCollection: " << std::endl;
609 if (!EEphits.isValid()) {
610 std::cerr <<
"Error! can't get the product EERecHitCollection: " << std::endl;
617 if (!pElectrons.isValid()) {
618 std::cerr <<
"Error! can't get the product ElectronCollection: " << std::endl;
625 if (!EBhits || !EEhits)
return;
627 if (EBhits->size() == 0 && EEhits->size() == 0 )
return ;
629 if (!electronCollection)
return ;
631 if (electronCollection->size() == 0)
return;
639 reco::GsfElectronCollection::const_iterator eleIt = electronCollection->begin();
643 float highestElePt=0.;
645 for (eleIt=electronCollection->begin(); eleIt!=electronCollection->end(); eleIt++) {
647 if(fabs(eleIt->eta())>2.4)
continue;
650 if(eleIt->pt()>highestElePt) {
651 highestElePt=eleIt->pt();
652 highPtElectron = *eleIt;
665 std::vector<DetId> v1;
667 for (std::vector<std::pair<DetId,float> >::const_iterator idsIt = sc.hitsAndFractions().begin();
668 idsIt != sc.hitsAndFractions().end ();++idsIt)
669 {v1.push_back(idsIt->first);
683 if(maxHitId.subdetId()!=1) {
684 maxCC_Eta = ((
EEDetId)maxHitId).ix();
685 maxCC_Phi = ((
EEDetId)maxHitId).iy();
686 Zside = ((
EEDetId)maxHitId).zside();
689 maxCC_Eta = ((
EBDetId)maxHitId).ieta();
690 maxCC_Phi = ((
EBDetId)maxHitId).iphi();
705 std::vector<float>
energy;
712 std::vector<DetId> NxNaroundMax = topology->getWindow(maxHitId,ClusterSize,ClusterSize);
714 std::vector<DetId> S9aroundMax = topology->getWindow(maxHitId,3,3);
717 if((
int)NxNaroundMax.size()!=ClusterSize*ClusterSize)
return;
719 if(S9aroundMax.size()!=9)
return;
724 for (
int icry=0;icry<ClusterSize*ClusterSize;icry++){
725 if (NxNaroundMax[icry].subdetId() ==
EcalBarrel) {
727 itrechit = EBhits->find(NxNaroundMax[icry]);
728 if(itrechit==EBhits->end()){
736 energy.push_back(itrechit->energy());
737 energy5x5 += itrechit->energy();
741 if(NxNaroundMax[icry]==S9aroundMax[
tt])energy3x3+=itrechit->energy();
746 itrechit = EEhits->find(NxNaroundMax[icry]);
748 if(itrechit==EEhits->end()){
757 energy.push_back(itrechit->energy());
758 energy5x5 += itrechit->energy();
762 if(NxNaroundMax[icry]==S9aroundMax[
tt])energy3x3+=itrechit->energy();
770 if((
int)
energy.size()!=ClusterSize*ClusterSize)
return ;
798 float Ptrack_in=
sqrt(
pow(highPtElectron.trackMomentumAtVtx().X(),2) +
pow(highPtElectron.trackMomentumAtVtx().Y(),2) +
pow(highPtElectron.trackMomentumAtVtx().Z(),2) );
800 float UncorrectedPatCalo =
sqrt(
pow(highPtElectron.trackMomentumAtCalo().X(),2)+
pow(highPtElectron.trackMomentumAtCalo().Y(),2)+
pow(highPtElectron.trackMomentumAtCalo().Z(),2));
802 float Ptrack_out =
sqrt(
pow(highPtElectron.trackMomentumOut().X(),2)+
pow(highPtElectron.trackMomentumOut().Y(),2)+
pow(highPtElectron.trackMomentumOut().Z(),2) );
811 EoPNoCuts->Fill(highPtElectron.eSuperClusterOverP());
816 PinOverPoutNoCuts->Fill(
sqrt(
pow(highPtElectron.trackMomentumAtVtx().X(),2) +
pow(highPtElectron.trackMomentumAtVtx().Y(),2) +
pow(highPtElectron.trackMomentumAtVtx().Z(),2) )/
sqrt(
pow(highPtElectron.trackMomentumOut().X(),2)+
pow(highPtElectron.trackMomentumOut().Y(),2)+
pow(highPtElectron.trackMomentumOut().Z(),2) ) );
819 MapCor1NoCuts->Fill(energy5x5/UncorrectedPatCalo,energy5x5/Ptrack_in);
820 MapCor2NoCuts->Fill(energy5x5/UncorrectedPatCalo,highPtElectron.eSuperClusterOverP());
821 MapCor3NoCuts->Fill(energy5x5/UncorrectedPatCalo,Ptrack_out/Ptrack_in);
822 MapCor4NoCuts->Fill(energy5x5/UncorrectedPatCalo,energy5x5/highPtElectron.p());
823 MapCor5NoCuts->Fill(energy5x5/UncorrectedPatCalo,UncorrectedPatCalo/Ptrack_out);
824 MapCor6NoCuts->Fill(Ptrack_out/Ptrack_in,energy5x5/Ptrack_in);
825 MapCor7NoCuts->Fill(Ptrack_out/Ptrack_in,UncorrectedPatCalo/Ptrack_out);
826 MapCor8NoCuts->Fill(energy5x5/Ptrack_in,UncorrectedPatCalo/Ptrack_out);
827 MapCor9NoCuts->Fill(energy5x5/UncorrectedPatCalo,highPtElectron.eSeedClusterOverPout());
828 MapCor10NoCuts->Fill(highPtElectron.eSeedClusterOverPout(),Ptrack_out/Ptrack_in);
829 MapCor11NoCuts->Fill(highPtElectron.eSeedClusterOverPout(),energy5x5/Ptrack_in);
834 Error2NoCuts->Fill(highPtElectron.trackMomentumError()/Ptrack_out);
835 Error3NoCuts->Fill(highPtElectron.trackMomentumError()/UncorrectedPatCalo);
842 if((energy3x3/energy5x5)<
cut1_)
return ;
843 if((Ptrack_out/Ptrack_in)<
cut2_ || (Ptrack_out/Ptrack_in)>
cut3_ )
return;
918 E25oPvsEta->Fill(maxCC_Eta,energy5x5/UncorrectedPatCalo);
920 float Radius =
sqrt((maxCC_Eta)*(maxCC_Eta) + (maxCC_Phi)*(maxCC_Phi));
928 e25->Fill(energy5x5);
930 scE->Fill(sc.energy());
931 trP->Fill(UncorrectedPatCalo);
933 EoP->Fill(highPtElectron.eSuperClusterOverP());
936 E25oP->Fill(energy5x5/UncorrectedPatCalo);
939 Map->Fill(maxCC_Eta,maxCC_Phi);
949 PinOverPout->Fill(
sqrt(
pow(highPtElectron.trackMomentumAtVtx().X(),2) +
pow(highPtElectron.trackMomentumAtVtx().Y(),2) +
pow(highPtElectron.trackMomentumAtVtx().Z(),2) )/
sqrt(
pow(highPtElectron.trackMomentumOut().X(),2)+
pow(highPtElectron.trackMomentumOut().Y(),2)+
pow(highPtElectron.trackMomentumOut().Z(),2) ) );
952 MapCor1->Fill(energy5x5/UncorrectedPatCalo,energy5x5/Ptrack_in);
953 MapCor2->Fill(energy5x5/UncorrectedPatCalo,highPtElectron.eSuperClusterOverP());
954 MapCor3->Fill(energy5x5/UncorrectedPatCalo,Ptrack_out/Ptrack_in);
955 MapCor4->Fill(energy5x5/UncorrectedPatCalo,energy5x5/highPtElectron.p());
956 MapCor5->Fill(energy5x5/UncorrectedPatCalo,UncorrectedPatCalo/Ptrack_out);
957 MapCor6->Fill(Ptrack_out/Ptrack_in,energy5x5/Ptrack_in);
958 MapCor7->Fill(Ptrack_out/Ptrack_in,UncorrectedPatCalo/Ptrack_out);
959 MapCor8->Fill(energy5x5/Ptrack_in,UncorrectedPatCalo/Ptrack_out);
960 MapCor9->Fill(energy5x5/UncorrectedPatCalo,highPtElectron.eSeedClusterOverPout());
961 MapCor10->Fill(highPtElectron.eSeedClusterOverPout(),Ptrack_out/Ptrack_in);
962 MapCor11->Fill(highPtElectron.eSeedClusterOverPout(),energy5x5/Ptrack_in);
964 PinMinPout->Fill((Ptrack_in-Ptrack_out)/Ptrack_in);
966 Error1->
Fill(highPtElectron.trackMomentumError()/Ptrack_in);
967 Error2->Fill(highPtElectron.trackMomentumError()/Ptrack_out);
968 Error3->Fill(highPtElectron.trackMomentumError()/UncorrectedPatCalo);
971 hadOverEm->Fill(highPtElectron.hadronicOverEm());
TH2F * GeneralMapEndCapMinus
ElectronCalibrationUniv(const edm::ParameterSet &)
T getParameter(std::string const &) const
tuple start
Check for commandline option errors.
~ElectronCalibrationUniv()
TH2F * E25oPvsEtaEndCapPlus
std::vector< std::vector< float > > EventMatrix
TH2F * GeneralMapEndCapPlus
TH2F * E25oPvsEtaEndCapMinus
#define DEFINE_FWK_MODULE(type)
std::vector< int > MaxCCeta
std::vector< EcalRecHit >::const_iterator const_iterator
TH2F * Map3DcalibEndCapMinus
MinL3AlgoUniv< DetId > * UnivL3
TH1F * eSeedOverPout2NoCuts
TH2F * GeneralMapBeforePt
std::vector< GsfElectron > GsfElectronCollection
collection of GsfElectron objects
edm::InputTag EBrecHitLabel_
std::vector< std::vector< DetId > > UnivEventIds
int iphi() const
get the crystal iphi
TH1F * eSeedOverPout2ESeed
std::vector< float > solution
bool TestEEvalidDetId(int crystal_ix, int crystal_iy, int iz)
TH1F * eSeedOverPoutNoCuts
virtual void beginRun(edm::Run const &, edm::EventSetup const &)
TH2F * Map3DcalibEndCapPlus
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
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)
edm::InputTag trackLabel_
std::map< DetId, float > Univsolution
Abs< T >::type abs(const T &t)
MinL3Algorithm * MyL3Algo1
edm::InputTag electronLabel_
int ieta() const
get the crystal ieta
HouseholderDecomposition * MyHH
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< int > MaxCCphi
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::ESHandle< CaloTopology > theCaloTopology
const_iterator end() const
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)
return(e1-e2)*(e1-e2)+dp *dp
TH2F * GeneralMapEndCapMinusBeforePt
void writeLine(EBDetId const &, float)
iterator find(key_type k)
TH1F * calibinterEndCapPlus
TH2F * GeneralMapEndCapPlusBeforePt
std::string miscalibfile_
edm::InputTag EErecHitLabel_
virtual void analyze(const edm::Event &, const edm::EventSetup &)
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)
std::vector< float > EnergyVector
Power< A, B >::type pow(const A &a, const B &b)
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)
TH1F * calibinterEndCapMinus
std::string miscalibfileEndCap_
DetId findMaxHit(const std::vector< DetId > &v1, const EBRecHitCollection *EBhits, const EERecHitCollection *EEhits)