Skip to content
Snippets Groups Projects
Commit 5c03faae authored by Marco Clemencic's avatar Marco Clemencic
Browse files

v17r4

parent 073bb82d
No related branches found
No related tags found
No related merge requests found
Showing
with 467 additions and 314 deletions
......@@ -6,6 +6,6 @@ find_package(GaudiProject)
#---------------------------------------------------------------
# Declare project name and version
gaudi_project(Rec v17r3p1
USE Lbcom v16r2p1
gaudi_project(Rec v17r4
USE Lbcom v16r3
DATA TCK/HltTCK)
################################################################################
# Package: PrKernel
################################################################################
gaudi_subdir(PrKernel v1r6)
gaudi_subdir(PrKernel v1r7)
gaudi_depends_on_subdirs(Event/RecEvent
Tf/TfKernel
......
......@@ -47,8 +47,6 @@ public:
void setContainer( std::string name ) { m_container = name; };
void setWriteHistos(int write){ m_writeHistos = write; };
void setUseEta25Cut(bool cut){ m_eta25cut = cut;};
void setUsewriteXYEffHistos(bool hist){ m_writeXYEffHistos = hist;};
void printparticlekey(bool key){m_printparticlekey = key;};
void setTriggerNumbers(bool numbers){ m_triggerNumbers = numbers;};
void setSelectId( int data ) { m_selectId = data; };
void setTrackType( LHCb::Track::Types type) { m_trackType = type; };
......
......@@ -20,11 +20,11 @@ class IHistoTool;
static const InterfaceID IID_IPrTTCounter ( "IPrTTCounter", 1, 0 );
/** @class IPrCounter IPrCounter.h PrKernel/IPrCounter.h
/** @class IPrTTCounter IPrTTCounter.h PrKernel/IPrTTCounter.h
*
*
* @author Michel De Cian & Paolo Gandini & Thomas Nikodem
* @date 2013-12-13
* @author Michel De Cian & Paolo Gandini & Thomas Nikodem & Svende Braun
* @date 2014-12-23
*/
class IPrTTCounter : virtual public IAlgTool {
public:
......@@ -46,8 +46,7 @@ public:
void setContainer( std::string name ) { m_container = name; };
void setWriteHistos(int write){ m_writeHistos = write; };
void setUseEta25Cut(bool cut){ m_eta25cut = cut;};
//void printparticlekey(bool key){m_printparticlekey = key;};
void setUsewriteXYEffHistos(bool hist){m_writeXYEffHistos = hist;};
void setSelectId( int data ) { m_selectId = data; };
void setTriggerNumbers(bool numbers){ m_triggerNumbers = numbers;};
......@@ -61,9 +60,8 @@ protected:
int m_writeHistos;
bool m_eta25cut;
bool m_writeXYEffHistos;
// bool m_printparticlekey;
bool m_triggerNumbers;
int m_selectId;
std::string m_container;
......
......@@ -3,7 +3,7 @@
# Maintainer :
#=====================================================================
package PrKernel
version v1r6
version v1r7
#=====================================================================
# Structure, i.e. directories to process.
......
v1r6
v1r7
......@@ -4,7 +4,10 @@
! Purpose : Basic tools for Pattern for the Upgrade
!-----------------------------------------------------------------------------
!========================= PrKernel v1r6 2014-12-11 =========================
!========================= PrKernel v1r7 2015-01-14 =========================
! 2014-12-23 - Svende Braun
- Add modified version of IPrTTCounter for efficiency studies.
! 2014-11-07 - Svende Braun
- Add IPrTTCounter and modified IPrCounter for efficiency studies. Temporary solution only.
......
################################################################################
# Package: PrMCTools
################################################################################
gaudi_subdir(PrMCTools v2r5)
gaudi_subdir(PrMCTools v2r6)
gaudi_depends_on_subdirs(Det/VPDet
Event/FTEvent
......
......@@ -3,7 +3,7 @@
# Maintainer : Michel De Cian
#=====================================================================
package PrMCTools
version v2r5
version v2r6
#=====================================================================
# Structure, i.e. directories to process.
......
v2r5
v2r6
......@@ -4,6 +4,10 @@
! Purpose : MC tools for pattern recognition for the Upgrade
!-----------------------------------------------------------------------------
!========================= PrMCTools v2r6 2015-01-14 =========================
! 2015-01-10 - Michel De Cian
- Rewrite method "plotMCHits" in PrPlotFTHits to use MCHit<->FTCluster linker.
!========================= PrMCTools v2r5 2014-12-11 =========================
! 2014-12-10 - Michel De Cian
- Fix LiteCluster locations for STDetectors in PrLHCbID2MCParticle
......
......@@ -17,12 +17,14 @@
#include "GaudiAlg/GaudiHistoTool.h"
#include "GaudiAlg/IHistoTool.h"
//-----------------------------------------------------------------------------
// Implementation file for class : PrChecker2
//
// 2005-03-29 : Olivier Callot
// modified by Wenbin Qian for Upgrade
// 2013-05-31 : Sascha Stahl, Thomas Nikodem upgraded to write Histograms
// 2014-12-22 : Svende Braun, Michel De Cian upgraded for configurable selection cuts
//-----------------------------------------------------------------------------
......@@ -46,9 +48,11 @@ PrChecker2::PrChecker2( const std::string& name,
m_best(NULL),
m_bestLong(NULL),
m_bestDownstream(NULL),
m_new(NULL),
m_ttForward(NULL),
m_ttMatch(NULL),
m_ttDownst(NULL),
m_ttnew(NULL),
m_writeVeloHistos(-1),
m_writeForwardHistos(-1),
m_writeMatchHistos(-1),
......@@ -58,15 +62,17 @@ PrChecker2::PrChecker2( const std::string& name,
m_writeBestHistos(-1),
m_writeBestLongHistos(-1),
m_writeBestDownstreamHistos(-1),
m_writeNewHistos(-1),
m_writeUTHistos(-1),
m_writeTTForwardHistos(-1),
m_writeTTMatchHistos(-1),
m_writeTTDownstHistos(-1),
m_writeTTNewHistos(-1),
m_selectIdNew(1),
m_selectIdNewTT(1),
m_eta25cut(false),
m_triggerNumbers(false),
m_writeXYEffHistos(false),
m_particlekeyforward(false),
m_useElectrons(false),
m_vetoElectrons(false),
m_histoTool(NULL)
{
declareProperty( "VeloTracks", m_veloTracks = LHCb::TrackLocation::Velo );
......@@ -75,6 +81,9 @@ PrChecker2::PrChecker2( const std::string& name,
declareProperty( "SeedTracks", m_seedTracks = LHCb::TrackLocation::Seed );
declareProperty( "DownTracks", m_downTracks = LHCb::TrackLocation::Downstream );
declareProperty( "UpTracks", m_upTracks = LHCb::TrackLocation::VeloTT );
declareProperty( "BestTracks", m_bestTracks = LHCb::TrackLocation::Default );
declareProperty( "NewTracks", m_newTracks = LHCb::TrackLocation::VeloTT );
declareProperty( "NewTTTracks", m_ttnewTracks = LHCb::TrackLocation::VeloTT );
// declareProperty( "KShortTracks", m_kshortTracks = LHCb::TrackLocation::KsTrack );
declareProperty( "WriteVeloHistos", m_writeVeloHistos = -1 );
......@@ -86,26 +95,29 @@ PrChecker2::PrChecker2( const std::string& name,
declareProperty( "WriteBestHistos", m_writeBestHistos = -1 );
declareProperty( "WriteBestLongHistos",m_writeBestLongHistos = -1 );
declareProperty( "WriteBestDownstreamHistos", m_writeBestDownstreamHistos = -1 );
declareProperty( "WriteNewHistos", m_writeNewHistos = -1 );
declareProperty( "WriteUTHistos", m_writeUTHistos = -1 );
declareProperty( "WriteTTForwardHistos", m_writeTTForwardHistos = -1 );
declareProperty( "WriteTTMatchHistos", m_writeTTMatchHistos = -1 );
declareProperty( "WriteTTDownstHistos", m_writeTTDownstHistos = -1 );
declareProperty( "Eta25Cut", m_eta25cut = false );
declareProperty( "TriggerNumbers", m_triggerNumbers = false );
declareProperty( "UseElectrons", m_useElectrons = false );
declareProperty( "WriteTTNewHistos", m_writeTTNewHistos = -1 );
declareProperty("WriteXYEffHistos", m_writeXYEffHistos = false );
declareProperty("particlekeyforward", m_particlekeyforward = false );
declareProperty( "SelectIdNewContainer", m_selectIdNew = 1 );
declareProperty( "SelectIdNewTTContainer", m_selectIdNewTT = 1 );
declareProperty( "MyForwardCuts", m_map_forward = fillMyMap("Forward"));
declareProperty( "MyVeloCuts", m_map_velo = fillMyMap("Velo"));
declareProperty( "MyUpCuts", m_map_up = fillMyMap("Upstream"));
declareProperty( "MyTtrackCuts", m_map_ttrack = fillMyMap("Ttrack"));
declareProperty( "MyDownCuts", m_map_down = fillMyMap("Downstream"));
declareProperty( "MyTTForwardCuts", m_map_ttforward = fillMyMap("TTForward"));
declareProperty( "MyTTDownCuts", m_map_ttdown = fillMyMap("TTDownstream"));
declareProperty( "Eta25Cut", m_eta25cut = false );
declareProperty( "TriggerNumbers", m_triggerNumbers = false );
declareProperty( "VetoElectrons", m_vetoElectrons = true );
declareProperty( "MyForwardCuts", m_map_forward = DefaultCutMap("Forward"));
declareProperty( "MyVeloCuts", m_map_velo = DefaultCutMap("Velo"));
declareProperty( "MyUpCuts", m_map_up = DefaultCutMap("Upstream"));
declareProperty( "MyTtrackCuts", m_map_ttrack = DefaultCutMap("Ttrack"));
declareProperty( "MyDownCuts", m_map_down = DefaultCutMap("Downstream"));
declareProperty( "MyNewCuts", m_map_new = DefaultCutMap("New"));
declareProperty( "MyTTForwardCuts", m_map_ttforward = DefaultCutMap("TTForward"));
declareProperty( "MyTTDownCuts", m_map_ttdown = DefaultCutMap("TTDownstream"));
declareProperty( "MyTTNewCuts", m_map_ttnew = DefaultCutMap("TTNew"));
}
//=============================================================================
......@@ -139,8 +151,24 @@ StatusCode PrChecker2::initialize()
ghtool->setHistoDir("Track/PrChecker2") ;
m_histoTool = htool;
m_velo = tool<IPrCounter>( "PrCounter", "Velo", this );
if(m_triggerNumbers){//if true add extra cuts in maps
m_map_forward.insert(std::pair<std::string,std::string>("07_long_fromB_P>3GeV_Pt>0.5GeV", "isLong & fromB & trigger"));
m_map_forward.insert(std::pair<std::string,std::string>("08_TT_long_fromB_P>3GeV_Pt>0.5GeV","isLong & fromB & trigger & isTT"));
m_map_velo.insert(std::pair<std::string,std::string>("08_long_fromB_P>3GeV_Pt>0.5GeV", "isLong & fromB & trigger"));
m_map_velo.insert(std::pair<std::string,std::string>("09_TT_long_fromB_P>3GeV_Pt>0.5GeV","isLong & fromB & trigger & isTT"));
m_map_up.insert(std::pair<std::string,std::string>("11_long_fromB_P>3GeV_Pt>0.5GeV", "isLong & fromB & trigger"));
m_map_up.insert(std::pair<std::string,std::string>("12_TT_long_fromB_P>3GeV_Pt>0.5GeV","isLong & fromB & trigger & isTT"));
m_map_new.insert(std::pair<std::string,std::string>("long_fromB_P>3GeV_Pt>0.5GeV", "isLong & fromB & trigger"));
m_map_new.insert(std::pair<std::string,std::string>("TT_long_fromB_P>3GeV_Pt>0.5GeV","isLong & fromB & trigger & isTT"));
m_map_ttforward.insert(std::pair<std::string,std::string>("03_long_fromB_P>3GeV_Pt>0.5GeV", "isLong & fromB & trigger"));
m_map_ttforward.insert(std::pair<std::string,std::string>("04_TT_long_fromB_P>3GeV_Pt>0.5GeV","isLong & fromB & trigger & isTT"));
m_map_ttdown.insert(std::pair<std::string,std::string>("07_long_fromB_P>3GeV_Pt>0.5GeV", "isLong & fromB & trigger"));
m_map_ttdown.insert(std::pair<std::string,std::string>("08_TT_long_fromB_P>3GeV_Pt>0.5GeV","isLong & fromB & trigger & isTT"));
m_map_ttnew.insert(std::pair<std::string,std::string>("long_fromB_P>3GeV_Pt>0.5GeV", "isLong & fromB & trigger"));
m_map_ttnew.insert(std::pair<std::string,std::string>("TT_long_fromB_P>3GeV_Pt>0.5GeV","isLong & fromB & trigger & isTT"));
}
m_velo = tool<IPrCounter>( "PrCounter2", "Velo", this );
m_velo->setContainer( m_veloTracks );
m_velo->setWriteHistos(m_writeVeloHistos);
m_velo->setSelectId( 3 );
......@@ -148,16 +176,15 @@ StatusCode PrChecker2::initialize()
m_velo->addSelection( pair.first ,true);
}
m_forward = tool<IPrCounter>( "PrCounter", "Forward", this );
m_forward = tool<IPrCounter>( "PrCounter2", "Forward", this );
m_forward->setContainer( m_forwardTracks );
m_forward->setWriteHistos(m_writeForwardHistos);
m_forward->printparticlekey(m_particlekeyforward);
m_forward->setSelectId( 8 );
for( auto pair : m_map_forward ){
m_forward->addSelection( pair.first ,true);
}
m_match = tool<IPrCounter>( "PrCounter", "Match", this );
m_match = tool<IPrCounter>( "PrCounter2", "Match", this );
m_match->setContainer( m_matchTracks );
m_match->setWriteHistos(m_writeMatchHistos);
m_match->setSelectId( 8 );
......@@ -165,7 +192,7 @@ StatusCode PrChecker2::initialize()
m_match->addSelection( pair.first ,true);
}
m_upTrack = tool<IPrCounter>( "PrCounter", "Upstream", this );
m_upTrack = tool<IPrCounter>( "PrCounter2", "Upstream", this );
m_upTrack->setContainer( m_upTracks );
m_upTrack->setWriteHistos(m_writeUpHistos);
m_upTrack->setSelectId( 4 );
......@@ -173,7 +200,7 @@ StatusCode PrChecker2::initialize()
m_upTrack->addSelection( pair.first ,true);
}
m_tTrack = tool<IPrCounter>( "PrCounter", "TTrack", this );
m_tTrack = tool<IPrCounter>( "PrCounter2", "TTrack", this );
m_tTrack->setContainer( m_seedTracks );
m_tTrack->setWriteHistos(m_writeTTrackHistos );
m_tTrack->setSelectId( 8 );
......@@ -181,7 +208,7 @@ StatusCode PrChecker2::initialize()
m_tTrack->addSelection( pair.first ,true);
}
m_downTrack = tool<IPrCounter>( "PrCounter", "Downstream", this );
m_downTrack = tool<IPrCounter>( "PrCounter2", "Downstream", this );
m_downTrack->setContainer( m_downTracks );
m_downTrack->setWriteHistos(m_writeDownHistos );
m_downTrack->setSelectId( 4 );
......@@ -189,16 +216,16 @@ StatusCode PrChecker2::initialize()
m_downTrack->addSelection( pair.first ,true);
}
m_best = tool<IPrCounter>( "PrCounter", "Best", this );
m_best->setContainer( LHCb::TrackLocation::Default );
m_best = tool<IPrCounter>( "PrCounter2", "Best", this );
m_best->setContainer( m_bestTracks );
m_best->setWriteHistos(m_writeBestHistos);
m_best->setSelectId( 15 );
for( auto pair : m_map_forward ){
m_best->addSelection( pair.first ,true);
}
m_bestLong = tool<IPrCounter>( "PrCounter", "BestLong", this );
m_bestLong->setContainer( LHCb::TrackLocation::Default );
m_bestLong = tool<IPrCounter>( "PrCounter2", "BestLong", this );
m_bestLong->setContainer( m_bestTracks );
m_bestLong->setWriteHistos(m_writeBestLongHistos);
m_bestLong->setSelectId( 15 );
m_bestLong->setTrackType( LHCb::Track::Long );
......@@ -206,16 +233,23 @@ StatusCode PrChecker2::initialize()
m_bestLong->addSelection( pair.first ,true);
}
m_bestDownstream = tool<IPrCounter>( "PrCounter", "BestDown", this );
m_bestDownstream->setContainer( LHCb::TrackLocation::Default );
m_bestDownstream = tool<IPrCounter>( "PrCounter2", "BestDown", this );
m_bestDownstream->setContainer( m_bestTracks );
m_bestDownstream->setWriteHistos(m_writeBestDownstreamHistos);
m_bestDownstream->setSelectId( 12 );
m_bestDownstream->setTrackType( LHCb::Track::Downstream );
for( auto pair : m_map_down ){
m_bestDownstream->addSelection( pair.first ,true);
}
m_new = tool<IPrCounter>( "PrCounter2", "New", this );
m_new->setContainer( m_newTracks );
m_new->setWriteHistos(m_writeNewHistos);
m_new->setSelectId( m_selectIdNew );
for( auto pair : m_map_new ){
m_new->addSelection( pair.first ,true);
}
m_allCounters.push_back( m_velo );
m_allCounters.push_back( m_forward );
m_allCounters.push_back( m_match );
......@@ -225,7 +259,9 @@ StatusCode PrChecker2::initialize()
m_allCounters.push_back( m_best );
m_allCounters.push_back( m_bestLong );
m_allCounters.push_back( m_bestDownstream );
if(!m_map_new.empty()){
m_allCounters.push_back( m_new );
}
m_ttForward = tool<IPrTTCounter>( "PrTTCounter", "TTForward", this );
m_ttForward->setContainer( m_forwardTracks );
......@@ -247,50 +283,61 @@ StatusCode PrChecker2::initialize()
for( auto pair : m_map_ttdown ){
m_ttDownst->addSelection( pair.first ,true);
}
m_ttnew = tool<IPrTTCounter>( "PrTTCounter", "TTNew", this );
m_ttnew->setContainer( m_ttnewTracks );
m_ttnew->setWriteHistos(m_writeTTNewHistos);
m_ttnew->setSelectId( m_selectIdNewTT );
for( auto pair : m_map_ttnew ){
m_ttnew->addSelection( pair.first ,true);
}
m_allTTCounters.push_back( m_ttForward );
m_allTTCounters.push_back( m_ttMatch );
m_allTTCounters.push_back( m_ttDownst );
if(!m_map_ttnew.empty()){
m_allTTCounters.push_back( m_ttnew );
}
for ( std::vector<IPrCounter*>::iterator itC = m_allCounters.begin();
m_allCounters.end() != itC; ++itC ) {
(*itC)->setUseEta25Cut(m_eta25cut);
(*itC)->setTriggerNumbers(m_triggerNumbers);
(*itC)->setUsewriteXYEffHistos(m_writeXYEffHistos);
}
}
for ( std::vector<IPrTTCounter*>::iterator itCt = m_allTTCounters.begin();
m_allTTCounters.end() != itCt; ++itCt ) {
(*itCt)->setUseEta25Cut(m_eta25cut);
(*itCt)->setTriggerNumbers(m_triggerNumbers);
(*itCt)->setUsewriteXYEffHistos(m_writeXYEffHistos);
}
}
m_textCuts.insert( std::pair<std::string, std::vector<std::string>>( "Forward", getMyCut( m_map_forward )) );
m_textCuts.insert( std::pair<std::string, std::vector<std::string>>( "Velo", getMyCut( m_map_velo )) );
m_textCuts.insert( std::pair<std::string, std::vector<std::string>>( "Upstream", getMyCut( m_map_up )) );
m_textCuts.insert( std::pair<std::string, std::vector<std::string>>( "Ttrack", getMyCut( m_map_ttrack )) );
m_textCuts.insert( std::pair<std::string, std::vector<std::string>>( "Downstream", getMyCut( m_map_down )) );
m_textCuts.insert( std::pair<std::string, std::vector<std::string>>( "TTForward", getMyCut( m_map_ttforward )) );
m_textCuts.insert( std::pair<std::string, std::vector<std::string>>( "TTDownstream", getMyCut( m_map_ttdown )) );
std::vector<std::string> cutAliases ={"isNotLong", "isLong", "isVelo", "isNotVelo", "isDown", "isNotDown", "isUp", "isNotUp", "isTT", "isNotTT", "isSeed", "isNotSeed", "fromB", "fromKsFromB", "strange", "fromD", "isNotElectron", "isElectron" };
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "Forward", getMyCut( m_map_forward )) );
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "Velo", getMyCut( m_map_velo )) );
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "Upstream", getMyCut( m_map_up )) );
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "Ttrack", getMyCut( m_map_ttrack )) );
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "Downstream", getMyCut( m_map_down )) );
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "TTForward", getMyCut( m_map_ttforward )) );
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "TTDownstream", getMyCut( m_map_ttdown )) );
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "New", getMyCut( m_map_new )) );
m_Cuts.insert( std::pair<std::string, std::vector<std::string>>( "TTNew", getMyCut( m_map_ttnew )) );
std::vector<std::string> cutAliases ={"isNotLong", "isLong", "isVelo", "isNotVelo", "isDown", "isNotDown", "isUp", "isNotUp", "isTT", "isNotTT", "isSeed", "isNotSeed", "fromB", "fromKsFromB", "strange", "fromD", "isElectron", "isNotElectron", "BOrDMother" };
// -- initialize the LoKi cuts
m_factory = tool<LoKi::IMCHybridFactory> ("LoKi::Hybrid::MCTool/MCHybridFactory:PUBLIC" , this ) ;
if ( nullptr == m_factory ){ return Error ( "Could not locate IMCHybridFactory" ) ; } // RETURN
//for(unsigned int i = 0; i<m_textCuts.size(); ++i){
for( auto pair : m_textCuts ){//loop over textCuts
for( auto pair : m_Cuts ){//loop over textCuts
std::vector< addOtherCuts > dummy;
std::vector< LoKi::Types::MCCut > vectortmp; //vector von LoKi cuts
for( std::string cutString : pair.second ){//loop over 2nd element of textCuts = strings of cuts
dummy.push_back( addOtherCuts() );
for( std::string alias : cutAliases ){//loop over cutAliases
......@@ -300,22 +347,34 @@ StatusCode PrChecker2::initialize()
if( found != std::string::npos ){//if found then
dummy.back().addCut( isTrack( alias ) );//other components are already filled //add this category of cuts to addOtherCuts()
cutString.replace(found, alias.length(), "MCTRUE");//replace found at position found, with length of string to replace, replace it with string ""
cutString.replace(found, alias.length(), "MCTRUE");//replace found at position found, with length of string to replace, replace it with string "" (Loki Cut)
}
}
if(m_vetoElectrons == true) {
std::string str2 ("isNotElectron");
dummy.back().addCut( isTrack( str2 ) );
std::size_t found = cutString.find(str2 );
if( found != std::string::npos ){
cutString.replace(found, str2.length(), "MCTRUE");
}}
//LoKi cuts: define aliases for better use
if(m_eta25cut == true) cutString.append(" & eta25");
std::string str3 ("eta25");
std::size_t found = cutString.find( str3 );
if( found != std::string::npos ){
cutString.replace(found, str3.length(), "(MCETA > 2.0) & (MCETA < 5.0)");
}
std::string str4 ("over5");
found = cutString.find( str4 );
if( found != std::string::npos ){
cutString.replace(found, str4.length(), "(MCP > 5000)");
}
std::string str5 ("trigger");
found = cutString.find( str5 );
if( found != std::string::npos ){
......@@ -328,10 +387,10 @@ StatusCode PrChecker2::initialize()
vectortmp.push_back(tmp);
if ( sc.isFailure() ){ return Error ( "Error from IMCHybridFactory",sc ) ; } // RETURN
}
//give those replaced cuts as input to LoKi and otherCuts
m_LoKiCuts.insert( std::pair<std::string, std::vector<LoKi::Types::MCCut>>( pair.first, vectortmp ) );//give same names as in m_textCuts = 1st, LoKicuts = 2nd
m_otherCuts.insert( std::pair<std::string, std::vector<addOtherCuts>>( pair.first, dummy ) );//give same names as in m_textCuts = 1st, othercuts = 2nd
m_LoKiCuts.insert( std::pair<std::string, std::vector<LoKi::Types::MCCut>>( pair.first, vectortmp ) );//give same names as in m_Cuts = 1st, LoKicuts = 2nd
m_otherCuts.insert( std::pair<std::string, std::vector<addOtherCuts>>( pair.first, dummy ) );//give same names as in m_Cuts = 1st, othercuts = 2nd
}
......@@ -484,6 +543,16 @@ StatusCode PrChecker2::execute() {
m_downTrack->countAndPlot(m_histoTool,part,flags,ids,nPrim);
m_bestDownstream->countAndPlot(m_histoTool,part,flags,ids,nPrim);
//New cuts (for new track container)
flags.clear();
std::vector<LoKi::Types::MCCut> newMCCuts = m_LoKiCuts["New"];
std::vector<addOtherCuts> newMCCuts2 = m_otherCuts["New"];
for(unsigned int i = 0; i < newMCCuts.size(); ++i){
flags.push_back( newMCCuts[i](part) && newMCCuts2[i](part, trackInfo) );
}
m_new->countAndPlot(m_histoTool,part,flags,ids,nPrim);
//TTForward cuts
flags.clear();
......@@ -506,7 +575,18 @@ StatusCode PrChecker2::execute() {
}
m_ttDownst->countAndPlot( m_histoTool, part, flags, ids );
//New cuts (for new TTtrack container)
flags.clear();
std::vector<LoKi::Types::MCCut> ttnewMCCuts = m_LoKiCuts["TTNew"];
std::vector<addOtherCuts> ttnewMCCuts2 = m_otherCuts["TTNew"];
for(unsigned int i = 0; i < ttnewMCCuts.size(); ++i){
flags.push_back( ttnewMCCuts[i](part) && ttnewMCCuts2[i](part, trackInfo) );
}
m_ttnew->countAndPlot(m_histoTool, part, flags, ids);
}
......
......@@ -19,8 +19,8 @@
#include "LoKi/Primitives.h"
#include "LoKi/MCParticles.h"
#include "MCInterfaces/IMCReconstructible.h"
#include <tuple>
//#include <unordered_map>
class IHistoTool ;
......@@ -31,10 +31,45 @@ class IHistoTool ;
* Parameters:
* - Eta25Cut: Only consider particles with 2 < eta < 5? (default: false)
* - TriggerNumbers: Give numbers for p > 3GeV, pT > 500 MeV? (default: false)
* - UseElectrons: Take electrons into account in numbers? (default: false)
* if selected long_fromB_P>3GeV_Pt>0.5GeV cut is added to each track container
* - vetoElectrons: Take electrons into account in numbers? (default: true)
*
*
* additional track location container can be added for PrCounter2 and PrTTCounter via:
*
* @code
* from Configurables import PrChecker2
* #to fix the LokiGendecorator problem
* from Configurables import LoKi__Hybrid__MCTool
* myFactory = LoKi__Hybrid__MCTool("MCHybridFactory")
* myFactory.Modules = [ "LoKiMC.decorators" ]
* PrChecker2("PrChecker2").addTool( myFactory )
*
* PrChecker2("PrChecker2").NewTracks= "Rec/Track/Velo"
* PrChecker2("PrChecker2").WriteNewHistos = 2
* PrChecker2("PrChecker2").SelectIdNewContainer = 1
* PrChecker2("PrChecker2").MyNewCuts= {"fromBorD" : "BOrDMother", "B daughters": "fromB", "D daughters": "fromD" }
* @endcode
*
*
*
* Uses IHistoTool: for each container histograms are plotted if the following code segment is used. Default values are -1 (no histograms), can also be set to 2 for additional histograms (expectedHits, docaz, PVz, EtaP, EtaPhi, efficiency maps @z=9000mm XYZ9000 and @z=2485mm XYZ2485)
*
* @code
* PrChecker2("PrChecker2").Write(container)Histos = 1
* @endcode
*
* Configurable selection cuts for each container, can be changed via:
*
* @code
* PrChecker2("PrChecker2").MyForwardCuts = {"long" : "isLong", "B daughter": "fromB" }
* @endcode
*
* As a default selection cuts of old PrChecker are used. The following cuts are predefined:
* is(Not)Long, is(Not)Velo, is(Not)Down, is(Not)Up, is(Not)TT, is(Not)Seed, fromB, fromD, BOrDMother, fromKsFromB, strange, is(Not)Electron, eta25, over5, trigger and Loki syntax (LoKi::MCParticles) can be used for kinematical cuts: (MCPT> 2300), here () are essential.
*
* @author Olivier Callot, Thomas Nikodem
* @date 2014-02-13
* @author Olivier Callot, Thomas Nikodem, Svende Braun, Michel De Cian
* @date 2014-12-22
*/
class EffCounter {
......@@ -82,6 +117,9 @@ class PrChecker2 : public GaudiHistoAlg {
std::string m_seedTracks;
std::string m_downTracks;
std::string m_upTracks;
std::string m_bestTracks;
std::string m_newTracks;///< additional configurable track container for PrCounter2
std::string m_ttnewTracks;///< additional configurable track container for PrTTCounter
IPrCounter* m_velo;
IPrCounter* m_forward;
......@@ -92,17 +130,18 @@ class PrChecker2 : public GaudiHistoAlg {
IPrCounter* m_best;
IPrCounter* m_bestLong;
IPrCounter* m_bestDownstream;
IPrCounter* m_new;
IPrTTCounter* m_ttForward;
IPrTTCounter* m_ttMatch;
IPrTTCounter* m_ttDownst;
IPrTTCounter* m_ttnew;
//IPrCounter* m_utForward;
//IPrCounter* m_utMatch;
//IPrCounter* m_utbestLong;
//IPrCounter* m_utDownst;
int m_writetestHistos;
int m_writeVeloHistos;
int m_writeForwardHistos;
int m_writeMatchHistos;
......@@ -112,22 +151,27 @@ class PrChecker2 : public GaudiHistoAlg {
int m_writeBestHistos;
int m_writeBestLongHistos;
int m_writeBestDownstreamHistos;
int m_writeNewHistos;
int m_writeUTHistos;
int m_writeTTForwardHistos;
int m_writeTTMatchHistos;
int m_writeTTDownstHistos;
int m_writeTTNewHistos;
int m_selectIdNew;
int m_selectIdNewTT;
bool m_eta25cut;
bool m_triggerNumbers;
bool m_writeXYEffHistos;
bool m_particlekeyforward;
bool m_useElectrons;
bool m_vetoElectrons;
//convert strings to normal cuts ==> called m_otherCuts (without LoKi Hybrid factory)
/** @class isTrack PrChecker2.h
* Predefined selection cuts: it converts strings to normal cuts, used by addOtherCuts
*/
class isTrack {
enum recAs {
......@@ -148,7 +192,8 @@ class PrChecker2 : public GaudiHistoAlg {
fromD = 16,
fromKsFromB = 17,
isElectron = 18,
isNotElectron = 19
isNotElectron = 19,
BOrDMother = 20,
};
std::map< std::string, recAs> lookuptable = {{"isLong",isLong},
......@@ -168,7 +213,8 @@ class PrChecker2 : public GaudiHistoAlg {
{"fromD",fromD},
{"fromKsFromB",fromKsFromB},
{"isElectron",isElectron},
{"isNotElectron",isNotElectron}};
{"isNotElectron",isNotElectron},
{"BOrDMother",BOrDMother}};
public:
......@@ -177,13 +223,15 @@ class PrChecker2 : public GaudiHistoAlg {
};
bool operator()(LHCb::MCParticle* mcp, MCTrackInfo mcInfo) const {
bool operator()(LHCb::MCParticle* mcp, MCTrackInfo mcInfo) const {
bool motherB = false;
bool motherD = false;
if(m_kind == isLong) return mcInfo.hasVeloAndT( mcp );
if(m_kind == isNotLong) return !mcInfo.hasVeloAndT( mcp );
if(m_kind == isDown) return mcInfo.hasT( mcp ) && mcInfo.hasTT( mcp );
if(m_kind == isNotDown) return !mcInfo.hasT( mcp ) && !mcInfo.hasTT( mcp );
if(m_kind == isNotDown) return !(mcInfo.hasT( mcp ) && mcInfo.hasTT( mcp ));
if(m_kind == isUp) return mcInfo.hasVelo( mcp ) && mcInfo.hasTT( mcp );
if(m_kind == isNotUp) return !mcInfo.hasVelo( mcp ) && !mcInfo.hasTT( mcp );
if(m_kind == isNotUp) return !(mcInfo.hasVelo( mcp ) && mcInfo.hasTT( mcp ));
if(m_kind == isVelo) return mcInfo.hasVelo( mcp );
if(m_kind == isNotVelo) return !mcInfo.hasVelo( mcp );
if(m_kind == isSeed) return mcInfo.hasT( mcp );
......@@ -192,8 +240,7 @@ class PrChecker2 : public GaudiHistoAlg {
if(m_kind == isNotTT) return !mcInfo.hasTT( mcp );
if(m_kind == isElectron) return abs( mcp->particleID().pid() ) == 11;
if(m_kind == isNotElectron) return abs( mcp->particleID().pid() ) != 11;
//if(m_kind == eta25) return true;
if ( 0 != mcp->originVertex() ) {
const LHCb::MCParticle* mother = mcp->originVertex()->mother();
if ( 0 != mother ) {
......@@ -228,13 +275,18 @@ class PrChecker2 : public GaudiHistoAlg {
}
while( 0 != mother ) {
if ( mother->particleID().hasBottom() &&
( mother->particleID().isMeson() || mother->particleID().isBaryon() ) ) if(m_kind == fromB) return true;
( mother->particleID().isMeson() || mother->particleID().isBaryon() ) ) motherB = true;
if ( mother->particleID().hasCharm() &&
( mother->particleID().isMeson() || mother->particleID().isBaryon() ) ) if(m_kind == fromD) return true;
( mother->particleID().isMeson() || mother->particleID().isBaryon() ) ) motherD = true;
mother = mother->originVertex()->mother();
}
if( m_kind == fromD && motherD == true) return m_kind == fromD;
if( m_kind == fromB && motherB == true) return m_kind == fromB;
if(m_kind == BOrDMother && (motherD || motherB) ) return m_kind == BOrDMother;
}
return false;
}
......@@ -244,7 +296,9 @@ class PrChecker2 : public GaudiHistoAlg {
};
/** @class addOtherCuts PrChecker2.h
* Class that adds selection cuts defined in isTrack to cuts
*/
class addOtherCuts{
public:
......@@ -265,7 +319,7 @@ class PrChecker2 : public GaudiHistoAlg {
std::vector<isTrack> m_cuts;
};
//maps for each track container with {cut name,selection cut}
std::map <std::string,std::string> m_map_forward;
std::map <std::string,std::string> m_map_velo;
......@@ -274,20 +328,73 @@ class PrChecker2 : public GaudiHistoAlg {
std::map <std::string,std::string> m_map_down;
std::map <std::string,std::string> m_map_ttforward;
std::map <std::string,std::string> m_map_ttdown;
std::map <std::string,std::string> m_map_new1;
std::map <std::string,std::string> m_map_new2;
std::map <std::string,std::string> m_map_new;
std::map <std::string,std::string> m_map_ttnew;
//default cuts for each container, if not other ones are specified in run python file, those are taken
std::map <std::string,std::string> fillMyMap( std::string name ){
/** @brief Map filled with default cuts for each container, first string is name of the cut, second one is cut (predefined from class isTrack or kinematical Loki Cuts)
*/
std::map <std::string,std::string> DefaultCutMap( std::string name ){
std::map <std::string,std::string> map_velo = { {"velo" ,"isVelo & isNotElectron"},
{"long","isLong & isNotElectron"},{"long>5GeV" ,"isLong & over5 & isNotElectron " }, {"long_strange" , "isLong & strange & isNotElectron" },{ "long_strange>5GeV","isLong & strange & over5 & isNotElectron" },{"long_fromB" ,"isLong & fromB & isNotElectron" },{"long_fromB>5GeV" , "isLong & fromB & over5 & isNotElectron" }};
std::map <std::string,std::string> map_forward = {{"long","isLong & isNotElectron"}, {"long>5GeV","isLong & over5 & isNotElectron " }, {"long_strange","isLong & strange & isNotElectron" },{"long_strange>5GeV","isLong & strange & over5 & isNotElectron" },{"long_fromB","isLong & fromB & isNotElectron" },{"long_fromB>5GeV","isLong & fromB & over5 & isNotElectron" }};
std::map <std::string,std::string> map_up = { {"velo" ,"isVelo & isNotElectron"},{"velo+UT" ,"isVelo & isTT & isNotElectron"},{"velo+UT>5GeV" , "isVelo & isTT & over5 & isNotElectron"},{"velo+notLong" ,"isNotLong & isVelo & isNotElectron "},{"velo+UT+notLong" ,"isNotLong & isVelo & isTT & isNotElectron"},{"velo+UT+notLong>5GeV" ,"isNotLong & isVelo & isTT & isNotElectron & over5 "},{"long" ,"isLong & isNotElectron"},{"long>5GeV" ,"isLong & over5 & isNotElectron "},{"long_fromB" ,"isLong & fromB & isNotElectron"},{"long_fromB>5GeV" , "isLong & fromB & over5 & isNotElectron"}};
std::map <std::string,std::string> map_ttrack = {{"hasT" ,"isSeed & isNotElectron"},{"long" ,"isLong & isNotElectron"},{"long>5GeV" ,"isLong & over5 & isNotElectron "},{ "long_fromB" ,"isLong & fromB & isNotElectron"},{"long_fromB>5GeV" , "isLong & fromB & over5 & isNotElectron"},{"UT+T_strange" , " strange & isDown & isNotElectron"},{"UT+T_strange>5GeV" , " strange & isDown & over5 & isNotElectron"},{"noVelo+UT+T_strange" , " strange & isDown & isNotVelo & isNotElectron"},{"noVelo+UT+T_strange>5GeV" , " strange & isDown & over5 & isNotVelo & isNotElectron"},{"UT+T_SfromDB" , " strange & isDown & ( fromB | fromD ) & isNotElectron"},{"UT+T_SfromDB>5GeV" , " strange & isDown & over5 & ( fromB | fromD ) & isNotElectron"},{"noVelo+UT+T_SfromDB>5GeV" , " strange & isDown & isNotVelo & over5 & ( fromB | fromD ) & isNotElectron"}};
std::map <std::string,std::string> map_down = {{"UT+T" ,"isDown & isNotElectron"},{"UT+T>5GeV" ,"isDown & over5 & isNotElectron"},{"UT+T_strange>5GeV" , " strange & isDown & over5 & isNotElectron"},{"UT+T_strange>5GeV" , " strange & isDown & over5 & isNotElectron"},{"noVelo+UT+T_strange" , " strange & isDown & isNotVelo & isNotElectron"},{"noVelo+UT+T_strange>5GeV" , " strange & isDown & over5 & isNotVelo & isNotElectron"},{"UT+T_fromB" , "isDown & fromB & isNotElectron"},{"UT+T_fromB>5GeV" , "isDown & fromB & over5 & isNotElectron"},{"noVelo+UT+T_fromB" , "isDown & fromB & isNotVelo & isNotElectron"},{"noVelo+UT+T_fromB>5GeV" , "isDown & fromB & over5 & isNotVelo & isNotElectron"},{"UT+T_SfromDB" , " strange & isDown & ( fromB | fromD ) & isNotElectron"},{"UT+T_SfromDB>5GeV" , " strange & isDown & over5 & ( fromB | fromD ) & isNotElectron"},{"noVelo+UT+T_SfromDB" , " strange & isDown & isNotVelo & ( fromB | fromD ) & isNotElectron"},{"noVelo+UT+T_SfromDB>5GeV" , " strange & isDown & isNotVelo & over5 & ( fromB | fromD ) & isNotElectron"}};
std::map <std::string,std::string> map_ttforward = {{ "long" ,"isLong & isNotElectron"},{"long>5GeV" ,"isLong & over5 & isNotElectron "}};
std::map <std::string,std::string> map_ttdown = {{"has seed" ,"isSeed & isNotElectron"},{"has seed +noVelo, T+TT" ,"isSeed & isNotVelo & isDown & isNotElectron"},{"down+strange" , " strange & isDown"},{"down+strange+>5GeV" , " strange & isDown & over5 "}, {"pi<-Ks<-B" , "fromKsFromB "},{"pi<-Ks<-B+> 5 GeV" , "fromKsFromB & over5 "}};
std::map <std::string,std::string> map_velo = { {"01_velo" ,"isVelo "},//use numbers for right order of cuts
{"02_long","isLong "},
{"03_long>5GeV" ,"isLong & over5 " },
{"04_long_strange" , "isLong & strange " },
{"05_long_strange>5GeV","isLong & strange & over5 " },
{"06_long_fromB" ,"isLong & fromB " },
{"07_long_fromB>5GeV" , "isLong & fromB & over5 " }};
std::map <std::string,std::string> map_forward = {{"01_long","isLong "},
{"02_long>5GeV","isLong & over5 " },
{"03_long_strange","isLong & strange " },
{"04_long_strange>5GeV","isLong & strange & over5 " },
{"05_long_fromB","isLong & fromB " },
{"06_long_fromB>5GeV","isLong & fromB & over5 " }};
std::map <std::string,std::string> map_up = { {"01_velo" ,"isVelo "},
{"02_velo+UT" ,"isVelo & isTT "},
{"03_velo+UT>5GeV" , "isVelo & isTT & over5 "},
{"04_velo+notLong" ,"isNotLong & isVelo "},
{"05_velo+UT+notLong" ,"isNotLong & isVelo & isTT "},
{"06_velo+UT+notLong>5GeV" ,"isNotLong & isVelo & isTT & over5 "},
{"07_long" ,"isLong "},
{"08_long>5GeV" ,"isLong & over5 "},
{"09_long_fromB" ,"isLong & fromB "},
{"10_long_fromB>5GeV" , "isLong & fromB & over5 "}};
std::map <std::string,std::string> map_ttrack = {{"01_hasT" ,"isSeed "},
{"02_long" ,"isLong "},
{"03_long>5GeV" ,"isLong & over5 "},
{ "04_long_fromB" ,"isLong & fromB "},
{"05_long_fromB>5GeV" , "isLong & fromB & over5 "},
{"06_UT+T_strange" , " strange & isDown "},
{"07_UT+T_strange>5GeV" , " strange & isDown & over5"},
{"08_noVelo+UT+T_strange" , " strange & isDown & isNotVelo"},
{"09_noVelo+UT+T_strange>5GeV" , " strange & isDown & over5 & isNotVelo "},
{"10_UT+T_SfromDB" , " strange & isDown & ( fromB | fromD ) "},
{"11_UT+T_SfromDB>5GeV" , " strange & isDown & over5 & ( fromB | fromD )"},
{"12_noVelo+UT+T_SfromDB>5GeV" , " strange & isDown & isNotVelo & over5 & ( fromB | fromD ) "}};
std::map <std::string,std::string> map_down = {{"01_UT+T" ,"isDown "},
{"02_UT+T>5GeV" ,"isDown & over5"},
{"03_UT+T_strange" , " strange & isDown"},
{"04_UT+T_strange>5GeV" , " strange & isDown & over5 "},
{"05_noVelo+UT+T_strange" , " strange & isDown & isNotVelo"},
{"06_noVelo+UT+T_strange>5GeV" , " strange & isDown & over5 & isNotVelo "},
{"07_UT+T_fromB" , "isDown & fromB "},
{"08_UT+T_fromB>5GeV" , "isDown & fromB & over5 "},
{"09_noVelo+UT+T_fromB" , "isDown & fromB & isNotVelo"},
{"10_noVelo+UT+T_fromB>5GeV" , "isDown & fromB & over5 & isNotVelo"},
{"11_UT+T_SfromDB" , " strange & isDown & ( fromB | fromD ) "},
{"12_UT+T_SfromDB>5GeV" , " strange & isDown & over5 & ( fromB | fromD ) "},
{"13_noVelo+UT+T_SfromDB" , " strange & isDown & isNotVelo & ( fromB | fromD )"},
{"14_noVelo+UT+T_SfromDB>5GeV" , " strange & isDown & isNotVelo & over5 & ( fromB | fromD ) "}};
std::map <std::string,std::string> map_new = {};
std::map <std::string,std::string> map_ttforward = {{ "01_long" ,"isLong "},
{"02_long>5GeV" ,"isLong & over5 "}};
std::map <std::string,std::string> map_ttdown = {{"01_has seed" ,"isSeed "},
{"02_has seed +noVelo, T+TT" ,"isSeed & isNotVelo & isDown "},
{"03_down+strange" , " strange & isDown"},
{"04_down+strange+>5GeV" , " strange & isDown & over5 "},
{"05_pi<-Ks<-B" , "fromKsFromB "},
{"06_pi<-Ks<-B+> 5 GeV" , "fromKsFromB & over5 "}};
std::map <std::string,std::string> map_ttnew = {};
std::map <std::string,std::string> empty_map = {{},{}};
if( name == "Forward" ) return map_forward;
......@@ -295,34 +402,37 @@ class PrChecker2 : public GaudiHistoAlg {
if( name == "Upstream" ) return map_up;
if( name == "Ttrack" ) return map_ttrack;
if( name == "Downstream" ) return map_down;
if( name == "New" ) return map_new;
if( name == "TTForward" ) return map_ttforward;
if( name == "TTDownstream" ) return map_ttdown;
if( name == "TTNew" ) return map_ttnew;
return empty_map;
}
//make vector of second elements of maps --> needed as input for m_textcuts
std::vector<std::string> getMyCut( std::map <std::string,std::string> myThingy ){
/** @brief makes vector of second elements of DefaultCutMap --> needed as input for m_Cuts */
std::vector<std::string> getMyCut( std::map <std::string,std::string> myCutMap ){
std::vector<std::string> dummy;
for( auto it : myThingy ){
for( auto it : myCutMap ){
dummy.push_back(it.second);
}
return dummy;
}
//== Vector of the counters
std::vector<IPrCounter*> m_allCounters;
std::vector<IPrTTCounter*> m_allTTCounters;
std::vector<IPrCounter*> m_allCounters;///<Vector of PrCounter
std::vector<IPrTTCounter*> m_allTTCounters;///<Vector of PrTTCounter
const IHistoTool* m_histoTool;
LoKi::IMCHybridFactory* m_factory;
LoKi::IMCHybridFactory* m_factory;///<needed to convert normal cuts into Loki cuts
//maps for cuts
std::map< std::string, std::vector <std::string> > m_textCuts;
std::map < std::string, std::vector < LoKi::Types::MCCut> > m_LoKiCuts;
std::map < std::string, std::vector <addOtherCuts> > m_otherCuts;
std::map< std::string, std::vector <std::string> > m_Cuts;///<map of track container name and corresponding cuts
std::map < std::string, std::vector < LoKi::Types::MCCut> > m_LoKiCuts;///<converted map of Loki cuts, first component is name of track container
std::map < std::string, std::vector <addOtherCuts> > m_otherCuts;///<map of other cuts as predefined in isTrack, first component is name of track container
......
......@@ -29,8 +29,6 @@ PrCounter2::PrCounter2( const std::string& type,
declareInterface<IPrCounter>(this);
m_link = NULL;
m_writeHistos = -1;
m_writeXYEffHistos = false;
m_printparticlekey = false;
m_extrapolator= NULL;
//m_idealStateCreator= NULL;
m_eta25cut = false;
......@@ -43,7 +41,7 @@ PrCounter2::PrCounter2( const std::string& type,
m_fracGhost = 0.;
m_nEvent = 0.;
m_trackType = LHCb::Track::TypeUnknown;
declareProperty( "TitleSize", m_titleSize = 30 );
declareProperty( "TitleSize", m_titleSize = 40 );
std::string title(name);
while(title.find(".") < title.size()){
......@@ -75,7 +73,6 @@ void PrCounter2::addSelection ( std::string name, bool writeHisto ) {
}
m_name.push_back( name );
m_writeHisto.push_back(writeHisto);
//m_writeHistoXYeff.push_back(writeHisto2);
m_wanted.push_back( 0 );
m_counted.push_back( 0 );
m_clone.push_back( 0 );
......@@ -104,8 +101,7 @@ void PrCounter2::initEvent(const IHistoTool* htool = NULL, const int nPV = 0){
m_extrapolator = tool<ITrackExtrapolator>("TrackMasterExtrapolator",this);
// m_idealStateCreator = tool<IIdealStateCreator>("IdealStateCreator", "IdealStateCreator", this);
//std::cout << "title"<< m_title<<std:: endl;
double nbTracks = 0;
if(htool && m_writeHistos>0 )htool->plot1D(nPV,m_title+"/nPV_Events","nPV_Events",-0.5,20.5,21);
......@@ -135,7 +131,7 @@ void PrCounter2::initEvent(const IHistoTool* htool = NULL, const int nPV = 0){
htool->plot2D(track->pseudoRapidity(),track->p(),m_title+"/EtaP_Ghosts","EtaP_Ghosts",0.,7.,0.,100000.,20, 20);
htool->plot2D(track->pseudoRapidity(),track->momentum().Phi(),m_title+"/EtaPhi_Ghosts","EtaPhi_Ghosts",0.,7.,-3.142,3.142,20,20);
}
if(sc && m_writeXYEffHistos){
if(sc){
htool->plot2D( state.x(),state.y() ,m_title+"/XYZ9000_Ghosts", "XYZ9000_Ghosts",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/XYZ2485_Ghosts", "XYZ2485_Ghosts",-1000,1000.,-1000.,1000.0,100,100);
}
......@@ -151,7 +147,7 @@ void PrCounter2::initEvent(const IHistoTool* htool = NULL, const int nPV = 0){
htool->plot2D(track->pseudoRapidity(),track->p(),m_title+"/EtaP_Total","EtaP_Total",0.,7.,0.,100000.,20, 20);
htool->plot2D(track->pseudoRapidity(),track->momentum().Phi(),m_title+"/EtaPhi_Total","EtaPhi_Total",0.,7.,-3.142,3.142,20,20);
}
if(sc && m_writeXYEffHistos){
if(sc ){
htool->plot2D( state.x(),state.y() ,m_title+"/XYZ9000_Total", "XYZ9000_Total",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/XYZ2485_Total", "XYZ2485_Total",-1000,1000.,-1000.,1000.0,100,100);
}
......@@ -169,7 +165,7 @@ void PrCounter2::initEvent(const IHistoTool* htool = NULL, const int nPV = 0){
htool->plot1D(track->p(),m_title+"/P_Ghosts_P>3GeV_Pt>0.5GeV","P_Ghosts_P>3GeV_Pt>0.5GeV",0.,100000.,50);
htool->plot2D(track->pseudoRapidity(),track->p(),m_title+"/EtaP_Ghosts_P>3GeV_Pt>0.5GeV","EtaP_Ghosts_P>3GeV_Pt>0.5GeV",0.,7.,0.,100000.,20, 20);
htool->plot2D(track->pseudoRapidity(),track->momentum().Phi(),m_title+"/EtaPhi_Ghosts_P>3GeV_Pt>0.5GeV","EtaPhi_Ghosts_P>3GeV_Pt>0.5GeV",0.,7.,-3.142,3.142,20,20);
if(sc && m_writeXYEffHistos){
if(sc ){
htool->plot2D( state.x(),state.y() ,m_title+"/XYZ9000_Ghosts_P>3GeV_Pt>0.5GeV", "XYZ9000_Ghosts_P>3GeV_Pt>0.5GeV",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/XYZ2485_Ghosts_P>3GeV_Pt>0.5GeV", "XYZ2485_Ghosts_P>3GeV_Pt>0.5GeV",-1000,1000.,-1000.,1000.0,100,100);
}
......@@ -183,7 +179,7 @@ void PrCounter2::initEvent(const IHistoTool* htool = NULL, const int nPV = 0){
htool->plot1D(track->p(),m_title+"/P_Total_P>3GeV_Pt>0.5GeV","P_Total_P>3GeV_Pt>0.5GeV",0.,100000.,50);
htool->plot2D(track->pseudoRapidity(),track->p(),m_title+"/EtaP_Total_P>3GeV_Pt>0.5GeV","EtaP_Ghosts_P>3GeV_Pt>0.5GeV",0.,7.,0.,100000.,20, 20);
htool->plot2D(track->pseudoRapidity(),track->momentum().Phi(),m_title+"/EtaPhi_Total_P>3GeV_Pt>0.5GeV","EtaPhi_Total_P>3GeV_Pt>0.5GeV",0.,7.,-3.142,3.142,20,20);
if(sc && m_writeXYEffHistos){
if(sc ){
htool->plot2D( state.x(),state.y() ,m_title+"/XYZ9000_Total_P>3GeV_Pt>0.5GeV", "XYZ9000_Total_P>3GeV_Pt>0.5GeV",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/XYZ2485_Total_P>3GeV_Pt>0.5GeV", "XYZ2485_Total_P>3GeV_Pt>0.5GeV",-1000,1000.,-1000.,1000.0,100,100);
}
......@@ -272,29 +268,18 @@ int PrCounter2::countAndPlot(const IHistoTool* htool,const LHCb::MCParticle* par
}
}
}
// std::cout << "title"<< m_title<< std::endl;
unsigned int maxRecHits = 0.;
for ( unsigned int kk = 0; flags.size() > kk; ++kk ) {
if ( flags[kk] ) {
m_wanted[kk] ++;
//if(kk==0 && flags[0] && m_printparticlekey){std::cout << " long key wanted"<< part->key()<<std::endl;}
//if(kk==0 && flags[0] && (std::strcmp("m_title","titletest")==0)){std::cout << "test long key wanted"<< part->key()<<std::endl;}
// std::cout << "PrChecker key "<< part->key()<<std:: endl;
if ( found ) {
//std::cout << "PrChecker key "<< part->key()<<std:: endl;
m_counted[kk]++;
m_clone[kk] += clone;
for ( InvIterator it = trackList.begin(); trackList.end() != it; ++it ) {
const LHCb::Track* tr = it->to();
if ( (m_trackType!=LHCb::Track::TypeUnknown) && (tr->type()!=m_trackType) ) continue;
m_purity[kk] += it->weight();
//std::cout << "weight "<< it->weight()<<std:: endl;
//std::cout << "PrChecker key "<< it->to()->key()<<std:: endl;
//std::cout << "PrChecker key "<< part->key()<<std:: endl;
// std::cout << "PrChecker key "<< LHCb::MCParticle* mcp=trackList.begin()->to()<<std:: endl;
unsigned int nbMeas = 0;
unsigned int nbMeas = 0;
for ( std::vector<LHCb::LHCbID>::const_iterator itId = tr->lhcbIDs().begin();
tr->lhcbIDs().end() != itId; ++itId ) {
if ( std::find( ids.begin(), ids.end(), *itId ) == ids.end() ) continue;
......@@ -316,8 +301,7 @@ int PrCounter2::countAndPlot(const IHistoTool* htool,const LHCb::MCParticle* par
}
}
//std::cout << "PrChecker key "<< part->key()<<std:: endl;
double prodx = part->originVertex()->position().X();
double prody = part->originVertex()->position().Y();
double docaz = -100.0;
......@@ -364,28 +348,22 @@ int PrCounter2::countAndPlot(const IHistoTool* htool,const LHCb::MCParticle* par
htool->plot1D(PVz,m_title+"/"+m_name[k]+"_PVz_reconstructible",m_name[k]+"_PVz_reconstructible",-200.,200.,50);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_reconstructible",m_name[k]+"_EtaP_reconstructible",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_reconstructible",m_name[k]+"_EtaPhi_reconstructible",0.,7.,-3.142,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_reconstructible", "XYZ9000_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_reconstructible", "XYZ2485_reconstructible",-1000,1000.,-1000.,1000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_reconstructible", "XYZ9000_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_reconstructible", "XYZ2485_reconstructible",-1000,1000.,-1000.,1000.0,100,100);
if(mcq>0){
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_pos_reconstructible",m_name[k]+"_Eta_pos_reconstructible",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_pos_reconstructible",m_name[k]+"_Phi_pos_reconstructible",-3.142,3.142,25);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_pos_reconstructible",m_name[k]+"_EtaP_pos_reconstructible",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_pos_reconstructible",m_name[k]+"_EtaPhi_pos_reconstructible",0.,7.,-3.142,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_pos_reconstructible", "XYZ9000_pos_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_pos_reconstructible", "XYZ2485_pos_reconstructible",-1000,1000.,-1000.,1000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_pos_reconstructible", "XYZ9000_pos_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_pos_reconstructible", "XYZ2485_pos_reconstructible",-1000,1000.,-1000.,1000.0,100,100);
}else{
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_neg_reconstructible",m_name[k]+"_Eta_neg_reconstructible",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_neg_reconstructible",m_name[k]+"_Phi_neg_reconstructible",-3.142,3.142,25);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_neg_reconstructible",m_name[k]+"_EtaP_neg_reconstructible",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_neg_reconstructible",m_name[k]+"_EtaPhi_neg_reconstructible",0.,7.,-3.142,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_neg_reconstructible", "XYZ900_neg_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_neg_reconstructible", "XYZ2485_neg_reconstructible",-1000,1000.,-1000.,1000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_neg_reconstructible", "XYZ900_neg_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_neg_reconstructible", "XYZ2485_neg_reconstructible",-1000,1000.,-1000.,1000.0,100,100);
}
}
if ( !found ) continue;
......@@ -409,29 +387,22 @@ int PrCounter2::countAndPlot(const IHistoTool* htool,const LHCb::MCParticle* par
htool->plot1D(PVz,m_title+"/"+m_name[k]+"_PVz_reconstructed",m_name[k]+"_PVz_reconstructed",-200.,200.,50);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_reconstructed",m_name[k]+"_EtaP_reconstructed",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_reconstructed",m_name[k]+"_EtaPhi_reconstructed",0.,7.,-3.142,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_reconstructed", "XYZ9000_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_reconstructed", "XYZ2485_reconstructed",-1000,1000.,-1000.,1000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_reconstructed", "XYZ9000_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_reconstructed", "XYZ2485_reconstructed",-1000,1000.,-1000.,1000.0,100,100);
if(mcq>0){
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_pos_reconstructed",m_name[k]+"_Eta_pos_reconstructed",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_pos_reconstructed",m_name[k]+"_Phi_pos_reconstructed",-3.142,3.142,25);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_pos_reconstructed",m_name[k]+"_EtaP_pos_reconstructed",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_pos_reconstructed",m_name[k]+"_EtaPhi_pos_reconstructed",0.,7.,-3.142,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_pos_reconstructed", "XYZ9000_pos_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_pos_reconstructed", "XYZ2485_pos_reconstructed",-1000,1000.,-1000.,1000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_pos_reconstructed", "XYZ9000_pos_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_pos_reconstructed", "XYZ2485_pos_reconstructed",-1000,1000.,-1000.,1000.0,100,100);
}else{
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_neg_reconstructed",m_name[k]+"_Eta_neg_reconstructed",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_neg_reconstructed",m_name[k]+"_Phi_neg_reconstructed",-3.142,3.142,25);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_neg_reconstructed",m_name[k]+"_EtaP_neg_reconstructed",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_neg_reconstructed",m_name[k]+"_EtaPhi_neg_reconstructed",0.,7.,-3.142,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_neg_reconstructed", "XYZ9000_neg_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_neg_reconstructed", "XYZ2485_neg_reconstructed",-1000,1000.,-1000.,1000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_neg_reconstructed", "XYZ9000_neg_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
htool->plot2D( state2.x(),state2.y() ,m_title+"/"+m_name[k]+"XYZ2485_neg_reconstructed", "XYZ2485_neg_reconstructed",-1000,1000.,-1000.,1000.0,100,100);
}
}
}
......@@ -468,7 +439,7 @@ void PrCounter2::printStatistics ( ) {
double purity = 100. * m_purity[kk] / nTot;
double hitEff = 100. * m_hitEff[kk] / nTot;
std::string nameformat = m_name[kk];
std::string blank ( m_titleSize-nameformat.size(), ' ');
std::string blank ( m_titleSize-(nameformat.size()), ' ');
nameformat = blank + nameformat;
info() << " " << nameformat
<< format( " :%8d from %8d [%5.1f %%] %6d clones [%4.1f %%]",
......
// $Id: $
#ifndef PRCOUNTER2_H
#define PRCOUNTER2_H 1
#ifndef PRCOUNTER_H
#define PRCOUNTER_H 1
// Include files
// from Gaudi
......@@ -12,7 +12,7 @@
#include "PrKernel/IPrCounter.h"
//#include "MCInterfaces/IIdealStateCreator.h"
#include "TrackInterfaces/ITrackExtrapolator.h"
//#include "Event/State.h"
/** @class PrCounter2 PrCounter2.h
* This is a counter for track efficiency measurement.
......@@ -63,8 +63,8 @@ private:
MyAsct* m_link;
const InvTable* m_invTable;
ITrackExtrapolator* m_extrapolator;
//IIdealStateCreator* m_idealStateCreator;
ITrackExtrapolator* m_extrapolator;
//IIdealStateCreator* m_idealStateCreator;
std::string m_title;
unsigned int m_titleSize;
......
......@@ -46,6 +46,7 @@ PrPlotFTHits::PrPlotFTHits( const std::string& name,
declareProperty( "PlotFTHitsOnTrack", m_plotFTHitsOnTrack = true);
declareProperty( "PlotTrackingEfficiency", m_plotTrackingEfficiency = true);
declareProperty( "PlotMCHits", m_plotMCHits = true);
declareProperty( "OnlyLongAndDownForMCHits", m_onlyLongDownForMCHits = true );
}
//=============================================================================
......@@ -593,75 +594,46 @@ void PrPlotFTHits::plotTrackingEfficiency(){
// Plot MC hits belonging to a cluster/hit
//=============================================================================
void PrPlotFTHits::plotMCHits () {
m_ghtool->setHistoDir("Track/PrPlotFTHits/MCHits") ;
LHCb::MCParticles* mcParts = getIfExists<LHCb::MCParticles>( LHCb::MCParticleLocation::Default );
if ( msgLevel( MSG::ERROR ) && !mcParts ) error() << "Could not find MCParticles at: " << LHCb::MCParticleLocation::Default << endmsg;
// -- MC linking
// -- MC linking
LinkedTo<LHCb::MCHit, LHCb::FTCluster> myMCHitLink ( evtSvc(), msgSvc(), LHCb::FTClusterLocation::Default + "2MCHits");
LinkedTo<LHCb::MCParticle, LHCb::FTCluster> myClusterLink ( evtSvc(), msgSvc(), LHCb::FTClusterLocation::Default );
LinkedFrom<LHCb::MCHit,LHCb::MCParticle> myMCHitLink( evtSvc(), msgSvc(), LHCb::MCParticleLocation::Default + "2MC" + "FT" + "Hits");
// -- The association between clusters/hits and MCHits is done in a bit a cumbersome way:
// -- As there exists not direct link (for the moment), the cluster is associated to an MCParticle, the MCHit to an MCParticle
// -- and then the MCHit closest in z to the MCParticle is chosen.
// -- Ideally a LinkerTable would be created between MCHits and FT clusters.
MCTrackInfo trackInfo( evtSvc(), msgSvc() );
for(LHCb::MCParticle* mcPart : *mcParts){
for(unsigned int i = 0; i < m_zone; i++){
// -- Protect against super low momentum tracks.
if( mcPart->p() < 500) continue;
const int layer = i/2;
if(m_excludeElectrons){
if( abs(mcPart->particleID().pid()) == 11 ) continue; // No electrons!
}
char layerName[100];
sprintf(layerName, "Layer%i",layer);
bool isOK = trackInfo.hasT( mcPart ) && (trackInfo.hasTT( mcPart ) || trackInfo.hasVelo( mcPart ));
if( !isOK ) continue;
for(unsigned int i = 0; i < m_zone; i++){
PrHitZone* hitZone = m_ftHitManager->zone( i );
HitRange range = m_ftHitManager->hits(i);
for( HitRange::const_iterator it = range.begin(); it != range.end(); ++it ){
PrHit* hit = *it;
for( const PrHit* hit : hitZone->hits()){
const LHCb::MCParticle* mcPartHit = myClusterLink.first( hit->id().ftID() );
// -- Get the MCParticle matched to the cluster/hit
const LHCb::MCParticle* mcPartHit = myClusterLink.first( hit->id().ftID() );
if( mcPart != mcPartHit) continue;
// -- Get the (first) MCHit matched to the MCParticle
LHCb::MCHit* mcHit = myMCHitLink.first( mcPart );
if(mcHit == nullptr) continue;
char zoneName[100];
sprintf(zoneName, "Zone%i",i);
LHCb::MCHit* bestMCHit = mcHit;
// -- Get the MCHit which is closest to the cluster in z (at maximum 10mm away).
double dist = 10.0;
while( mcHit != nullptr){
if( fabs( mcHit->midPoint().Z() - hit->z(mcHit->midPoint().Y()) ) < dist ){
dist = fabs(mcHit->midPoint().Z() - hit->z(mcHit->midPoint().Y()));
bestMCHit = mcHit;
}
mcHit = myMCHitLink.next();
}
// -- only care about MCHits that belong to long or downstream reconstructible tracks
const bool isOK = trackInfo.hasT( mcPartHit ) && (trackInfo.hasTT( mcPartHit ) || trackInfo.hasVelo( mcPartHit ));
if( m_onlyLongDownForMCHits && !isOK ) continue;
m_histoTool->plot2D( bestMCHit->midPoint().X(), bestMCHit->midPoint().Y(), zoneName,
"mc hits in zones",-3000,3000,-500,500, 6000, 1000);
// -- Get the (first) MCHit matched to the MCParticle
LHCb::MCHit* mcHit = myMCHitLink.first( hit->id().ftID() );
while(mcHit != nullptr){
m_histoTool->plot2D( mcHit->midPoint().X(),mcHit->midPoint().Y(), layerName,
"mc hits in layer",-3200,3200,-3200,3200, 6400, 6400);
mcHit = myMCHitLink.next();
}
}
}
}
//=============================================================================
// Get the PrHit corresponding to the LHCbID
......
......@@ -35,6 +35,7 @@
* - PlotFTHitsOnTrack: Plot all FT hits which belong to a track.
* - PlotTrackingEfficiency: Plot the tracking efficiency in 2D.
* - PlotMCHits: Plot the MC hits belonging to FT hits
* - OnlyLongAndDownForMCHits: Only plot MCHits that belong to long and downstream reconstructible tracks?
*
* Note that this tool needs MCHits and may therfore not run on all input files.
* Furthermore note that the location of MCHits has to be mapped correctly, like:
......@@ -144,6 +145,7 @@ private:
bool m_plotFTHitsOnTrack;
bool m_plotTrackingEfficiency;
bool m_plotMCHits;
bool m_onlyLongDownForMCHits;
......
......@@ -35,12 +35,12 @@ PrTTCounter::PrTTCounter( const std::string& type,
m_extrapolator= NULL;
//m_idealStateCreator= NULL;
m_triggerNumbers = false;
m_writeXYEffHistos = false;
//m_printparticlekey = false;
m_nbGhost = 0.;
m_nbGhostHit = 0.;
m_totTrack = 0;
declareProperty( "TitleSize", m_titleSize = 30 );
m_totTrackTrigger = 0;
m_totGhostTrigger = 0;
declareProperty( "TitleSize", m_titleSize = 40 );
std::string title(name);
while(title.find(".") < title.size()){
......@@ -129,11 +129,12 @@ void PrTTCounter::initEvent (const IHistoTool* htool = NULL) {
htool->plot1D((*itT)->momentum().Phi(),m_title+"/Phi_Ghosts","Phi_Ghosts",-3.142,3.142,25);
htool->plot1D((*itT)->pt(),m_title+"/Pt_Ghosts","Pt_Ghosts",0.,10000.,50);
htool->plot1D((*itT)->p(),m_title+"/P_Ghosts","P_Ghosts",0.,100000.,50);
}
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/XYEff_Ghosts", "XYEff_Ghosts",-3000,3000.,-3000.,3000.0,100,100);
}
}
htool->plot2D((*itT)->pseudoRapidity(),(*itT)->p(),m_title+"/EtaP_Ghosts","EtaP_Ghosts",0.,7.,0.,100000.,20, 20);
htool->plot2D((*itT)->pseudoRapidity(),(*itT)->momentum().Phi(),m_title+"/EtaPhi_Ghosts","EtaPhi_Ghosts",0.,7.,-3.142,3.142,20,20);
}
htool->plot2D( state.x(),state.y() ,m_title+"/XYZ9000_Ghosts", "XYZ9000_Ghosts",-3000,3000.,-3000.,3000.0,100,100);
}
m_nbGhostHit += nbInTT;
}
if(htool && m_writeHistos>0 ){
......@@ -142,34 +143,35 @@ void PrTTCounter::initEvent (const IHistoTool* htool = NULL) {
htool->plot1D((*itT)->momentum().Phi(),m_title+"/Phi_Total","Phi_Total",-3.142,3.142,25);
htool->plot1D((*itT)->pt(),m_title+"/Pt_Total","Pt_Total",0.,10000.,50);
htool->plot1D((*itT)->p(),m_title+"/P_Total","P_Total",0.,100000.,50);
htool->plot2D((*itT)->pseudoRapidity(),(*itT)->p(),m_title+"/EtaP_Total","EtaP_Total",0.,7.,0.,100000.,20, 20);
htool->plot2D((*itT)->pseudoRapidity(),(*itT)->momentum().Phi(),m_title+"/EtaPhi_Total","EtaPhi_Total",0.,7.,-3.142,3.142,20,20);
}
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/XYEff_Total", "XYEff_Total",-3000,3000.,-3000.,3000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/XYZ9000_Total", "XYZ9000_Total",-3000,3000.,-3000.,3000.0,100,100);
}
m_totTrack++;
if(m_triggerNumbers && ((*itT)->type() != LHCb::Track::Velo) && (*itT)->p() > 3000. && (*itT)->pt() > 500.){
if(m_triggerNumbers && ((*itT)->type() != LHCb::Track::Velo) && (*itT)->p() > 3000. && (*itT)->pt() > 500.) {
if ( m_link->direct()->relations( tr ).empty() ){
// m_totGhostTrigger++;
m_totGhostTrigger++;
if(htool && m_writeHistos>0 ){
htool->plot1D((*itT)->pseudoRapidity(),m_title+"/Eta_Ghosts_P>3GeV_Pt>0.5GeV","Eta_Ghosts_P>3GeV_Pt>0.5GeV",0.,7.,50);
htool->plot1D((*itT)->momentum().Phi(),m_title+"/Phi_Ghosts_P>3GeV_Pt>0.5GeV","Phi_Ghosts_P>3GeV_Pt>0.5GeV",-3.142,3.142,25);
htool->plot1D((*itT)->pt(),m_title+"/Pt_Ghosts_P>3GeV_Pt>0.5GeV","Pt_Ghosts_P>3GeV_Pt>0.5GeV",0.,10000.,50);
htool->plot1D((*itT)->p(),m_title+"/P_Ghosts_P>3GeV_Pt>0.5GeV","P_Ghosts_P>3GeV_Pt>0.5GeV",0.,100000.,50);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/XYEff_Ghosts_P>3GeV_Pt>0.5GeV", "XYEff_Ghosts_P>3GeV_Pt>0.5GeV",-3000,3000.,-3000.,3000.0,100,100);
}
htool->plot2D((*itT)->pseudoRapidity(),(*itT)->p(),m_title+"/EtaP_Ghosts_P>3GeV_Pt>0.5GeV","EtaP_Ghosts_P>3GeV_Pt>0.5GeV",0.,7.,0.,100000.,20, 20);
htool->plot2D((*itT)->pseudoRapidity(),(*itT)->momentum().Phi(),m_title+"/EtaPhi_Ghosts_P>3GeV_Pt>0.5GeV","EtaPhi_Ghosts_P>3GeV_Pt>0.5GeV",0.,7.,-3.142,3.142,20,20);
htool->plot2D( state.x(),state.y() ,m_title+"/XYZ9000_Ghosts_P>3GeV_Pt>0.5GeV", "XYEff_Ghosts_P>3GeV_Pt>0.5GeV",-3000,3000.,-3000.,3000.0,100,100);
}
}
if(htool && m_writeHistos>0 ){
htool->plot1D((*itT)->pseudoRapidity(),m_title+"/Eta_Total_P>3GeV_Pt>0.5GeV","Eta_Total_P>3GeV_Pt>0.5GeV",0.,7.,50);
htool->plot1D((*itT)->momentum().Phi(),m_title+"/Phi_Total_P>3GeV_Pt>0.5GeV","Phi_Total_P>3GeV_Pt>0.5GeV",-3.142,3.142,25);
htool->plot1D((*itT)->pt(),m_title+"/Pt_Total_P>3GeV_Pt>0.5GeV","Pt_Total_P>3GeV_Pt>0.5GeV",0.,10000.,50);
htool->plot1D((*itT)->p(),m_title+"/P_Total_P>3GeV_Pt>0.5GeV","P_Total_P>3GeV_Pt>0.5GeV",0.,100000.,50);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/XYEff__Total_P>3GeV_Pt>0.5GeV", "XYEff_Total_P>3GeV_Pt>0.5GeV",-3000,3000.,-3000.,3000.0,100,100);
htool->plot1D((*itT)->p(),m_title+"/P_Total_P>3GeV_Pt>0.5GeV","P_Total_P>3GeV_Pt>0.5GeV",0.,100000.,50);
htool->plot2D((*itT)->pseudoRapidity(),(*itT)->p(),m_title+"/EtaP_Total_P>3GeV_Pt>0.5GeV","EtaP_Ghosts_P>3GeV_Pt>0.5GeV",0.,7.,0.,100000.,20, 20);
htool->plot2D((*itT)->pseudoRapidity(),(*itT)->momentum().Phi(),m_title+"/EtaPhi_Total_P>3GeV_Pt>0.5GeV","EtaPhi_Total_P>3GeV_Pt>0.5GeV",0.,7.,-3.142,3.142,20,20);
htool->plot2D( state.x(),state.y() ,m_title+"/XYZ9000_Total_P>3GeV_Pt>0.5GeV", "XYZ9000_Total_P>3GeV_Pt>0.5GeV",-3000,3000.,-3000.,3000.0,100,100);
}
}
m_totTrackTrigger++;
}
}//end track loop
}//end initialize event
......@@ -283,29 +285,25 @@ int PrTTCounter::countAndPlot(const IHistoTool* htool, const LHCb::MCParticle* p
htool->plot1D(part->momentum().Pt(),m_title+"/"+m_name[k]+"_Pt_reconstructible",m_name[k]+"_Pt_reconstructible",0.,10000.,50);
htool->plot1D(part->momentum().P(),m_title+"/"+m_name[k]+"_P_reconstructible",m_name[k]+"_P_reconstructible",0.,100000.,50);
if(m_writeHistos>1){
htool->plot1D(nbTrack,m_title+"/"+m_name[k]+"_expectedHits_reconstructible",m_name[k]+"_expectedHits_reconstructible",-0.5,20.5,21);
htool->plot1D(nbTrack,m_title+"/"+m_name[k]+"_expectedHits_reconstructible",m_name[k]+"_expectedHits_reconstructible",-0.5,20.5,21);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_reconstructible",m_name[k]+"_EtaP_reconstructible",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_reconstructible",m_name[k]+"_EtaPhi_reconstructible",0.,7.,-3.241,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYEff_reconstructible", "XYEff_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_reconstructible", "XYZ9000_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
if(mcq>0){
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_pos_reconstructible",m_name[k]+"_Eta_pos_reconstructible",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_pos_reconstructible",m_name[k]+"_Phi_pos_reconstructible",-3.142,3.142,25);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_pos_reconstructible",m_name[k]+"_EtaP_pos_reconstructible",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_pos_reconstructible",m_name[k]+"_EtaPhi_pos_reconstructible",0.,7.,-3.241,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYEff_pos_reconstructible", "XYEff_pos_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_pos_reconstructible", "XYZ9000_pos_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
}else{
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_neg_reconstructible",m_name[k]+"_Eta_neg_reconstructible",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_neg_reconstructible",m_name[k]+"_Phi_neg_reconstructible",-3.142,3.142,25);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_neg_reconstructible",m_name[k]+"_EtaP_neg_reconstructible",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_neg_reconstructible",m_name[k]+"_EtaPhi_neg_reconstructible",0.,7.,-3.241,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYEff_neg_reconstructible", "XYEff_neg_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_neg_reconstructible", "XYZ9000_neg_reconstructible",-3000,3000.,-3000.,3000.0,100,100);
}
}
if( !shallIPlotTheHistograms[k] ) continue;
//if ( !found ) continue;
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_reconstructed",m_name[k]+"_Eta_reconstructed",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_reconstructed",m_name[k]+"_Phi_reconstructed",-3.142,3.142,25);
htool->plot1D(part->momentum().Pt(),m_title+"/"+m_name[k]+"_Pt_reconstructed",m_name[k]+"_Pt_reconstructed",0.,10000.,50);
......@@ -321,25 +319,22 @@ int PrTTCounter::countAndPlot(const IHistoTool* htool, const LHCb::MCParticle* p
htool->plot1D(nbTrack,m_title+"/"+m_name[k]+"_expectedHits_reconstructed",m_name[k]+"_expectedHits_reconstructed",-0.5,20.5,21);
htool->plot1D(maxRecHits,m_title+"/"+m_name[k]+"_reconstructedHits",m_name[k]+"_reconstructedHits",-0.5,20.5,21);
htool->plot1D(maxRecHits/nbTrack,m_title+"/"+m_name[k]+"_HitEff",m_name[k]+"_HitEff",0.0,1.1,50);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_reconstructed",m_name[k]+"_EtaP_reconstructed",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_reconstructed",m_name[k]+"_EtaPhi_reconstructed",0.,7.,-3.241,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYEff_reconstructed", "XYEff_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_reconstructed", "XYZ9000_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
if(mcq>0){
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_pos_reconstructed",m_name[k]+"_Eta_pos_reconstructed",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_pos_reconstructed",m_name[k]+"_Phi_pos_reconstructed",-3.142,3.142,25);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_pos_reconstructed",m_name[k]+"_EtaP_pos_reconstructed",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_pos_reconstructed",m_name[k]+"_EtaPhi_pos_reconstructed",0.,7.,-3.241,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYEff_pos_reconstructed", "XYEff_pos_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_pos_reconstructed", "XYZ9000_pos_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
}else{
htool->plot1D(part->momentum().Eta(),m_title+"/"+m_name[k]+"_Eta_neg_reconstructed",m_name[k]+"_Eta_neg_reconstructed",0.,7.,50);
htool->plot1D(part->momentum().Phi(),m_title+"/"+m_name[k]+"_Phi_neg_reconstructed",m_name[k]+"_Phi_neg_reconstructed",-3.142,3.142,25);
htool->plot2D(part->momentum().Eta(),part->momentum().P(),m_title+"/"+m_name[k]+"_EtaP_neg_reconstructed",m_name[k]+"_EtaP_neg_reconstructed",0.,7.,0.,100000.,20, 20);
htool->plot2D(part->momentum().Eta(),part->momentum().Phi(),m_title+"/"+m_name[k]+"_EtaPhi_neg_reconstructed",m_name[k]+"_EtaPhi_neg_reconstructed",0.,7.,-3.241,3.142,20,20);
if(m_writeXYEffHistos){
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYEff_neg_reconstructed", "XYEff_neg_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
}
htool->plot2D( state.x(),state.y() ,m_title+"/"+m_name[k]+"XYZ9000_neg_reconstructed", "XYZ9000_neg_reconstructed",-3000,3000.,-3000.,3000.0,100,100);
}
}
}
......@@ -352,43 +347,62 @@ int PrTTCounter::countAndPlot(const IHistoTool* htool, const LHCb::MCParticle* p
void PrTTCounter::printStatistics ( ) {
if ( m_totTrack == 0 ) return;
m_title.resize( m_titleSize, ' ' );
std::string strigger = "for P>3GeV,Pt>0.5GeV";
strigger.resize( m_titleSize, ' ' );
info() << "++++ TT Efficiency for " << m_container << " ++++ ";
info() << "**** TT Efficiency for " << m_container << " **** ";
if ( 0 != m_nbGhost ) {
double bad = m_nbGhostHit / m_nbGhost;
info() << "\33[1;36m" << format( "%6.0f ghost, %5.2f TT per track", m_nbGhost, bad );
info() << format( "%6.0f ghost, %5.2f TT per track", m_nbGhost, bad )<< endmsg;
}
info() << "\33[0m" << endmsg;
if(m_triggerNumbers) info() << "**** " << strigger
<< format( "%7d tracks including %7d ghosts [%4.1f %%] ****",
m_totTrackTrigger, m_totGhostTrigger, 100.*m_totGhostTrigger/m_totTrackTrigger ) << endmsg;
for ( unsigned int kk = 0; m_name.size() > kk; ++kk ) {
if ( 0.5 > m_nbTrack[kk] ) continue;
double eff = 0.;
double fraceff = 0.;
double bad = 0.;
double fracbad = 0.;
double meanHits = 0.;
if ( 0.5 < m_nbTrack[kk] ) {
meanHits = m_mcHits[kk] / m_nbTrack[kk];
eff = m_foundOK[kk] / m_nbTrack[kk];
fraceff = 100. * eff / meanHits;
bad = m_wrong[kk] / m_nbTrack[kk];
}
fracbad = 100. *bad / (eff+bad);
}
double eff3 = 0.;
double fraceff3 = 0.;
double bad3 = 0.;
double fracbad3 = 0.;
double meanHits3 = 0.;
if ( 0.5 < m_nbTrack3[kk] ) {
if ( 0.5 < m_nbTrack3[kk] ) {
meanHits3 = m_mcHits3[kk] / m_nbTrack3[kk];
eff3 = m_foundOK3[kk] / m_nbTrack3[kk];
fraceff3 = 100. *eff3 / meanHits3;
bad3 = m_wrong3[kk] / m_nbTrack3[kk];
}
fracbad3 = 100. *bad3 / (eff3+bad3);
}
std::string nameformat = m_name[kk];
std::string blank ( m_titleSize-nameformat.size(), ' ');
std::string nameformat2 = m_name[kk];
std::string blank ( m_titleSize-(nameformat.size()), ' ');
std::string blank2 ( m_titleSize-(nameformat.size()+5.0), ' ');
nameformat2 = blank2 + nameformat;
nameformat = blank + nameformat;
info() << " " << nameformat //m_name[kk]
<< format( " :%6.0f tr %5.2f mcTT, OK%5.2f wrong%5.2f",
m_nbTrack[kk], meanHits, eff, bad);
info() << format( " %6.0f tr>3TT %5.2f mcTT, OK%5.2f wrong %5.2f",
m_nbTrack3[kk], meanHits3, eff3, bad3) << endmsg;
info() << " " << nameformat
<< format( " :%6.0f tr %5.2f from %5.2f mcTT [%5.1f %%] %5.2f ghost hits on real tracks [%4.1f %%]",
m_nbTrack[kk], eff, meanHits, fraceff, bad, fracbad) << endmsg;
info() << " " << nameformat2+" >3TT"
<< format( " :%6.0f tr %5.2f from %5.2f mcTT [%5.1f %%] %5.2f ghost hits on real tracks [%4.1f %%]",
m_nbTrack3[kk], eff3, meanHits3, fraceff3, bad3, fracbad3 ) << endmsg;
}
info() << endmsg;
}
//=============================================================================
......@@ -24,8 +24,8 @@ public:
/// Standard constructor
PrTTCounter( const std::string& type,
const std::string& name,
const IInterface* parent);
const std::string& name,
const IInterface* parent);
virtual ~PrTTCounter( ); ///< Destructor
virtual StatusCode finalize();
......@@ -36,8 +36,7 @@ public:
std::vector<bool> flags,
std::vector<LHCb::LHCbID>& ids );
//void setContainer( std::string name ) { m_container = name; }
void addSelection ( std::string name, bool writeHisto );
void printStatistics();
......@@ -50,30 +49,33 @@ private:
typedef InvTable::Range InvRange;
typedef InvTable::iterator InvIterator;
//std::string m_container;
TrackAsct* m_link;
TrackAsct* m_link;
const InvTable* m_invTable;
bool m_validData;
std::string m_title;
unsigned int m_titleSize;
ITrackExtrapolator* m_extrapolator;
//IIdealStateCreator* m_idealStateCreator;
std::string m_title;
unsigned int m_titleSize;
double m_nbGhost;
double m_nbGhostHit;
int m_totTrack;
bool m_validData;
double m_nbGhost;
double m_nbGhostHit;
int m_totTrack;
int m_totTrackTrigger; ///< Total number of tracks processed
int m_totGhostTrigger;
std::vector<std::string> m_name; ///< Name of the sub-counters
std::vector<bool> m_writeHisto; ///< Make histograms for this container
std::vector<double> m_nbTrack;
std::vector<double> m_mcHits; ///< Nb of MC hits on tracks
std::vector<double> m_foundOK; ///< Nb of correct hits
std::vector<double> m_wrong; ///< Nb of wrong ones
std::vector<double> m_nbTrack3;
std::vector<double> m_mcHits3; ///< Nb of MC hits on tracks with >= 3 TT hits
std::vector<double> m_foundOK3; ///< Nb of correct hits 3 TT hits
std::vector<double> m_wrong3; ///< Nb of wrong ones 3 TT hits
std::vector<double> m_nbTrack;
std::vector<double> m_mcHits; ///< Nb of MC hits on tracks
std::vector<double> m_foundOK; ///< Nb of correct hits
std::vector<double> m_wrong; ///< Nb of wrong ones
std::vector<double> m_nbTrack3;
std::vector<double> m_mcHits3; ///< Nb of MC hits on tracks with >= 3 TT hits
std::vector<double> m_foundOK3; ///< Nb of correct hits 3 TT hits
std::vector<double> m_wrong3; ///< Nb of wrong ones 3 TT hits
};
#endif // PRTTCOUNTER_H
################################################################################
# Package: ChargedProtoANNPID
################################################################################
gaudi_subdir(ChargedProtoANNPID v2r8)
gaudi_subdir(ChargedProtoANNPID v2r9)
gaudi_depends_on_subdirs(Event/MCEvent
Event/PhysEvent
......@@ -9,14 +9,13 @@ gaudi_depends_on_subdirs(Event/MCEvent
GaudiAlg
Rec/RecInterfaces)
find_package(NeuroBayesExpert)
if(NEUROBAYESEXPERT_FOUND)
add_definitions(-D_ENABLE_NEUROBAYES)
include_directories(${NEUROBAYESEXPERT_INCLUDE_DIRS})
else()
message(WARNING "Not using NeuroBayesExpert")
endif()
#find_package(NeuroBayesExpert)
#if(NEUROBAYESEXPERT_FOUND)
# add_definitions(-D_ENABLE_NEUROBAYES)
# include_directories(${NEUROBAYESEXPERT_INCLUDE_DIRS})
#else()
# message(WARNING "Not using NeuroBayesExpert")
#endif()
find_package(ROOT COMPONENTS TMVA)
......@@ -25,8 +24,8 @@ gaudi_add_module(ChargedProtoANNPID
INCLUDE_DIRS ROOT Rec/RecInterfaces
LINK_LIBRARIES ROOT MCEvent PhysEvent RecEvent GaudiAlgLib)
if(NEUROBAYESEXPERT_FOUND)
target_link_libraries(ChargedProtoANNPID ${NEUROBAYESEXPERT_LIBRARIES})
endif()
#if(NEUROBAYESEXPERT_FOUND)
# target_link_libraries(ChargedProtoANNPID ${NEUROBAYESEXPERT_LIBRARIES})
#endif()
gaudi_install_python_modules()
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