79 EventsAfterCuts =
new TH1F(
"EventsAfterCuts",
"Events After Cuts",30,0,30);
82 e9 =
new TH1F(
"e9",
"E9 energy", 300, 0., 150.);
83 e25 =
new TH1F(
"e25",
"E25 energy", 300, 0., 150.);
84 scE =
new TH1F(
"scE",
"SC energy", 300, 0., 150.);
85 trP =
new TH1F(
"trP",
"Trk momentum", 300, 0., 150.);
86 EoP =
new TH1F(
"EoP",
"EoP", 600, 0., 3.);
87 EoP_all =
new TH1F(
"EoP_all",
"EoP_all",600, 0., 3.);
89 calibs =
new TH1F(
"calib",
"Calibration constants", 800, 0.5, 2.);
90 calibsEndCapMinus =
new TH1F(
"calibEndCapMinus",
"Calibration constants EE-", 800, 0.5, 2.);
91 calibsEndCapPlus =
new TH1F(
"calibEndCapPlus",
"Calibration constants EE+", 800, 0.5, 2.);
93 e25OverScE =
new TH1F(
"e25OverscE",
"E25 / SC energy", 400, 0., 2.);
94 E25oP =
new TH1F(
"E25oP",
"E25 / P", 750, 0., 1.5);
96 Map =
new TH2F(
"Map",
"Nb Events in Crystal",173 ,-86 ,86,362, 0, 361 );
97 e9Overe25 =
new TH1F(
"e9Overe25",
"E9 / E25", 400, 0., 2.);
98 Map3Dcalib =
new TH2F(
"3Dcalib",
"3Dcalib",173 ,-86 ,86,362, 0, 361 );
102 MapCor1 =
new TH2F (
"MapCor1",
"Correlation E25/Pcalo versus E25/Pin",100 ,0. ,5. ,100,0.,5. );
103 MapCor2 =
new TH2F (
"MapCor2",
"Correlation E25/Pcalo versus E/P",100 ,0. ,5. ,100,0.,5. );
104 MapCor3 =
new TH2F (
"MapCor3",
"Correlation E25/Pcalo versus Pout/Pin",100 ,0. ,5. ,100,0.,5. );
105 MapCor4 =
new TH2F (
"MapCor4",
"Correlation E25/Pcalo versus E25/highestP",100 ,0. ,5. ,100,0.,5. );
106 MapCor5 =
new TH2F (
"MapCor5",
"Correlation E25/Pcalo versus Pcalo/Pout",100 ,0. ,5. ,100,0.,5. );
107 MapCor6 =
new TH2F (
"MapCor6",
"Correlation Pout/Pin versus E25/Pin",100 ,0. ,5. ,100,0.,5. );
108 MapCor7 =
new TH2F (
"MapCor7",
"Correlation Pout/Pin versus Pcalo/Pout",100 ,0. ,5. ,100,0.,5. );
109 MapCor8 =
new TH2F (
"MapCor8",
"Correlation E25/Pin versus Pcalo/Pout",100 ,0. ,5. ,100,0.,5. );
110 MapCor9 =
new TH2F (
"MapCor9",
"Correlation E25/Pcalo versus Eseed/Pout",100 ,0. ,5. ,100,0.,5. );
111 MapCor10 =
new TH2F (
"MapCor10",
"Correlation Eseed/Pout versus Pout/Pin",100 ,0. ,5. ,100,0.,5. );
112 MapCor11 =
new TH2F (
"MapCor11",
"Correlation Eseed/Pout versus E25/Pin",100 ,0. ,5. ,100,0.,5. );
115 E25oPvsEta =
new TH2F (
"E25oPvsEta",
"E/P vs Eta", 173, -86, 86, 600, 0.7,1.3);
116 E25oPvsEtaEndCapMinus =
new TH2F (
"E25oPvsEtaEndCapMinus",
"E/P vs R EE-", 100, 0, 100, 600, 0.7,1.3);
117 E25oPvsEtaEndCapPlus =
new TH2F (
"E25oPvsEtaEndCapPlus",
"E/P vs R EE+", 100, 0, 100, 600, 0.7,1.3);
119 PinMinPout =
new TH1F(
"PinMinPout",
"(Pin - Pout)/Pin",600,-2.0,2.0);
121 calibinter =
new TH1F(
"calibinter",
"internal calibration constants", 800 , 0.5,2.);
122 PinOverPout=
new TH1F(
"PinOverPout",
"pinOverpout", 600,0., 3.);
123 eSeedOverPout=
new TH1F(
"eSeedOverPout",
"eSeedOverpout ", 600, 0., 3.);
127 calibinterEndCapMinus =
new TH1F(
"calibinterEndCapMinus",
"internal calibration constants", 800 , 0.5,2.);
128 calibinterEndCapPlus =
new TH1F(
"calibinterEndCapPlus",
"internal calibration constants", 800 , 0.5,2.);
135 Error1 =
new TH1F (
"Error1",
"DeltaP/Pin",800 ,-1.0,1.0 );
136 Error2 =
new TH1F (
"Error2",
"DeltaP/Pout",800 ,-1.0,1.0 );
137 Error3 =
new TH1F (
"Error3",
"DeltaP/Pcalo",800 ,-1.0,1.0 );
138 eSeedOverPout2=
new TH1F(
"eSeedOverPout2",
"eSeedOverpout (No Supercluster)", 600, 0., 4.);
139 hadOverEm=
new TH1F(
"hadOverEm",
"Had/EM distribution", 600, -2., 2.);
142 Map3DcalibNoCuts =
new TH2F(
"3DcalibNoCuts",
"3Dcalib (Before Cuts)",173 ,-86 ,86,362, 0, 361 );
143 e9NoCuts =
new TH1F(
"e9NoCuts",
"E9 energy (Before Cuts)",300, 0., 150.);
144 e25NoCuts =
new TH1F(
"e25NoCuts",
"E25 energy (Before Cuts)", 300, 0., 150.);
145 scENoCuts =
new TH1F(
"scENoCuts",
"SC energy (Before Cuts)", 300, 0., 150.);
146 trPNoCuts =
new TH1F(
"trPNoCuts",
"Trk momentum (Before Cuts)", 300, 0., 150.);
147 EoPNoCuts =
new TH1F(
"EoPNoCuts",
"EoP (Before Cuts)", 600, 0., 3.);
148 calibsNoCuts =
new TH1F(
"calibNoCuts",
"Calibration constants (Before Cuts)", 800, 0., 2.);
149 e25OverScENoCuts =
new TH1F(
"e25OverscENoCuts",
"E25 / SC energy (Before Cuts)", 400, 0., 2.);
150 E25oPNoCuts =
new TH1F(
"E25oPNoCuts",
"E25 / P (Before Cuts)", 750, 0., 1.5);
151 MapEndCapMinus =
new TH2F(
"MapEndCapMinus",
"Nb Events in Crystal (EndCap)",100 ,0 ,100,100, 0, 100 );
152 MapEndCapPlus =
new TH2F(
"MapEndCapPlus",
"Nb Events in Crystal (EndCap)",100 ,0 ,100,100, 0, 100 );
153 e9Overe25NoCuts =
new TH1F(
"e9Overe25NoCuts",
"E9 / E25 (Before Cuts)", 400, 0., 2.);
154 PinOverPoutNoCuts =
new TH1F(
"PinOverPoutNoCuts",
"pinOverpout (Before Cuts)", 600,0., 3.);
155 eSeedOverPoutNoCuts =
new TH1F(
" eSeedOverPoutNoCuts",
"eSeedOverpout (Before Cuts) ", 600, 0., 4.);
156 PinMinPoutNoCuts =
new TH1F(
"PinMinPoutNoCuts",
"(Pin - Pout)/Pin (Before Cuts)",600,-2.0,2.0);
160 calibinterNoCuts =
new TH1F(
"calibinterNoCuts",
"internal calibration constants", 2000 , 0.5,2.);
162 MapCor1NoCuts =
new TH2F (
"MapCor1NoCuts",
"Correlation E25/PatCalo versus E25/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
163 MapCor2NoCuts =
new TH2F (
"MapCor2NoCuts",
"Correlation E25/PatCalo versus E/P (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
164 MapCor3NoCuts =
new TH2F (
"MapCor3NoCuts",
"Correlation E25/PatCalo versus Pout/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
165 MapCor4NoCuts =
new TH2F (
"MapCor4NoCuts",
"Correlation E25/PatCalo versus E25/highestP (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
166 MapCor5NoCuts =
new TH2F (
"MapCor5NoCuts",
"Correlation E25/Pcalo versus Pcalo/Pout (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
167 MapCor6NoCuts =
new TH2F (
"MapCor6NoCuts",
"Correlation Pout/Pin versus E25/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
168 MapCor7NoCuts =
new TH2F (
"MapCor7NoCuts",
"Correlation Pout/Pin versus Pcalo/Pout (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
169 MapCor8NoCuts =
new TH2F (
"MapCor8NoCuts",
"Correlation E25/Pin versus Pcalo/Pout (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
170 MapCor9NoCuts =
new TH2F (
"MapCor9NoCuts",
"Correlation E25/Pcalo versus Eseed/Pout (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
171 MapCor10NoCuts =
new TH2F (
"MapCor10NoCuts",
"Correlation Eseed/Pout versus Pout/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
172 MapCor11NoCuts =
new TH2F (
"MapCor11NoCuts",
"Correlation Eseed/Pout versus E25/Pin (Before Cuts)",100 ,0. ,5. ,100,0.,5. );
176 Error1NoCuts =
new TH1F (
"Eror1NoCuts",
"DeltaP/Pin (Before Cuts)",800 ,-1.0,1.0 );
177 Error2NoCuts =
new TH1F (
"Error2NoCuts",
"DeltaP/Pout (Before Cuts)",800 ,-1.0,1.0 );
178 Error3NoCuts =
new TH1F (
"Error3NoCuts",
"DeltaP/Pcalo (Before Cuts)",800 ,-1.0, 1.0);
179 eSeedOverPout2NoCuts=
new TH1F(
"eSeedOverPout2NoCuts",
"eSeedOverpout (No Supercluster, Before Cuts)", 600, 0., 4.);
180 hadOverEmNoCuts=
new TH1F(
"hadOverEmNoCuts",
"Had/EM distribution (Before Cuts)", 600, -2., 2.);
183 MapCor1ESeed =
new TH2F (
"MapCor1ESeed",
"Correlation E25/Pcalo versus E25/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
184 MapCor2ESeed =
new TH2F (
"MapCor2ESeed",
"Correlation E25/Pcalo versus E/P (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
185 MapCor3ESeed =
new TH2F (
"MapCor3ESeed",
"Correlation E25/Pcalo versus Pout/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
186 MapCor4ESeed =
new TH2F (
"MapCor4ESeed",
"Correlation E25/Pcalo versus E25/highestP (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
187 MapCor5ESeed =
new TH2F (
"MapCor5ESeed",
"Correlation E25/Pcalo versus Pcalo/Pout (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
188 MapCor6ESeed =
new TH2F (
"MapCor6ESeed",
"Correlation Pout/Pin versus E25/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
189 MapCor7ESeed =
new TH2F (
"MapCor7ESeed",
"Correlation Pout/Pin versus Pcalo/Pout (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
190 MapCor8ESeed =
new TH2F (
"MapCor8ESeed",
"Correlation E25/Pin versus Pcalo/Pout (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
191 MapCor9ESeed =
new TH2F (
"MapCor9ESeed",
"Correlation E25/Pcalo versus Eseed/Pout (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
192 MapCor10ESeed =
new TH2F (
"MapCor10ESeed",
"Correlation Eseed/Pout versus Pout/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
193 MapCor11ESeed =
new TH2F (
"MapCor11ESeed",
"Correlation Eseed/Pout versus E25/Pin (after Eseed/Pout cut)",100 ,0. ,5. ,100,0.,5. );
195 eSeedOverPout2ESeed=
new TH1F(
"eSeedOverPout2ESeed",
"eSeedOverpout (No Supercluster, after Eseed/Pout cut)", 600, 0., 4.);
197 hadOverEmESeed=
new TH1F(
"hadOverEmESeed",
"Had/EM distribution (after Eseed/Pout cut)", 600, -2., 2.);
200 GeneralMap =
new TH2F(
"GeneralMap",
"Map without any cuts",173 ,-86 ,86,362, 0, 361 );
201 GeneralMapEndCapMinus =
new TH2F(
"GeneralMapEndCapMinus",
"Map without any cuts",100 ,0 ,100,100, 0, 100 );
202 GeneralMapEndCapPlus =
new TH2F(
"GeneralMapEndCapPlus",
"Map without any cuts",100 ,0 ,100,100, 0, 100 );
203 GeneralMapBeforePt =
new TH2F(
"GeneralMapBeforePt",
"Map without any cuts",173 ,-86 ,86,362, 0, 361 );
221 std::cout<<
" Name of Algorithm is not recognize "<<
calibAlgo_<<
" Should be either L3, HH or HHReg. Abort! "<<std::endl;
248 time_t cpu_time_used;
268 std::cout<<
" Calibration not run due to problem in Algo Choice..."<<std::endl;
275 cpu_time_used = end -
start;
291 std::map<EBDetId,float> OldCoeff;
310 std::map<EEDetId,float> OldCoeffEndCap;
323 std::map<DetId,float>::const_iterator itmap;
325 const DetId Id(itmap->first);
327 const EBDetId IChannelDetId(itmap->first);
336 calibs->Fill(itmap->second);
343 write_calibrations.
writeLine(IChannelDetId,itmap->second);
349 const EEDetId IChannelDetId(itmap->first);
357 if(IChannelDetId.
zside()<0){
372 write_calibrations.
writeLine(IChannelDetId,itmap->second);
506 std::cout <<
"************* STATISTICS **************" << std::endl;
508 std::cout <<
"Timing info:" << std::endl;
509 std::cout <<
"CPU time usage -- calibrating: " << cpu_time_used <<
" sec." << std::endl;
518 double currEnergy = 0.;
521 for( std::vector<DetId>::const_iterator idsIt = v1.begin(); idsIt != v1.end(); ++idsIt) {
522 if(idsIt->subdetId()==1){
524 itrechit = EBhits->
find(*idsIt);
525 if(itrechit==EBhits->
end()){
526 std::cout <<
"ElectronCalibration::findMaxHit: rechit not found! " << (
EBDetId)(*idsIt)<<std::endl;
529 if(itrechit->energy() > currEnergy) {
530 currEnergy=itrechit->energy();
535 itrechit = EEhits->
find(*idsIt);
536 if(itrechit==EEhits->
end()){
537 std::cout <<
"ElectronCalibration::findMaxHit: rechit not found! idsIt = " << (
EEDetId)(*idsIt)<< std::endl;
541 if(itrechit->energy() > currEnergy) {
542 currEnergy=itrechit->energy();
555 if (crystal_ix < 1 || crystal_ix > 100 ||
556 crystal_iy < 1 || crystal_iy > 100 ||
abs(iz) != 1 )
558 if ( (crystal_ix >= 1 && crystal_ix <= 3 && (crystal_iy <= 40 || crystal_iy > 60) ) ||
559 (crystal_ix >= 4 && crystal_ix <= 5 && (crystal_iy <= 35 || crystal_iy > 65) ) ||
560 (crystal_ix >= 6 && crystal_ix <= 8 && (crystal_iy <= 25 || crystal_iy > 75) ) ||
561 (crystal_ix >= 9 && crystal_ix <= 13 && (crystal_iy <= 20 || crystal_iy > 80) ) ||
562 (crystal_ix >= 14 && crystal_ix <= 15 && (crystal_iy <= 15 || crystal_iy > 85) ) ||
563 (crystal_ix >= 16 && crystal_ix <= 20 && (crystal_iy <= 13 || crystal_iy > 87) ) ||
564 (crystal_ix >= 21 && crystal_ix <= 25 && (crystal_iy <= 8 || crystal_iy > 92) ) ||
565 (crystal_ix >= 26 && crystal_ix <= 35 && (crystal_iy <= 5 || crystal_iy > 95) ) ||
566 (crystal_ix >= 36 && crystal_ix <= 39 && (crystal_iy <= 3 || crystal_iy > 97) ) ||
567 (crystal_ix >= 98 && crystal_ix <= 100 && (crystal_iy <= 40 || crystal_iy > 60) ) ||
568 (crystal_ix >= 96 && crystal_ix <= 97 && (crystal_iy <= 35 || crystal_iy > 65) ) ||
569 (crystal_ix >= 93 && crystal_ix <= 95 && (crystal_iy <= 25 || crystal_iy > 75) ) ||
570 (crystal_ix >= 88 && crystal_ix <= 92 && (crystal_iy <= 20 || crystal_iy > 80) ) ||
571 (crystal_ix >= 86 && crystal_ix <= 87 && (crystal_iy <= 15 || crystal_iy > 85) ) ||
572 (crystal_ix >= 81 && crystal_ix <= 85 && (crystal_iy <= 13 || crystal_iy > 87) ) ||
573 (crystal_ix >= 76 && crystal_ix <= 80 && (crystal_iy <= 8 || crystal_iy > 92) ) ||
574 (crystal_ix >= 66 && crystal_ix <= 75 && (crystal_iy <= 5 || crystal_iy > 95) ) ||
575 (crystal_ix >= 62 && crystal_ix <= 65 && (crystal_iy <= 3 || crystal_iy > 97) ) ||
576 ( (crystal_ix == 40 || crystal_ix == 61) && ( (crystal_iy >= 46 && crystal_iy <= 55 ) || crystal_iy <= 3 || crystal_iy > 97 )) ||
577 ( (crystal_ix == 41 || crystal_ix == 60) && crystal_iy >= 44 && crystal_iy <= 57 ) ||
578 ( (crystal_ix == 42 || crystal_ix == 59) && crystal_iy >= 43 && crystal_iy <= 58 ) ||
579 ( (crystal_ix == 43 || crystal_ix == 58) && crystal_iy >= 42 && crystal_iy <= 59 ) ||
580 ( (crystal_ix == 44 || crystal_ix == 45 || crystal_ix == 57 || crystal_ix == 56) && crystal_iy >= 41 && crystal_iy <= 60 ) ||
581 ( crystal_ix >= 46 && crystal_ix <= 55 && crystal_iy >= 40 && crystal_iy <= 61 )
599 if (!EBphits.isValid()) {
600 std::cerr <<
"Error! can't get the product EBRecHitCollection: " << std::endl;
608 if (!EEphits.isValid()) {
609 std::cerr <<
"Error! can't get the product EERecHitCollection: " << std::endl;
616 if (!pElectrons.isValid()) {
617 std::cerr <<
"Error! can't get the product ElectronCollection: " << std::endl;
624 if (!EBhits || !EEhits)
return;
626 if (EBhits->size() == 0 && EEhits->size() == 0 )
return ;
628 if (!electronCollection)
return ;
630 if (electronCollection->size() == 0)
return;
638 reco::GsfElectronCollection::const_iterator eleIt = electronCollection->begin();
642 float highestElePt=0.;
644 for (eleIt=electronCollection->begin(); eleIt!=electronCollection->end(); eleIt++) {
646 if(fabs(eleIt->eta())>2.4)
continue;
649 if(eleIt->pt()>highestElePt) {
650 highestElePt=eleIt->pt();
651 highPtElectron = *eleIt;
664 std::vector<DetId> v1;
666 for (std::vector<std::pair<DetId,float> >::const_iterator idsIt = sc.hitsAndFractions().begin();
667 idsIt != sc.hitsAndFractions().end ();++idsIt)
668 {v1.push_back(idsIt->first);
682 if(maxHitId.subdetId()!=1) {
683 maxCC_Eta = ((
EEDetId)maxHitId).ix();
684 maxCC_Phi = ((
EEDetId)maxHitId).iy();
685 Zside = ((
EEDetId)maxHitId).zside();
688 maxCC_Eta = ((
EBDetId)maxHitId).ieta();
689 maxCC_Phi = ((
EBDetId)maxHitId).iphi();
704 std::vector<float>
energy;
711 std::vector<DetId> NxNaroundMax = topology->getWindow(maxHitId,ClusterSize,ClusterSize);
713 std::vector<DetId> S9aroundMax = topology->getWindow(maxHitId,3,3);
716 if((
int)NxNaroundMax.size()!=ClusterSize*ClusterSize)
return;
718 if(S9aroundMax.size()!=9)
return;
723 for (
int icry=0;icry<ClusterSize*ClusterSize;icry++){
724 if (NxNaroundMax[icry].subdetId() ==
EcalBarrel) {
726 itrechit = EBhits->find(NxNaroundMax[icry]);
727 if(itrechit==EBhits->end()){
735 energy.push_back(itrechit->energy());
736 energy5x5 += itrechit->energy();
740 if(NxNaroundMax[icry]==S9aroundMax[
tt])energy3x3+=itrechit->energy();
745 itrechit = EEhits->find(NxNaroundMax[icry]);
747 if(itrechit==EEhits->end()){
756 energy.push_back(itrechit->energy());
757 energy5x5 += itrechit->energy();
761 if(NxNaroundMax[icry]==S9aroundMax[
tt])energy3x3+=itrechit->energy();
769 if((
int)
energy.size()!=ClusterSize*ClusterSize)
return ;
797 float Ptrack_in=
sqrt(
pow(highPtElectron.trackMomentumAtVtx().X(),2) +
pow(highPtElectron.trackMomentumAtVtx().Y(),2) +
pow(highPtElectron.trackMomentumAtVtx().Z(),2) );
799 float UncorrectedPatCalo =
sqrt(
pow(highPtElectron.trackMomentumAtCalo().X(),2)+
pow(highPtElectron.trackMomentumAtCalo().Y(),2)+
pow(highPtElectron.trackMomentumAtCalo().Z(),2));
801 float Ptrack_out =
sqrt(
pow(highPtElectron.trackMomentumOut().X(),2)+
pow(highPtElectron.trackMomentumOut().Y(),2)+
pow(highPtElectron.trackMomentumOut().Z(),2) );
810 EoPNoCuts->Fill(highPtElectron.eSuperClusterOverP());
815 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) ) );
818 MapCor1NoCuts->Fill(energy5x5/UncorrectedPatCalo,energy5x5/Ptrack_in);
819 MapCor2NoCuts->Fill(energy5x5/UncorrectedPatCalo,highPtElectron.eSuperClusterOverP());
820 MapCor3NoCuts->Fill(energy5x5/UncorrectedPatCalo,Ptrack_out/Ptrack_in);
821 MapCor4NoCuts->Fill(energy5x5/UncorrectedPatCalo,energy5x5/highPtElectron.p());
822 MapCor5NoCuts->Fill(energy5x5/UncorrectedPatCalo,UncorrectedPatCalo/Ptrack_out);
823 MapCor6NoCuts->Fill(Ptrack_out/Ptrack_in,energy5x5/Ptrack_in);
824 MapCor7NoCuts->Fill(Ptrack_out/Ptrack_in,UncorrectedPatCalo/Ptrack_out);
825 MapCor8NoCuts->Fill(energy5x5/Ptrack_in,UncorrectedPatCalo/Ptrack_out);
826 MapCor9NoCuts->Fill(energy5x5/UncorrectedPatCalo,highPtElectron.eSeedClusterOverPout());
827 MapCor10NoCuts->Fill(highPtElectron.eSeedClusterOverPout(),Ptrack_out/Ptrack_in);
828 MapCor11NoCuts->Fill(highPtElectron.eSeedClusterOverPout(),energy5x5/Ptrack_in);
833 Error2NoCuts->Fill(highPtElectron.trackMomentumError()/Ptrack_out);
834 Error3NoCuts->Fill(highPtElectron.trackMomentumError()/UncorrectedPatCalo);
841 if((energy3x3/energy5x5)<
cut1_)
return ;
842 if((Ptrack_out/Ptrack_in)<
cut2_ || (Ptrack_out/Ptrack_in)>
cut3_ )
return;
917 E25oPvsEta->Fill(maxCC_Eta,energy5x5/UncorrectedPatCalo);
919 float Radius =
sqrt((maxCC_Eta)*(maxCC_Eta) + (maxCC_Phi)*(maxCC_Phi));
927 e25->Fill(energy5x5);
929 scE->Fill(sc.energy());
930 trP->Fill(UncorrectedPatCalo);
932 EoP->Fill(highPtElectron.eSuperClusterOverP());
935 E25oP->Fill(energy5x5/UncorrectedPatCalo);
938 Map->Fill(maxCC_Eta,maxCC_Phi);
948 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) ) );
951 MapCor1->Fill(energy5x5/UncorrectedPatCalo,energy5x5/Ptrack_in);
952 MapCor2->Fill(energy5x5/UncorrectedPatCalo,highPtElectron.eSuperClusterOverP());
953 MapCor3->Fill(energy5x5/UncorrectedPatCalo,Ptrack_out/Ptrack_in);
954 MapCor4->Fill(energy5x5/UncorrectedPatCalo,energy5x5/highPtElectron.p());
955 MapCor5->Fill(energy5x5/UncorrectedPatCalo,UncorrectedPatCalo/Ptrack_out);
956 MapCor6->Fill(Ptrack_out/Ptrack_in,energy5x5/Ptrack_in);
957 MapCor7->Fill(Ptrack_out/Ptrack_in,UncorrectedPatCalo/Ptrack_out);
958 MapCor8->Fill(energy5x5/Ptrack_in,UncorrectedPatCalo/Ptrack_out);
959 MapCor9->Fill(energy5x5/UncorrectedPatCalo,highPtElectron.eSeedClusterOverPout());
960 MapCor10->Fill(highPtElectron.eSeedClusterOverPout(),Ptrack_out/Ptrack_in);
961 MapCor11->Fill(highPtElectron.eSeedClusterOverPout(),energy5x5/Ptrack_in);
963 PinMinPout->Fill((Ptrack_in-Ptrack_out)/Ptrack_in);
965 Error1->
Fill(highPtElectron.trackMomentumError()/Ptrack_in);
966 Error2->Fill(highPtElectron.trackMomentumError()/Ptrack_out);
967 Error3->Fill(highPtElectron.trackMomentumError()/UncorrectedPatCalo);
970 hadOverEm->Fill(highPtElectron.hadronicOverEm());
TH2F * GeneralMapEndCapMinus
ElectronCalibrationUniv(const edm::ParameterSet &)
T getParameter(std::string const &) const
~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
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)
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)