Skip to content
Snippets Groups Projects
Commit ef4bd038 authored by Pierre Antoine Delsart's avatar Pierre Antoine Delsart Committed by Graeme Stewart
Browse files

'UseFourMomArea property set to True by default. ATLJETMET-292' (EventShapeTools-00-01-11)

	* ATLJETMET-292
	* Root/EventDensityTool.cxx : added UseFourMomArea property. Set
	it to true by default.
	* EventShapeTools-00-01-11

2015-03-18  David Adams
	* EventShapeTools-00-01-10
	* ATLJETMET-292
	* Root/EventDensityTool.cxx: Add display of properties in
	  initialization.

2015-03-03    <delsart@localhost>
	* Root/EventShapeCopier.cxx (renameEventDensities): ignore
	StatusCode in this RootCore-only helper function
	* EventShapeTools-00-01-09

2015-03-02    <delsart@localhost>
	* cmt/Makefile.RootCore : add dependency on EventShapeInterface
	* EventShapeTools-00-01-08

...
(Long ChangeLog diff - truncated)
parent 09edb9ac
No related branches found
No related tags found
1 merge request!20779WIP: Migrate DataQualityTools to ToolHandles
......@@ -50,8 +50,12 @@ public:
StatusCode fillEventShape(xAOD::EventShape* es) const;
StatusCode fillEventShape(xAOD::EventShape* es, const xAOD::IParticleContainer* input) const;
static void renameEventDensities();
/// This function is only a convenience function for use in Standalone Analysis
/// it avoids the need of configuring the tool by copying pre-determined EventShape
/// written with old convention in early D3PD
/// IMPORTANT : This function does nothing in Athena. Instead use the configEventShapeCopierAlg("LCTopo") function
/// to schedule an Athena algorithm (see python/EventDensityConfig).
void renameEventDensities();
protected:
std::string m_inputEventShape;
......
......@@ -22,7 +22,7 @@ using fastjet::VoronoiAreaSpec;
EventDensityTool::EventDensityTool(const std::string& name)
: asg::AsgTool(name),
m_useAreaFourMom(false),
m_useAreaFourMom(true),
m_rhoDec(""),
m_sigmaDec(""),
m_areaDec("") {
......@@ -34,6 +34,7 @@ EventDensityTool::EventDensityTool(const std::string& name)
declareProperty("AreaDefinition", m_areadef = "Voronoi");
declareProperty("VoronoiRfact", m_vrfact = 1.0);
declareProperty("OutputContainer", m_outcon = "GenericEventDensity");
declareProperty("UseFourMomArea", m_useAreaFourMom);
}
//**********************************************************************
......@@ -61,7 +62,6 @@ StatusCode EventDensityTool::initialize() {
m_fjjetdef = JetDefinition(fjalg, m_jetrad);
// Build area definition.
m_useAreaFourMom = (m_areadef == "ActiveFourVector");
if ( m_areadef == "Voronoi" ) {
m_fjareadef = AreaDefinition(fastjet::voronoi_area, VoronoiAreaSpec(m_vrfact));
} else if ( m_areadef == "Active" || m_useAreaFourMom ) {
......@@ -81,7 +81,20 @@ StatusCode EventDensityTool::initialize() {
<< m_rapmin << ", " << m_rapmax << ")");
return StatusCode::FAILURE;
}
ATH_MSG_INFO("Fastjet jet selector: " << m_fjselector.description());
ATH_MSG_INFO("Configured properties:");
ATH_MSG_INFO(" JetAlgorithm: " << m_jetalg);
ATH_MSG_INFO(" JetRadius: " << m_jetrad);
ATH_MSG_INFO(" JetInput: " << m_pjgetter);
ATH_MSG_INFO(" AbsRapidityMin: " << m_rapmin);
ATH_MSG_INFO(" AbsRapidityMax: " << m_rapmax);
ATH_MSG_INFO(" AreaDefinition: " << m_areadef);
ATH_MSG_INFO(" VoronoiRfact: " << m_vrfact);
ATH_MSG_INFO(" OutputContainer: " << m_outcon);
ATH_MSG_INFO("Derived properties:");
ATH_MSG_INFO(" Fastjet jet defn: " << m_fjjetdef.description());
ATH_MSG_INFO(" Fastjet area defn: " << m_fjareadef.description());
ATH_MSG_INFO(" Fastjet jet selector: " << m_fjselector.description());
ATH_MSG_INFO(" Use area four-momentum: " << m_useAreaFourMom);
// Fill the EventShape object
m_rhoDec = SG::AuxElement::Accessor<float>("Density");
......@@ -150,6 +163,9 @@ fillEventShape( xAOD::EventShape* pevs, const PseudoJetVector& pjv) const {
ATH_MSG_DEBUG("Input pseudojet count: " << pjv.size());
ATH_MSG_DEBUG("Event shape container address: " << pevs);
for(const auto & pj : pjv) {
ATH_MSG_DEBUG(" pj input e="<<pj.e() << " pz="<<pj.pz() << " px="<<pj.px() );
}
// Find jets.
const ClusterSequenceArea* pcsa = new ClusterSequenceArea(pjv, m_fjjetdef, m_fjareadef);
if ( pcsa == 0 ) {
......@@ -162,8 +178,8 @@ fillEventShape( xAOD::EventShape* pevs, const PseudoJetVector& pjv) const {
double rho, sigma, area;
pcsa->get_median_rho_and_sigma(m_fjselector, m_useAreaFourMom, rho, sigma, area);
ATH_MSG_DEBUG(" calculated rho="<< rho);
// Record rho.
// Record rho.
m_rhoDec(*pevs) = rho;
m_sigmaDec(*pevs) = sigma;
m_areaDec(*pevs) = area;
......
......@@ -75,21 +75,17 @@ StatusCode EventShapeCopier::fillEventShape(xAOD::EventShape *evs, const xAOD::I
#ifdef XAOD_ANALYSIS
void EventShapeCopier::renameEventDensities(){
static EventShapeCopier kt4copier("Kt4LCTopoEDCopier");
static EventShapeCopier kt6copier("Kt6LCTopoEDCopier");
static bool needinit = true;
if(needinit){
kt4copier.setProperty("InputEventShape", "LCTopoEventShape");
kt4copier.setProperty("OutputEventShape", "Kt4LCTopoEventShape");
kt4copier.setProperty("EventDensityName", "DensityForJetsR4");
kt6copier.setProperty("InputEventShape", "LCTopoEventShape");
kt6copier.setProperty("OutputEventShape", "Kt6LCTopoEventShape");
kt6copier.setProperty("EventDensityName", "DensityForJetsR6");
needinit = false;
}
kt4copier.fillEventShape();
kt6copier.fillEventShape();
setProperty("InputEventShape", "LCTopoEventShape").ignore();
setProperty("OutputEventShape", "Kt4LCTopoEventShape").ignore();
setProperty("EventDensityName", "DensityForJetsR4").ignore();
fillEventShape().ignore();
setProperty("InputEventShape", "LCTopoEventShape").ignore();
setProperty("OutputEventShape", "Kt6LCTopoEventShape").ignore();
setProperty("EventDensityName", "DensityForJetsR6").ignore();
fillEventShape().ignore();
}
#else
// In Athena, do nothing. Use an Athena alg as defined in python/EventDensityConfig.py
......
......@@ -12,7 +12,7 @@ PACKAGE_OBJFLAGS =
PACKAGE_LDFLAGS =
PACKAGE_BINFLAGS =
PACKAGE_LIBFLAGS =
PACKAGE_DEP = AsgTools PATCore PATInterfaces xAODJet JetInterface xAODEventShape Asg_FastJet
PACKAGE_DEP = AsgTools PATCore PATInterfaces xAODJet JetInterface xAODEventShape Asg_FastJet EventShapeInterface
PACKAGE_TRYDEP =
PACKAGE_CLEAN =
PACKAGE_PEDANTIC = 0
......
......@@ -15,6 +15,7 @@ def configEventDensityTool( name, pjGetter, radius, **options ):
AreaDefinition = "Voronoi",
VoronoiRfact = 0.9,
OutputContainer = "Kt"+str(int(10*radius))+pjGetter.Label + "EventShape",
UseFourMomArea = True,
)
# Override properties with user-supplied options.
toolProperties.update( options)
......
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