13 edm::LogVerbatim(
"ObjectResolutionCalc") << (
"ObjectResolutionCalc") <<
"=== Constructing a TopObjectResolutionCalc...";
15 if (!
resoFile_)
edm::LogError(
"ObjectResolutionCalc") <<
"No resolutions fits for this file available: "<<resopath<<
"...";
16 TString resObsName[8] = {
"_ares",
"_bres",
"_cres",
"_dres",
"_thres",
"_phres",
"_etres",
"_etares"};
21 while((key = (TKey*)nextitem())) {
22 TString
name = key->GetName();
24 for(Int_t ro=0; ro<8; ro++) {
25 TString obsName = resObsName[ro]; obsName +=
"_NN";
26 if(name.Contains(obsName)){
33 if(name.Contains(
"etabin") && (!name.Contains(
"etbin"))) {
34 for(
int p=0;
p<8;
p++){
35 if(name.Contains(resObsName[
p])){
36 TString etabin =
name; etabin.Remove(0,etabin.Index(
"_")+1); etabin.Remove(0,etabin.Index(
"_")+7);
37 int etaBin = etabin.Atoi();
38 TH1F *
tmp = (TH1F*) (
resoFile_->GetKey(name)->ReadObj());
46 TH1F *tmpEta = (TH1F*) (
resoFile_->GetKey(
"hEtaBins")->ReadObj());
47 for(
int b=1;
b<=tmpEta->GetNbinsX();
b++)
etaBinVals_.push_back(tmpEta->GetXaxis()->GetBinLowEdge(
b));
48 etaBinVals_.push_back(tmpEta->GetXaxis()->GetBinUpEdge(tmpEta->GetNbinsX()));
65 "TopObjectResolutionCalc::obsRes should never be called when using a NN for resolutions." );
73 int bin = nrEtaBins-1;
74 for(
int i=0;
i<nrEtaBins;
i++) {
86 obj.setResolutionA(
network_[0]->Evaluate(0,v ));
87 obj.setResolutionB(
network_[1]->Evaluate(0,v ));
88 obj.setResolutionC(
network_[2]->Evaluate(0,v ));
89 obj.setResolutionD(
network_[3]->Evaluate(0,v ));
90 obj.setResolutionTheta(
network_[4]->Evaluate(0,v ));
91 obj.setResolutionPhi(
network_[5]->Evaluate(0,v ));
92 obj.setResolutionEt(
network_[6]->Evaluate(0,v ));
93 obj.setResolutionEta(
network_[7]->Evaluate(0,v ));
96 obj.setResolutionA( this->
obsRes(0,bin,obj.
et()) );
97 obj.setResolutionB( this->
obsRes(1,bin,obj.
et()) );
98 obj.setResolutionC( this->
obsRes(2,bin,obj.
et()) );
99 obj.setResolutionD( this->
obsRes(3,bin,obj.
et()) );
100 obj.setResolutionTheta( this->
obsRes(4,bin,obj.
et()) );
101 obj.setResolutionPhi( this->
obsRes(5,bin,obj.
et()) );
102 obj.setResolutionEt( this->
obsRes(6,bin,obj.
et()) );
103 obj.setResolutionEta( this->
obsRes(7,bin,obj.
et()) );
113 obj.setResolutionA(
network_[0]->Evaluate(0,v ));
114 obj.setResolutionB(
network_[1]->Evaluate(0,v ));
115 obj.setResolutionC(
network_[2]->Evaluate(0,v ));
116 obj.setResolutionD(
network_[3]->Evaluate(0,v ));
117 obj.setResolutionTheta(
network_[4]->Evaluate(0,v ));
118 obj.setResolutionPhi(
network_[5]->Evaluate(0,v ));
119 obj.setResolutionEt(
network_[6]->Evaluate(0,v ));
120 obj.setResolutionEta(
network_[7]->Evaluate(0,v ));
123 obj.setResolutionA( this->
obsRes(0,bin,obj.
et()) );
124 obj.setResolutionB( this->
obsRes(1,bin,obj.
et()) );
125 obj.setResolutionC( this->
obsRes(2,bin,obj.
et()) );
126 obj.setResolutionD( this->
obsRes(3,bin,obj.
et()) );
127 obj.setResolutionTheta( this->
obsRes(4,bin,obj.
et()) );
128 obj.setResolutionPhi( this->
obsRes(5,bin,obj.
et()) );
129 obj.setResolutionEt( this->
obsRes(6,bin,obj.
et()) );
130 obj.setResolutionEta( this->
obsRes(7,bin,obj.
et()) );
140 obj.setResolutionA(
network_[0]->Evaluate(0,v ));
141 obj.setResolutionB(
network_[1]->Evaluate(0,v ));
142 obj.setResolutionC(
network_[2]->Evaluate(0,v ));
143 obj.setResolutionD(
network_[3]->Evaluate(0,v ));
144 obj.setResolutionTheta(
network_[4]->Evaluate(0,v ));
145 obj.setResolutionPhi(
network_[5]->Evaluate(0,v ));
146 obj.setResolutionEt(
network_[6]->Evaluate(0,v ));
147 obj.setResolutionEta(
network_[7]->Evaluate(0,v ));
150 obj.setResolutionA( this->
obsRes(0,bin,obj.
et()) );
151 obj.setResolutionB( this->
obsRes(1,bin,obj.
et()) );
152 obj.setResolutionC( this->
obsRes(2,bin,obj.
et()) );
153 obj.setResolutionD( this->
obsRes(3,bin,obj.
et()) );
154 obj.setResolutionTheta( this->
obsRes(4,bin,obj.
et()) );
155 obj.setResolutionPhi( this->
obsRes(5,bin,obj.
et()) );
156 obj.setResolutionEt( this->
obsRes(6,bin,obj.
et()) );
157 obj.setResolutionEta( this->
obsRes(7,bin,obj.
et()) );
167 obj.setResolutionA(
network_[0]->Evaluate(0,v ));
168 obj.setResolutionB(
network_[1]->Evaluate(0,v ));
169 obj.setResolutionC(
network_[2]->Evaluate(0,v ));
170 obj.setResolutionD(
network_[3]->Evaluate(0,v ));
171 obj.setResolutionTheta( 1000000. );
172 obj.setResolutionPhi(
network_[5]->Evaluate(0,v ));
173 obj.setResolutionEt(
network_[6]->Evaluate(0,v ));
174 obj.setResolutionEta( 1000000. );
176 obj.setResolutionA( this->
obsRes(0,0,obj.
et()) );
177 obj.setResolutionC( this->
obsRes(1,0,obj.
et()) );
178 obj.setResolutionB( this->
obsRes(2,0,obj.
et()) );
179 obj.setResolutionD( this->
obsRes(3,0,obj.
et()) );
180 obj.setResolutionTheta( 1000000. );
181 obj.setResolutionPhi( this->
obsRes(5,0,obj.
et()) );
182 obj.setResolutionEt( this->
obsRes(6,0,obj.
et()) );
183 obj.setResolutionEta( 1000000. );
193 obj.setResolutionA(
network_[0]->Evaluate(0,v ));
194 obj.setResolutionB(
network_[1]->Evaluate(0,v ));
195 obj.setResolutionC(
network_[2]->Evaluate(0,v ));
196 obj.setResolutionD(
network_[3]->Evaluate(0,v ));
197 obj.setResolutionTheta(
network_[4]->Evaluate(0,v ));
198 obj.setResolutionPhi(
network_[5]->Evaluate(0,v ));
199 obj.setResolutionEt(
network_[6]->Evaluate(0,v ));
200 obj.setResolutionEta(
network_[7]->Evaluate(0,v ));
203 obj.setResolutionA( this->
obsRes(0,bin,obj.
et()) );
204 obj.setResolutionB( this->
obsRes(1,bin,obj.
et()) );
205 obj.setResolutionC( this->
obsRes(2,bin,obj.
et()) );
206 obj.setResolutionD( this->
obsRes(3,bin,obj.
et()) );
207 obj.setResolutionTheta( this->
obsRes(4,bin,obj.
et()) );
208 obj.setResolutionPhi( this->
obsRes(5,bin,obj.
et()) );
209 obj.setResolutionEt( this->
obsRes(6,bin,obj.
et()) );
210 obj.setResolutionEta( this->
obsRes(7,bin,obj.
et()) );
Analysis-level MET class.
virtual double et() const GCC11_FINAL
transverse energy
TMultiLayerPerceptron * network_[10]
Analysis-level tau class.
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< float > etaBinVals_
Analysis-level electron class.
Analysis-level calorimeter jet class.
std::vector< std::vector< double > > tmp
float obsRes(int obs, int eta, float eT)
Analysis-level muon class.