CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HOCalibAnalyzer Class Reference

#include <Calibration/HOCalibAnalyzer/src/HOCalibAnalyzer.cc>

Inheritance diagram for HOCalibAnalyzer:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HOCalibAnalyzer (const edm::ParameterSet &)
 
 ~HOCalibAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept 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 noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void endJob () override
 
int getHOieta (int ij)
 
int invert_HOieta (int ieta)
 

Private Attributes

float caloen [3]
 
float chisq
 
float ecal03
 
const double elosfact = (14.9 + 0.96 * std::fabs(std::log(8 * 2.8)) + 0.033 * 8 * (1.0 - std::pow(8, -0.33)))
 
float hbhesig [9]
 
float hcal03
 
TH1F * ho_indenergy [netamx][nphimx]
 
float hoang
 
edm::InputTag hoCalibVariableCollectionTag
 
float hocorsig [18]
 
float hocro
 
float hodx
 
float hody
 
unsigned hoflag
 
float hosig [9]
 
float htime
 
unsigned ievt
 
int ilumi
 
int ipass
 
int irun
 
int isect
 
int isect2
 
const double m_ahigh
 
const int m_bins
 
const bool m_cosmic
 
const bool m_histFill
 
const double m_low
 
const bool m_treeFill
 
const bool m_verbose
 
const bool m_zeroField
 
float momatho
 
TH2F * mu_projection [ncut+1]
 
TH1F * muonch
 
TH1F * muonmm
 
TH1F * muonnm
 
TH1F * muonph
 
TH1F * muonth
 
int mypow_2 [31]
 
float ncount [ringmx][ncut+10]
 
int ndof
 
int nevents [10]
 
int nmuon
 
int nprim
 
float pherr
 
float pileup
 
TH1F * sel_muonch
 
TH1F * sel_muonmm
 
TH1F * sel_muonnm
 
TH1F * sel_muonph
 
TH1F * sel_muonth
 
TH2F * sig_eta_evt [3 *netamx][ncut]
 
TH2F * sigvsevt [3 *netamx][ncut]
 
TTree * T1
 
float therr
 
float tkpt03
 
float tmphoang
 
const edm::EDGetTokenT< HORecHitCollectiontok_allho_
 
const edm::EDGetTokenT< HOCalibVariableCollectiontok_ho_
 
float trkdr
 
float trkdz
 
float trkmm
 
float trkph
 
float trkth
 
float trkvx
 
float trkvy
 
float trkvz
 
const char * varcrit [3] = {"All", "steps", "n-1"}
 
TH1F * variab [3 *netamx][ncut]
 

Static Private Attributes

static constexpr int ncut = 14
 
static constexpr int netamx = 30
 
static constexpr int nphimx = 72
 
static constexpr int ringmx = 5
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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< Bconsumes (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 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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

April 2015 Addition of these variables, ilumi (analyser), pileup (analyser), nprim

Definition at line 61 of file HOCalibAnalyzer.cc.

Constructor & Destructor Documentation

◆ HOCalibAnalyzer()

HOCalibAnalyzer::HOCalibAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 150 of file HOCalibAnalyzer.cc.

References caloen, chisq, ecal03, compareTotals::fs, getHOieta(), hcal03, ho_indenergy, hoang, hocorsig, hocro, hodx, hody, hoflag, hosig, htime, hcalRecHitTable_cff::ieta, ievt, ilumi, ipass, irun, isect, isect2, TFileService::kSharedResource, m_ahigh, m_bins, m_cosmic, m_histFill, m_low, momatho, mu_projection, muonch, muonmm, muonnm, muonph, muonth, mypow_2, Skims_PA_cff::name, ncount, ncut, ndof, netamx, nevents, nmuon, nphimx, nprim, pherr, pileup, angle_units::piRadians(), funct::pow(), ringmx, sel_muonch, sel_muonmm, sel_muonnm, sel_muonph, sel_muonth, sig_eta_evt, sigvsevt, T1, therr, runGCPTkAlMap::title, tkpt03, trkdr, trkdz, trkmm, trkph, trkth, trkvx, trkvy, trkvz, varcrit, and variab.

151  : m_cosmic(iConfig.getUntrackedParameter<bool>("cosmic", true)),
152  m_zeroField(iConfig.getUntrackedParameter<bool>("zeroField", false)),
153  m_bins(iConfig.getUntrackedParameter<int>("HOSignalBins", 120)),
154  m_low(iConfig.getUntrackedParameter<double>("lowerRange", -1.0)),
155  m_ahigh(iConfig.getUntrackedParameter<double>("upperRange", 29.0)),
156  m_histFill(iConfig.getUntrackedParameter<bool>("histFill", true)),
157  m_treeFill(iConfig.getUntrackedParameter<bool>("treeFill", false)),
158  m_verbose(iConfig.getUntrackedParameter<bool>("verbose", false)),
159  tok_ho_(consumes<HOCalibVariableCollection>(iConfig.getParameter<edm::InputTag>("hoCalibVariableCollectionTag"))),
160  tok_allho_(consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInputTag"))) {
161  // It is very likely you want the following in your configuration
162  // hoCalibVariableCollectionTag = cms.InputTag('hoCalibProducer', 'HOCalibVariableCollection')
163 
164  usesResource(TFileService::kSharedResource);
165 
166  //now do what ever initialization is needed
167  ipass = 0;
168  for (int ij = 0; ij < 10; ij++) {
169  nevents[ij] = 0;
170  }
171 
173 
174  T1 = fs->make<TTree>("T1", "HOSignal");
175 
176  T1->Branch("irun", &irun, "irun/I");
177  T1->Branch("ievt", &ievt, "ievt/i");
178 
179  T1->Branch("isect", &isect, "isect/I");
180  T1->Branch("isect2", &isect2, "isect2/I");
181  T1->Branch("ndof", &ndof, "ndof/I");
182  T1->Branch("nmuon", &nmuon, "nmuon/I");
183 
184  T1->Branch("ilumi", &ilumi, "ilumi/I");
185  if (!m_cosmic) {
186  T1->Branch("pileup", &pileup, "pileup/F");
187  T1->Branch("nprim", &nprim, "nprim/I");
188  T1->Branch("tkpt03", &tkpt03, " tkpt03/F");
189  T1->Branch("ecal03", &ecal03, " ecal03/F");
190  T1->Branch("hcal03", &hcal03, " hcal03/F");
191  }
192 
193  T1->Branch("trkdr", &trkdr, "trkdr/F");
194  T1->Branch("trkdz", &trkdz, "trkdz/F");
195 
196  T1->Branch("trkvx", &trkvx, "trkvx/F");
197  T1->Branch("trkvy", &trkvy, "trkvy/F");
198  T1->Branch("trkvz", &trkvz, "trkvz/F");
199  T1->Branch("trkmm", &trkmm, "trkmm/F");
200  T1->Branch("trkth", &trkth, "trkth/F");
201  T1->Branch("trkph", &trkph, "trkph/F");
202 
203  T1->Branch("chisq", &chisq, "chisq/F");
204  T1->Branch("therr", &therr, "therr/F");
205  T1->Branch("pherr", &pherr, "pherr/F");
206  T1->Branch("hodx", &hodx, "hodx/F");
207  T1->Branch("hody", &hody, "hody/F");
208  T1->Branch("hoang", &hoang, "hoang/F");
209 
210  T1->Branch("momatho", &momatho, "momatho/F");
211  T1->Branch("hoflag", &hoflag, "hoflag/i");
212  T1->Branch("htime", &htime, "htime/F");
213  T1->Branch("hosig", hosig, "hosig[9]/F");
214  T1->Branch("hocro", &hocro, "hocro/F");
215  T1->Branch("hocorsig", hocorsig, "hocorsig[18]/F");
216  T1->Branch("caloen", caloen, "caloen[3]/F");
217 
218  char name[200];
219  char title[200];
220 
221  if (m_histFill) {
222  for (int ij = 0; ij < netamx; ij++) {
223  int ieta = getHOieta(ij);
224  for (int jk = 0; jk < nphimx; jk++) {
225  sprintf(name, "ho_indenergy_%i_%i", ij, jk);
226  sprintf(title, "ho IndEnergy (GeV) i#eta=%i i#phi=%i", ieta, jk + 1);
227  ho_indenergy[ij][jk] = fs->make<TH1F>(name, title, 1200, m_low, m_ahigh);
228  }
229  }
230  }
231 
232  muonnm = fs->make<TH1F>("muonnm", "No of muon", 10, -0.5, 9.5);
233  muonmm = fs->make<TH1F>("muonmm", "P_{mu}", 200, -100., 100.);
234  muonth = fs->make<TH1F>("muonth", "{Theta}_{mu}", 180, 0., 180.);
235  muonph = fs->make<TH1F>("muonph", "{Phi}_{mu}", 180, -180., 180.);
236  muonch = fs->make<TH1F>("muonch", "{chi^2}/ndf", 100, 0., 1000.);
237 
238  sel_muonnm = fs->make<TH1F>("sel_muonnm", "No of muon(sel)", 10, -0.5, 9.5);
239  sel_muonmm = fs->make<TH1F>("sel_muonmm", "P_{mu}(sel)", 200, -100., 100.);
240  sel_muonth = fs->make<TH1F>("sel_muonth", "{Theta}_{mu}(sel)", 180, 0., 180.);
241  sel_muonph = fs->make<TH1F>("sel_muonph", "{Phi}_{mu}(sel)", 180, -180., 180.);
242  sel_muonch = fs->make<TH1F>("sel_muonch", "{chi^2}/ndf(sel)", 100, 0., 1000.);
243 
244  //if change order, change in iselect_wotime also and other efficiency numbers
245  const char* varnam[ncut] = {"ndof",
246  "chisq",
247  "th",
248  "ph",
249  "therr",
250  "pherr",
251  "dircos",
252  "trkmm",
253  "nmuon",
254  "calo",
255  "trkiso",
256  "#phi-dir",
257  "#eta-dir",
258  "time"};
259  int nbinxx[ncut] = {25, 60, 60, 60, 60, 60, 60, 120, 6, 60, 60, 120, 120, 60};
260  double alowxx[ncut] = {5.5, 0., 0., -angle_units::piRadians, 0.0, 0.0, 0.0, 0., 0.5, 0.0, 0.0, -20., -32., -45.0};
261  double ahghxx[ncut] = {
262  30.5, 40., angle_units::piRadians, angle_units::piRadians, 0.8, 0.02, 0.5, 300., 6.5, 10.0, 24.0, 20.0, 32.0, 45.0};
263 
264  for (int kl = 0; kl < ncut; kl++) {
265  for (int jk = 0; jk < 3; jk++) {
266  for (int ij = 0; ij < netamx; ij++) {
267  sprintf(name, "sigeta_%i_%i_%i", kl, jk, ij);
268  sprintf(title, "sigeta %s %s i#eta=%i", varnam[kl], varcrit[jk], getHOieta(ij));
269  sig_eta_evt[netamx * jk + ij][kl] =
270  fs->make<TH2F>(name, title, nbinxx[kl], alowxx[kl], ahghxx[kl], m_bins, m_low, m_ahigh);
271  }
272  }
273  }
274 
275  for (int kl = 0; kl < ncut; kl++) {
276  for (int ij = 0; ij < ringmx * 3; ij++) {
277  int iring = ij % ringmx - 2;
278  int iset = ij / ringmx;
279  sprintf(name, "sigring_%i_%i", kl, ij);
280  sprintf(title, "Signal %s %s Ring%i", varnam[kl], varcrit[iset], iring);
281  sigvsevt[ij][kl] = fs->make<TH2F>(name, title, nbinxx[kl], alowxx[kl], ahghxx[kl], m_bins, m_low, m_ahigh);
282  }
283  }
284 
285  for (int kl = 0; kl < ncut; kl++) {
286  for (int ij = 0; ij < ringmx * 3; ij++) {
287  int iring = ij % ringmx - 2;
288  int iset = ij / ringmx;
289  sprintf(name, "varring_%i_%i", kl, ij);
290  sprintf(title, "%s %s Ring%i", varnam[kl], varcrit[iset], iring);
291  variab[ij][kl] = fs->make<TH1F>(name, title, nbinxx[kl], alowxx[kl], ahghxx[kl]);
292  }
293  }
294 
295  for (int ij = 0; ij <= ncut; ij++) {
296  sprintf(name, "mu_projection_%i", ij);
297  if (ij == 0) {
298  sprintf(title, "All projected muon");
299  } else {
300  sprintf(title, "Projected muon with selection %s", varnam[ij - 1]);
301  }
302  mu_projection[ij] =
303  fs->make<TH2F>(name, title, netamx + 1, -netamx / 2 - 0.5, netamx / 2 + 0.5, nphimx, 0.5, nphimx + 0.5);
304  }
305 
306  for (int ij = 0; ij < 31; ij++) {
307  mypow_2[ij] = std::pow(2, ij);
308  }
309  for (int ij = 0; ij < ringmx; ij++) {
310  for (int jk = 0; jk < ncut + 10; jk++) {
311  ncount[ij][jk] = 0.0;
312  }
313  }
314 }
static const std::string kSharedResource
Definition: TFileService.h:76
const edm::EDGetTokenT< HORecHitCollection > tok_allho_
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< HOCalibVariableCollection > tok_ho_
const double m_low
static constexpr int ncut
TH1F * variab[3 *netamx][ncut]
TH1F * ho_indenergy[netamx][nphimx]
TH2F * sig_eta_evt[3 *netamx][ncut]
static constexpr int nphimx
static constexpr int ringmx
T getUntrackedParameter(std::string const &, T const &) const
const double m_ahigh
float ncount[ringmx][ncut+10]
const bool m_verbose
const char * varcrit[3]
int getHOieta(int ij)
const bool m_treeFill
constexpr double piRadians(M_PI)
const bool m_zeroField
const bool m_cosmic
static constexpr int netamx
TH2F * sigvsevt[3 *netamx][ncut]
const bool m_histFill
TH2F * mu_projection[ncut+1]
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ ~HOCalibAnalyzer()

HOCalibAnalyzer::~HOCalibAnalyzer ( )
override

Definition at line 316 of file HOCalibAnalyzer.cc.

References ipass, and nevents.

316  {
317  edm::LogVerbatim("HOCalibAnalyzer") << " Total events = " << std::setw(7) << nevents[0] << " " << std::setw(7)
318  << nevents[1] << " " << std::setw(7) << nevents[2] << " " << std::setw(7)
319  << nevents[3] << " " << std::setw(7) << nevents[4] << " " << std::setw(7)
320  << nevents[5] << " Selected events # is " << ipass;
321 }
Log< level::Info, true > LogVerbatim

Member Function Documentation

◆ analyze()

void HOCalibAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 344 of file HOCalibAnalyzer.cc.

References funct::abs(), caloen, chisq, ecal03, materialEffect::elos, elosfact, funct::false, hcal03, ho_indenergy, hoang, hocorsig, hocro, hodx, hody, hoflag, hosig, htime, hcalRecHitTable_cff::ieta, iEvent, ievt, ilumi, createfilelist::int, invert_HOieta(), ipass, hcalRecHitTable_cff::iphi, isect, isect2, edm::HandleBase::isValid(), dqm-mbProfile::log, m_cosmic, m_histFill, m_treeFill, m_verbose, m_zeroField, SiStripPI::max, momatho, mu_projection, muonch, muonmm, muonnm, muonph, muonth, mypow_2, ncount, ncut, ndof, netamx, nevents, nmuon, nphimx, nprim, pherr, pileup, angle_units::piRadians(), funct::pow(), ringmx, sel_muonch, sel_muonmm, sel_muonnm, sel_muonph, sel_muonth, sig_eta_evt, sigvsevt, funct::sin(), T1, therr, tkpt03, tmphoang, tok_ho_, trkdr, trkdz, trkmm, trkph, trkth, trkvx, trkvy, trkvz, and variab.

344  {
345  nevents[0]++;
346 
347  ievt = iEvent.id().event();
348  ilumi = iEvent.luminosityBlock();
349 
350  const edm::Handle<HOCalibVariableCollection>& HOCalib = iEvent.getHandle(tok_ho_);
351 
352  if (nevents[0] % 20000 == 1) {
353  edm::LogVerbatim("HOCalibAnalyzer") << "nmuon event # " << std::setw(7) << nevents[0] << " " << std::setw(7)
354  << nevents[1] << " " << std::setw(7) << nevents[2] << " " << std::setw(7)
355  << nevents[3] << " " << std::setw(7) << nevents[4] << " " << std::setw(7)
356  << nevents[5];
357  edm::LogVerbatim("HOCalibAnalyzer") << " Run # " << iEvent.id().run() << " Evt # " << iEvent.id().event() << " "
358  << int(HOCalib.isValid()) << " " << ipass;
359  }
360 
361  if (HOCalib.isValid()) {
362  nevents[1]++;
363  nmuon = (*HOCalib).size();
364 
365  for (HOCalibVariableCollection::const_iterator hoC = (*HOCalib).begin(); hoC != (*HOCalib).end(); hoC++) {
366  trkdr = (*hoC).trkdr;
367  trkdz = (*hoC).trkdz;
368 
369  trkvx = (*hoC).trkvx;
370  trkvy = (*hoC).trkvy;
371  trkvz = (*hoC).trkvz;
372 
373  trkmm = (*hoC).trkmm;
374  trkth = (*hoC).trkth;
375  trkph = (*hoC).trkph;
376 
377  ndof = static_cast<int>((*hoC).ndof);
378  chisq = (*hoC).chisq;
379  momatho = (*hoC).momatho;
380 
381  therr = (*hoC).therr;
382  pherr = (*hoC).pherr;
383  trkph = (*hoC).trkph;
384 
385  if (!m_cosmic) {
386  nprim = (*hoC).nprim;
387  pileup = (*hoC).pileup;
388  tkpt03 = (*hoC).tkpt03;
389  ecal03 = (*hoC).ecal03;
390  hcal03 = (*hoC).hcal03;
391  }
392 
393  isect = (*hoC).isect;
394  isect2 = (*hoC).isect2;
395  hodx = (*hoC).hodx;
396  hody = (*hoC).hody;
397  hoang = (*hoC).hoang;
398 
400 
401  htime = (*hoC).htime;
402  hoflag = (*hoC).hoflag;
403  for (int ij = 0; ij < 9; ij++) {
404  hosig[ij] = (*hoC).hosig[ij];
405  if (m_verbose)
406  edm::LogVerbatim("HOCalibAnalyzer") << "hosig " << ij << " " << hosig[ij];
407  }
408  for (int ij = 0; ij < 18; ij++) {
409  hocorsig[ij] = (*hoC).hocorsig[ij];
410  if (m_verbose)
411  edm::LogVerbatim("HOCalibAnalyzer") << "hocorsig " << ij << " " << hocorsig[ij];
412  }
413  hocro = (*hoC).hocro;
414  for (int ij = 0; ij < 3; ij++) {
415  caloen[ij] = (*hoC).caloen[ij];
416  }
417 
418  int ipsall = 0;
419  int ips0 = 0;
420  int ips1 = 0;
421  int ips2 = 0;
422  int ips3 = 0;
423  int ips4 = 0;
424  int ips5 = 0;
425  int ips6 = 0;
426  int ips7 = 0;
427  int ips8 = 0;
428  int ips9 = 0;
429  int ips10 = 0;
430  int ips11 = 0;
431  int ips12 = 0;
432  int ips13 = 0;
433 
434  nevents[2]++;
435  bool isZSps = (hosig[4] < -99.0) ? false : true;
436 
437  if ((!m_cosmic) && std::fabs(trkmm) < momatho)
438  continue;
439 
440  nevents[3]++;
441  if (std::fabs(trkth - angle_units::piRadians / 2) < 0.000001)
442  continue; //22OCT07
443  nevents[4]++;
444 
445  int ieta = int((std::abs(isect) % 10000) / 100.) - 50; //an offset to acodate -ve eta values
446  if (std::abs(ieta) >= 16)
447  continue;
448  nevents[5]++;
449  int iphi = std::abs(isect) % 100;
450 
451  int iring = 0;
452 
453  int iring2 = iring + 2;
454 
455  double abshoang = (m_cosmic) ? std::fabs(hoang) : hoang;
456 
457  double elos = 1.0 / std::max(0.1, std::abs(static_cast<double>(hoang)));
458 
459  if (!m_zeroField)
460  elos *= ((14.9 + 0.96 * std::fabs(log(momatho * 2.8)) + 0.033 * momatho * (1.0 - std::pow(momatho, -0.33))) /
461  elosfact);
462 
463  if (m_cosmic) {
464  if (std::abs(ndof) >= 20 && std::abs(ndof) < 55) {
465  ips0 = mypow_2[0];
466  ipsall += ips0;
467  }
468  if (chisq > 0 && chisq < 12) {
469  ips1 = mypow_2[1];
470  ipsall += ips1;
471  } //18Jan2008
472 
473  if (trkth > 0.3 && trkth < angle_units::piRadians - 0.3) {
474  ips2 = mypow_2[2];
475  ipsall += ips2;
476  } //No nead for pp evt
477  if (trkph > -angle_units::piRadians + 0.1 && trkph < -0.1) {
478  ips3 = mypow_2[3];
479  ipsall += ips3;
480  } //No nead for pp evt
481 
482  if (therr < 0.02) {
483  ips4 = mypow_2[4];
484  ipsall += ips4;
485  }
486  if (pherr < 0.0002) {
487  ips5 = mypow_2[5];
488  ipsall += ips5;
489  }
490  if (abshoang > 0.60 && abshoang < 1.0) {
491  ips6 = mypow_2[6];
492  ipsall += ips6;
493  }
494 
495  if (m_zeroField || (std::fabs(momatho) > 5.0 && std::fabs(momatho) < 2000.0)) {
496  ips7 = mypow_2[7];
497  ipsall += ips7;
498  }
499 
500  if (nmuon >= 1 && nmuon <= 3) {
501  ips8 = mypow_2[8];
502  ipsall += ips8;
503  }
504 
505  // initially for: if (hodx>0 && hody>0) { }
506  ips9 = mypow_2[9];
507  ipsall += ips9;
508 
509  ips10 = mypow_2[10];
510  ipsall += ips10;
511 
512  if (iring2 == 2) {
513  if (std::fabs(hodx) < 100 && std::fabs(hodx) > 2 && std::fabs(hocorsig[8]) < 40 &&
514  std::fabs(hocorsig[8]) > 2) {
515  ips11 = mypow_2[11];
516  ipsall += ips11;
517  }
518 
519  if (std::fabs(hody) < 100 && std::fabs(hody) > 2 && std::fabs(hocorsig[9]) < 40 &&
520  std::fabs(hocorsig[9]) > 2) {
521  ips12 = mypow_2[12];
522  ipsall += ips12;
523  }
524 
525  } else {
526  if (std::fabs(hodx) < 100 && std::fabs(hodx) > 2) {
527  ips11 = mypow_2[11];
528  ipsall += ips11;
529  }
530 
531  if (std::fabs(hody) < 100 && std::fabs(hody) > 2) {
532  ips12 = mypow_2[12];
533  ipsall += ips12;
534  }
535  }
536 
537  if (m_zeroField) {
538  if (iring2 == 0) {
539  if (htime > -60 && htime < 60) {
540  ips13 = mypow_2[13];
541  ipsall += ips13;
542  }
543  }
544  if (iring2 == 1) {
545  if (htime > -60 && htime < 60) {
546  ips13 = mypow_2[13];
547  ipsall += ips13;
548  }
549  }
550  if (iring2 == 2) {
551  if (htime > -60 && htime < 60) {
552  ips13 = mypow_2[13];
553  ipsall += ips13;
554  }
555  }
556  if (iring2 == 3) {
557  if (htime > -60 && htime < 60) {
558  ips13 = mypow_2[13];
559  ipsall += ips13;
560  }
561  }
562  if (iring2 == 4) {
563  if (htime > -60 && htime < 60) {
564  ips13 = mypow_2[13];
565  ipsall += ips13;
566  }
567  }
568  } else {
569  if (htime > -100 && htime < 100) {
570  ips13 = mypow_2[13];
571  ipsall += ips13;
572  }
573  }
574  } else {
575  if (std::abs(ndof) >= 10 && std::abs(ndof) < 25) {
576  ips0 = mypow_2[0];
577  ipsall += ips0;
578  }
579  if (chisq > 0 && chisq < 10) {
580  ips1 = mypow_2[1];
581  ipsall += ips1;
582  } //18Jan2008
583 
584  if (std::fabs(trkth - angle_units::piRadians / 2) < 21.5) {
585  ips2 = mypow_2[2];
586  ipsall += ips2;
587  } //No nead for pp evt
588  if (std::fabs(trkph + angle_units::piRadians / 2) < 21.5) {
589  ips3 = mypow_2[3];
590  ipsall += ips3;
591  } //No nead for pp evt
592 
593  if (therr < 0.00002) {
594  ips4 = mypow_2[4];
595  ipsall += ips4;
596  }
597  if (pherr < 0.000002) {
598  ips5 = mypow_2[5];
599  ipsall += ips5;
600  }
601  // earlier: if (abshoang >0.40 && abshoang <1.0) {ips6 = mypow_2[6]; ipsall +=ips6;}
602  if (tmphoang < 0.065) {
603  ips6 = mypow_2[6];
604  ipsall += ips6;
605  }
606 
607  if (std::fabs(momatho) < 250.0 && std::fabs(momatho) > 15.0) {
608  if (iring2 == 2) {
609  ips7 = mypow_2[7];
610  ipsall += ips7;
611  }
612  if ((iring2 == 1 || iring2 == 3) && std::fabs(momatho) > 17.0) {
613  ips7 = mypow_2[7];
614  ipsall += ips7;
615  }
616  if ((iring2 == 0 || iring2 == 4) && std::fabs(momatho) > 20.0) {
617  ips7 = mypow_2[7];
618  ipsall += ips7;
619  }
620  }
621 
622  if (nmuon >= 1 && nmuon <= 3) {
623  ips8 = mypow_2[8];
624  ipsall += ips8;
625  }
626 
627  if (ndof > 0 && caloen[0] < 15.0) {
628  ips9 = mypow_2[9];
629  ipsall += ips9;
630  } //5.0
631  if (tkpt03 < 5.0) {
632  ips10 = mypow_2[10];
633  ipsall += ips10;
634  } //4.0
635 
636  if (iring2 == 2) {
637  if (std::fabs(hodx) < 100 && std::fabs(hodx) > 2 && std::fabs(hocorsig[8]) < 40 &&
638  std::fabs(hocorsig[8]) > 2) {
639  ips11 = mypow_2[11];
640  ipsall += ips11;
641  }
642 
643  if (std::fabs(hody) < 100 && std::fabs(hody) > 2 && std::fabs(hocorsig[9]) < 40 &&
644  std::fabs(hocorsig[9]) > 2) {
645  ips12 = mypow_2[12];
646  ipsall += ips12;
647  }
648 
649  } else {
650  if (std::fabs(hodx) < 100 && std::fabs(hodx) > 2) {
651  ips11 = mypow_2[11];
652  ipsall += ips11;
653  }
654 
655  if (std::fabs(hody) < 100 && std::fabs(hody) > 2) {
656  ips12 = mypow_2[12];
657  ipsall += ips12;
658  }
659  }
660 
661  if (iring2 == 0) {
662  if (htime > -20 && htime < 20) {
663  ips13 = mypow_2[13];
664  ipsall += ips13;
665  }
666  }
667  if (iring2 == 1) {
668  if (htime > -20 && htime < 20) {
669  ips13 = mypow_2[13];
670  ipsall += ips13;
671  }
672  }
673  if (iring2 == 2) {
674  if (htime > -30 && htime < 20) {
675  ips13 = mypow_2[13];
676  ipsall += ips13;
677  }
678  }
679  if (iring2 == 3) {
680  if (htime > -20 && htime < 20) {
681  ips13 = mypow_2[13];
682  ipsall += ips13;
683  }
684  }
685  if (iring2 == 4) {
686  if (htime > -20 && htime < 20) {
687  ips13 = mypow_2[13];
688  ipsall += ips13;
689  }
690  }
691  }
692  int tmpxet = invert_HOieta(ieta);
693  double nomHOSig = hosig[4] / elos;
694 
695  if (ipsall - ips0 == mypow_2[ncut] - mypow_2[0] - 1) {
696  if (isZSps) {
697  sigvsevt[iring2][0]->Fill(std::abs(ndof), nomHOSig);
698  sig_eta_evt[tmpxet][0]->Fill(std::abs(ndof), nomHOSig);
699  }
700  variab[iring2][0]->Fill(std::abs(ndof));
701  }
702  if (ipsall - ips1 == mypow_2[ncut] - mypow_2[1] - 1) {
703  if (isZSps) {
704  sigvsevt[iring2][1]->Fill(chisq, nomHOSig);
705  sig_eta_evt[tmpxet][1]->Fill(chisq, nomHOSig);
706  }
707  variab[iring2][1]->Fill(chisq);
708  }
709  if (ipsall - ips2 == mypow_2[ncut] - mypow_2[2] - 1) {
710  if (isZSps) {
711  sigvsevt[iring2][2]->Fill(trkth, nomHOSig);
712  sig_eta_evt[tmpxet][2]->Fill(trkth, nomHOSig);
713  }
714  variab[iring2][2]->Fill(trkth);
715  }
716  if (ipsall - ips3 == mypow_2[ncut] - mypow_2[3] - 1) {
717  if (isZSps) {
718  sigvsevt[iring2][3]->Fill(trkph, nomHOSig);
719  sig_eta_evt[tmpxet][3]->Fill(trkph, nomHOSig);
720  }
721  variab[iring2][3]->Fill(trkph);
722  }
723  if (ipsall - ips4 == mypow_2[ncut] - mypow_2[4] - 1) {
724  if (isZSps) {
725  sigvsevt[iring2][4]->Fill(1000 * therr, nomHOSig);
726  sig_eta_evt[tmpxet][4]->Fill(1000 * therr, nomHOSig);
727  }
728  variab[iring2][4]->Fill(1000 * therr);
729  }
730  if (ipsall - ips5 == mypow_2[ncut] - mypow_2[5] - 1) {
731  if (isZSps) {
732  sigvsevt[iring2][5]->Fill(1000 * pherr, nomHOSig);
733  sig_eta_evt[tmpxet][5]->Fill(1000 * pherr, nomHOSig);
734  }
735  variab[iring2][5]->Fill(1000 * pherr);
736  }
737  if (ipsall - ips6 == mypow_2[ncut] - mypow_2[6] - 1) {
738  if (isZSps) {
739  sigvsevt[iring2][6]->Fill(tmphoang, (nomHOSig)*abshoang);
740  sig_eta_evt[tmpxet][6]->Fill(tmphoang, (nomHOSig)*abshoang);
741  }
742  variab[iring2][6]->Fill(tmphoang);
743  }
744  if (ipsall - ips7 == mypow_2[ncut] - mypow_2[7] - 1) {
745  if (isZSps) {
746  sigvsevt[iring2][7]->Fill(std::fabs(trkmm), nomHOSig);
747  sig_eta_evt[tmpxet][7]->Fill(std::fabs(trkmm), nomHOSig);
748  }
749  variab[iring2][7]->Fill(std::fabs(trkmm));
750  }
751  if (ipsall - ips8 == mypow_2[ncut] - mypow_2[8] - 1) {
752  if (isZSps) {
753  sigvsevt[iring2][8]->Fill(nmuon, nomHOSig);
754  sig_eta_evt[tmpxet][8]->Fill(nmuon, nomHOSig);
755  }
756  variab[iring2][8]->Fill(nmuon);
757  }
758  if (!m_cosmic) {
759  if (ipsall - ips9 == mypow_2[ncut] - mypow_2[9] - 1) {
760  if (isZSps) {
761  sigvsevt[iring2][9]->Fill(caloen[0], nomHOSig);
762  sig_eta_evt[tmpxet][9]->Fill(caloen[0], nomHOSig);
763  }
764  variab[iring2][9]->Fill(caloen[0]);
765  }
766  }
767  if (ipsall - ips10 == mypow_2[ncut] - mypow_2[10] - 1) {
768  if (isZSps) {
769  sigvsevt[iring2][10]->Fill(tkpt03, nomHOSig);
770  sig_eta_evt[tmpxet][10]->Fill(tkpt03, nomHOSig);
771  }
772  variab[iring2][10]->Fill(tkpt03);
773  }
774  if (ipsall - ips11 == mypow_2[ncut] - mypow_2[11] - 1) {
775  if (isZSps) {
776  sigvsevt[iring2][11]->Fill(hodx, nomHOSig);
777  sig_eta_evt[tmpxet][11]->Fill(hodx, nomHOSig);
778  }
779  variab[iring2][11]->Fill(hodx);
780  }
781  if (ipsall - ips12 == mypow_2[ncut] - mypow_2[12] - 1) {
782  if (isZSps) {
783  sigvsevt[iring2][12]->Fill(hody, nomHOSig);
784  sig_eta_evt[tmpxet][12]->Fill(hody, nomHOSig);
785  }
786  variab[iring2][12]->Fill(hody);
787  }
788 
789  if (ipsall - ips13 == mypow_2[ncut] - mypow_2[13] - 1) {
790  if (isZSps) {
791  sigvsevt[iring2][13]->Fill(htime, nomHOSig);
792  sig_eta_evt[tmpxet][13]->Fill(htime, nomHOSig);
793  }
794  variab[iring2][13]->Fill(htime);
795  }
796 
797  if (isZSps) {
798  sigvsevt[iring2 + ringmx][0]->Fill(std::abs(ndof), nomHOSig);
799  sig_eta_evt[netamx + tmpxet][0]->Fill(std::abs(ndof), nomHOSig);
800  }
801  variab[iring2 + 5][0]->Fill(std::abs(ndof));
802 
803  ncount[iring2][0]++;
804  if (isZSps) {
805  ncount[iring2][1]++;
806  }
807  if (ips0 > 0) {
808  if (isZSps) {
809  ncount[iring2][10]++;
810  sigvsevt[iring2 + ringmx][1]->Fill(chisq, nomHOSig);
811  sig_eta_evt[netamx + tmpxet][1]->Fill(chisq, nomHOSig);
812  }
813  variab[iring2 + ringmx][1]->Fill(chisq);
814  mu_projection[1]->Fill(ieta, iphi);
815  if (ips1 > 0) {
816  if (isZSps) {
817  ncount[iring2][11]++;
818  sigvsevt[iring2 + ringmx][2]->Fill(trkth, nomHOSig);
819  sig_eta_evt[netamx + tmpxet][2]->Fill(trkth, nomHOSig);
820  }
821  variab[iring2 + ringmx][2]->Fill(trkth);
822  mu_projection[2]->Fill(ieta, iphi);
823  if (ips2 > 0) {
824  if (isZSps) {
825  ncount[iring2][12]++;
826  sigvsevt[iring2 + ringmx][3]->Fill(trkph, nomHOSig);
827  sig_eta_evt[netamx + tmpxet][3]->Fill(trkph, nomHOSig);
828  }
829  variab[iring2 + ringmx][3]->Fill(trkph);
830  mu_projection[3]->Fill(ieta, iphi);
831  if (ips3 > 0) {
832  if (isZSps) {
833  ncount[iring2][13]++;
834  sigvsevt[iring2 + ringmx][4]->Fill(1000 * therr, nomHOSig);
835  sig_eta_evt[netamx + tmpxet][4]->Fill(1000 * therr, nomHOSig);
836  }
837  variab[iring2 + ringmx][4]->Fill(1000 * therr);
838  mu_projection[4]->Fill(ieta, iphi);
839  if (ips4 > 0) {
840  if (isZSps) {
841  ncount[iring2][14]++;
842  sigvsevt[iring2 + ringmx][5]->Fill(1000 * pherr, nomHOSig);
843  sig_eta_evt[netamx + tmpxet][5]->Fill(1000 * pherr, nomHOSig);
844  }
845  variab[iring2 + ringmx][5]->Fill(1000 * pherr);
846  mu_projection[5]->Fill(ieta, iphi);
847  if (ips5 > 0) {
848  if (isZSps) {
849  ncount[iring2][15]++;
850  sigvsevt[iring2 + ringmx][6]->Fill(tmphoang, (nomHOSig)*abshoang);
851  sig_eta_evt[netamx + tmpxet][6]->Fill(tmphoang, (nomHOSig)*abshoang);
852  }
853  variab[iring2 + ringmx][6]->Fill(tmphoang);
854  mu_projection[6]->Fill(ieta, iphi);
855  if (ips6 > 0) {
856  if (isZSps) {
857  ncount[iring2][16]++;
858  sigvsevt[iring2 + ringmx][7]->Fill(std::fabs(trkmm), nomHOSig);
859  sig_eta_evt[netamx + tmpxet][7]->Fill(std::fabs(trkmm), nomHOSig);
860  }
861  variab[iring2 + ringmx][7]->Fill(std::fabs(trkmm));
862  mu_projection[7]->Fill(ieta, iphi);
863  if (ips7 > 0) {
864  ncount[iring2][4]++; //Efficiency of Muon detection
865  if (isZSps) {
866  ncount[iring2][17]++;
867  sigvsevt[iring2 + ringmx][8]->Fill(nmuon, nomHOSig);
868  sig_eta_evt[netamx + tmpxet][8]->Fill(nmuon, nomHOSig);
869  }
870  variab[iring2 + ringmx][8]->Fill(nmuon);
871  mu_projection[8]->Fill(ieta, iphi);
872  if (ips8 > 0) {
873  if (!m_cosmic) {
874  if (isZSps) {
875  ncount[iring2][18]++;
876  sigvsevt[iring2 + ringmx][9]->Fill(caloen[0], nomHOSig);
877  sig_eta_evt[netamx + tmpxet][9]->Fill(caloen[0], nomHOSig);
878  }
879  variab[iring2 + ringmx][9]->Fill(caloen[0]);
880  mu_projection[9]->Fill(ieta, iphi);
881  }
882  if (ips9 > 0) {
883  if (isZSps) {
884  ncount[iring2][19]++;
885  sigvsevt[iring2 + ringmx][10]->Fill(tkpt03, nomHOSig);
886  sig_eta_evt[netamx + tmpxet][10]->Fill(tkpt03, nomHOSig);
887  }
888  variab[iring2 + ringmx][10]->Fill(tkpt03);
889  mu_projection[10]->Fill(ieta, iphi);
890  if (ips10 > 0) {
891  ncount[iring2][3]++; //Efficiency of Muon detection
892  if (isZSps) {
893  ncount[iring2][20]++;
894  sigvsevt[iring2 + ringmx][11]->Fill(hodx, nomHOSig);
895  sig_eta_evt[netamx + tmpxet][11]->Fill(hodx, nomHOSig);
896  }
897  variab[iring2 + ringmx][11]->Fill(hodx);
898  mu_projection[11]->Fill(ieta, iphi);
899 
900  if (ips11 > 0) {
901  if (isZSps) {
902  ncount[iring2][21]++;
903  sigvsevt[iring2 + ringmx][12]->Fill(hody, nomHOSig);
904  sig_eta_evt[netamx + tmpxet][12]->Fill(hody, nomHOSig);
905  }
906  variab[iring2 + ringmx][12]->Fill(hody);
907  mu_projection[12]->Fill(ieta, iphi);
908 
909  if (ips12 > 0) {
910  ncount[iring2][2]++; //Efficiency of Muon detection
911  if (isZSps) {
912  ncount[iring2][22]++;
913  sigvsevt[iring2 + ringmx][13]->Fill(htime, nomHOSig);
914  sig_eta_evt[tmpxet + ringmx][13]->Fill(htime, nomHOSig);
915  }
916  variab[iring2 + ringmx][13]->Fill(htime);
917  mu_projection[13]->Fill(ieta, iphi);
918 
919  if (ips13 > 0) {
920  if (isZSps) {
921  ncount[iring2][23]++;
922  mu_projection[14]->Fill(ieta, iphi);
923  }
924  }
925  }
926  }
927  }
928  }
929  }
930  }
931  }
932  }
933  }
934  }
935  }
936  }
937  }
938  if (isZSps) {
939  sigvsevt[iring2 + 2 * ringmx][0]->Fill(std::abs(ndof), nomHOSig);
940  sigvsevt[iring2 + 2 * ringmx][1]->Fill(chisq, nomHOSig);
941  sigvsevt[iring2 + 2 * ringmx][2]->Fill(trkth, nomHOSig);
942  sigvsevt[iring2 + 2 * ringmx][3]->Fill(trkph, nomHOSig);
943  sigvsevt[iring2 + 2 * ringmx][4]->Fill(1000 * therr, nomHOSig);
944  sigvsevt[iring2 + 2 * ringmx][5]->Fill(1000 * pherr, nomHOSig);
945  if (abshoang > 0.01) {
946  sigvsevt[iring2 + 2 * ringmx][6]->Fill(tmphoang, (nomHOSig)*abshoang);
947  }
948  sigvsevt[iring2 + 2 * ringmx][7]->Fill(std::fabs(trkmm), nomHOSig);
949  sigvsevt[iring2 + 2 * ringmx][8]->Fill(nmuon, nomHOSig);
950  if (!m_cosmic)
951  sigvsevt[iring2 + 2 * ringmx][9]->Fill(caloen[0], nomHOSig);
952  sigvsevt[iring2 + 2 * ringmx][10]->Fill(tkpt03, nomHOSig);
953  sigvsevt[iring2 + 2 * ringmx][11]->Fill(hodx, nomHOSig);
954  sigvsevt[iring2 + 2 * ringmx][12]->Fill(hody, nomHOSig);
955  sigvsevt[iring2 + 2 * ringmx][13]->Fill(htime, nomHOSig);
956 
957  sig_eta_evt[2 * netamx + tmpxet][0]->Fill(std::abs(ndof), nomHOSig);
958  sig_eta_evt[2 * netamx + tmpxet][1]->Fill(chisq, nomHOSig);
959  sig_eta_evt[2 * netamx + tmpxet][2]->Fill(trkth, nomHOSig);
960  sig_eta_evt[2 * netamx + tmpxet][3]->Fill(trkph, nomHOSig);
961  sig_eta_evt[2 * netamx + tmpxet][4]->Fill(1000 * therr, nomHOSig);
962  sig_eta_evt[2 * netamx + tmpxet][5]->Fill(1000 * pherr, nomHOSig);
963  if (abshoang > 0.01) {
964  sig_eta_evt[2 * netamx + tmpxet][6]->Fill(tmphoang, (nomHOSig)*abshoang);
965  }
966  sig_eta_evt[2 * netamx + tmpxet][7]->Fill(std::fabs(trkmm), nomHOSig);
967  sig_eta_evt[2 * netamx + tmpxet][8]->Fill(nmuon, nomHOSig);
968  if (!m_cosmic)
969  sig_eta_evt[2 * netamx + tmpxet][9]->Fill(caloen[0], nomHOSig);
970  sig_eta_evt[2 * netamx + tmpxet][10]->Fill(tkpt03, nomHOSig);
971  sig_eta_evt[2 * netamx + tmpxet][11]->Fill(hodx, nomHOSig);
972  sig_eta_evt[2 * netamx + tmpxet][12]->Fill(hody, nomHOSig);
973  sig_eta_evt[2 * netamx + tmpxet][13]->Fill(htime, nomHOSig);
974  }
975 
976  variab[iring2 + 2 * ringmx][0]->Fill(std::abs(ndof));
977  variab[iring2 + 2 * ringmx][1]->Fill(chisq);
978  variab[iring2 + 2 * ringmx][2]->Fill(trkth);
979  variab[iring2 + 2 * ringmx][3]->Fill(trkph);
980  variab[iring2 + 2 * ringmx][4]->Fill(1000 * therr);
981  variab[iring2 + 2 * ringmx][5]->Fill(1000 * pherr);
982  variab[iring2 + 2 * ringmx][6]->Fill(tmphoang);
983  variab[iring2 + 2 * ringmx][7]->Fill(std::fabs(trkmm));
984  variab[iring2 + 2 * ringmx][8]->Fill(nmuon);
985  if (!m_cosmic)
986  variab[iring2 + 2 * ringmx][9]->Fill(caloen[0]);
987  variab[iring2 + 2 * ringmx][10]->Fill(tkpt03);
988  variab[iring2 + 2 * ringmx][11]->Fill(hodx);
989  variab[iring2 + 2 * ringmx][12]->Fill(hody);
990  variab[iring2 + 2 * ringmx][13]->Fill(htime);
991 
992  muonnm->Fill(nmuon);
993  muonmm->Fill(trkmm);
994  muonth->Fill(trkth * 180 / angle_units::piRadians);
995  muonph->Fill(trkph * 180 / angle_units::piRadians);
996  muonch->Fill(chisq);
997 
998  int iselect = (ipsall == mypow_2[ncut] - 1) ? 1 : 0;
999 
1000  if (iselect == 1) {
1001  ipass++;
1002  sel_muonnm->Fill(nmuon);
1003  sel_muonmm->Fill(trkmm);
1004  sel_muonth->Fill(trkth * 180 / angle_units::piRadians);
1005  sel_muonph->Fill(trkph * 180 / angle_units::piRadians);
1006  sel_muonch->Fill(chisq);
1007  if (m_histFill && tmpxet >= 0 && tmpxet < netamx && iphi >= 0 && iphi < nphimx) {
1008  ho_indenergy[tmpxet][iphi - 1]->Fill(nomHOSig);
1009  }
1010  if (m_treeFill) {
1011  T1->Fill();
1012  }
1013  }
1014  } //close the for loop: (HOCalibVariableCollection::const_iterator hoC=(*HOCalib).begin(); hoC!=(*HOCalib).end(); hoC++){
1015  } //end of the if loop (isCosMu)
1016 }
Log< level::Info, true > LogVerbatim
const edm::EDGetTokenT< HOCalibVariableCollection > tok_ho_
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
static constexpr int ncut
TH1F * variab[3 *netamx][ncut]
TH1F * ho_indenergy[netamx][nphimx]
TH2F * sig_eta_evt[3 *netamx][ncut]
static constexpr int nphimx
static constexpr int ringmx
const double elosfact
float ncount[ringmx][ncut+10]
int iEvent
Definition: GenABIO.cc:224
const bool m_verbose
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int invert_HOieta(int ieta)
const bool m_treeFill
constexpr double piRadians(M_PI)
const bool m_zeroField
bool isValid() const
Definition: HandleBase.h:70
const bool m_cosmic
static constexpr int netamx
TH2F * sigvsevt[3 *netamx][ncut]
const bool m_histFill
TH2F * mu_projection[ncut+1]
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ beginJob()

void HOCalibAnalyzer::beginJob ( )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 69 of file HOCalibAnalyzer.cc.

69 {}

◆ endJob()

void HOCalibAnalyzer::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 71 of file HOCalibAnalyzer.cc.

Referenced by o2olib.O2ORunMgr::executeJob().

71 {}

◆ fillDescriptions()

void HOCalibAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 326 of file HOCalibAnalyzer.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and ProducerED_cfi::InputTag.

326  {
328  desc.add<edm::InputTag>("hoCalibVariableCollectionTag",
329  edm::InputTag("hoCalibProducer", "HOCalibVariableCollection"));
330  desc.add<edm::InputTag>("hoInputTag", edm::InputTag("horeco"));
331  desc.addUntracked<bool>("cosmic", true);
332  desc.addUntracked<bool>("zeroField", false);
333  desc.addUntracked<int>("HOSignalBins", 120);
334  desc.addUntracked<double>("lowerRange", -1.0);
335  desc.addUntracked<double>("upperRange", 29.0);
336  desc.addUntracked<bool>("histFill", true);
337  desc.addUntracked<bool>("treeFill", false);
338  desc.addUntracked<double>("sigma", 0.05);
339  desc.addUntracked<bool>("verbose", false);
340  descriptions.add("hoCalibAnalyzer", desc);
341 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ getHOieta()

int HOCalibAnalyzer::getHOieta ( int  ij)
inlineprivate

Definition at line 82 of file HOCalibAnalyzer.cc.

References netamx.

Referenced by HOCalibAnalyzer().

82 { return (ij < netamx / 2) ? -netamx / 2 + ij : -netamx / 2 + ij + 1; }
static constexpr int netamx

◆ invert_HOieta()

int HOCalibAnalyzer::invert_HOieta ( int  ieta)
inlineprivate

Definition at line 83 of file HOCalibAnalyzer.cc.

References hcalRecHitTable_cff::ieta, and netamx.

Referenced by analyze().

83 { return (ieta < 0) ? netamx / 2 + ieta : netamx / 2 + ieta - 1; }
static constexpr int netamx

Member Data Documentation

◆ caloen

float HOCalibAnalyzer::caloen[3]
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ chisq

float HOCalibAnalyzer::chisq
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ecal03

float HOCalibAnalyzer::ecal03
private

Definition at line 125 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ elosfact

const double HOCalibAnalyzer::elosfact = (14.9 + 0.96 * std::fabs(std::log(8 * 2.8)) + 0.033 * 8 * (1.0 - std::pow(8, -0.33)))
private

Definition at line 80 of file HOCalibAnalyzer.cc.

Referenced by analyze().

◆ hbhesig

float HOCalibAnalyzer::hbhesig[9]
private

Definition at line 123 of file HOCalibAnalyzer.cc.

◆ hcal03

float HOCalibAnalyzer::hcal03
private

Definition at line 125 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ho_indenergy

TH1F* HOCalibAnalyzer::ho_indenergy[netamx][nphimx]
private

Definition at line 100 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ hoang

float HOCalibAnalyzer::hoang
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ hoCalibVariableCollectionTag

edm::InputTag HOCalibAnalyzer::hoCalibVariableCollectionTag
private

Definition at line 132 of file HOCalibAnalyzer.cc.

◆ hocorsig

float HOCalibAnalyzer::hocorsig[18]
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ hocro

float HOCalibAnalyzer::hocro
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ hodx

float HOCalibAnalyzer::hodx
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ hody

float HOCalibAnalyzer::hody
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ hoflag

unsigned HOCalibAnalyzer::hoflag
private

Definition at line 120 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ hosig

float HOCalibAnalyzer::hosig[9]
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ htime

float HOCalibAnalyzer::htime
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ievt

unsigned HOCalibAnalyzer::ievt
private

Definition at line 120 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ilumi

int HOCalibAnalyzer::ilumi
private

Definition at line 121 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ipass

int HOCalibAnalyzer::ipass
private

Definition at line 96 of file HOCalibAnalyzer.cc.

Referenced by analyze(), HOCalibAnalyzer(), and ~HOCalibAnalyzer().

◆ irun

int HOCalibAnalyzer::irun
private

Definition at line 121 of file HOCalibAnalyzer.cc.

Referenced by HOCalibAnalyzer().

◆ isect

int HOCalibAnalyzer::isect
private

Definition at line 121 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ isect2

int HOCalibAnalyzer::isect2
private

Definition at line 121 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ m_ahigh

const double HOCalibAnalyzer::m_ahigh
private

Definition at line 91 of file HOCalibAnalyzer.cc.

Referenced by HOCalibAnalyzer().

◆ m_bins

const int HOCalibAnalyzer::m_bins
private

Definition at line 89 of file HOCalibAnalyzer.cc.

Referenced by HOCalibAnalyzer().

◆ m_cosmic

const bool HOCalibAnalyzer::m_cosmic
private

Definition at line 87 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ m_histFill

const bool HOCalibAnalyzer::m_histFill
private

Definition at line 92 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ m_low

const double HOCalibAnalyzer::m_low
private

Definition at line 90 of file HOCalibAnalyzer.cc.

Referenced by HOCalibAnalyzer().

◆ m_treeFill

const bool HOCalibAnalyzer::m_treeFill
private

Definition at line 93 of file HOCalibAnalyzer.cc.

Referenced by analyze().

◆ m_verbose

const bool HOCalibAnalyzer::m_verbose
private

Definition at line 94 of file HOCalibAnalyzer.cc.

Referenced by analyze().

◆ m_zeroField

const bool HOCalibAnalyzer::m_zeroField
private

Definition at line 88 of file HOCalibAnalyzer.cc.

Referenced by analyze().

◆ momatho

float HOCalibAnalyzer::momatho
private

Definition at line 125 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ mu_projection

TH2F* HOCalibAnalyzer::mu_projection[ncut+1]
private

Definition at line 118 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonch

TH1F* HOCalibAnalyzer::muonch
private

Definition at line 106 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonmm

TH1F* HOCalibAnalyzer::muonmm
private

Definition at line 103 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonnm

TH1F* HOCalibAnalyzer::muonnm
private

Definition at line 102 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonph

TH1F* HOCalibAnalyzer::muonph
private

Definition at line 105 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonth

TH1F* HOCalibAnalyzer::muonth
private

Definition at line 104 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ mypow_2

int HOCalibAnalyzer::mypow_2[31]
private

Definition at line 85 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ncount

float HOCalibAnalyzer::ncount[ringmx][ncut+10]
private

Definition at line 130 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ncut

constexpr int HOCalibAnalyzer::ncut = 14
staticprivate

Definition at line 76 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ndof

int HOCalibAnalyzer::ndof
private

Definition at line 121 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ netamx

constexpr int HOCalibAnalyzer::netamx = 30
staticprivate

Definition at line 73 of file HOCalibAnalyzer.cc.

Referenced by analyze(), getHOieta(), HOCalibAnalyzer(), and invert_HOieta().

◆ nevents

int HOCalibAnalyzer::nevents[10]
private

Definition at line 128 of file HOCalibAnalyzer.cc.

Referenced by analyze(), HOCalibAnalyzer(), and ~HOCalibAnalyzer().

◆ nmuon

int HOCalibAnalyzer::nmuon
private

Definition at line 121 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ nphimx

constexpr int HOCalibAnalyzer::nphimx = 72
staticprivate

Definition at line 74 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ nprim

int HOCalibAnalyzer::nprim
private

Definition at line 121 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ pherr

float HOCalibAnalyzer::pherr
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ pileup

float HOCalibAnalyzer::pileup
private

◆ ringmx

constexpr int HOCalibAnalyzer::ringmx = 5
staticprivate

Definition at line 75 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonch

TH1F* HOCalibAnalyzer::sel_muonch
private

Definition at line 112 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonmm

TH1F* HOCalibAnalyzer::sel_muonmm
private

Definition at line 109 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonnm

TH1F* HOCalibAnalyzer::sel_muonnm
private

Definition at line 108 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonph

TH1F* HOCalibAnalyzer::sel_muonph
private

Definition at line 111 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonth

TH1F* HOCalibAnalyzer::sel_muonth
private

Definition at line 110 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sig_eta_evt

TH2F* HOCalibAnalyzer::sig_eta_evt[3 *netamx][ncut]
private

Definition at line 114 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sigvsevt

TH2F* HOCalibAnalyzer::sigvsevt[3 *netamx][ncut]
private

Definition at line 115 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ T1

TTree* HOCalibAnalyzer::T1
private

Definition at line 98 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ therr

float HOCalibAnalyzer::therr
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ tkpt03

float HOCalibAnalyzer::tkpt03
private

Definition at line 125 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ tmphoang

float HOCalibAnalyzer::tmphoang
private

Definition at line 126 of file HOCalibAnalyzer.cc.

Referenced by analyze().

◆ tok_allho_

const edm::EDGetTokenT<HORecHitCollection> HOCalibAnalyzer::tok_allho_
private

Definition at line 134 of file HOCalibAnalyzer.cc.

◆ tok_ho_

const edm::EDGetTokenT<HOCalibVariableCollection> HOCalibAnalyzer::tok_ho_
private

Definition at line 133 of file HOCalibAnalyzer.cc.

Referenced by analyze().

◆ trkdr

float HOCalibAnalyzer::trkdr
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ trkdz

float HOCalibAnalyzer::trkdz
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ trkmm

float HOCalibAnalyzer::trkmm
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ trkph

float HOCalibAnalyzer::trkph
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ trkth

float HOCalibAnalyzer::trkth
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ trkvx

float HOCalibAnalyzer::trkvx
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ trkvy

float HOCalibAnalyzer::trkvy
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ trkvz

float HOCalibAnalyzer::trkvz
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ varcrit

const char* HOCalibAnalyzer::varcrit[3] = {"All", "steps", "n-1"}
private

Definition at line 78 of file HOCalibAnalyzer.cc.

Referenced by HOCalibAnalyzer().

◆ variab

TH1F* HOCalibAnalyzer::variab[3 *netamx][ncut]
private

Definition at line 116 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().