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