CMS 3D CMS Logo

List of all members | 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 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 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 * fabs(log(8 * 2.8)) + 0.033 * 8 * (1.0 - 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
 
float inslumi
 
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_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
 
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
 
- 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< 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 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 ()
 
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), inslumi (analyser), nprim

Definition at line 63 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, LEDCalibrationChannels::ieta, ievt, ilumi, inslumi, 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, 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  tok_ho_(consumes<HOCalibVariableCollection>(iConfig.getParameter<edm::InputTag>("hoCalibVariableCollectionTag"))),
159  tok_allho_(consumes<HORecHitCollection>(iConfig.getParameter<edm::InputTag>("hoInputTag"))) {
160  // It is very likely you want the following in your configuration
161  // hoCalibVariableCollectionTag = cms.InputTag('hoCalibProducer', 'HOCalibVariableCollection')
162 
163  usesResource(TFileService::kSharedResource);
164 
165  //now do what ever initialization is needed
166  ipass = 0;
167  for (int ij = 0; ij < 10; ij++) {
168  nevents[ij] = 0;
169  }
170 
172 
173  T1 = fs->make<TTree>("T1", "HOSignal");
174 
175  T1->Branch("irun", &irun, "irun/I");
176  T1->Branch("ievt", &ievt, "ievt/i");
177 
178  T1->Branch("isect", &isect, "isect/I");
179  T1->Branch("isect2", &isect2, "isect2/I");
180  T1->Branch("ndof", &ndof, "ndof/I");
181  T1->Branch("nmuon", &nmuon, "nmuon/I");
182 
183  T1->Branch("ilumi", &ilumi, "ilumi/I");
184  if (!m_cosmic) {
185  T1->Branch("inslumi", &inslumi, "inslumi/F");
186  T1->Branch("nprim", &nprim, "nprim/I");
187  T1->Branch("tkpt03", &tkpt03, " tkpt03/F");
188  T1->Branch("ecal03", &ecal03, " ecal03/F");
189  T1->Branch("hcal03", &hcal03, " hcal03/F");
190  }
191 
192  T1->Branch("trkdr", &trkdr, "trkdr/F");
193  T1->Branch("trkdz", &trkdz, "trkdz/F");
194 
195  T1->Branch("trkvx", &trkvx, "trkvx/F");
196  T1->Branch("trkvy", &trkvy, "trkvy/F");
197  T1->Branch("trkvz", &trkvz, "trkvz/F");
198  T1->Branch("trkmm", &trkmm, "trkmm/F");
199  T1->Branch("trkth", &trkth, "trkth/F");
200  T1->Branch("trkph", &trkph, "trkph/F");
201 
202  T1->Branch("chisq", &chisq, "chisq/F");
203  T1->Branch("therr", &therr, "therr/F");
204  T1->Branch("pherr", &pherr, "pherr/F");
205  T1->Branch("hodx", &hodx, "hodx/F");
206  T1->Branch("hody", &hody, "hody/F");
207  T1->Branch("hoang", &hoang, "hoang/F");
208 
209  T1->Branch("momatho", &momatho, "momatho/F");
210  T1->Branch("hoflag", &hoflag, "hoflag/i");
211  T1->Branch("htime", &htime, "htime/F");
212  T1->Branch("hosig", hosig, "hosig[9]/F");
213  T1->Branch("hocro", &hocro, "hocro/F");
214  T1->Branch("hocorsig", hocorsig, "hocorsig[18]/F");
215  T1->Branch("caloen", caloen, "caloen[3]/F");
216 
217  char name[200];
218  char title[200];
219 
220  if (m_histFill) {
221  for (int ij = 0; ij < netamx; ij++) {
222  int ieta = getHOieta(ij);
223  for (int jk = 0; jk < nphimx; jk++) {
224  sprintf(name, "ho_indenergy_%i_%i", ij, jk);
225  sprintf(title, "ho IndEnergy (GeV) i#eta=%i i#phi=%i", ieta, jk + 1);
226  ho_indenergy[ij][jk] = fs->make<TH1F>(name, title, 1200, m_low, m_ahigh);
227  }
228  }
229  }
230 
231  muonnm = fs->make<TH1F>("muonnm", "No of muon", 10, -0.5, 9.5);
232  muonmm = fs->make<TH1F>("muonmm", "P_{mu}", 200, -100., 100.);
233  muonth = fs->make<TH1F>("muonth", "{Theta}_{mu}", 180, 0., 180.);
234  muonph = fs->make<TH1F>("muonph", "{Phi}_{mu}", 180, -180., 180.);
235  muonch = fs->make<TH1F>("muonch", "{chi^2}/ndf", 100, 0., 1000.);
236 
237  sel_muonnm = fs->make<TH1F>("sel_muonnm", "No of muon(sel)", 10, -0.5, 9.5);
238  sel_muonmm = fs->make<TH1F>("sel_muonmm", "P_{mu}(sel)", 200, -100., 100.);
239  sel_muonth = fs->make<TH1F>("sel_muonth", "{Theta}_{mu}(sel)", 180, 0., 180.);
240  sel_muonph = fs->make<TH1F>("sel_muonph", "{Phi}_{mu}(sel)", 180, -180., 180.);
241  sel_muonch = fs->make<TH1F>("sel_muonch", "{chi^2}/ndf(sel)", 100, 0., 1000.);
242 
243  float pival = acos(-1.);
244 
245  //if change order, change in iselect_wotime also and other efficiency numbers
246  const char* varnam[ncut] = {"ndof",
247  "chisq",
248  "th",
249  "ph",
250  "therr",
251  "pherr",
252  "dircos",
253  "trkmm",
254  "nmuon",
255  "calo",
256  "trkiso",
257  "#phi-dir",
258  "#eta-dir",
259  "time"};
260  int nbinxx[ncut] = {25, 60, 60, 60, 60, 60, 60, 120, 6, 60, 60, 120, 120, 60};
261  double alowxx[ncut] = {5.5, 0., 0., -pival, 0.0, 0.0, 0.0, 0., 0.5, 0.0, 0.0, -20., -32., -45.0};
262  double ahghxx[ncut] = {30.5, 40., pival, pival, 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] = 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:303
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 char * varcrit[3]
int getHOieta(int ij)
const bool m_treeFill
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  // do anything here that needs to be done at desctruction time
318  // (e.g. close files, deallocate resources etc.)
319 
320  edm::LogVerbatim("HOCalibAnalyzer") << " Total events = " << setw(7) << nevents[0] << " " << setw(7) << nevents[1]
321  << " " << setw(7) << nevents[2] << " " << setw(7) << nevents[3] << " " << setw(7)
322  << nevents[4] << " " << setw(7) << nevents[5] << " Selected events # is "
323  << ipass;
324 }
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 331 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, LEDCalibrationChannels::ieta, iEvent, ievt, if(), ilumi, inslumi, createfilelist::int, invert_HOieta(), ipass, LEDCalibrationChannels::iphi, isect, isect2, edm::HandleBase::isValid(), dqm-mbProfile::log, m_cosmic, m_histFill, m_treeFill, m_zeroField, METSkim_cff::Max, momatho, mu_projection, muonch, muonmm, muonnm, muonph, muonth, mypow_2, ncount, ncut, ndof, netamx, nevents, nmuon, nphimx, nprim, pherr, 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.

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

◆ getHOieta()

int HOCalibAnalyzer::getHOieta ( int  ij)
inlineprivate

Definition at line 82 of file HOCalibAnalyzer.cc.

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 LEDCalibrationChannels::ieta.

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 * fabs(log(8 * 2.8)) + 0.033 * 8 * (1.0 - 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 99 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().

◆ inslumi

float HOCalibAnalyzer::inslumi
private

Definition at line 123 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ ipass

int HOCalibAnalyzer::ipass
private

Definition at line 95 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_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 105 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonmm

TH1F* HOCalibAnalyzer::muonmm
private

Definition at line 102 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonnm

TH1F* HOCalibAnalyzer::muonnm
private

Definition at line 101 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonph

TH1F* HOCalibAnalyzer::muonph
private

Definition at line 104 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ muonth

TH1F* HOCalibAnalyzer::muonth
private

Definition at line 103 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(), and HOCalibAnalyzer().

◆ 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().

◆ 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 111 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonmm

TH1F* HOCalibAnalyzer::sel_muonmm
private

Definition at line 108 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonnm

TH1F* HOCalibAnalyzer::sel_muonnm
private

Definition at line 107 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonph

TH1F* HOCalibAnalyzer::sel_muonph
private

Definition at line 110 of file HOCalibAnalyzer.cc.

Referenced by analyze(), and HOCalibAnalyzer().

◆ sel_muonth

TH1F* HOCalibAnalyzer::sel_muonth
private

Definition at line 109 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 97 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().