CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private 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
 
double m_ahigh
 
int m_bins
 
bool m_cosmic
 
bool m_histFill
 
double m_low
 
bool m_treeFill
 
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
 
edm::EDGetTokenT
< HORecHitCollection
tok_allho_
 
edm::EDGetTokenT
< HOCalibVariableCollection
tok_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< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

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 ( const edm::ParameterSet iConfig)
explicit

Definition at line 150 of file HOCalibAnalyzer.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), TFileService::kSharedResource, TFileService::make(), mergeVDriftHistosByStation::name, ndof, cmsHarvester::nevents, funct::pow(), and runGCPTkAlMap::title.

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

Definition at line 319 of file HOCalibAnalyzer.cc.

References cmsHarvester::nevents.

319  {
320  // do anything here that needs to be done at desctruction time
321  // (e.g. close files, deallocate resources etc.)
322 
323  edm::LogVerbatim("HOCalib") << " Total events = " << setw(7) << nevents[0] << " " << setw(7) << nevents[1] << " "
324  << setw(7) << nevents[2] << " " << setw(7) << nevents[3] << " " << setw(7) << nevents[4]
325  << " " << setw(7) << nevents[5] << " Selected events # is " << ipass;
326 }
Log< level::Info, true > LogVerbatim

Member Function Documentation

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

Implements edm::one::EDAnalyzerBase.

Definition at line 333 of file HOCalibAnalyzer.cc.

References funct::abs(), materialEffect::elos, edm::EventID::event(), edm::Event::getByToken(), edm::EventBase::id(), if(), log, edm::EventBase::luminosityBlock(), Max(), ndof, cmsHarvester::nevents, funct::pow(), edm::EventID::run(), and funct::sin().

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

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 69 of file HOCalibAnalyzer.cc.

69 {}
void HOCalibAnalyzer::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 71 of file HOCalibAnalyzer.cc.

Referenced by o2olib.O2ORunMgr::executeJob().

71 {}
int HOCalibAnalyzer::getHOieta ( int  ij)
inlineprivate

Definition at line 82 of file HOCalibAnalyzer.cc.

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

Definition at line 83 of file HOCalibAnalyzer.cc.

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

Member Data Documentation

float HOCalibAnalyzer::caloen[3]
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::chisq
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::ecal03
private

Definition at line 125 of file HOCalibAnalyzer.cc.

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.

float HOCalibAnalyzer::hbhesig[9]
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hcal03
private

Definition at line 125 of file HOCalibAnalyzer.cc.

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

Definition at line 99 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hoang
private

Definition at line 123 of file HOCalibAnalyzer.cc.

edm::InputTag HOCalibAnalyzer::hoCalibVariableCollectionTag
private

Definition at line 132 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hocorsig[18]
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hocro
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hodx
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hody
private

Definition at line 123 of file HOCalibAnalyzer.cc.

unsigned HOCalibAnalyzer::hoflag
private

Definition at line 120 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::hosig[9]
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::htime
private

Definition at line 123 of file HOCalibAnalyzer.cc.

unsigned HOCalibAnalyzer::ievt
private

Definition at line 120 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::ilumi
private

Definition at line 121 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::inslumi
private

Definition at line 123 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::ipass
private

Definition at line 95 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::irun
private

Definition at line 121 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::isect
private

Definition at line 121 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::isect2
private

Definition at line 121 of file HOCalibAnalyzer.cc.

double HOCalibAnalyzer::m_ahigh
private

Definition at line 91 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::m_bins
private

Definition at line 89 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_cosmic
private

Definition at line 87 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_histFill
private

Definition at line 92 of file HOCalibAnalyzer.cc.

double HOCalibAnalyzer::m_low
private

Definition at line 90 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_treeFill
private

Definition at line 93 of file HOCalibAnalyzer.cc.

bool HOCalibAnalyzer::m_zeroField
private

Definition at line 88 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::momatho
private

Definition at line 125 of file HOCalibAnalyzer.cc.

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

Definition at line 118 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonch
private

Definition at line 105 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonmm
private

Definition at line 102 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonnm
private

Definition at line 101 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonph
private

Definition at line 104 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::muonth
private

Definition at line 103 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::mypow_2[31]
private

Definition at line 85 of file HOCalibAnalyzer.cc.

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

Definition at line 130 of file HOCalibAnalyzer.cc.

constexpr int HOCalibAnalyzer::ncut = 14
staticprivate

Definition at line 76 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::ndof
private

Definition at line 121 of file HOCalibAnalyzer.cc.

constexpr int HOCalibAnalyzer::netamx = 30
staticprivate

Definition at line 73 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::nevents[10]
private

Definition at line 128 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::nmuon
private

Definition at line 121 of file HOCalibAnalyzer.cc.

constexpr int HOCalibAnalyzer::nphimx = 72
staticprivate

Definition at line 74 of file HOCalibAnalyzer.cc.

int HOCalibAnalyzer::nprim
private

Definition at line 121 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::pherr
private

Definition at line 123 of file HOCalibAnalyzer.cc.

constexpr int HOCalibAnalyzer::ringmx = 5
staticprivate

Definition at line 75 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonch
private

Definition at line 111 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonmm
private

Definition at line 108 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonnm
private

Definition at line 107 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonph
private

Definition at line 110 of file HOCalibAnalyzer.cc.

TH1F* HOCalibAnalyzer::sel_muonth
private

Definition at line 109 of file HOCalibAnalyzer.cc.

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

Definition at line 114 of file HOCalibAnalyzer.cc.

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

Definition at line 115 of file HOCalibAnalyzer.cc.

TTree* HOCalibAnalyzer::T1
private

Definition at line 97 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::therr
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::tkpt03
private

Definition at line 125 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::tmphoang
private

Definition at line 126 of file HOCalibAnalyzer.cc.

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

Definition at line 134 of file HOCalibAnalyzer.cc.

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

Definition at line 133 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkdr
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkdz
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkmm
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkph
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkth
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkvx
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkvy
private

Definition at line 123 of file HOCalibAnalyzer.cc.

float HOCalibAnalyzer::trkvz
private

Definition at line 123 of file HOCalibAnalyzer.cc.

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

Definition at line 78 of file HOCalibAnalyzer.cc.

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

Definition at line 116 of file HOCalibAnalyzer.cc.