Ejemplo n.º 1
0
     print 'Selected run:ls'
     for run in sorted(irunlsdict):
         if irunlsdict[run] is not None:
             print '\t%d : %s'%(run,','.join([str(ls) for ls in irunlsdict[run]]))
         else:
             print '\t%d : all'%run
 finecorrections=None
 if not options.withoutCorrection:
     session.transaction().start(True)
     finecorrections=lumiCorrections.pixelcorrectionsForRange(session.nominalSchema(),irunlsdict.keys())
     session.transaction().commit()
 if options.verbose:
         print 'afterglow ',finecorrections
 if options.action == 'delivered':
     session.transaction().start(True)
     result=lumiCalcAPI.deliveredLumiForRange(session.nominalSchema(),irunlsdict,amodetag=None,egev=None,beamstatus=None,norm=1.0,finecorrections=finecorrections,driftcorrections=None,usecorrectionv2=False,lumitype='PIXEL',branchName='DATA')
     session.transaction().commit()
     if not options.outputfile:
         lumiReport.toScreenTotDelivered(result,iresults,options.scalefactor,options.verbose)
     else:
         lumiReport.toCSVTotDelivered(result,options.outputfile,iresults,options.scalefactor,options.verbose)           
 if options.action == 'overview':
    session.transaction().start(True)
    result=lumiCalcAPI.lumiForRange(session.nominalSchema(),irunlsdict,amodetag=None,egev=None,beamstatus=None,norm=1.0,finecorrections=finecorrections,driftcorrections=None,usecorrectionv2=False,lumitype='PIXEL',branchName='DATA')
    session.transaction().commit()
    if not options.outputfile:
        lumiReport.toScreenOverview(result,iresults,options.scalefactor,options.verbose)
    else:
        lumiReport.toCSVOverview(result,options.outputfile,iresults,options.scalefactor,options.verbose)
 if options.action == 'lumibyls':
    if not options.hltpath:
Ejemplo n.º 2
0
     schema=session.nominalSchema()
     session.transaction().start(True)
     if options.correctionv3:
         cterms=lumiCorrections.nonlinearV3()                   
     else:#default            
         cterms=lumiCorrections.nonlinearV2()
     finecorrections=lumiCorrections.correctionsForRangeV2(schema,rruns,cterms)#constant+nonlinear corrections
     driftcorrections=lumiCorrections.driftcorrectionsForRange(schema,rruns,cterms)
     if options.verbose:
         print finecorrections,driftcorrections    
     session.transaction().commit()
     
 if options.action == 'delivered':
     session.transaction().start(True)
     #print irunlsdict
     result=lumiCalcAPI.deliveredLumiForRange(session.nominalSchema(),irunlsdict,amodetag=options.amodetag,egev=options.beamenergy,beamstatus=pbeammode,norm=normfactor,finecorrections=finecorrections,driftcorrections=driftcorrections,usecorrectionv2=True)
     session.transaction().commit()
     if not options.outputfile:
         lumiReport.toScreenTotDelivered(result,iresults,options.scalefactor,options.verbose)
     else:
         lumiReport.toCSVTotDelivered(result,options.outputfile,iresults,options.scalefactor,options.verbose)           
 if options.action == 'overview':
    session.transaction().start(True)
    result=lumiCalcAPI.lumiForRange(session.nominalSchema(),irunlsdict,amodetag=options.amodetag,egev=options.beamenergy,beamstatus=pbeammode,norm=normfactor,finecorrections=finecorrections,driftcorrections=driftcorrections,usecorrectionv2=True)
    session.transaction().commit()
    if not options.outputfile:
        lumiReport.toScreenOverview(result,iresults,options.scalefactor,options.verbose)
    else:
        lumiReport.toCSVOverview(result,options.outputfile,iresults,options.scalefactor,options.verbose)
 if options.action == 'lumibyls':
    if not options.hltpath: