Skip to content
Snippets Groups Projects
Commit 7edb4886 authored by Graeme Stewart's avatar Graeme Stewart
Browse files

Trigger/TrigAnalysis/TriggerRateTools deleted from 19.2

parent e06b93af
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 679 deletions
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef EvtVetoTool_H
#define EvtVetoTool_H
#include "GaudiKernel/AlgTool.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/ITHistSvc.h"
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/ToolHandle.h"
#include "StoreGate/StoreGate.h"
#include "StoreGate/StoreGateSvc.h"
#include "TriggerRateTools/IEvtVetoTool.h"
#include "JetEvent/JetCollection.h"
#include "JetEvent/Jet.h"
#include <vector>
#include <string>
#include <map>
class MsgStream;
static const InterfaceID IID_EvtVetoTool("EvtVetoTool", 1, 0);
class EvtVetoTool : public AlgTool, public virtual IEvtVetoTool {
public:
EvtVetoTool(const std::string & type, const std::string & name, const IInterface* parent);
~EvtVetoTool();
static const InterfaceID& interfaceID( ) { return IID_EvtVetoTool; };
StatusCode initialize();
StatusCode finalize();
bool isPassed();
//private:
private:
MsgStream* m_log;
ServiceHandle<StoreGateSvc> m_storeGate;
std::string m_truthJetsContainerName;
std::vector<const Jet*> m_truthJets;
double m_vetoThreshold;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef IEvtVetoTool_H
#define IEvtVetoTool_H
#include "GaudiKernel/IAlgTool.h"
#include <vector>
#include <string>
static const InterfaceID IID_IEvtVetoTool("IEvtVetoTool", 1, 0);
class IEvtVetoTool : virtual public IAlgTool {
public:
//EvtVetoTool(const std::string & type, const std::string & name, const IInterface* parent);
//~EvtVetoTool();
static const InterfaceID& interfaceID( ) { return IID_IEvtVetoTool; };
virtual bool isPassed() = 0;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef ISlicesInfoTool_H
#define ISlicesInfoTool_H
#include "GaudiKernel/IAlgTool.h"
#include <vector>
#include <string>
static const InterfaceID IID_ISlicesInfoTool("ISlicesInfoTool", 1, 0);
class ISlicesInfoTool : virtual public IAlgTool {
public:
static const InterfaceID& interfaceID( ) { return IID_ISlicesInfoTool; };
virtual StatusCode bookSlices() = 0;
virtual StatusCode fillSlices() = 0;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TriggerRateTools_Prescaler
#define TriggerRateTools_Prescaler
#include <vector>
class Prescaler {
private:
std::vector<double> *i_list;
std::vector<double> *i_res;
double i_sum;
int i_curr_level;
int i_level_max;
double i_total;
long double applyPrescales(std::vector<long double> *list, std::vector<long double> *res, long double sum, int curr_level, int level_max, long double total);
public:
Prescaler();
Prescaler(std::vector<double> *_list, std::vector<double> *_res, double _sum, int _curr_level, int _level_max, double _total);
virtual ~Prescaler();
double getPnum();
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef SlicesInfoTool_H
#define SlicesInfoTool_H
#include "GaudiKernel/AlgTool.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/ITHistSvc.h"
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/ToolHandle.h"
#include "StoreGate/DataHandle.h"
#include "StoreGate/StoreGate.h"
#include "StoreGate/StoreGateSvc.h"
#include "TriggerRateTools/ISlicesInfoTool.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include "TrigDecisionTool/TrigDecisionTool.h"
#include "JetEvent/JetCollection.h"
#include "JetEvent/Jet.h"
#include "TrigConfigSvc/ILVL1ConfigSvc.h"
#include "TrigConfL1Data/ThresholdConfig.h"
#include "TrigT1CaloEvent/EmTauROI_ClassDEF.h"
#include "TrigT1CaloEvent/EnergyRoI_ClassDEF.h"
#include "TrigT1CaloEvent/JetROI_ClassDEF.h"
#include "AnalysisTriggerEvent/LVL1_ROI.h"
#include "AnalysisTriggerEvent/EmTau_ROI.h"
#include "AnalysisTriggerEvent/EnergySum_ROI.h"
#include "AnalysisTriggerEvent/Jet_ROI.h"
#include "TrigT1Interfaces/JEPRoIDecoder.h"
#include "TrigMissingEtEvent/TrigMissingET.h"
#include "TrigMissingEtEvent/TrigMissingETContainer.h"
#include "InDetBCM_RawData/BCM_RDO_Container.h"
#include "InDetBCM_RawData/BCM_RDO_Collection.h"
#include "InDetBCM_RawData/BCM_RawData.h"
#include "TriggerRateSlices/TrigEFMissingEtObject.h"
#include "TriggerRateSlices/TrigL2MissingEtObject.h"
#include "TriggerRateSlices/TrigL1MissingEtObject.h"
#include "TriggerRateSlices/TrigMissingEtObject.h"
#include "TriggerRateSlices/TrigBCMObject.h"
#include "TROOT.h"
#include <TSystem.h>
#include "GaudiKernel/NTuple.h"
#include "TBranch.h"
#include "TTree.h"
#include "TFile.h"
#include "TH1.h"
#include "TH2.h"
namespace TrigConf {
class ILVL1ConfigSvc;
}
#include <vector>
#include <string>
#include <map>
class MsgStream;
static const InterfaceID IID_SlicesInfoTool("SlicesInfoTool", 1, 0);
class SlicesInfoTool : public AlgTool, public virtual ISlicesInfoTool {
public:
SlicesInfoTool(const std::string & type, const std::string & name, const IInterface* parent);
~SlicesInfoTool();
static const InterfaceID& interfaceID( ) { return IID_SlicesInfoTool; };
StatusCode initialize();
StatusCode finalize();
StatusCode bookSlices();
StatusCode fillSlices();
StatusCode bookMet();
StatusCode fillMet();
StatusCode bookBCM();
StatusCode fillBCM();
private:
MsgStream* m_log;
ITHistSvc* m_histSvc;
ServiceHandle<StoreGateSvc> m_storeGate;
ToolHandle<Trig::TrigDecisionTool> m_trigDec;
ServiceHandle<TrigConf::ILVL1ConfigSvc> m_configSvc;
Int_t evt_num;
TTree* tree;
bool m_doMet;
bool m_doBCM;
// BCM
TrigBCMObject* bcm;
std::string m_bcmRdoContainerName;
// MET
TrigL1MissingEtObject* etMissL1;
TrigL2MissingEtObject* etMissL2;
TrigEFMissingEtObject* etMissEF;
};
#endif
/*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef TriggerRateTools_H
#define TriggerRateTools_H
#include "GaudiKernel/Algorithm.h"
#include "GaudiKernel/ServiceHandle.h"
#include "GaudiKernel/MsgStream.h"
#include "GaudiKernel/ITHistSvc.h"
#include "GaudiKernel/ISvcLocator.h"
#include "GaudiKernel/ToolHandle.h"
#include "StoreGate/StoreGate.h"
#include "StoreGate/StoreGateSvc.h"
#include "TrigDecisionTool/TrigDecisionTool.h"
#include "TriggerRateTools/Prescaler.h"
#include "TriggerRateTools/EvtVetoTool.h"
#include "TriggerRateTools/SlicesInfoTool.h"
#include "TrigNtDecision/TD_Signature.h"
#include "TrigNtDecision/TD_CplxSignature.h"
#include "EventInfo/EventInfo.h"
#include "EventInfo/EventID.h"
#include <vector>
#include <string>
#include <map>
#include "TBranch.h"
#include "TTree.h"
#include "TFile.h"
#include "TH1.h"
#include "TH2.h"
#include "TBits.h"
namespace HLT {
class Chain;
class TriggerElement;
class HLTResult;
class ILvl1ResultAccessTool;
class Signature;
class Sequence;
//class Navigation;
}
namespace LVL1CTP {
class Lvl1Item;
class Lvl1Result;
}
namespace TrigConf {
class ITrigConfigSvc;
class TriggerItem;
class HLTChain;
class HLTTriggerElement;
}
class MsgStream;
using namespace Trig;
namespace Trig {
class ChainGroup;
class TriggerRateTools : public Algorithm {
public:
TriggerRateTools(const std::string &name, ISvcLocator *pSvcLocator);
~TriggerRateTools();
StatusCode initialize();
StatusCode execute();
StatusCode finalize();
private:
StatusCode prepare();
void retrieveResults();
StatusCode endEvent();
void resetResults();
int findSigIndex(std::string name, std::string lvl);
void addSig(std::string name, std::string lvl, double prescale, double passthrough, std::string, std::string);
void initializeSigFeatures(std::string lvl);
void initializeNtuple(std::string lvl);
void initializeHistos(std::string lvl);
int fillSingleRates(std::string lvl);
void fillCplxRates(std::string lvl);
double getPnum(std::vector<double> *list);
void applyVeto(std::string lvl, bool veto);
private:
MsgStream* m_log;
ITHistSvc* m_histSvc;
ServiceHandle<StoreGateSvc> m_storeGate;
double m_xsec;
double m_lumi;
double m_NColls;
std::vector<std::string> m_ignore;
std::vector< std::vector<std::string> > m_cplx_or;
std::vector< std::vector<std::string> > m_cum;
std::vector< std::vector<std::string> > m_cplx_and;
std::vector< std::vector<std::string> > m_menus;
std::vector< std::vector<std::string> > m_streams;
std::vector< std::vector<std::string> > m_psOverride;
bool m_dumpText;
bool m_doVeto;
bool m_doRawTD;
bool m_doSlicesInfo;
bool m_ignorePassThrough;
bool m_doRetrieveItems;
Trig::ExpertMethods *m_trigDecXmethods;
ToolHandle<Trig::TrigDecisionTool> m_trigDec;
//ToolHandle<IEvtVetoTool> m_evtVetoTool;
ToolHandleArray<IEvtVetoTool> m_vetoTools;
ToolHandle<SlicesInfoTool> m_slicesInfoTool;
const ChainGroup* L1Items;
const ChainGroup* L2Chains;
const ChainGroup* EFChains;
std::vector<std::string> ChainNames;
TFile *m_file;
TTree *raw_TD;
TTree *raw_PS;
TTree *s_sigs_tree;
TTree *c_sigs_tree;
TTree *menu_sigs_tree;
TTree *stream_sigs_tree;
TTree *l_sigs_tree;
int num_events;
int evt_num;
int num_sigs; // Number of L1 items + HLT chains found in the events
int num_sigs_persist; // Maximum number of L1 items + HLT chains found in all events
TH1F* sigs_L1_rate_hist;
TH1F* sigs_L2_rate_hist;
TH1F* sigs_EF_rate_hist;
TH2F* sigs_L1_overlap_hist;
TH2F* sigs_L2_overlap_hist;
TH2F* sigs_EF_overlap_hist;
std::vector<Int_t> sigs_L1_res;
std::vector<Int_t> sigs_L2_res;
std::vector<Int_t> sigs_EF_res;
std::vector<Int_t> sigs_L1_ps;
std::vector<Int_t> sigs_L2_ps;
std::vector<Int_t> sigs_EF_ps;
std::vector<double> sigs_L1_p;
std::vector<double> sigs_L2_p;
std::vector<double> sigs_EF_p;
std::vector<std::string> sigs_L1_name;
std::vector<std::string> sigs_L2_name;
std::vector<std::string> sigs_EF_name;
std::vector<double> lvl_pnum;
std::vector<TD_Signature*> s_sigs_L1;
std::vector<TD_Signature*> s_sigs_L2;
std::vector<TD_Signature*> s_sigs_EF;
std::vector<TD_CplxSignature*> c_sigs_L1;
std::vector<TD_CplxSignature*> c_sigs_L2;
std::vector<TD_CplxSignature*> c_sigs_EF;
std::vector<TD_CplxSignature*> menu_sigs_L1;
std::vector<TD_CplxSignature*> menu_sigs_L2;
std::vector<TD_CplxSignature*> menu_sigs_EF;
std::vector<TD_CplxSignature*> stream_sigs_L1;
std::vector<TD_CplxSignature*> stream_sigs_L2;
std::vector<TD_CplxSignature*> stream_sigs_EF;
std::vector<int> and_or_change_index;
std::vector<TD_CplxSignature*> l_sigs;
bool doOnce;
};
}
#endif
package TriggerRateTools
author Marc-Andre Dufour <Marc-Andre.Dufour@cern.ch>
author Miika Klemetti <Miika.Klemetti@mail.mcgill.ca>
use AtlasPolicy AtlasPolicy-*
use GaudiInterface GaudiInterface-* External
use StoreGate StoreGate-* Control
use EventInfo EventInfo-* Event
#use CBNT_Utils CBNT_Utils-* Reconstruction
use TrigT1Interfaces TrigT1Interfaces-* Trigger/TrigT1
use TrigT1CaloEvent TrigT1CaloEvent-* Trigger/TrigT1
#use TrigT1Config TrigT1Config-* Trigger/TrigT1
#use TrigT1Result TrigT1Result-* Trigger/TrigT1
use AnalysisTriggerEvent AnalysisTriggerEvent-* PhysicsAnalysis/AnalysisTrigger
use TrigCaloEvent TrigCaloEvent-* Trigger/TrigEvent
use TrigMissingEtEvent TrigMissingEtEvent-* Trigger/TrigEvent
use TrigConfL1Data TrigConfL1Data-* Trigger/TrigConfiguration
use TrigConfigSvc TrigConfigSvc-* Trigger/TrigConfiguration
#use TrigSteering TrigSteering-* Trigger/TrigSteer
use TrigSteeringEvent TrigSteeringEvent-* Trigger/TrigEvent
#use TrigDecision TrigDecision-* Trigger/TrigEvent
use TrigDecisionTool TrigDecisionTool-* Trigger/TrigAnalysis
#use TriggerMenuPython TriggerMenuPython-* Trigger/TriggerCommon
#use TriggerJobOpts TriggerJobOpts-* Trigger/TriggerCommon
use AtlasROOT AtlasROOT-* External
use TrigNtDecision TrigNtDecision-* Trigger/TrigAnalysis
use TriggerRateSlices TriggerRateSlices-* Trigger/TrigAnalysis
use JetEvent JetEvent-* Reconstruction/Jet
#use MissingETEvent MissingETEvent-00-* Reconstruction
use InDetBCM_RawData InDetBCM_RawData-* InnerDetector/InDetRawEvent
#library TriggerRateTools *.cxx components/*.cxx
apply_tag ROOTMathLibs
apply_pattern component_library
apply_pattern declare_joboptions files="*.py"
include_dirs $(TriggerRateTools_root)/TriggerRateTools
macro TriggerRateTools_linkopts "-L$(bin) -lTrigNtDecision"
macro TriggerRateTools_shlibflags "$(componentshr_linkopts) $(use_linkopts) "
apply_pattern dual_use_library files=*.cxx
set TriggerRateTools_PATH "$(TriggerRateTools_root)"
#!/bin/bash
################################################################################
# Author: Marc-Andre Dufour
# Date: 14 May 2007
#
# Description: Main configuration for the TriggerRateTools package.
################################################################################
export LUMINOSITY=10000000.0 #in barn^-1 sec^-1
export MAIN_OUTPUT_PATH="/usatlas/groups/trigger/dufourma/14.2.23/batchJobs"
export CONFIG_PATH="$TriggerRateTools_PATH/config"
export SCRIPT_PATH="$TriggerRateTools_PATH/steps"
#export RUN_DIR="/usatlas/groups/trigger/dufourma/AtlasOffline-14.2.10/run"
export FOLDER=`date +%Y-%b-%d-%H_%M`
export RUN_DIR="/tmp/$FOLDER"
export PYTHON_DIR="generated_scripts"
#export NUM_EVENTS_PER_STEP1=10
export NUM_RDOS_PER_STEP1=10
export NUM_AODS_PER_STEP2=50
export NUM_AODS_PER_STEP3=1
# Configuration of environment setup
COMMANDS[1]='cd /usatlas/u/dufourma/testarea/AtlasOffline-14.2.23'
COMMANDS[2]='. ./init.sh'
export DO_BATCH=true
export SLEEP=0
export BATCH_SYS="condor"
export DO_LVL1="True"
export DO_LVL2="True"
export DO_EF="True"
export DISABLE_RANDOM="True"
export TRIGGER_MENU_SETUP="lumi1E31"
export TRIGGER_PRESCALES_LVL1="L1Prescales100_Physics_lumi1E31"
export TRIGGER_PRESCALES_HLT="HLTPrescales100_Physics_lumi1E31"
# DO NOT MODIFY BELOW THIS LINE
TRT_ENV=${COMMANDS[1]}
index=1
for cmd in "${COMMANDS[@]}"; do
if [ $index -gt 1 ]; then
TRT_ENV="$TRT_ENV:$cmd"
fi
index=$((index+1))
done
export TRT_ENV
#!/bin/bash
export PREFIX="dijets_J0"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=39827
export MAX_NUM_AANS=39827
export NUM_RDOS_PER_STEP1=5
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005009.J0_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.01749 #barns
#!/bin/bash
export PREFIX="dijets_J1"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=7997
export MAX_NUM_AANS=7997
export NUM_RDOS_PER_STEP1=2
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005010.J1_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.001377 #barns
#!/bin/bash
export PREFIX="dijets_J2"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=8000
export MAX_NUM_AANS=8000
export NUM_RDOS_PER_STEP1=1
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005011.J2_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.0000963 #barns
#!/bin/bash
export PREFIX="dijets_J3"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=4000
export MAX_NUM_AANS=4000
export NUM_RDOS_PER_STEP1=1
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005012.J3_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.000006135 #barns
#!/bin/bash
export PREFIX="dijets_J4"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=2000
export MAX_NUM_AANS=2000
export NUM_RDOS_PER_STEP1=1
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005013.J4_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.0000003168 #barns
#!/bin/bash
export PREFIX="dijets_J5"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=1000
export MAX_NUM_AANS=1000
export NUM_RDOS_PER_STEP1=1
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005014.J5_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.00000001247 #barns
#!/bin/bash
export PREFIX="dijets_J6"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=10044
export MAX_NUM_AANS=10044
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005015.J6_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.0000000003445 #barns
#!/bin/bash
export PREFIX="dijets_J7"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=8250
export MAX_NUM_AANS=8250
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005016.J7_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.00000000000530 #barns
#!/bin/bash
export PREFIX="dijets_J8"
#export MAX_NUM_RDOS=5
export MAX_NUM_RDOS=3975
export MAX_NUM_AANS=3975
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="misal1_csc11.005017.J8_pythia_jetjet.digit.RDO.v12003103"
export USE_FULL_PATH=false
export XSECTION=0.0000000000000222 #barns
#!/bin/bash
export PREFIX="BP_450GeV"
export MAX_NUM_RDOS=50
export MAX_NUM_AANS=200000
export NUM_RDOS_PER_STEP1=1
export DET_DESCR="ATLAS-GEO-01-00-00"
#export DATA_PATH="/afs/cern.ch/user/t/trigcomm/w0/rates/demirkoz/run/user08.DominiqueTardif.006008.singlepart_TASScrape450GeV.digit.RDO.v14022001.20080908.2"
#export DATA_PATH="/afs/cern.ch/user/t/trigcomm/w0/rates/demirkoz/run/user08.DominiqueTardif.006006.singlepart_TASScrape7TeV.digit.RDO.v14022001.20080908.2"
export DATA_PATH="/afs/cern.ch/user/t/trigcomm/w0/rates/demirkoz/run/user08.DominiqueTardif.006007.singlepart_BPScrape450GeV.digit.RDO.v14022001.20080908.2"
export NON_LOCAL_ID=""
export XSECTION=0.070 #barns
export USE_FULL_PATH=true
#!/bin/bash
export PREFIX="beamgas"
export MAX_NUM_RDOS=500
export MAX_NUM_AANS=200000
export NUM_RDOS_PER_STEP1=2
export DET_DESCR="ATLAS-CSC-01-02-00"
export DATA_PATH=""
export NON_LOCAL_ID="/castor/cern.ch/user/s/stradlin/BeamGas_1.1/digit/hijing.O.digit"
export XSECTION=0.070 #barns
export USE_FULL_PATH=true
#!/bin/bash
export PREFIX="beamgas_bigenv"
export MAX_NUM_RDOS=500
export MAX_NUM_AANS=200000
export NUM_RDOS_PER_STEP1=2
export DET_DESCR="ATLAS-GEO-02-01-00"
export DATA_PATH=""
export NON_LOCAL_ID="/castor/cern.ch/user/m/mahsan/mc08.108863.Hijing_beamgas.digit.RDO.e4_s470_d122/"
export XSECTION=0.070 #barns
export USE_FULL_PATH=true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment