Commit e8522ac6 authored by marco aparo's avatar marco aparo
Browse files

Migrated Tag&Probe class to TrigInDetAnalysisUtils

parent 62611340
......@@ -156,8 +156,7 @@ ROBJECTS = \
$(OBJDIR)/ConfVtxAnalysis.o \
$(OBJDIR)/PurityAnalysis.o \
$(OBJDIR)/globals.o \
$(OBJDIR)/computils.o \
$(OBJDIR)/TagNProbe.o
$(OBJDIR)/computils.o
LOBJECTS = \
$(OBJDIR)/TIDAEvent.o \
......
......@@ -72,8 +72,8 @@
/// globals for communicating with *Analyses
#include "globals.h"
/// TagNProbe routine class
#include "TagNProbe.h"
/// TagNProbe class
#include "TrigInDetAnalysisUtils/TagNProbe.h"
// in ConfAnalysis
......
......@@ -57,7 +57,7 @@ atlas_add_executable( TIDAreader
LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis Readcards )
atlas_add_executable( TIDArdict
Analysis/src/rmain.cxx Analysis/src/TagNProbe.h Analysis/src/TagNProbe.cxx
Analysis/src/rmain.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} TrigInDetAnalysis TrigInDetAnalysisUtils
TrigInDetAnalysisExampleLib Resplot Readcards TIDA TIDAcomputils )
......
......@@ -7,8 +7,9 @@
** Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
**/
#ifndef TIDA_TAGNPROBE_H
#define TIDA_TAGNPROBE_H
#ifndef TIDAUTILS_TAGNPROBE_H
#define TIDAUTILS_TAGNPROBE_H
#include <stdlib.h>
......@@ -18,9 +19,7 @@
#include "TrigInDetAnalysis/TrackSelector.h"
#include "TrigInDetAnalysisUtils/Filters.h"
#include "TrigInDetAnalysisUtils/Filter_Offline2017.h"
#include "TrigInDetAnalysisExample/NtupleTrackSelector.h"
#include "RoiFilter.h"
#include "utils.h"
#include "TrigInDetAnalysis/TrackSelector.h"
#include "TrigInDetAnalysis/TrigObjectMatcher.h"
#include "TH1D.h"
......@@ -33,7 +32,7 @@
#include "TrigInDetAnalysis/TIDDirectory.h"
#include "TrigInDetAnalysis/Efficiency.h"
#include "TrigInDetAnalysis/TIDARoiDescriptor.h"
#include "TrigInDetAnalysisExample/ChainString.h"
class TagNProbe {
......@@ -47,7 +46,7 @@ public:
/// configuration methods
void SetEventConfiguration(
NtupleTrackSelector * refTracks, // reference tracks
TrackSelector * refTracks, // reference tracks
TrackFilter* refFilter, // reference filter
std::string refName, // reference objects name
TrigObjectMatcher* tom, // trigger object matcher
......@@ -81,7 +80,7 @@ public:
void SetObjMatcher( TrigObjectMatcher* tom ) { m_tom = tom; }
void SetOfflineTracks( NtupleTrackSelector * refTracks, TrackFilter* refFilter ) {
void SetOfflineTracks( TrackSelector * refTracks, TrackFilter* refFilter ) {
m_refTracks = refTracks;
m_refFilter = refFilter;
}
......@@ -142,7 +141,7 @@ protected:
private:
NtupleTrackSelector * m_refTracks;
TrackSelector * m_refTracks;
TrackFilter * m_refFilter;
TIDA::Chain * m_chain;
......@@ -172,4 +171,4 @@ private:
};
#endif // TIDA_TAGNPROBE_H
#endif // TIDAUTILS_TAGNPROBE_H
......@@ -7,7 +7,9 @@
** Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
**/
#include "TagNProbe.h"
#include "TrigInDetAnalysisUtils/TagNProbe.h"
double TagNProbe::computeZ_obj( TIDA::Track* t1, TIDA::Track* t2 ) {
......@@ -195,12 +197,9 @@ void TagNProbe::FillMap( std::vector<std::string>& tnpChains ) {
for ( size_t i=0 ; i<tnpChains.size()-1 ; i+=2 ) {
ChainString chain_tag = ChainString( tnpChains[i] );
ChainString chain_probe = ChainString( tnpChains[i+1] );
std::string chain_tag_name = (tnpChains[i]).substr( 0, (tnpChains[i]).find(":post") );
std::string chain_probe_name = (tnpChains[i+1]).substr( 0, (tnpChains[i+1]).find(":post") );
std::string chain_tag_name = chain_tag.pre();
std::string chain_probe_name = chain_probe.pre();
m_tnp_map.insert( std::map<std::string,std::string>::value_type( chain_probe_name, chain_tag_name ) );
/// new testChain vector is filled only with probe chain names
......@@ -275,8 +274,8 @@ std::vector<TIDA::Roi*> TagNProbe::GetRois( TIDA::Chain * chain, std::vector<TID
void TagNProbe::BookMinvHisto( std::string chain_name ) {
std::string hname_base = chain_name;
replace( hname_base, '/', '_' );
replace( hname_base, ':', '_' );
std::replace( hname_base.begin(), hname_base.end(), '/', '_' );
std::replace( hname_base.begin(), hname_base.end(), ':', '_' );
std::string hname_1 = hname_base + "_Minv_TnP";
std::string hname_2 = hname_base + "_Minv_obj_TnP";
......@@ -318,8 +317,8 @@ void TagNProbe::WriteMinvHisto( TDirectory* foutdir ) {
for ( hMinv_itr=m_hMinv_map.begin() ; hMinv_itr!=m_hMinv_map.end() ; hMinv_itr++ ) {
std::string dirname = hMinv_itr->first;
replace( dirname, '/', '_' );
replace( dirname, ':', '_' );
std::replace( dirname.begin(), dirname.end(), '/', '_' );
std::replace( dirname.begin(), dirname.end(), ':', '_' );
std::string dirpath( foutdir->GetPath() );
dirpath += dirname;
......@@ -338,8 +337,8 @@ void TagNProbe::WriteMinvHisto( TDirectory* foutdir ) {
for ( hMinv_obj_itr=m_hMinv_obj_map.begin() ; hMinv_obj_itr!=m_hMinv_obj_map.end() ; hMinv_obj_itr++ ) {
std::string dirname = hMinv_obj_itr->first;
replace( dirname, '/', '_' );
replace( dirname, ':', '_' );
std::replace( dirname.begin(), dirname.end(), '/', '_' );
std::replace( dirname.begin(), dirname.end(), ':', '_' );
std::string dirpath( foutdir->GetPath() );
dirpath += dirname;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment