CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes | Static Private Attributes
PhiSymmetryCalibration_step2_SM Class Reference

#include <PhiSymmetryCalibration_step2_SM.h>

Inheritance diagram for PhiSymmetryCalibration_step2_SM:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 
void fillConstantsHistos ()
 
void fillHistos ()
 
void outResidHistos ()
 
 PhiSymmetryCalibration_step2_SM (const edm::ParameterSet &iConfig)
 
void readEtSums ()
 
void setUp (const edm::EventSetup &setup)
 
void setupResidHistos ()
 
 ~PhiSymmetryCalibration_step2_SM () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

std::vector< DetIdbarrelCells
 
const edm::ESGetToken
< EcalChannelStatus,
EcalChannelStatusRcd
channelStatusToken_
 
std::vector< TH2F * > correl_barl_histos
 
std::vector< TH2F * > correl_endc_histos
 
EcalGeomPhiSymHelper e_
 
std::vector< DetIdendcapCells
 
float epsilon_M_barl [kBarlRings][kBarlWedges][kSides]
 
double epsilon_M_barl_SM_ [kBarlRings][int(kBarlWedges/nscx)][kSides]
 
float epsilon_M_endc [kEndcWedgesX][kEndcWedgesY][kSides]
 
double esum_barl_ [kBarlRings][kBarlWedges][kSides]
 
double esum_endc_ [kEndcWedgesX][kEndcWedgesX][kSides]
 
double esumMean_barl_ [kBarlRings]
 
double esumMean_endc_ [kEndcEtaRings]
 
double etsum_barl_ [kBarlRings][kBarlWedges][kSides]
 
double etsum_barl_SM_ [kBarlRings][int(kBarlWedges/nscx)][kSides]
 
double etsum_endc_ [kEndcWedgesX][kEndcWedgesX][kSides]
 
double etsum_endc_uncorr [kEndcWedgesX][kEndcWedgesX][kSides]
 
double etsumMean_barl_ [kBarlRings]
 
double etsumMean_barl_SM_ [kBarlRings]
 
double etsumMean_endc_ [kEndcEtaRings]
 
bool firstpass_
 
const edm::ESGetToken
< CaloGeometry,
CaloGeometryRecord
geometryToken_
 
const bool have_initial_miscalib_
 
const std::string initialmiscalibfile_
 
double k_barl_ [kBarlRings]
 
double k_endc_ [kEndcEtaRings]
 
std::vector< TH1F * > miscal_resid_barl_histos
 res miscalib histos More...
 
std::vector< TH1F * > miscal_resid_endc_histos
 
EcalIntercalibConstants miscalib_
 initial miscalibration applied if any) More...
 
int nBads_barl_SM_ [kBarlRings][int(kBarlWedges/nscx)][kSides]
 
EcalIntercalibConstants newCalibs_
 calib constants that we are going to calculate More...
 
unsigned int nhits_barl_ [kBarlRings][kBarlWedges][kSides]
 
unsigned int nhits_endc_ [kEndcWedgesX][kEndcWedgesX][kSides]
 
const std::string oldcalibfile_
 
EcalIntercalibConstants oldCalibs_
 the old calibration constants (when reiterating, the last ones derived) More...
 
float rawconst_barl [kBarlRings][kBarlWedges][kSides]
 
float rawconst_endc [kEndcWedgesX][kEndcWedgesX][kSides]
 
const bool reiteration_
 
const int statusThreshold_
 

Static Private Attributes

static const int nscx = 20
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 17 of file PhiSymmetryCalibration_step2_SM.h.

Constructor & Destructor Documentation

PhiSymmetryCalibration_step2_SM::PhiSymmetryCalibration_step2_SM ( const edm::ParameterSet iConfig)

Definition at line 20 of file PhiSymmetryCalibration_step2_SM.cc.

23  firstpass_(true),
24  statusThreshold_(iConfig.getUntrackedParameter<int>("statusThreshold", 0)),
25  reiteration_(iConfig.getUntrackedParameter<bool>("reiteration", false)),
26  oldcalibfile_(iConfig.getUntrackedParameter<std::string>("oldcalibfile", "EcalIntercalibConstants.xml")),
27  have_initial_miscalib_(iConfig.getUntrackedParameter<bool>("haveInitialMiscalib", false)),
28  initialmiscalibfile_(iConfig.getUntrackedParameter<std::string>("initialmiscalibfile", "InitialMiscalib.xml")) {}
T getUntrackedParameter(std::string const &, T const &) const
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > channelStatusToken_
PhiSymmetryCalibration_step2_SM::~PhiSymmetryCalibration_step2_SM ( )
override

Definition at line 18 of file PhiSymmetryCalibration_step2_SM.cc.

18 {}

Member Function Documentation

void PhiSymmetryCalibration_step2_SM::analyze ( const edm::Event ev,
const edm::EventSetup se 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 30 of file PhiSymmetryCalibration_step2_SM.cc.

References firstpass_, and setUp().

30  {
31  if (firstpass_) {
32  setUp(se);
33  firstpass_ = false;
34  }
35 }
void setUp(const edm::EventSetup &setup)
void PhiSymmetryCalibration_step2_SM::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 105 of file PhiSymmetryCalibration_step2_SM.cc.

References epsilon_M_barl_SM_, esum_barl_, esum_endc_, etsum_barl_, etsum_barl_SM_, etsum_endc_, etsumMean_barl_SM_, kBarlRings, kBarlWedges, kEndcWedgesX, kEndcWedgesY, kSides, nBads_barl_SM_, nhits_barl_, nhits_endc_, nscx, readEtSums(), setupResidHistos(), and jetcorrextractor::sign().

105  {
106  for (int ieta = 0; ieta < kBarlRings; ieta++) {
107  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
108  for (int sign = 0; sign < kSides; sign++) {
109  int iphi_r = int(iphi / nscx);
110 
111  etsum_barl_[ieta][iphi][sign] = 0.;
112  nhits_barl_[ieta][iphi][sign] = 0;
113  esum_barl_[ieta][iphi][sign] = 0.;
114  etsum_barl_SM_[ieta][iphi_r][sign] = 0;
115  nBads_barl_SM_[ieta][iphi_r][sign] = 0;
116  epsilon_M_barl_SM_[ieta][iphi_r][sign] = 0;
117  }
118  }
119  etsumMean_barl_SM_[ieta] = 0.;
120  }
121 
122  for (int ix = 0; ix < kEndcWedgesX; ix++) {
123  for (int iy = 0; iy < kEndcWedgesY; iy++) {
124  for (int sign = 0; sign < kSides; sign++) {
125  etsum_endc_[ix][iy][sign] = 0.;
126  nhits_endc_[ix][iy][sign] = 0;
127  esum_endc_[ix][iy][sign] = 0.;
128  }
129  }
130  }
131 
132  readEtSums();
134 }
double etsum_barl_[kBarlRings][kBarlWedges][kSides]
static const int kBarlRings
double sign(double x)
unsigned int nhits_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double etsum_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
static const int kSides
int nBads_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
static const int kBarlWedges
static const int kEndcWedgesX
double esum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double epsilon_M_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
double esum_barl_[kBarlRings][kBarlWedges][kSides]
unsigned int nhits_barl_[kBarlRings][kBarlWedges][kSides]
static const int kEndcWedgesY
void PhiSymmetryCalibration_step2_SM::endJob ( void  )
overridevirtual

this is the new constant, or better, the correction to be applied to the old constant

residual miscalibraition / expected precision

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 136 of file PhiSymmetryCalibration_step2_SM.cc.

References funct::abs(), barrelCells, EcalGeomPhiSymHelper::cellPos_, correl_barl_histos, correl_endc_histos, EcalCondHeader::datasource_, EcalCondHeader::date_, e_, endcapCells, EcalGeomPhiSymHelper::endcapRing_, epsilon_M_barl, epsilon_M_barl_SM_, epsilon_M_endc, PV3DBase< T, PVType, FrameType >::eta(), etsum_barl_, etsum_barl_SM_, etsum_endc_, etsumMean_barl_, etsumMean_barl_SM_, etsumMean_endc_, fillConstantsHistos(), fillHistos(), firstpass_, EcalGeomPhiSymHelper::goodCell_barl, EcalGeomPhiSymHelper::goodCell_endc, EBDetId::ieta(), EBDetId::iphi(), EEDetId::ix(), EEDetId::iy(), k_barl_, k_endc_, kBarlRings, kBarlWedges, kEndcEtaRings, kEndcWedgesX, kEndcWedgesY, kSides, EcalCondHeader::method_, miscal_resid_barl_histos, miscal_resid_endc_histos, miscalib_, newCalibs_, nscx, oldCalibs_, submitPVResolutionJobs::out, outResidHistos(), rawconst_barl, rawconst_endc, relativeConstraints::ring, jetcorrextractor::sign(), EcalCondHeader::since_, AlCaHLTBitMon_QueryRunRegistry::string, EcalCondHeader::tag_, EcalCondHeader::version_, EcalFloatCondObjectContainerXMLTranslator::writeXML(), EBDetId::zside(), and EEDetId::zside().

Referenced by o2olib.O2ORunMgr::executeJob().

136  {
137  if (firstpass_) {
138  edm::LogError("PhiSym") << "Must process at least one event-Exiting" << endl;
139  return;
140  }
141 
142  // Here the real calculation of constants happens
143 
144  // perform the area correction for endcap etsum
145  // NOT USED ANYMORE
146 
147  /*
148  for (int ix=0; ix<kEndcWedgesX; ix++) {
149  for (int iy=0; iy<kEndcWedgesY; iy++) {
150 
151  int ring = e_.endcapRing_[ix][iy];
152 
153  if (ring!=-1) {
154  for (int sign=0; sign<kSides; sign++) {
155  etsum_endc_uncorr[ix][iy][sign] = etsum_endc_[ix][iy][sign];
156  etsum_endc_[ix][iy][sign]*=meanCellArea_[ring]/cellArea_[ix][iy];
157  }
158  }
159  }
160  }
161  */
162 
163  // ETsum histos, maps and other usefull histos (area,...)
164  // are filled and saved here
165  fillHistos();
166 
167  // write ETsum mean for all rings
168  std::ofstream etsumMean_barl_out("etsumMean_barl.dat", ios::out);
169  for (int ieta = 0; ieta < kBarlRings; ieta++) {
170  etsumMean_barl_out << ieta << " " << etsumMean_barl_[ieta] << endl;
171  }
172  etsumMean_barl_out.close();
173 
174  std::ofstream etsumMean_endc_out("etsumMean_endc.dat", ios::out);
175  for (int ring = 0; ring < kEndcEtaRings; ring++) {
176  etsumMean_endc_out << e_.cellPos_[ring][50].eta() << " " << etsumMean_endc_[ring] << endl;
177  }
178  etsumMean_endc_out.close();
179 
180  // determine barrel calibration constants
181  for (int ieta = 0; ieta < kBarlRings; ieta++) {
182  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
183  for (int sign = 0; sign < kSides; sign++) {
184  // sc
185  int iphi_r = int(iphi / nscx);
186 
187  //if(nBads_barl_SM_[ieta][iphi_r][sign]>0){
188  // std::cout << "ETSUM" << etsum_barl_SM_[ieta][iphi_r][sign] << " " <<ieta << " " << iphi_r << " " << sign << " " << nBads_barl_SM_[ieta][iphi_r][sign]<< endl;
189  //}
190 
191  float epsilon_T_SM = etsum_barl_SM_[ieta][iphi_r][sign] / etsumMean_barl_SM_[ieta] - 1.;
192 
193  epsilon_M_barl_SM_[ieta][iphi_r][sign] = epsilon_T_SM / k_barl_[ieta];
194 
195  if (e_.goodCell_barl[ieta][iphi][sign]) {
196  float etsum = etsum_barl_[ieta][iphi][sign];
197  float epsilon_T = (etsum / etsumMean_barl_[ieta]) - 1.;
198  rawconst_barl[ieta][iphi][sign] = epsilon_T + 1.;
199  epsilon_M_barl[ieta][iphi][sign] = epsilon_T / k_barl_[ieta];
200 
201  } else {
202  rawconst_barl[ieta][iphi][sign] = 1.;
203  epsilon_M_barl[ieta][iphi][sign] = 0.;
204  } //if
205  } //sign
206  } //iphi
207  } //ieta
208 
209  // determine endcap calibration constants
210  for (int ix = 0; ix < kEndcWedgesX; ix++) {
211  for (int iy = 0; iy < kEndcWedgesY; iy++) {
212  for (int sign = 0; sign < kSides; sign++) {
213  int ring = e_.endcapRing_[ix][iy];
214  if (ring != -1 && e_.goodCell_endc[ix][iy][sign]) {
215  float etsum = etsum_endc_[ix][iy][sign];
216  float epsilon_T = (etsum / etsumMean_endc_[ring]) - 1.;
217  rawconst_endc[ix][iy][sign] = epsilon_T + 1.;
218  epsilon_M_endc[ix][iy][sign] = epsilon_T / k_endc_[ring];
219  } else {
220  epsilon_M_endc[ix][iy][0] = 0.;
221  epsilon_M_endc[ix][iy][1] = 0.;
222  rawconst_endc[ix][iy][0] = 1.;
223  rawconst_endc[ix][iy][1] = 1.;
224  } //if
225  } //sign
226  } //iy
227  } //ix
228 
229  // output sc calibration
230  std::fstream scfile("sccalibration.dat", std::ios::out);
231  for (int ieta = 0; ieta < kBarlRings; ++ieta) {
232  for (int iphi_r = 0; iphi_r < int(kBarlWedges / nscx); ++iphi_r) {
233  for (int sign = 0; sign < kSides; sign++) {
234  scfile << ieta << " " << iphi_r << " " << sign << " " << 1 / (1 + epsilon_M_barl_SM_[ieta][iphi_r][sign])
235  << std::endl;
236  }
237  }
238  }
239 
240  std::string newcalibfile("EcalIntercalibConstants_new.xml");
241 
242  TFile ehistof("ehistos.root", "recreate");
243 
244  TH1D ebhisto("eb", "eb", 100, 0., 2.);
245 
246  std::vector<DetId>::const_iterator barrelIt = barrelCells.begin();
247  for (; barrelIt != barrelCells.end(); barrelIt++) {
248  EBDetId eb(*barrelIt);
249  int ieta = abs(eb.ieta()) - 1;
250  int iphi = eb.iphi() - 1;
251  int sign = eb.zside() > 0 ? 1 : 0;
252 
255  newCalibs_[eb] = oldCalibs_[eb] / (1 + epsilon_M_barl[ieta][iphi][sign]);
256 
257  if (e_.goodCell_barl[ieta][iphi][sign]) {
258  ebhisto.Fill(newCalibs_[eb]);
259 
261  miscal_resid_barl_histos[ieta]->Fill(miscalib_[eb] * newCalibs_[eb]);
262  correl_barl_histos[ieta]->Fill(miscalib_[eb], newCalibs_[eb]);
263  }
264 
265  } // barrelit
266 
267  TH1D eehisto("ee", "ee", 100, 0., 2.);
268  std::vector<DetId>::const_iterator endcapIt = endcapCells.begin();
269 
270  for (; endcapIt != endcapCells.end(); endcapIt++) {
271  EEDetId ee(*endcapIt);
272  int ix = ee.ix() - 1;
273  int iy = ee.iy() - 1;
274  int sign = ee.zside() > 0 ? 1 : 0;
275 
276  newCalibs_[ee] = oldCalibs_[ee] / (1 + epsilon_M_endc[ix][iy][sign]);
277 
278  if (e_.goodCell_endc[ix][iy][sign]) {
279  eehisto.Fill(newCalibs_[ee]);
280  miscal_resid_endc_histos[e_.endcapRing_[ix][iy]]->Fill(miscalib_[ee] * newCalibs_[ee]);
281  ;
282 
283  correl_endc_histos[e_.endcapRing_[ix][iy]]->Fill(miscalib_[ee], newCalibs_[ee]);
284  }
285  } //endcapit
286  // Write xml file
287  EcalCondHeader header;
288  header.method_ = "phi symmetry";
289  header.version_ = "0";
290  header.datasource_ = "testdata";
291  header.since_ = 1;
292  header.tag_ = "unknown";
293  header.date_ = "Mar 24 1973";
294 
296 
297  eehisto.Write();
298  ebhisto.Write();
299  ehistof.Close();
300 
302 
303  outResidHistos();
304 }
std::string datasource_
static int writeXML(const std::string &filename, const EcalCondHeader &header, const EcalFloatCondObjectContainer &record)
cond::Time_t since_
EcalIntercalibConstants miscalib_
initial miscalibration applied if any)
double etsum_barl_[kBarlRings][kBarlWedges][kSides]
std::string date_
static const int kBarlRings
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
double sign(double x)
std::string version_
GlobalPoint cellPos_[kEndcWedgesX][kEndcWedgesY]
double etsum_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
static const int kSides
Log< level::Error, false > LogError
float epsilon_M_barl[kBarlRings][kBarlWedges][kSides]
static const int kBarlWedges
static const int kEndcWedgesX
int endcapRing_[kEndcWedgesX][kEndcWedgesY]
static const int kEndcEtaRings
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
std::string tag_
double epsilon_M_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
float epsilon_M_endc[kEndcWedgesX][kEndcWedgesY][kSides]
std::string method_
float rawconst_barl[kBarlRings][kBarlWedges][kSides]
EcalIntercalibConstants newCalibs_
calib constants that we are going to calculate
T eta() const
Definition: PV3DBase.h:73
EcalIntercalibConstants oldCalibs_
the old calibration constants (when reiterating, the last ones derived)
float rawconst_endc[kEndcWedgesX][kEndcWedgesX][kSides]
std::vector< TH1F * > miscal_resid_barl_histos
res miscalib histos
bool goodCell_endc[kEndcWedgesX][kEndcWedgesX][kSides]
static const int kEndcWedgesY
void PhiSymmetryCalibration_step2_SM::fillConstantsHistos ( )

Definition at line 306 of file PhiSymmetryCalibration_step2_SM.cc.

References e_, validate-o2o-wbm::f, EcalGeomPhiSymHelper::goodCell_barl, EcalGeomPhiSymHelper::goodCell_endc, kBarlRings, kBarlWedges, kEndcWedgesX, kEndcWedgesY, kSides, newCalibs_, oldCalibs_, rawconst_barl, rawconst_endc, jetcorrextractor::sign(), and EEDetId::validDetId().

Referenced by endJob().

306  {
307  TFile f("CalibHistos.root", "recreate");
308 
309  TH2F barreletamap("barreletamap", "barreletamap", 171, -85, 86, 100, 0., 2.);
310  TH2F barreletamapraw("barreletamapraw", "barreletamapraw", 171, -85, 86, 100, 0., 2.);
311 
312  TH2F barrelmapold("barrelmapold", "barrelmapold", 360, 1., 361., 171, -85., 86.);
313  TH2F barrelmapnew("barrelmapnew", "barrelmapnew", 360, 1., 361., 171, -85., 86.);
314  TH2F barrelmapratio("barrelmapratio", "barrelmapratio", 360, 1., 361., 171, -85., 86.);
315 
316  TH1F rawconst_endc_h("rawconst_endc", "rawconst_endc", 100, 0., 2.);
317  TH1F const_endc_h("const_endc", "const_endc", 100, 0., 2.);
318 
319  TH1F oldconst_endc_h("oldconst_endc", "oldconst_endc;oldCalib;", 200, 0, 2);
320  TH2F newvsraw_endc_h("newvsraw_endc", "newvsraw_endc;rawConst;newCalib", 200, 0, 2, 200, 0, 2);
321 
322  TH2F endcapmapold_plus("endcapmapold_plus", "endcapmapold_plus", 100, 1., 101., 100, 1., 101.);
323  TH2F endcapmapnew_plus("endcapmapnew_plus", "endcapmapnew_plus", 100, 1., 101., 100, 1., 101.);
324  TH2F endcapmapratio_plus("endcapmapratio_plus", "endcapmapratio_plus", 100, 1., 101., 100, 1., 101.);
325 
326  TH2F endcapmapold_minus("endcapmapold_minus", "endcapmapold_minus", 100, 1., 101., 100, 1., 101.);
327  TH2F endcapmapnew_minus("endcapmapnew_minus", "endcapmapnew_minus", 100, 1., 101., 100, 1., 101.);
328  TH2F endcapmapratio_minus("endcapmapratio_minus", "endcapmapratio_minus", 100, 1., 101., 100, 1., 101.);
329 
330  for (int sign = 0; sign < kSides; sign++) {
331  int thesign = sign == 1 ? 1 : -1;
332 
333  for (int ieta = 0; ieta < kBarlRings; ieta++) {
334  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
335  if (e_.goodCell_barl[ieta][iphi][sign]) {
336  EBDetId eb(thesign * (ieta + 1), iphi + 1);
337  //int mod20= (iphi+1)%20;
338  //if (mod20==0 || mod20==1 ||mod20==2) continue; // exclude SM boundaries
339  barreletamap.Fill(ieta * thesign + thesign, newCalibs_[eb]);
340  barreletamapraw.Fill(ieta * thesign + thesign, rawconst_barl[ieta][iphi][sign]);
341 
342  barrelmapold.Fill(iphi + 1, ieta * thesign + thesign, oldCalibs_[eb]);
343  barrelmapnew.Fill(iphi + 1, ieta * thesign + thesign, newCalibs_[eb]);
344  barrelmapratio.Fill(iphi + 1, ieta * thesign + thesign, newCalibs_[eb] / oldCalibs_[eb]);
345  } //if
346  } //iphi
347  } //ieta
348 
349  for (int ix = 0; ix < kEndcWedgesX; ix++) {
350  for (int iy = 0; iy < kEndcWedgesY; iy++) {
351  if (e_.goodCell_endc[ix][iy][sign]) {
352  if (!EEDetId::validDetId(ix + 1, iy + 1, thesign))
353  continue;
354  EEDetId ee(ix + 1, iy + 1, thesign);
355 
356  rawconst_endc_h.Fill(rawconst_endc[ix][iy][sign]);
357  const_endc_h.Fill(newCalibs_[ee]);
358  oldconst_endc_h.Fill(oldCalibs_[ee]);
359  newvsraw_endc_h.Fill(rawconst_endc[ix][iy][sign], newCalibs_[ee]);
360 
361  if (sign == 1) {
362  endcapmapold_plus.Fill(ix + 1, iy + 1, oldCalibs_[ee]);
363  endcapmapnew_plus.Fill(ix + 1, iy + 1, newCalibs_[ee]);
364  endcapmapratio_plus.Fill(ix + 1, iy + 1, newCalibs_[ee] / oldCalibs_[ee]);
365  } else {
366  endcapmapold_minus.Fill(ix + 1, iy + 1, oldCalibs_[ee]);
367  endcapmapnew_minus.Fill(ix + 1, iy + 1, newCalibs_[ee]);
368  endcapmapratio_minus.Fill(ix + 1, iy + 1, newCalibs_[ee] / oldCalibs_[ee]);
369  }
370 
371  } //if
372  } //iy
373  } //ix
374 
375  } // sides
376 
377  barreletamap.Write();
378  barreletamapraw.Write();
379  rawconst_endc_h.Write();
380  const_endc_h.Write();
381  oldconst_endc_h.Write();
382  newvsraw_endc_h.Write();
383  barrelmapold.Write();
384  barrelmapnew.Write();
385  barrelmapratio.Write();
386  endcapmapold_plus.Write();
387  endcapmapnew_plus.Write();
388  endcapmapratio_plus.Write();
389  endcapmapold_minus.Write();
390  endcapmapnew_minus.Write();
391  endcapmapratio_minus.Write();
392 
393  f.Close();
394 }
static const int kBarlRings
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
double sign(double x)
static const int kSides
static const int kBarlWedges
static const int kEndcWedgesX
float rawconst_barl[kBarlRings][kBarlWedges][kSides]
static bool validDetId(int crystal_ix, int crystal_iy, int iz)
Definition: EEDetId.h:248
EcalIntercalibConstants newCalibs_
calib constants that we are going to calculate
EcalIntercalibConstants oldCalibs_
the old calibration constants (when reiterating, the last ones derived)
float rawconst_endc[kEndcWedgesX][kEndcWedgesX][kSides]
bool goodCell_endc[kEndcWedgesX][kEndcWedgesX][kSides]
static const int kEndcWedgesY
void PhiSymmetryCalibration_step2_SM::fillHistos ( )

Definition at line 398 of file PhiSymmetryCalibration_step2_SM.cc.

References EcalGeomPhiSymHelper::cellArea_, EcalGeomPhiSymHelper::cellPhi_, EcalGeomPhiSymHelper::cellPos_, e_, EcalGeomPhiSymHelper::endcapRing_, esum_barl_, esum_endc_, esumMean_barl_, esumMean_endc_, PV3DBase< T, PVType, FrameType >::eta(), etsum_barl_, etsum_barl_SM_, etsum_endc_, etsum_endc_uncorr, etsumMean_barl_, etsumMean_barl_SM_, etsumMean_endc_, validate-o2o-wbm::f, EcalGeomPhiSymHelper::goodCell_barl, EcalGeomPhiSymHelper::goodCell_endc, kBarlRings, kBarlWedges, kEndcEtaRings, kEndcWedgesX, kEndcWedgesY, kSides, EcalGeomPhiSymHelper::nBads_barl, nBads_barl_SM_, EcalGeomPhiSymHelper::nBads_endc, nhits_barl_, EcalGeomPhiSymHelper::nRing_, nscx, EcalGeomPhiSymHelper::phi_endc_, relativeConstraints::ring, jetcorrextractor::sign(), and submitPVValidationJobs::t.

Referenced by endJob().

398  {
399  TFile f("PhiSymmetryCalibration.root", "recreate");
400 
401  std::vector<TH1F*> etsum_barl_histos(kBarlRings);
402  std::vector<TH1F*> esum_barl_histos(kBarlRings);
403 
404  // determine ranges of ET sums to get histo bounds and book histos (barrel)
405  for (int ieta = 0; ieta < kBarlRings; ieta++) {
406  float low = 999999.;
407  float high = 0.;
408  float low_e = 999999.;
409  float high_e = 0.;
410 
411  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
412  for (int sign = 0; sign < kSides; sign++) {
413  float etsum = etsum_barl_[ieta][iphi][sign];
414  if (etsum < low && etsum != 0.)
415  low = etsum;
416  if (etsum > high)
417  high = etsum;
418 
419  float esum = esum_barl_[ieta][iphi][sign];
420  if (esum < low_e && esum != 0.)
421  low_e = esum;
422  if (esum > high_e)
423  high_e = esum;
424  }
425  }
426 
427  ostringstream t;
428  t << "etsum_barl_" << ieta + 1;
429  etsum_barl_histos[ieta] = new TH1F(t.str().c_str(), "", 50, low - .2 * low, high + .1 * high);
430  t.str("");
431 
432  t << "esum_barl_" << ieta + 1;
433  esum_barl_histos[ieta] = new TH1F(t.str().c_str(), "", 50, low_e - .2 * low_e, high_e + .1 * high_e);
434  t.str("");
435 
436  // fill barrel ET sum histos
437  etsumMean_barl_[ieta] = 0.;
438  esumMean_barl_[ieta] = 0.;
439 
440  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
441  for (int sign = 0; sign < kSides; sign++) {
442  // mean for the SC
443  int iphi_r = int(iphi / nscx);
444 
445  if (!(iphi % nscx)) {
446  // bad channel correction
447  etsum_barl_SM_[ieta][iphi_r][sign] =
448  etsum_barl_SM_[ieta][iphi_r][sign] * nscx / (nscx - nBads_barl_SM_[ieta][iphi_r][sign]);
449  // std::cout << "ETSUM M " << ieta << " " << iphi_r << " " <<
450  // sign << " " << etsum_barl_SM_[ieta][iphi_r][sign] << " " << nBads_barl_SM_[ieta][iphi_r][sign]<< endl;
451  etsumMean_barl_SM_[ieta] += etsum_barl_SM_[ieta][iphi_r][sign] / (2 * int(kBarlWedges / nscx));
452  }
453  if (e_.goodCell_barl[ieta][iphi][sign]) {
454  float etsum = etsum_barl_[ieta][iphi][sign];
455  float esum = esum_barl_[ieta][iphi][sign];
456  etsum_barl_histos[ieta]->Fill(etsum);
457  esum_barl_histos[ieta]->Fill(esum);
458  etsumMean_barl_[ieta] += etsum;
459 
460  esumMean_barl_[ieta] += esum;
461  }
462  }
463  }
464 
465  etsum_barl_histos[ieta]->Write();
466  esum_barl_histos[ieta]->Write();
467  etsumMean_barl_[ieta] /= (720. - e_.nBads_barl[ieta]);
468  esumMean_barl_[ieta] /= (720. - e_.nBads_barl[ieta]);
469 
470  delete etsum_barl_histos[ieta];
471  delete esum_barl_histos[ieta]; //VS
472  }
473 
474  std::vector<TH1F*> etsum_endc_histos(kEndcEtaRings);
475  std::vector<TH1F*> etsum_endc_uncorr_histos(kEndcEtaRings);
476  std::vector<TH1F*> esum_endc_histos(kEndcEtaRings);
477 
478  std::vector<TH2F*> etsumvsarea_endc_histos(kEndcEtaRings);
479  std::vector<TH2F*> esumvsarea_endc_histos(kEndcEtaRings);
480 
481  // determine ranges of ET sums to get histo bounds and book histos (endcap)
482  for (int ring = 0; ring < kEndcEtaRings; ring++) {
483  float low = FLT_MAX;
484  float low_uncorr = FLT_MAX;
485  float high = 0.;
486  float high_uncorr = 0;
487  float low_e = FLT_MAX;
488  float high_e = 0.;
489  float low_a = 1.;
490  float high_a = 0.;
491  for (int ix = 0; ix < kEndcWedgesX; ix++) {
492  for (int iy = 0; iy < kEndcWedgesY; iy++) {
493  if (e_.endcapRing_[ix][iy] == ring) {
494  for (int sign = 0; sign < kSides; sign++) {
495  float etsum = etsum_endc_[ix][iy][sign];
496  if (etsum < low && etsum != 0.)
497  low = etsum;
498  if (etsum > high)
499  high = etsum;
500 
501  float etsum_uncorr = etsum_endc_uncorr[ix][iy][sign];
502  if (etsum_uncorr < low_uncorr && etsum_uncorr != 0.)
503  low_uncorr = etsum_uncorr;
504  if (etsum_uncorr > high_uncorr)
505  high_uncorr = etsum_uncorr;
506 
507  float esum = esum_endc_[ix][iy][sign];
508  if (esum < low_e && esum != 0.)
509  low_e = esum;
510  if (esum > high_e)
511  high_e = esum;
512 
513  float area = e_.cellArea_[ix][iy];
514  if (area < low_a)
515  low_a = area;
516  if (area > high_a)
517  high_a = area;
518  }
519  }
520  }
521  }
522 
523  ostringstream t;
524  t << "etsum_endc_" << ring + 1;
525  etsum_endc_histos[ring] = new TH1F(t.str().c_str(), "", 50, low - .2 * low, high + .1 * high);
526  t.str("");
527 
528  t << "etsum_endc_uncorr_" << ring + 1;
529  etsum_endc_uncorr_histos[ring] =
530  new TH1F(t.str().c_str(), "", 50, low_uncorr - .2 * low_uncorr, high_uncorr + .1 * high_uncorr);
531  t.str("");
532 
533  t << "esum_endc_" << ring + 1;
534  esum_endc_histos[ring] = new TH1F(t.str().c_str(), "", 50, low_e - .2 * low_e, high_e + .1 * high_e);
535  t.str("");
536 
537  t << "etsumvsarea_endc_" << ring + 1;
538  etsumvsarea_endc_histos[ring] =
539  new TH2F(t.str().c_str(), ";A_{#eta#phi};#Sigma E_{T}", 50, low_a, high_a, 50, low, high);
540  t.str("");
541 
542  t << "esumvsarea_endc_" << ring + 1;
543  esumvsarea_endc_histos[ring] =
544  new TH2F(t.str().c_str(), ";A_{#eta#phi};#Sigma E", 50, low_a, high_a, 50, low_e, high_e);
545  t.str("");
546 
547  // fill endcap ET sum histos
548  etsumMean_endc_[ring] = 0.;
549  esumMean_endc_[ring] = 0.;
550  for (int ix = 0; ix < kEndcWedgesX; ix++) {
551  for (int iy = 0; iy < kEndcWedgesY; iy++) {
552  if (e_.endcapRing_[ix][iy] == ring) {
553  for (int sign = 0; sign < kSides; sign++) {
554  if (e_.goodCell_endc[ix][iy][sign]) {
555  float etsum = etsum_endc_[ix][iy][sign];
556  float esum = esum_endc_[ix][iy][sign];
557  float etsum_uncorr = etsum_endc_uncorr[ix][iy][sign];
558  etsum_endc_histos[ring]->Fill(etsum);
559  etsum_endc_uncorr_histos[ring]->Fill(etsum_uncorr);
560  esum_endc_histos[ring]->Fill(esum);
561 
562  float area = e_.cellArea_[ix][iy];
563  etsumvsarea_endc_histos[ring]->Fill(area, etsum);
564  esumvsarea_endc_histos[ring]->Fill(area, esum);
565 
566  etsumMean_endc_[ring] += etsum;
567  esumMean_endc_[ring] += esum;
568  }
569  }
570  }
571  }
572  }
573 
574  etsum_endc_histos[ring]->Write();
575  etsum_endc_uncorr_histos[ring]->Write();
576  esum_endc_histos[ring]->Write();
577  etsumMean_endc_[ring] /= (float(e_.nRing_[ring] * 2 - e_.nBads_endc[ring]));
578  esumMean_endc_[ring] /= (float(e_.nRing_[ring] * 2 - e_.nBads_endc[ring]));
579  etsumvsarea_endc_histos[ring]->Write();
580  esumvsarea_endc_histos[ring]->Write();
581 
582  delete etsum_endc_histos[ring];
583  delete etsum_endc_uncorr_histos[ring];
584  delete esum_endc_histos[ring];
585  delete etsumvsarea_endc_histos[ring];
586  delete esumvsarea_endc_histos[ring];
587  } //ring
588 
589  // Maps of etsum in EB and EE
590  TH2F barreletamap("barreletamap", "barreletamap", 171, -85, 86, 100, 0, 2);
591  TH2F barrelmap("barrelmap", "barrelmap - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{0}}", 360, 1, 360, 171, -85, 86);
592  TH2F barrelmap_e("barrelmape", "barrelmape - #frac{#Sigma E}{<#Sigma E>_{0}}", 360, 1, 360, 171, -85, 86);
593  TH2F barrelmap_divided("barrelmapdiv", "barrelmapdivided - #frac{#Sigma E_{T}}{hits}", 360, 1, 360, 171, -85, 86);
594  TH2F barrelmap_e_divided("barrelmapediv", "barrelmapedivided - #frac{#Sigma E}{hits}", 360, 1, 360, 171, -85, 86);
595  TH2F endcmap_plus_corr(
596  "endcapmapplus_corrected", "endcapmapplus - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}", 100, 1, 101, 100, 1, 101);
597  TH2F endcmap_minus_corr(
598  "endcapmapminus_corrected", "endcapmapminus - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}", 100, 1, 101, 100, 1, 101);
599  TH2F endcmap_plus_uncorr("endcapmapplus_uncorrected",
600  "endcapmapplus_uncor - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",
601  100,
602  1,
603  101,
604  100,
605  1,
606  101);
607  TH2F endcmap_minus_uncorr("endcapmapminus_uncorrected",
608  "endcapmapminus_uncor - #frac{#Sigma E_{T}}{<#Sigma E_{T}>_{38}}",
609  100,
610  1,
611  101,
612  100,
613  1,
614  101);
615  TH2F endcmap_e_plus("endcapmapeplus", "endcapmapeplus - #frac{#Sigma E}{<#Sigma E>_{38}}", 100, 1, 101, 100, 1, 101);
616  TH2F endcmap_e_minus(
617  "endcapmapeminus", "endcapmapeminus - #frac{#Sigma E}{<#Sigma E>_{38}}", 100, 1, 101, 100, 1, 101);
618 
619  for (int sign = 0; sign < kSides; sign++) {
620  int thesign = sign == 1 ? 1 : -1;
621 
622  for (int ieta = 0; ieta < kBarlRings; ieta++) {
623  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
624  if (e_.goodCell_barl[ieta][iphi][sign]) {
625  barrelmap.Fill(iphi + 1, ieta * thesign + thesign, etsum_barl_[ieta][iphi][sign] / etsumMean_barl_[0]);
626  barrelmap_e.Fill(iphi + 1, ieta * thesign + thesign, esum_barl_[ieta][iphi][sign] / esumMean_barl_[0]); //VS
627  if (!nhits_barl_[ieta][iphi][sign])
628  nhits_barl_[ieta][iphi][sign] = 1;
629  barrelmap_divided.Fill(
630  iphi + 1, ieta * thesign + thesign, etsum_barl_[ieta][iphi][sign] / nhits_barl_[ieta][iphi][sign]);
631  barrelmap_e_divided.Fill(
632  iphi + 1, ieta * thesign + thesign, esum_barl_[ieta][iphi][sign] / nhits_barl_[ieta][iphi][sign]); //VS
633  //int mod20= (iphi+1)%20;
634  //if (mod20==0 || mod20==1 ||mod20==2) continue; // exclude SM boundaries
635  barreletamap.Fill(ieta * thesign + thesign, etsum_barl_[ieta][iphi][sign] / etsumMean_barl_[0]);
636  } //if
637  } //iphi
638  } //ieta
639 
640  for (int ix = 0; ix < kEndcWedgesX; ix++) {
641  for (int iy = 0; iy < kEndcWedgesY; iy++) {
642  if (sign == 1) {
643  endcmap_plus_corr.Fill(ix + 1, iy + 1, etsum_endc_[ix][iy][sign] / etsumMean_endc_[38]);
644  endcmap_plus_uncorr.Fill(ix + 1, iy + 1, etsum_endc_uncorr[ix][iy][sign] / etsumMean_endc_[38]);
645  endcmap_e_plus.Fill(ix + 1, iy + 1, esum_endc_[ix][iy][sign] / esumMean_endc_[38]);
646  } else {
647  endcmap_minus_corr.Fill(ix + 1, iy + 1, etsum_endc_[ix][iy][sign] / etsumMean_endc_[38]);
648  endcmap_minus_uncorr.Fill(ix + 1, iy + 1, etsum_endc_uncorr[ix][iy][sign] / etsumMean_endc_[38]);
649  endcmap_e_minus.Fill(ix + 1, iy + 1, esum_endc_[ix][iy][sign] / esumMean_endc_[38]);
650  }
651  } //iy
652  } //ix
653 
654  } //sign
655 
656  barreletamap.Write();
657  barrelmap_divided.Write();
658  barrelmap.Write();
659  barrelmap_e_divided.Write();
660  barrelmap_e.Write();
661  endcmap_plus_corr.Write();
662  endcmap_minus_corr.Write();
663  endcmap_plus_uncorr.Write();
664  endcmap_minus_uncorr.Write();
665  endcmap_e_plus.Write();
666  endcmap_e_minus.Write();
667 
668  vector<TH1F*> etavsphi_endc(kEndcEtaRings);
669  vector<TH1F*> areavsphi_endc(kEndcEtaRings);
670  vector<TH1F*> etsumvsphi_endcp_corr(kEndcEtaRings);
671  vector<TH1F*> etsumvsphi_endcm_corr(kEndcEtaRings);
672  vector<TH1F*> etsumvsphi_endcp_uncorr(kEndcEtaRings);
673  vector<TH1F*> etsumvsphi_endcm_uncorr(kEndcEtaRings);
674  vector<TH1F*> esumvsphi_endcp(kEndcEtaRings);
675  vector<TH1F*> esumvsphi_endcm(kEndcEtaRings);
676 
677  std::vector<TH1F*> deltaeta_histos(kEndcEtaRings);
678  std::vector<TH1F*> deltaphi_histos(kEndcEtaRings);
679 
680  for (int ring = 0; ring < kEndcEtaRings; ++ring) {
681  ostringstream t;
682  t << "etavsphi_endc_" << ring;
683  etavsphi_endc[ring] = new TH1F(t.str().c_str(), t.str().c_str(), e_.nRing_[ring], 0, e_.nRing_[ring]);
684  t.str("");
685 
686  t << "areavsphi_endc_" << ring;
687  areavsphi_endc[ring] = new TH1F(t.str().c_str(), t.str().c_str(), e_.nRing_[ring], 0, e_.nRing_[ring]);
688  t.str("");
689 
690  t << "etsumvsphi_endcp_corr_" << ring;
691  etsumvsphi_endcp_corr[ring] = new TH1F(t.str().c_str(), t.str().c_str(), e_.nRing_[ring], 0, e_.nRing_[ring]);
692  t.str("");
693 
694  t << "etsumvsphi_endcm_corr_" << ring;
695  etsumvsphi_endcm_corr[ring] = new TH1F(t.str().c_str(), t.str().c_str(), e_.nRing_[ring], 0, e_.nRing_[ring]);
696  t.str("");
697 
698  t << "etsumvsphi_endcp_uncorr_" << ring;
699  etsumvsphi_endcp_uncorr[ring] = new TH1F(t.str().c_str(), t.str().c_str(), e_.nRing_[ring], 0, e_.nRing_[ring]);
700  t.str("");
701 
702  t << "etsumvsphi_endcm_uncorr_" << ring;
703  etsumvsphi_endcm_uncorr[ring] = new TH1F(t.str().c_str(), t.str().c_str(), e_.nRing_[ring], 0, e_.nRing_[ring]);
704  t.str("");
705 
706  t << "esumvsphi_endcp_" << ring;
707  esumvsphi_endcp[ring] = new TH1F(t.str().c_str(), t.str().c_str(), e_.nRing_[ring], 0, e_.nRing_[ring]);
708  t.str("");
709 
710  t << "esumvsphi_endcm_" << ring;
711  esumvsphi_endcm[ring] = new TH1F(t.str().c_str(), t.str().c_str(), e_.nRing_[ring], 0, e_.nRing_[ring]);
712  t.str("");
713 
714  t << "deltaeta_" << ring;
715  deltaeta_histos[ring] = new TH1F(t.str().c_str(), "", 50, -.1, .1);
716  t.str("");
717  t << "deltaphi_" << ring;
718  deltaphi_histos[ring] = new TH1F(t.str().c_str(), "", 50, -.1, .1);
719  t.str("");
720  }
721 
722  for (int ix = 0; ix < kEndcWedgesX; ix++) {
723  for (int iy = 0; iy < kEndcWedgesY; iy++) {
724  int ring = e_.endcapRing_[ix][iy];
725  if (ring != -1) {
726  int iphi_endc = -1;
727  for (int ip = 0; ip < e_.nRing_[ring]; ip++) {
728  if (e_.cellPhi_[ix][iy] == e_.phi_endc_[ip][ring])
729  iphi_endc = ip;
730  }
731 
732  if (iphi_endc != -1) {
733  for (int sign = 0; sign < kSides; sign++) {
734  if (e_.goodCell_endc[ix][iy][sign]) {
735  if (sign == 1) {
736  etsumvsphi_endcp_corr[ring]->Fill(iphi_endc, etsum_endc_[ix][iy][sign]);
737  etsumvsphi_endcp_uncorr[ring]->Fill(iphi_endc, etsum_endc_uncorr[ix][iy][sign]);
738  esumvsphi_endcp[ring]->Fill(iphi_endc, esum_endc_[ix][iy][sign]);
739  } else {
740  etsumvsphi_endcm_corr[ring]->Fill(iphi_endc, etsum_endc_[ix][iy][sign]);
741  etsumvsphi_endcm_uncorr[ring]->Fill(iphi_endc, etsum_endc_uncorr[ix][iy][sign]);
742  esumvsphi_endcm[ring]->Fill(iphi_endc, esum_endc_[ix][iy][sign]);
743  }
744  } //if
745  } //sign
746  etavsphi_endc[ring]->Fill(iphi_endc, e_.cellPos_[ix][iy].eta());
747  areavsphi_endc[ring]->Fill(iphi_endc, e_.cellArea_[ix][iy]);
748  } //if iphi_endc
749 
750  } //if ring
751  } //iy
752  } //ix
753 
754  for (int ring = 0; ring < kEndcEtaRings; ++ring) {
755  etavsphi_endc[ring]->Write();
756  areavsphi_endc[ring]->Write();
757  etsumvsphi_endcp_corr[ring]->Write();
758  etsumvsphi_endcm_corr[ring]->Write();
759  etsumvsphi_endcp_uncorr[ring]->Write();
760  etsumvsphi_endcm_uncorr[ring]->Write();
761  esumvsphi_endcp[ring]->Write();
762  esumvsphi_endcm[ring]->Write();
763  deltaeta_histos[ring]->Write();
764  deltaphi_histos[ring]->Write();
765 
766  delete etsumvsphi_endcp_corr[ring];
767  delete etsumvsphi_endcm_corr[ring];
768  delete etsumvsphi_endcp_uncorr[ring];
769  delete etsumvsphi_endcm_uncorr[ring];
770  delete etavsphi_endc[ring];
771  delete areavsphi_endc[ring];
772  delete esumvsphi_endcp[ring];
773  delete esumvsphi_endcm[ring];
774  delete deltaeta_histos[ring];
775  delete deltaphi_histos[ring];
776  }
777 
778  f.Close();
779 }
double etsum_barl_[kBarlRings][kBarlWedges][kSides]
int nRing_[kEndcEtaRings]
int nBads_endc[kEndcEtaRings]
static const int kBarlRings
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
double sign(double x)
GlobalPoint cellPos_[kEndcWedgesX][kEndcWedgesY]
double etsum_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
static const int kSides
int nBads_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
double phi_endc_[kMaxEndciPhi][kEndcEtaRings]
static const int kBarlWedges
static const int kEndcWedgesX
int endcapRing_[kEndcWedgesX][kEndcWedgesY]
static const int kEndcEtaRings
double esum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double cellPhi_[kEndcWedgesX][kEndcWedgesY]
T eta() const
Definition: PV3DBase.h:73
double cellArea_[kEndcWedgesX][kEndcWedgesY]
double etsum_endc_uncorr[kEndcWedgesX][kEndcWedgesX][kSides]
double esum_barl_[kBarlRings][kBarlWedges][kSides]
unsigned int nhits_barl_[kBarlRings][kBarlWedges][kSides]
int nBads_barl[kBarlRings]
bool goodCell_endc[kEndcWedgesX][kEndcWedgesX][kSides]
static const int kEndcWedgesY
void PhiSymmetryCalibration_step2_SM::outResidHistos ( )

Definition at line 844 of file PhiSymmetryCalibration_step2_SM.cc.

References correl_barl_histos, correl_endc_histos, validate-o2o-wbm::f, miscal_resid_barl_histos, miscal_resid_endc_histos, and relativeConstraints::ring.

Referenced by endJob().

844  {
845  // output histograms of residual miscalibrations
846  TFile f("PhiSymmetryCalibration_miscal_resid.root", "recreate");
847  for (int ieta = 0; ieta < 85; ieta++) {
848  miscal_resid_barl_histos[ieta]->Write();
849  correl_barl_histos[ieta]->Write();
850 
851  delete miscal_resid_barl_histos[ieta];
852  delete correl_barl_histos[ieta];
853  }
854 
855  for (int ring = 0; ring < 39; ring++) {
856  miscal_resid_endc_histos[ring]->Write();
857  correl_endc_histos[ring]->Write();
858 
860  delete correl_endc_histos[ring];
861  }
862  f.Close();
863 }
std::vector< TH1F * > miscal_resid_barl_histos
res miscalib histos
void PhiSymmetryCalibration_step2_SM::readEtSums ( )

Definition at line 781 of file PhiSymmetryCalibration_step2_SM.cc.

References etsum_barl_, etsum_barl_SM_, etsum_endc_, recoMuon::in, k_barl_, k_endc_, kBarlRings, kEndcEtaRings, nhits, nhits_barl_, nhits_endc_, nscx, relativeConstraints::ring, and jetcorrextractor::sign().

Referenced by beginJob().

781  {
782  //read in ET sums
783 
784  int ieta, iphi, sign, ix, iy, dummy;
785  double etsum;
786  unsigned int nhits;
787  std::ifstream etsum_barl_in("etsum_barl.dat", ios::in);
788  while (etsum_barl_in >> dummy >> ieta >> iphi >> sign >> etsum >> nhits) {
789  etsum_barl_[ieta][iphi][sign] += etsum;
790  nhits_barl_[ieta][iphi][sign] += nhits;
791 
792  // fill etsums for the SM calibration
793  int iphi_r = int(iphi / nscx);
794  etsum_barl_SM_[ieta][iphi_r][sign] += etsum;
795  // etsum*nscx/(nscx- nBads_barl_SM_[ieta][iphi_r][sign]);
796  // if(nBads_barl_SM_[ieta][iphi_r][sign]>0){
797  // std::cout << "ETSUM" << etsum_barl_SM_[ieta][iphi_r][sign] << " " << nscx << " " << nBads_barl_SM_[ieta][iphi_r][sign]<< endl;
798  // }
799  }
800 
801  std::ifstream etsum_endc_in("etsum_endc.dat", ios::in);
802  while (etsum_endc_in >> dummy >> ix >> iy >> sign >> etsum >> nhits >> dummy) {
803  etsum_endc_[ix][iy][sign] += etsum;
804  nhits_endc_[ix][iy][sign] += nhits;
805  }
806 
807  std::ifstream k_barl_in("k_barl.dat", ios::in);
808  for (int ieta = 0; ieta < kBarlRings; ieta++) {
809  k_barl_in >> dummy >> k_barl_[ieta];
810  }
811 
812  std::ifstream k_endc_in("k_endc.dat", ios::in);
813  for (int ring = 0; ring < kEndcEtaRings; ring++) {
814  k_endc_in >> dummy >> k_endc_[ring];
815  }
816 }
double etsum_barl_[kBarlRings][kBarlWedges][kSides]
static const int kBarlRings
double sign(double x)
unsigned int nhits_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
double etsum_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
static const int kEndcEtaRings
double etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
unsigned int nhits_barl_[kBarlRings][kBarlWedges][kSides]
void PhiSymmetryCalibration_step2_SM::setUp ( const edm::EventSetup setup)

if a miscalibration was applied, load it, if not put it to 1

Definition at line 37 of file PhiSymmetryCalibration_step2_SM.cc.

References barrelCells, channelStatusToken_, e_, DetId::Ecal, EcalBarrel, EcalEndcap, endcapCells, relativeConstraints::geometry, geometryToken_, edm::EventSetup::getData(), EcalGeomPhiSymHelper::goodCell_barl, h, have_initial_miscalib_, initialmiscalibfile_, kBarlRings, kBarlWedges, kSides, miscalib_, nBads_barl_SM_, nscx, oldcalibfile_, oldCalibs_, AlCaHLTBitMon_ParallelJobs::p, fed_dqm_sourceclient-live_cfg::path, EcalFloatCondObjectContainerXMLTranslator::readXML(), reiteration_, runTheMatrix::ret, EcalGeomPhiSymHelper::setup(), jetcorrextractor::sign(), and statusThreshold_.

Referenced by analyze().

37  {
38  const auto& chStatus = se.getData(channelStatusToken_);
39 
40  const auto& geometry = se.getData(geometryToken_);
41 
42  barrelCells = geometry.getValidDetIds(DetId::Ecal, EcalBarrel);
43  endcapCells = geometry.getValidDetIds(DetId::Ecal, EcalEndcap);
44 
45  e_.setup(&geometry, &chStatus, statusThreshold_);
46 
47  for (int sign = 0; sign < kSides; sign++) {
48  for (int ieta = 0; ieta < kBarlRings; ieta++) {
49  for (int iphi = 0; iphi < kBarlWedges; iphi++) {
50  int iphi_r = int(iphi / nscx);
51  if (!e_.goodCell_barl[ieta][iphi][sign]) {
52  nBads_barl_SM_[ieta][iphi_r][sign]++;
53  // std::cout << "N BAD CELL " << nBads_barl_SM_[ieta][iphi_r][sign] << endl;
54  }
55  }
56  }
57  }
58 
62  namespace fs = std::filesystem;
64  if (!fs::exists(p))
65  edm::LogError("PhiSym") << "File not found: " << initialmiscalibfile_ << endl;
66 
68  if (ret)
69  edm::LogError("PhiSym") << "Error reading XML files" << endl;
70  } else {
71  for (vector<DetId>::iterator it = barrelCells.begin(); it != barrelCells.end(); ++it) {
72  miscalib_[*it] = 1;
73  }
74 
75  for (vector<DetId>::iterator it = endcapCells.begin(); it != endcapCells.end(); ++it) {
76  miscalib_[*it] = 1;
77  }
78  }
79 
80  // if we are reiterating, read constants from previous iter
81  // if not put them to one
82  if (reiteration_) {
84  namespace fs = std::filesystem;
85  fs::path p(oldcalibfile_.c_str());
86  if (!fs::exists(p))
87  edm::LogError("PhiSym") << "File not found: " << oldcalibfile_ << endl;
88 
90 
91  if (ret)
92  edm::LogError("PhiSym") << "Error reading XML files" << endl;
93  ;
94 
95  } else {
96  for (vector<DetId>::iterator it = barrelCells.begin(); it != barrelCells.end(); ++it)
97  oldCalibs_[*it] = 1;
98 
99  for (vector<DetId>::iterator it = endcapCells.begin(); it != endcapCells.end(); ++it)
100  oldCalibs_[*it] = 1;
101 
102  } // else
103 }
tuple ret
prodAgent to be discontinued
void setup(const CaloGeometry *geometry, const EcalChannelStatus *chstatus, int statusThreshold)
EcalIntercalibConstants miscalib_
initial miscalibration applied if any)
static const int kBarlRings
bool goodCell_barl[kBarlRings][kBarlWedges][kSides]
double sign(double x)
static const int kSides
Log< level::Error, false > LogError
int nBads_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
static int readXML(const std::string &filename, EcalCondHeader &header, EcalFloatCondObjectContainer &record)
static const int kBarlWedges
const edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geometryToken_
const edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > channelStatusToken_
EcalIntercalibConstants oldCalibs_
the old calibration constants (when reiterating, the last ones derived)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
void PhiSymmetryCalibration_step2_SM::setupResidHistos ( )

Definition at line 818 of file PhiSymmetryCalibration_step2_SM.cc.

References correl_barl_histos, correl_endc_histos, kBarlRings, kEndcEtaRings, miscal_resid_barl_histos, miscal_resid_endc_histos, and relativeConstraints::ring.

Referenced by beginJob().

818  {
821 
822  for (int ieta = 0; ieta < kBarlRings; ieta++) {
823  ostringstream t1;
824  t1 << "mr_barl_" << ieta + 1;
825  miscal_resid_barl_histos[ieta] = new TH1F(t1.str().c_str(), "", 100, 0., 2.);
826  ostringstream t2;
827  t2 << "co_barl_" << ieta + 1;
828  correl_barl_histos[ieta] = new TH2F(t2.str().c_str(), "", 50, .5, 1.5, 50, .5, 1.5);
829  }
830 
833 
834  for (int ring = 0; ring < kEndcEtaRings; ring++) {
835  ostringstream t1;
836  t1 << "mr_endc_" << ring + 1;
837  miscal_resid_endc_histos[ring] = new TH1F(t1.str().c_str(), "", 100, 0., 2.);
838  ostringstream t2;
839  t2 << "co_endc_" << ring + 1;
840  correl_endc_histos[ring] = new TH2F(t2.str().c_str(), "", 50, .5, 1.5, 50, .5, 1.5);
841  }
842 }
static const int kBarlRings
static const int kEndcEtaRings
std::vector< TH1F * > miscal_resid_barl_histos
res miscalib histos

Member Data Documentation

std::vector<DetId> PhiSymmetryCalibration_step2_SM::barrelCells
private

Definition at line 78 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and setUp().

const edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> PhiSymmetryCalibration_step2_SM::channelStatusToken_
private

Definition at line 37 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by setUp().

std::vector<TH2F*> PhiSymmetryCalibration_step2_SM::correl_barl_histos
private

Definition at line 102 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), outResidHistos(), and setupResidHistos().

std::vector<TH2F*> PhiSymmetryCalibration_step2_SM::correl_endc_histos
private

Definition at line 105 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), outResidHistos(), and setupResidHistos().

EcalGeomPhiSymHelper PhiSymmetryCalibration_step2_SM::e_
private

Definition at line 76 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), fillConstantsHistos(), fillHistos(), and setUp().

std::vector<DetId> PhiSymmetryCalibration_step2_SM::endcapCells
private

Definition at line 79 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and setUp().

float PhiSymmetryCalibration_step2_SM::epsilon_M_barl[kBarlRings][kBarlWedges][kSides]
private

Definition at line 73 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob().

double PhiSymmetryCalibration_step2_SM::epsilon_M_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
private

Definition at line 49 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), and endJob().

float PhiSymmetryCalibration_step2_SM::epsilon_M_endc[kEndcWedgesX][kEndcWedgesY][kSides]
private

Definition at line 74 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob().

double PhiSymmetryCalibration_step2_SM::esum_barl_[kBarlRings][kBarlWedges][kSides]
private

Definition at line 59 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), and fillHistos().

double PhiSymmetryCalibration_step2_SM::esum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
private

Definition at line 60 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), and fillHistos().

double PhiSymmetryCalibration_step2_SM::esumMean_barl_[kBarlRings]
private

Definition at line 62 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by fillHistos().

double PhiSymmetryCalibration_step2_SM::esumMean_endc_[kEndcEtaRings]
private

Definition at line 63 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by fillHistos().

double PhiSymmetryCalibration_step2_SM::etsum_barl_[kBarlRings][kBarlWedges][kSides]
private

Definition at line 41 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), endJob(), fillHistos(), and readEtSums().

double PhiSymmetryCalibration_step2_SM::etsum_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
private

Definition at line 46 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), endJob(), fillHistos(), and readEtSums().

double PhiSymmetryCalibration_step2_SM::etsum_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
private

Definition at line 51 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), endJob(), fillHistos(), and readEtSums().

double PhiSymmetryCalibration_step2_SM::etsum_endc_uncorr[kEndcWedgesX][kEndcWedgesX][kSides]
private

Definition at line 52 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by fillHistos().

double PhiSymmetryCalibration_step2_SM::etsumMean_barl_[kBarlRings]
private

Definition at line 53 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and fillHistos().

double PhiSymmetryCalibration_step2_SM::etsumMean_barl_SM_[kBarlRings]
private

Definition at line 48 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), endJob(), and fillHistos().

double PhiSymmetryCalibration_step2_SM::etsumMean_endc_[kEndcEtaRings]
private

Definition at line 54 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and fillHistos().

bool PhiSymmetryCalibration_step2_SM::firstpass_
private

Definition at line 81 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by analyze(), and endJob().

const edm::ESGetToken<CaloGeometry, CaloGeometryRecord> PhiSymmetryCalibration_step2_SM::geometryToken_
private

Definition at line 38 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by setUp().

const bool PhiSymmetryCalibration_step2_SM::have_initial_miscalib_
private

Definition at line 97 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by setUp().

const std::string PhiSymmetryCalibration_step2_SM::initialmiscalibfile_
private

Definition at line 98 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by setUp().

double PhiSymmetryCalibration_step2_SM::k_barl_[kBarlRings]
private

Definition at line 65 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and readEtSums().

double PhiSymmetryCalibration_step2_SM::k_endc_[kEndcEtaRings]
private

Definition at line 66 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and readEtSums().

std::vector<TH1F*> PhiSymmetryCalibration_step2_SM::miscal_resid_barl_histos
private

res miscalib histos

Definition at line 101 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), outResidHistos(), and setupResidHistos().

std::vector<TH1F*> PhiSymmetryCalibration_step2_SM::miscal_resid_endc_histos
private

Definition at line 104 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), outResidHistos(), and setupResidHistos().

EcalIntercalibConstants PhiSymmetryCalibration_step2_SM::miscalib_
private

initial miscalibration applied if any)

Definition at line 94 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and setUp().

int PhiSymmetryCalibration_step2_SM::nBads_barl_SM_[kBarlRings][int(kBarlWedges/nscx)][kSides]
private

Definition at line 47 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), fillHistos(), and setUp().

EcalIntercalibConstants PhiSymmetryCalibration_step2_SM::newCalibs_
private

calib constants that we are going to calculate

Definition at line 91 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and fillConstantsHistos().

unsigned int PhiSymmetryCalibration_step2_SM::nhits_barl_[kBarlRings][kBarlWedges][kSides]
private

Definition at line 56 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), fillHistos(), and readEtSums().

unsigned int PhiSymmetryCalibration_step2_SM::nhits_endc_[kEndcWedgesX][kEndcWedgesX][kSides]
private

Definition at line 57 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), and readEtSums().

const int PhiSymmetryCalibration_step2_SM::nscx = 20
staticprivate

Definition at line 45 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by beginJob(), endJob(), fillHistos(), readEtSums(), and setUp().

const std::string PhiSymmetryCalibration_step2_SM::oldcalibfile_
private

Definition at line 85 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by setUp().

EcalIntercalibConstants PhiSymmetryCalibration_step2_SM::oldCalibs_
private

the old calibration constants (when reiterating, the last ones derived)

Definition at line 88 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), fillConstantsHistos(), and setUp().

float PhiSymmetryCalibration_step2_SM::rawconst_barl[kBarlRings][kBarlWedges][kSides]
private

Definition at line 69 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and fillConstantsHistos().

float PhiSymmetryCalibration_step2_SM::rawconst_endc[kEndcWedgesX][kEndcWedgesX][kSides]
private

Definition at line 70 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by endJob(), and fillConstantsHistos().

const bool PhiSymmetryCalibration_step2_SM::reiteration_
private

Definition at line 84 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by setUp().

const int PhiSymmetryCalibration_step2_SM::statusThreshold_
private

Definition at line 82 of file PhiSymmetryCalibration_step2_SM.h.

Referenced by setUp().