diff --git a/include/JetBranches.h b/include/JetBranches.h index 5af2d35..eaf1e1a 100644 --- a/include/JetBranches.h +++ b/include/JetBranches.h @@ -158,6 +158,8 @@ class JetBranches : public CollectionBranches float _daughters_trackOmega[ LCT_JET_MAX ][ LCT_JET_PARTICLES_MAX ] {} ; /* PFOs track Omega */ float _daughters_trackZ0[ LCT_JET_MAX ][ LCT_JET_PARTICLES_MAX ] {} ; /* PFOs track Z0 */ float _daughters_trackTanLambda[ LCT_JET_MAX ][ LCT_JET_PARTICLES_MAX ] {} ; /* PFOs track TanLambda */ + float _daughters_trackSigmaD0[ LCT_JET_MAX ][ LCT_JET_PARTICLES_MAX ] {} ; // error on d0 from cov matrix + float _daughters_trackSigmaZ0[ LCT_JET_MAX ][ LCT_JET_PARTICLES_MAX ] {} ; // error on Z0 from cov matrix }; /* ----- end of class JetBranches ----- */ diff --git a/include/LCTuple.h b/include/LCTuple.h index d3c80f1..3724bc6 100644 --- a/include/LCTuple.h +++ b/include/LCTuple.h @@ -151,4 +151,4 @@ class LCTuple : public Processor { std::vector _pidBranchDefs {} ; } ; -#endif +#endif \ No newline at end of file diff --git a/include/LCTupleConf.h b/include/LCTupleConf.h index b960b7d..9747dae 100644 --- a/include/LCTupleConf.h +++ b/include/LCTupleConf.h @@ -22,25 +22,25 @@ struct CollID : public lcrtrel::LCIntExtension {} ; // => ADJUST AS NEEDED !!!!!! // ================================================================= -#define LCT_COLLENTRIES_MAX 1000000 -#define LCT_MCPARTICLE_MAX 1000000 -#define LCT_RECOPARTICLE_MAX 500000 -#define LCT_TRACK_MAX 1200000 -#define LCT_TRACKSTATE_MAX 4000000 -#define LCT_CLUSTER_MAX 500000 -#define LCT_RELATION_MAX 6000000 -#define LCT_SIMTRACKERHIT_MAX 6000000 -#define LCT_TRACKERHIT_MAX 3000000 -#define LCT_TRACKERRAWHIT_MAX 10000000 -#define LCT_SIMCALORIMETERHIT_MAX 5000000 -#define LCT_CALORIMETERHIT_MAX 1000000 -#define LCT_PARTICLEID_MAX 1000000 -#define LCT_VERTEX_MAX 1000 -#define LCT_JET_MAX 200 -#define LCT_JET_PARTICLES_MAX 200 -#define LCT_ISOLEP_MAX 100000 - -#define LCT_STRING_MAX 1024 +#define LCT_COLLENTRIES_MAX 1000000 +#define LCT_MCPARTICLE_MAX 1000000 +#define LCT_RECOPARTICLE_MAX 500000 +#define LCT_TRACK_MAX 1500000 +#define LCT_TRACKSTATE_MAX 100000 +#define LCT_CLUSTER_MAX 500000 +#define LCT_RELATION_MAX 1000000 +#define LCT_SIMTRACKERHIT_MAX 2000000 +#define LCT_TRACKERHIT_MAX 3000000 +#define LCT_TRACKERRAWHIT_MAX 5000000 +#define LCT_SIMCALORIMETERHIT_MAX 3000000 +#define LCT_CALORIMETERHIT_MAX 2000000 +#define LCT_PARTICLEID_MAX 1000000 +#define LCT_VERTEX_MAX 1000 +#define LCT_JET_MAX 200 +#define LCT_JET_PARTICLES_MAX 200 +#define LCT_ISOLEP_MAX 100000 + +#define LCT_STRING_MAX 1024 #define LCT_PARAMETERS_MAX 1000 #define LCT_PARAMVALS_MAX 50 diff --git a/include/SimCalorimeterHitBranches.h b/include/SimCalorimeterHitBranches.h index d0138d5..7f91992 100644 --- a/include/SimCalorimeterHitBranches.h +++ b/include/SimCalorimeterHitBranches.h @@ -45,7 +45,7 @@ class SimCalorimeterHitBranches : public CollectionBranches { float _scpoz[ LCT_SIMCALORIMETERHIT_MAX ] {} ; float _scene[ LCT_SIMCALORIMETERHIT_MAX ] {} ; int _scmcc[ LCT_SIMCALORIMETERHIT_MAX ] {} ; - float _sctim[ LCT_SIMCALORIMETERHIT_MAX ][ 100 ] {} ; + float _sctim[ LCT_SIMCALORIMETERHIT_MAX ][ 50 ] {} ; } ; diff --git a/include/TrackBranches.h b/include/TrackBranches.h index be5ca9f..fad6374 100644 --- a/include/TrackBranches.h +++ b/include/TrackBranches.h @@ -98,7 +98,4 @@ class TrackBranches : public CollectionBranches { } ; -#endif - - - +#endif \ No newline at end of file diff --git a/include/VertexBranches.h b/include/VertexBranches.h index 027357b..5ad1712 100644 --- a/include/VertexBranches.h +++ b/include/VertexBranches.h @@ -42,6 +42,7 @@ class VertexBranches : public CollectionBranches { float _vtcov[ LCT_VERTEX_MAX ][6] {} ; float _vtpar[ LCT_VERTEX_MAX ][6] {} ; //arbitrary value -- has to be checked if enough fields + float _vttrchi[LCT_VERTEX_MAX][30] {} ; } ; #endif diff --git a/src/JetBranches.cc b/src/JetBranches.cc index be243b8..3d0c674 100644 --- a/src/JetBranches.cc +++ b/src/JetBranches.cc @@ -107,6 +107,8 @@ void JetBranches::initBranches( TTree* tree, const std::string& pre){ tree->Branch( (pre+"daughters_trackOmega").c_str(), _daughters_trackOmega , (pre+"daughters_trackOmega["+pre+"njet][200]/F").c_str() ) ; tree->Branch( (pre+"daughters_trackZ0").c_str(), _daughters_trackZ0 , (pre+"daughters_trackZ0["+pre+"njet][200]/F").c_str() ) ; tree->Branch( (pre+"daughters_trackTanLambda").c_str(), _daughters_trackTanLambda , (pre+"daughters_trackTanLambda["+pre+"njet][200]/F").c_str() ) ; + tree->Branch( (pre+"daughters_trackSigmaD0").c_str(), _daughters_trackSigmaD0 , (pre+"daughters_trackSigmaD0["+pre+"njet][200]/F").c_str() ) ; + tree->Branch( (pre+"daughters_trackSigmaZ0").c_str(), _daughters_trackSigmaZ0 , (pre+"daughters_trackSigmaZ0["+pre+"njet][200]/F").c_str() ) ; } @@ -310,12 +312,14 @@ void JetBranches::fill(const EVENT::LCCollection* col, EVENT::LCEvent* evt ) auto tracks = particles[partid]->getTracks(); - if (tracks.size()>0) { + if (tracks.size()>0 && tracks[0] != NULL) { _daughters_trackD0[ i ][ partid ] = tracks[0]->getD0(); _daughters_trackPhi[ i ][ partid ] = tracks[0]->getPhi(); _daughters_trackOmega[ i ][ partid ] = tracks[0]->getOmega(); _daughters_trackZ0[ i ][ partid ] = tracks[0]->getZ0(); _daughters_trackTanLambda[ i ][ partid ] = tracks[0]->getTanLambda(); + _daughters_trackSigmaD0[ i ][ partid ] = tracks[0]->getCovMatrix()[0]; + _daughters_trackSigmaZ0[ i ][ partid ] = tracks[0]->getCovMatrix()[2]; } } diff --git a/src/LCTuple.cc b/src/LCTuple.cc index 91c1a69..60a493a 100644 --- a/src/LCTuple.cc +++ b/src/LCTuple.cc @@ -701,4 +701,4 @@ void LCTuple::decodePIDBranchDefinitions(){ } streamlog_out( DEBUG5 ) << std::endl ; } -} +} \ No newline at end of file diff --git a/src/MCParticleBranches.cc b/src/MCParticleBranches.cc index f7088c5..97a565a 100644 --- a/src/MCParticleBranches.cc +++ b/src/MCParticleBranches.cc @@ -66,11 +66,14 @@ void MCParticleBranches::fill(const EVENT::LCCollection* col, EVENT::LCEvent* ev if (_writeparameters) CollectionBranches::fill(col, evt); _nmc = col->getNumberOfElements() ; - + int nmax = 500; + if(_nmc > nmax) _nmc = nmax; + for(int i=0 ; i < _nmc ; ++i){ lcio::MCParticle* mcp = static_cast( col->getElementAt(i) ) ; + _mcori[i] = mcp->ext(); _mcpdg[ i ] = mcp->getPDG() ; @@ -111,5 +114,7 @@ void MCParticleBranches::fill(const EVENT::LCCollection* col, EVENT::LCEvent* ev _mcda3[ i ] = ( p1.size() > 3 ? p1[3]->ext() - 1 : -1 ) ; _mcda4[ i ] = ( p1.size() > 4 ? p1[4]->ext() - 1 : -1 ) ; + } + } diff --git a/src/SimCalorimeterHitBranches.cc b/src/SimCalorimeterHitBranches.cc index 087eee4..1d5156e 100644 --- a/src/SimCalorimeterHitBranches.cc +++ b/src/SimCalorimeterHitBranches.cc @@ -31,7 +31,7 @@ void SimCalorimeterHitBranches::initBranches( TTree* tree, const std::string& pr tree->Branch( (pre+"scpoz").c_str() , _scpoz , (pre+"scpoz["+pre+"nsch]/F").c_str() ) ; tree->Branch( (pre+"scene").c_str() , _scene , (pre+"scene["+pre+"nsch]/F").c_str() ) ; tree->Branch( (pre+"scmcc").c_str() , _scmcc , (pre+"scmcc["+pre+"nsch]/I").c_str() ) ; - tree->Branch( (pre+"sctim").c_str() , _sctim , (pre+"sctim["+pre+"nsch][100]/F").c_str() ) ; + tree->Branch( (pre+"sctim").c_str() , _sctim , (pre+"sctim["+pre+"nsch][50]/F").c_str() ) ; } diff --git a/src/TrackBranches.cc b/src/TrackBranches.cc index 3c0ec05..3a2de96 100644 --- a/src/TrackBranches.cc +++ b/src/TrackBranches.cc @@ -228,4 +228,4 @@ void TrackBranches::fill(const EVENT::LCCollection* col, EVENT::LCEvent* evt ){ } } } -} +} \ No newline at end of file diff --git a/src/VertexBranches.cc b/src/VertexBranches.cc index 26e9c4b..76924ef 100644 --- a/src/VertexBranches.cc +++ b/src/VertexBranches.cc @@ -31,6 +31,7 @@ void VertexBranches::initBranches( TTree* tree, const std::string& pre){ tree->Branch( (pre+"vtprb").c_str() , _vtprb , (pre+"vtprb["+pre+"nvt]/F").c_str() ) ; tree->Branch( (pre+"vtcov").c_str() , _vtcov , (pre+"vtcov["+pre+"nvt][6]/F").c_str() ) ; tree->Branch( (pre+"vtpar").c_str() , _vtpar , (pre+"vtpar["+pre+"nvt][6]/F").c_str() ) ; + tree->Branch( (pre+"vttrchi").c_str() , _vttrchi , (pre+"vttrchi["+pre+"nvt][30]/F").c_str() ) ; } @@ -60,6 +61,12 @@ void VertexBranches::fill(const EVENT::LCCollection* col, EVENT::LCEvent* evt ){ _vtprb[i] = vtx->getProbability(); for(int j=0; j<6 ; ++j) _vtcov[ i ][ j ] = vtx->getCovMatrix()[j] ; // for(int j=0; j<6 ; ++j) _vtpar[ i ][ j ] = vtx->getParameters()[j] ; + + // additional parameters: chi2 of each track + EVENT::FloatVec tracksChi = vtx->getParameters(); + for(unsigned int j = 0; j < tracksChi.size(); j++){ + _vttrchi[i][j] = tracksChi[j]; + } } }