Introduction
Tracing the upgradation of my analysis package
Upgrading from 1206 to 1303
Biscribing how to ungrage my own analysis code 12.0.6 to 13.0.3. After upgrade, plots are given for validation of code and data comparing.
This upgradation procedure refers to this page
AthenaAwareNTuple and the following log is dedicated to my own code upgradation.
upgrade from 12.0.6 to 13.0.3
algotithm:
1. initialize() ==>CBNT_initialize()
execute() ==>CBNT_execute()
finalize() ==>CBNT_finalize()
2. add
CBNT_clear();
(all defined ntuple item) =0;
(all defined vector )->clear();
3. inherit
public algorithm ==> public CBNT_AthenaAwareBase
4. add
virtual StatusCode clearParticle(); in DoParticle.h
5. remove
StatusCode accessNtuple(); in all files
6. NTuple::Item<long> ==> long
NTuple::Array<double> ==> std::vector<double>*
sc = m_ntuplePtr -> addItem ("ntuple name", variable) or
sc = m_ntuplePtr -> addItem ("ntuple name", vectorlength, vector) ==> addBranch("ntuple name", variable,"ntuple name/type")
this line should be put after definition of toolsvc and analysistool
7. set ntuple vector:
(ntuple variable)[] =xx ==> (ntuple variable)->push_back(xx)
8. TruthParticle: in 13, truthparticle allow you to retrieve mother or child of both type: genparticle or truthparticle.
getChild() ==> genChild(get genparticle child) and child(get truthparticle child);
getGenParticle() ==> genParticle();
(*mcItr)->getMother(iMoth)->pdgId() ==> (*mcItr)->mother(iMoth)->pdgId()
requirement:
1, Particle-01-* ==> Particle-*
use TrackIsolationTool ==> use IsolationTool
use AnalysisRunTime AAA AAA ==> use AnalysisRunTime AtlasAnalysisRunTime-*
2,remove
use ElectronPhotonAlgs
use JetMissingEtAlgs
use ElectronPhotonIDEvent ElectronPhotonIDEvent-00-* PhysicsAnalysis/ElectronPhotonID
use TauIDEvent TauIDEvent-00-* PhysicsAnalysis/TauID
3,add
use ROOT v1 LCG_Interfaces
use tauEvent tauEvent-* Reconstruction
DoParticle.h
1, ElectronPhotonIDEvent ==> egammaEvent
#include "AnalysisTriggerEvent/L1EMTauObjectContainer.h" ==> #include "AnalysisTriggerEvent/EmTau_ROI.h"
Electron:
1. Electron defination has been put in namespace Analysis: Electron==>Analysis::Electron
2. isEM() ==> isem()
parameter(......) ==> my_author = (*m_userParticleContainer)[0]->author();
my_eoverp = (*m_userParticleContainer)[0]->detail<EMTrackMatch>(m_trkMatchContainerName)->EoverP();
my_etcone = (*m_userParticleContainer)[0]->detail<EMShower>(m_showerContainerName)->etcone();
electron->hasTrack==>(electron->detail<EMTrackMatch>(m_trkMatchContainerName)) == NULL
electron->getGennParticle()==>electron->genParticle()
3. add
#include "egammaEvent/egammaParamDefs.h"
#include "egammaEvent/EMShower.h"
#include "egammaEvent/EMTrackMatch.h"
Muon
1. MuonIDEvent/Muon.h ==>muonEvent/Muon.h
MuonIDEvent/MuonContainer.h ==> muonEvent/MuonContainer.h
2. MuonContainer ==> Analysis::MuonContainer
cbndMuon->reconstructedVertex() ==> Muon->origin()
remove
#include NTuple.h INTupleSvc.h, SmartDataPtr.h, SmartDataLocator.h, IDataProviderSvc.h
Plots 1206+1303
- copy my version of 13.0.30-0_2 to 14.0.10 and modify:
- DoMuon.cxx
comment my_hasMuonSpectrometerTrackParticle = (*m_userParticleContainer)[0]->hasMuonSpectrometerTrackParticle();
- AnalysisCommon_jobOptions.py
AuditorSvc.Auditors += [ "ChronoAuditor", "MemStatAuditor"]
- gmake success.
- run job success