17 #include "EVENT/LCIO.h"
45 using namespace EVENT ;
46 using namespace IMPL ;
88 static const std::string _h(
"| Number of elements | Type name | Flag | Is transient | Is default | Is subset |\n");
93 static const std::string _t(
"|--------------------|-----------|-------------|--------------|------------|-----------|\n");
97 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCCollection>& sV){
109 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCCollection> l) {
120 out <<
"Warning: collection not of type " << LCIO::LCCOLLECTION <<
endl ;
143 static const std::string _h(
"| Run number |Event number |Detector name| Time stamp | Weight |\n");
148 static const std::string _t(
"|-------------|-------------|-------------|-------------|-------------|\n");
152 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCEvent>& sV){
164 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCEvent> l) {
175 out <<
"Warning: collection not of type " << LCIO::LCEVENT <<
endl ;
193 out <<
" " <<
"Name: " <<
setw(20) <<
left << *name;
215 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCFlag>& sV){
222 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCFlag> l) {
251 bool isFixedSize =
BitSet32( col->
getFlag() ).test( LCIO::GOBIT_FIXED);
255 header <<
" [ id ] ";
258 header <<
" - isFixedSize: " << ( isFixedSize ?
"true" :
"false" );
261 header <<
" Data.... ";
269 static const std::string _t(
" --------------------------------------------------------\n");
273 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCGenericObject>& sV){
278 for(
int j=0;j<obj->
getNInt();j++){
279 out <<
"i:" << obj->
getIntVal( j ) <<
"; " ;
291 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCGenericObject> l) {
302 out <<
"Warning: collection not of type " << LCIO::LCGENERICOBJECT <<
endl ;
310 sstream <<
dec << hit->
id();
324 static const std::string _h(
"| [ id ] | val0, val1, ...\n");
329 static const std::string _t(
"|------------|----------------\n");
333 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCIntVec>& sV){
337 for(
unsigned int j=0;j< vec->
size();j++){
339 if( j<vec->
size()-1){
342 if( ! ( (j+1) % 10) ){
351 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCIntVec> l) {
362 out <<
"Warning: collection not of type " << LCIO::LCINTVEC <<
endl ;
370 sstream <<
dec << hit->
id();
381 static const std::string _h(
" [ id ] | val0, val1, ...\n");
387 static const std::string _t(
"------------|------------------\n");
391 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCFloatVec>& sV){
395 for(
unsigned int j=0;j< vec->
size();j++){
397 if( j<vec->
size()-1){
400 if( ! ( (j+1) % 10) ){
409 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCFloatVec> ll){
419 out <<
"Warning: collection not of type " << LCIO::LCFLOATVEC <<
endl ;
501 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCObject>& sV){
508 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCObject> l) {
528 sstream <<
dec << hit->
id();
547 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCParameters>& ){
553 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCParameters> l) {
638 static const std::string _h(
"| [from_id ] | [ to_id ] | Weight |\n");
643 static const std::string _t(
"|------------|------------|---------|\n");
647 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCRelation>& sV){
658 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCRelation> ll){
668 out <<
"Warning: collection not of type " << LCIO::LCRELATION <<
endl ;
685 static const std::string _h(
" [ Run number ] | Detector name | Description | Parameters |\n");
690 static const std::string _t(
"----------------|---------------|-------------|------------|\n");
694 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCRunHeader>& sV){
704 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCRunHeader> l) {
715 out <<
"Warning: collection not of type " << LCIO::LCRUNHEADER <<
endl ;
723 sstream <<
dec << hit->
id();
736 static const std::string _h(
"-------------------");
741 static const std::string _t(
"-------------------\n");
745 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::LCIO>& ){
751 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::LCIO> l) {
779 static const std::string _h(
"| Type | PDG | Likelihood |Algorithm type|");
788 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::ParticleID>& sV){
798 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::ParticleID> l) {
809 out <<
"Warning: collection not of type " << LCIO::PARTICLEID <<
endl ;
829 static const std::string _h(
" [ id ] | cellId0 ( M, S, I, J, K) | cellId1 | amplitude | time \n");
834 static const std::string _t(
"------------|---------------------------|----------|-----------|-------\n");
838 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::RawCalorimeterHit>& sV){
852 out <<
endl <<
" id-fields: ("<< id(hit).valueString() <<
")" <<
std::endl ;
855 out <<
endl <<
" id-fields: --- unknown/default ---- ";
861 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::RawCalorimeterHit> l) {
872 out <<
"Warning: collection not of type " << LCIO::RAWCALORIMETERHIT <<
endl ;
876 out <<
" LCIO::RCHBIT_ID1 : " << flag.
test( LCIO::RCHBIT_ID1 ) <<
endl ;
877 out <<
" LCIO::RCHBIT_TIME : " << flag.test( LCIO::RCHBIT_TIME ) <<
endl ;
878 out <<
" LCIO::RCHBIT_NO_PTR : " << flag.test( LCIO::RCHBIT_NO_PTR ) <<
endl ;
950 static const std::string _h(
" [ id ] | cellid0 | cellid1 | time | cellid-fields \n");
955 static const std::string _t(
"------------|----------|----------|----------|----------------\n");
959 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackerData>& sV){
971 out<<
" " << id(const_cast<EVENT::TrackerData*>(hit)).valueString();
973 out <<
" --- unknown/default ---- ";
976 out <<
"chargeADC : " ;
979 for(
unsigned j=0 ; j < charge.
size() ; j++ ){
980 out << charge[j] <<
"," ;
987 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::TrackerData> l) {
998 out <<
"Warning: collection not of type " << LCIO::TRACKERDATA <<
endl ;
1017 static const std::string _h(
" [ id ] | cellid0 | cellid1 | time | charge | quality |corr.Data | cellid-fields: | cov(c,c), cov(t,c), cov(t,t) \n");
1022 static const std::string _t(
"------------|----------|----------|------|--------|----------|----------|----------------|------------------------------\n");
1026 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackerPulse>& sV){
1046 out<<
"|" << id(const_cast<EVENT::TrackerPulse*>(hit)).valueString() <<
"|";
1048 out <<
"| --- unknown/default ---- |";
1061 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::TrackerPulse> l) {
1072 out <<
"Warning: collection not of type " << LCIO::TRACKERPULSE <<
endl ;
1077 out <<
" LCIO::TRAWBIT_ID1 : " << flag.
test( LCIO::TRAWBIT_ID1 ) <<
endl ;
1094 static const std::string _h(
" [ id ] | cellid0 | cellid1 | time | cellid-fields \n");
1099 static const std::string _t(
"------------|----------|----------|----------|----------------\n");
1103 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackerRawData>& sV){
1115 out<<
" " << id(const_cast<EVENT::TrackerRawData*>(hit)).valueString();
1117 out <<
" --- unknown/default ---- ";
1120 out <<
" adc values: " ;
1122 for(
unsigned j=0 ; j < charge.
size() ; j++ ) {
1123 out << charge[j] <<
"," ;
1130 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::TrackerRawData> l) {
1141 out <<
"Warning: collection not of type " << LCIO::TRACKERRAWDATA <<
endl ;
1160 static const std::string _h(
" [ id ] |cellId0 |cellId1 | energy | position (x,y,z) | nMCParticles \n -> MC contribution: prim. PDG | energy | time | length | sec. PDG | stepPosition (x,y,z) \n");
1165 static const std::string _t(
"------------|--------|--------|----------|----------------------------------|--------------\n");
1169 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::SimCalorimeterHit>& sV){
1179 if(flag.test( LCIO::CHBIT_LONG )){
1183 out <<
"| no position available ";
1190 out <<
" id-fields: ("<< id(const_cast<EVENT::SimCalorimeterHit*>(hit)).valueString() <<
")" <<
std::endl ;
1192 out <<
" id-fields: --- unknown/default ---- ";
1203 if(flag.test(LCIO::CHBIT_STEP)){
1215 if(k < hit->getNMCContributions()-1 ){ out <<
endl; }
1224 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::SimCalorimeterHit> ll){
1235 if(col->
getTypeName() != LCIO::SIMCALORIMETERHIT){
1236 out <<
"Warning: collection not of type " << LCIO::SIMCALORIMETERHIT <<
endl ;
1246 out <<
" -> LCIO::CHBIT_LONG : " << flag.
test( LCIO::CHBIT_LONG ) <<
endl ;
1247 out <<
" LCIO::CHBIT_BARREL : " << flag.test( LCIO::CHBIT_BARREL ) <<
endl ;
1248 out <<
" LCIO::CHBIT_ID1 : " << flag.test( LCIO::CHBIT_ID1 ) <<
endl ;
1249 out <<
" LCIO::CHBIT_STEP : " << flag.test( LCIO::CHBIT_STEP ) <<
endl ;
1270 if(flag.test(LCIO::CHBIT_LONG)){
1305 static const std::string _h(
" [ id ] |cellId0 |cellId1 | position (x,y,z) | time |[type]||[qual.]| EDep |EDepError| cov(x,x), cov(y,x), cov(y,y), cov(z,x), cov(z,y), cov(z,z)\n");
1310 static const std::string _t(
"------------|--------|--------|-----------------------------|---------|------|------|---------|---------|-----------------------------------------------------------------\n");
1314 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackerHit>& sV){
1323 out << part->
getTime() <<
"|";
1335 if( ! rawHits.
empty() ){
1336 out <<
" rawHits ("<< rawHits.
size() <<
"): ";
1339 for( i=0 ; i < rawHits.
size() ; i++ ){
1340 if( rawHits[i] == 0 ) continue ;
1341 out <<
dec <<
"[" << rawHits[i]->id() <<
"], " <<
dec ;
1348 out <<
" id-fields: ("<< id(const_cast<EVENT::TrackerHit*>(part)).valueString() <<
")" <<
std::endl ;
1350 out <<
" id-fields: --- unknown/default ---- ";
1358 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::TrackerHit> ll){
1367 out <<
"Warning: collection not of type " << LCIO::TRACKERHIT <<
endl ;
1377 out <<
" LCIO::CHBIT_BARREL : " << flag.
test( LCIO::CHBIT_BARREL ) <<
endl ;
1411 static const std::string _h(
" [ id ] |cellId0 |cellId1 | position (x,y,z) | time |[type]|[qual.]| EDep |EDepError| du | dv |q| u (theta, phi) | v (theta, phi)\n");
1416 static const std::string _t(
"------------|--------|--------|-----------------------------|---------|------|------|---------|---------|---------|---------|-|-------------------|-------------------|\n");
1420 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackerHitPlane>& sV){
1429 out << part->
getTime() <<
"|";
1434 out << part->
getdU() <<
"|";
1435 out << part->
getdV() <<
"|";
1438 out << part->
getU()[0] <<
"," << part->
getU()[1] <<
"|";
1439 out << part->
getV()[0] <<
"," << part->
getV()[1] <<
"|";
1448 if( ! rawHits.
empty() ){
1449 out <<
" rawHits ("<< rawHits.
size() <<
"): ";
1452 for( i=0 ; i < rawHits.
size() ; i++ ){
1453 if( rawHits[i] == 0 ) continue ;
1454 out <<
dec <<
"[" << rawHits[i]->id() <<
"], " <<
dec ;
1461 out <<
" id-fields: ("<< id(const_cast<EVENT::TrackerHitPlane*>(part)).valueString() <<
")" <<
std::endl ;
1463 out <<
" id-fields: --- unknown/default ---- ";
1471 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::TrackerHitPlane> ll){
1480 out <<
"Warning: collection not of type " << LCIO::TRACKERHITPLANE <<
endl ;
1531 static const std::string _h(
" [ id ] |cellId0 |cellId1 | position (x,y,z) | time |[type]|[qual.]| EDep |EDepError| dRPhi | dZ |q| center (x,y) |\n");
1536 static const std::string _t(
"------------|--------|--------|-----------------------------|---------|------|------|---------|---------|---------|---------|-|-------------------|\n");
1540 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackerHitZCylinder>& sV){
1549 out << part->
getTime() <<
"|";
1556 out << part->
getdZ() <<
"|";
1567 if( ! rawHits.
empty() ){
1568 out <<
" rawHits ("<< rawHits.
size() <<
"): ";
1571 for( i=0 ; i < rawHits.
size() ; i++ ){
1572 if( rawHits[i] == 0 ) continue ;
1573 out <<
dec <<
"[" << rawHits[i]->id() <<
"], " <<
dec ;
1580 out <<
" id-fields: ("<< id(const_cast<EVENT::TrackerHitZCylinder*>(part)).valueString() <<
")" <<
std::endl ;
1582 out <<
" id-fields: --- unknown/default ---- ";
1590 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::TrackerHitZCylinder> ll){
1598 if(col->
getTypeName() != LCIO::TRACKERHITZCYLINDER){
1599 out <<
"Warning: collection not of type " << LCIO::TRACKERHITZCYLINDER <<
endl ;
1649 static const std::string _h(
" [ id ] |cellId0 |cellId1 | position (x,y,z) | EDep | time |PDG of MCParticle| (px, py, pz) | pathLength | Quality \n");
1654 static const std::string _t(
"------------|--------|--------|---------------------------------|----------|----------|-----------------|-------------------|-------------|---------\n");
1658 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::SimTrackerHit>& sV){
1663 bool pStored = flag.
test(LCIO::THBIT_MOMENTUM);
1692 out << hit->
getEDep () <<
" | ";
1693 out << hit->
getTime () <<
" | ";
1694 out <<
setw(14) << pdgid <<
" ";
1704 out <<
"| unknown |";
1709 out << LCTOOLS::getQualityBits(hit);
1715 out <<
" id-fields: ("<< id(const_cast<EVENT::SimTrackerHit*>(hit)).valueString() <<
")" <<
std::endl ;
1717 out <<
" id-fields: --- unknown/default ---- ";
1741 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::SimTrackerHit> ll){
1751 out <<
"Warning: collection not of type " << LCIO::SIMTRACKERHIT <<
endl ;
1761 out <<
" LCIO::THBIT_BARREL : " << flag.
test( LCIO::THBIT_BARREL ) <<
endl ;
1762 out <<
" LCIO::THBIT_MOMENTUM : " << flag.test( LCIO::THBIT_MOMENTUM ) <<
endl ;
1764 out << LCTOOLS::getQualityBits() <<
endl;
1793 if(flag.test(LCIO::THBIT_MOMENTUM)){
1813 static const std::string _h(
" [ id ] |cellId0 |cellId1 | energy |energyerr | position (x,y,z) \n");
1818 static const std::string _t(
"------------|--------|--------|----------|----------|-----------------------------------\n");
1822 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::CalorimeterHit>& sV){
1834 if( flag.test( LCIO::CHBIT_LONG ) ){
1838 out <<
" no position available ";
1842 out <<
endl <<
" id-fields: ("<< id(const_cast<EVENT::CalorimeterHit*>(hit)).valueString() <<
")" <<
std::endl ;
1844 out <<
endl <<
" id-fields: --- unknown/default ---- ";
1852 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::CalorimeterHit> l) {
1863 out <<
"Warning: collection not of type " << LCIO::CALORIMETERHIT <<
endl ;
1871 out <<
" -> LCIO::RCHBIT_LONG : " << flag.
test( LCIO::RCHBIT_LONG ) <<
endl ;
1872 out <<
" LCIO::RCHBIT_BARREL : " << flag.test( LCIO::RCHBIT_BARREL ) <<
endl ;
1873 out <<
" LCIO::RCHBIT_ID1 : " << flag.test( LCIO::RCHBIT_ID1 ) <<
endl ;
1874 out <<
" LCIO::RCHBIT_TIME : " << flag.test( LCIO::RCHBIT_TIME ) <<
endl ;
1875 out <<
" LCIO::RCHBIT_NO_PTR : " << flag.test( LCIO::RCHBIT_NO_PTR ) <<
endl ;
1876 out <<
" LCIO::RCHBIT_ENERGY_ERROR : " << flag.test( LCIO::RCHBIT_ENERGY_ERROR ) <<
endl ;
1894 if(flag.test(LCIO::CHBIT_LONG)){
1915 static const std::string _h(
" [ id ] | PDG | px, py, pz | px_ep , py_ep , pz_ep | energy |gen|[simstat ]| vertex x, y , z | endpoint x, y , z | mass | charge | [parents] - [daughters] \n");
1920 static const std::string _t(
"------------|-----|-------------------------------|--------|---|----------|-------------------------------|-------------------------------|---------|---------|--------------------------\n");
1924 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::MCParticle>& sV){
1938 out << LCTOOLS::getSimulatorStatusString(const_cast<EVENT::MCParticle *>(part) ).c_str() <<
"|";
1943 out << part->
getMass() <<
"|";
1948 if(k>0) out <<
"," ;
1953 if(k>0) out <<
"," ;
1956 out <<
"] " <<
endl;
1962 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::MCParticle> ll){
1973 out <<
"Warning: collection not of type " << LCIO::MCPARTICLE <<
endl ;
1984 tmp << mcp->
id() <<
dec;
2017 out<<LCTOOLS::getSimulatorStatusString() << LCTOOLS::getSimulatorStatusString((
MCParticle *) mcp) <<
endl;
2075 static const std::string _h(
" [ id ] |com|type| momentum( px,py,pz) | energy | mass | charge | position ( x,y,z) |pidUsed|GoodnessOfPID|\n");
2080 static const std::string _t(
"------------|---|----|-------------------------------|--------|--------|--------|-------------------------------|-------|-------------|\n");
2084 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::ReconstructedParticle>& sV){
2095 out << tmp.
str() <<
"|";
2100 out << part->
getMass() <<
"|";
2105 out << tmp.
str() <<
"|";
2117 out <<
" covariance( px,py,pz,E) : (" ;
2118 for(
int l=0;l<10;l++){
2129 out <<
")" <<
endl ;
2131 out <<
" particles ( [ id ] ):" ;
2143 out <<
" tracks ( [ id ] ): " ;
2150 if( l != N-1 ) out <<
", ";
2154 out <<
" clusters ( [ id ] ): " ;
2161 if(l != N-1) out <<
", " ;
2164 out <<
" particle ids ( [id], PDG, (type)): " <<
std::endl ;
2187 out <<
" vertices: startVertex( id:[ " <<
setw(8) << (sv !=0? sv->
id(): 0);
2188 out <<
"id_aRP: "<<
setw(8) << ((sv != 0 && svr != 0) ? svr->
id() : 0 );
2189 out <<
"] endVertex( id:[" <<
setw(8) << ( ev != 0 ? ev->
id() : 0 );
2190 out <<
"], id_aRP:[" <<
setw(8) << ((ev != 0 && evr != 0) ? evr->
id() : 0 ) <<
"]";
2198 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::ReconstructedParticle> ll){
2206 if(col->
getTypeName() != LCIO::RECONSTRUCTEDPARTICLE){
2207 out <<
"Warning: collection not of type " << LCIO::RECONSTRUCTEDPARTICLE <<
endl ;
2218 tmp<<
"0x" <<
dec << part->
id() <<
dec;
2251 out <<
"Covariance p,E: ";
2253 for(
int l=0;l<10;l++){
2254 if(l==5) { out << endl <<
" ";}
2263 out << endl <<
"Particles id: ";
2270 if(! ((l+1)%4)) { out << endl <<
" ";}
2274 out << endl <<
"Tracks id: ";
2277 if(! ((l+1)%5)){ out << endl <<
" ";}
2281 if( l != N-1 ) out <<
", ";
2284 out << endl <<
"Clusters id: ";
2287 if(! ((l+1)%5)){ out << endl <<
" ";}
2291 if(l != N-1) out <<
", " ;
2294 out << endl <<
"Particle ids ( [id], PDG, (type)): " <<
endl;
2310 static const std::string _h(
" [ id ] | d0 | phi | omega | z0 | tan lambda| reference point(x,y,z) \n");
2315 static const std::string _t(
"------------|----------|----------|----------|-----------|-----------|-------------------------------- \n");
2319 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::TrackState>& sV){
2324 out <<
" |" << trk->
getD0();
2325 out <<
" |" << trk->
getPhi();
2335 for(
unsigned l=0 , N=trk->
getCovMatrix().
size(), ncolumns = 1 , nele =1 ; l <N ; ++l , ++nele) {
2337 if(! ( (nele) % ncolumns ) ){
2352 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::TrackState> ll){
2363 out <<
"Warning: collection not of type " << LCIO::TRACKSTATE <<
endl ;
2401 for(
unsigned l=0 , N=part->
getCovMatrix().
size(), ncolumns = 1 , nele =1 ; l <N ; ++l , ++nele) {
2405 if(! ( (nele) % ncolumns ) ){
2408 out << endl <<
" " ;
2423 static const std::string _h(
" [ id ] | type | d0 | phi | omega | z0 | tan lambda| reference point(x,y,z) | dEdx | dEdxErr | chi2 | ndf \n");
2428 static const std::string _t(
"------------|----------|----------|----------|----------|-----------|-----------|---------------------------------|----------|----------|-------- \n");
2432 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Track>& sV){
2444 out <<
" |" << trk->
getD0();
2445 out <<
" |" << trk->
getPhi();
2450 out <<
")|" << trk->
getdEdx();
2452 out <<
" |" << trk->
getChi2();
2459 for(
unsigned l=0 , N=trk->
getCovMatrix().
size(), ncolumns = 1 , nele =1 ; l <N ; ++l , ++nele) {
2461 if(! ( (nele) % ncolumns ) ){
2471 out <<
" tracks(id): " ;
2474 for(
unsigned int l=0,N=tracks.
size(); l<N ;l++){
2477 << ( tracks[l] ? tracks[l]->id() : 0 ) <<
"]" ;
2479 if( l != N-1 ) out <<
", ";
2484 if(flag.
test(LCIO::TRBIT_HITS)){
2487 for(
unsigned l=0;l<hits.
size();l++){
2488 out <<
"[" <<
setfill(
'0') <<
setw(8) << ( hits[l] ? hits[l]->id() : 0 ) <<
"] ";
2494 out <<
" radius of innermost hit " << trk->
getRadiusOfInnermostHit() <<
" / mm , " <<
" subdetector Hit numbers : "
2498 if(l < trk->getSubdetectorHitNumbers().
size()-1){
2507 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::Track> ll){
2519 out <<
"Warning: collection not of type " << LCIO::TRACK <<
endl ;
2528 out <<
" LCIO::TRBIT_HITS : " << flag.
test( LCIO::TRBIT_HITS ) <<
endl ;
2567 out <<
"Tracks(id): " ;
2570 for(
unsigned l=0;l<tracks.
size();l++){
2571 if( tracks[l] != 0 )
2572 out << tracks[l]->id();
2581 if(l != tracks.
size()-1){ out <<
", ";}
2587 for(
unsigned l=0;l<hits.
size();l++){
2588 out <<
"[" << ( hits[l] ? hits[l]->id() : 0 ) <<
"] ";
2589 if(!((l+1)%7)){out << endl <<
" ";}
2593 out <<
"Radius of innermost hit " << part->
getRadiusOfInnermostHit() <<
" / mm , " <<
" subdetector Hit numbers : " ;
2603 if(l < part->getSubdetectorHitNumbers().
size()-1){
2618 static const std::string _h(
" [ id ] |type| energy |energyerr | position ( x,y,z) | itheta | iphi \n");
2623 static const std::string _t(
"------------|----|----------|----------|----------------------------------|----------|----------\n");
2627 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Cluster>& sV){
2640 out <<
" errors (6 pos)/( 3 dir): (" ;
2641 for(
int l=0;l<6;l++){
2645 for(
int l=0;l<3;l++){
2648 out <<
")" <<
endl ;
2649 out <<
" clusters(e): " ;
2651 for(
unsigned int l=0;l<clusters.
size();l++){
2652 out <<
setw(4) << ( clusters[l] ? clusters[l]->getEnergy() : 0. ) <<
", ";
2655 out <<
" subdetector energies : " ;
2657 for(
unsigned int l=0;l<sdE.
size();l++){
2658 out <<
setw(4) << sdE[l] <<
", ";
2663 if( flag.test( LCIO::CLBIT_HITS ) ) {
2667 for(
unsigned int k=0;k<hits.
size();k++){
2668 out <<
"[" <<
setfill(
'0' ) <<
dec <<
setw(8) << ( hits[k] ? hits[k]->id() : 0 ) <<
"]"
2670 if( ! ( (k+1) % 10 ) ) out <<
std::endl ;
2680 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::Cluster> l) {
2692 out <<
"Warning: collection not of type " << LCIO::CLUSTER <<
endl ;
2701 out <<
" LCIO::CLBIT_HITS : " << flag.
test( LCIO::CLBIT_HITS ) <<
endl ;
2706 tmp <<
dec << clu->
id();
2757 static const std::string _h(
"\n[ id ] |pri| alg. type | chi2 | prob. | position ( x, y, z) | [par] | [idRecP] \n");
2762 static const std::string _t(
"------------|---|-------------------|-----------|-----------|---------------------------------|-------|------------\n");
2766 std::ostream& operator<<( std::ostream& out, const UTIL::lcio_short<EVENT::Vertex>& sV){
2785 std::ostream& operator<<( std::ostream& out, const LCIO_LONG<EVENT::Vertex> ll){
2795 out <<
"Warning: collection not of type " << LCIO::VERTEX <<
endl ;
2815 out <<
"Covariance Matrix ";
2818 if((! ((i+1)%3)) && i < v->getCovMatrix().size()- 1){ out << endl <<
" "; }
2825 }
else { out <<
endl; }
2828 out <<
" Parameter [";
2829 out <<
setw(3) << i <<
"]:\t";
2840 using namespace UTIL ;
virtual const TrackVec & getTracks() const =0
The tracks that have been combined to this track.
virtual const double * getPosition() const =0
Returns the hit position in [mm].
The generic object that is held in an LCCollection.
virtual float getITheta() const =0
Intrinsic direction of cluster at position: Theta.
virtual bool isTransient() const =0
True if collection is transient, i.e.
virtual const ParticleIDVec & getParticleIDs() const =0
The particle Id's sorted by their likelihood.
virtual float getChi2() const =0
Chi squared of the vertex fit.
const std::string & header(const EVENT::Vertex *)
operator for detailed output of a vertex object (e.g.
A generic tracker hit to be used by pattern recognition.
virtual int getCellID1() const =0
Returns the second detector specific (geometrical) cell id.
virtual int getCellID1() const =0
Returns the second detector specific (geometrical) cell id.
virtual const ReconstructedParticleVec & getParticles() const =0
The reconstructed particles that have been combined to this particle.
virtual int getCellID0() const =0
Returns the detector specific (geometrical) cell id.
virtual const MCParticleVec & getParents() const =0
Returns the parents of this particle.
virtual int getTime() const =0
Returns a time measurement associated with the adc values, e.g.
virtual const TrackStateVec & getTrackStates() const =0
Returns track states associtated to this track.
virtual const FloatVec & getCovMatrix() const =0
Covariance matrix of the charge (c) and time (t) measurements.
virtual float getEDep() const =0
The energy deposited on the hit [GeV].
virtual const double * getPosition() const =0
The hit position in [mm].
virtual int getPDGCont(int i) const =0
Returns the PDG code of the shower particle that caused this contribution.
The generic simulated calorimeter hit.
virtual Vertex * getEndVertex() const =0
The vertex where the particle decays This method actually returns the start vertex from the first dau...
virtual const FloatVec & getParameters() const =0
Additional parameters related to this vertex - check/set the collection parameter "VertexParameterNa...
static const int AtVertex
virtual double getEnergy() const =0
Energy of the reconstructed particle - only float used in files.
virtual int getType() const =0
Type - userdefined.
The Vertex class for LCIO.
virtual int getNDouble() const =0
Number of double values stored in this object.
virtual int getType() const =0
Type of raw data hit, either one of LCIO::TPCHIT LCIO::SIMTRACKERHIT
virtual float getTanLambda() const =0
Lambda is the dip angle of the track in r-z at the reference point.
virtual int id() const =0
Returns an object id for internal (debugging) use in LCIO.
virtual int getType() const =0
Type of reconstructed particle.
virtual double getWeight() const =0
Returns the event weight.
virtual LCObject * getTo() const =0
The 'to' object of the given relation.
virtual int getCellID1() const =0
Returns the second detector specific (geometrical) cell id.
virtual const float * getStepPosition(int i) const =0
Returns the position where the energy deposited (step) occurred optional, only if bit LCIO::CHBIT_STE...
virtual const double * getMomentumAtEndpoint() const =0
Returns the particle's 3-momentum at the endpoint in [GeV] Only float used in files.
virtual float getCharge() const =0
Charge of the reconstructed particle.
virtual const float * getCenter() const =0
Radius of cylinder.
lcio_short< T > lcshort(const T *t, const EVENT::LCCollection *b=NULL)
virtual float getFloatVal(int index) const =0
Returns the float value for the given index.
virtual float getOmega() const =0
Omega is the signed curvature of the track in [1/mm].
virtual const CalorimeterHitVec & getCalorimeterHits() const =0
The hits that have been combined to this cluster.
virtual const float * getReferencePoint() const =0
Reference point of the track parameters.
virtual const FloatVec & getCovMatrix() const =0
Covariance matrix of the track parameters.
virtual bool isPrimary() const =0
Checks if the Vertex is the primary vertex of the event.
A tracker hit on a planar surface - the hit is stored as: x,y,z, u(theta, phi), v(theta,phi), du, dv where (x,y,z) is the position in global cartesian coordinates, u,v are the the meassurement directions (unit vectors, spanning the plane) and du,dv are the measurement errors along these directions.
int id() const
Returns an object id for internal (debugging) use in LCIO.
A generic simulated tracker hit.
virtual const float * getV() const =0
Direction of second measurement - given as (theta, phi).
virtual MCParticle * getParticleCont(int i) const =0
Returns the MCParticle that caused the shower responsible for this contribution to the hit...
virtual int getCellID1() const =0
Same name as in CalorimeterHit, even though there are no 'cells' in this case Optional, check/set flag(LCIO::RTHZBIT_ID1)==1.
virtual const TrackerHitVec & getTrackerHits() const =0
Optionaly ( check/set flag(LCIO::TRBIT_HITS)==1) return the hits that have been used to create this t...
virtual float getRadiusOfInnermostHit() const =0
The radius of the innermost hit that has been used in the track fit.
virtual float getEnergyError() const =0
Returns the error of the hit energy in [GeV].
The LCIO TrackState class.
virtual float getEnergyCont(int i) const =0
Returns the energy in [GeV] of the i-th contribution to the hit.
virtual int getCellID1() const =0
Returns the second detector specific (geometrical) cell id.
virtual float getLengthCont(int i) const =0
Returns the step length of the i-th contribution to the hit.
virtual const ClusterVec & getClusters() const =0
The clusters that have been combined to this cluster.
virtual const FloatVec & getHitContributions() const =0
Returns the energy contribution of the hits Runs parallel to the CalorimeterHitVec from getCalorimete...
virtual int getPDG() const =0
Returns the PDG code of the particle.
virtual int getAmplitude() const =0
Returns the amplitude of the hit in ADC counts.
virtual int getNFloat() const =0
Number of float values stored in this object.
virtual float getdU() const =0
Measurement error along u.
virtual const float * getMomentum() const =0
Returns the 3-momentum of the particle at the hits position in [GeV] - optional, only if bit LCIO::TH...
virtual int getRunNumber() const =0
Return the run number off this event.
virtual const FloatVec & getCovMatrix() const =0
Covariance matrix of the position (stored as lower triangle matrix, i.e.
virtual float getdEdx() const =0
dEdx of the track.
virtual const std::vector< std::string > * getCollectionNames() const =0
Returns the names of the collections in the event.
virtual float getLikelihood() const =0
The likelihood of this hypothesis - in a user defined normalization.
Convenient helper class for setting single bits in a 32bit-field, such as collection flags or hit typ...
TrackerData contains the corrected (calibrated) raw tracker data.
virtual float getTime() const =0
The time of the pulse - arbitrary units.
virtual const std::string getDataDescription() const =0
The description string.
virtual double getDoubleVal(int index) const =0
Returns the double value for the given index.
virtual double getMass() const =0
Returns the mass of the particle in [GeV] - only float used in files.
virtual const FloatVec & getCovMatrix() const =0
Covariance of the position (x,y,z), stored as lower triangle matrix.
virtual const FloatVec & getPositionError() const =0
Covariance matrix of the position (6 Parameters)
virtual float getD0() const =0
Impact paramter of the track in (r-phi).
virtual float getCharge() const =0
The integrated charge of the pulse - arbitrary units.
std::ostream & operator<<(std::ostream &os, const LCIORandomAccess &ra)
virtual const ClusterVec & getClusters() const =0
The weights of the reconstructed particles combined to this particle.
virtual const std::string & getAlgorithmType() const =0
Type code for the algorithm that has been used to create the vertex - check/set the collection parame...
std::vector< std::string > LCStrVec
Header file for the f77-wrapper functions for stl vectors.
virtual float getD0() const =0
Impact paramter of the track in (r-phi).
virtual int getCellID0() const =0
Returns the detector specific (geometrical) cell id.
virtual float getEnergyError() const =0
Returns the error on the energy of the cluster.
virtual long64 getTimeStamp() const =0
Returns the time stamp of the event.
static const int AtFirstHit
virtual const FloatVec & getCovMatrix() const =0
Covariance matrix of the track parameters.
virtual float getWeight() const =0
The weight of the given relation - only if collection flag bit LCIO::LCREL_WEIGHTED is set...
virtual int getCellID0() const =0
Returns the first detector specific (geometrical) cell id.
virtual int getLocation() const =0
The location of the track state.
virtual const float * getPosition() const =0
Returns the position of the hit in world coordinates.
virtual int getFlag() const =0
Returns flag word for collection.
virtual double getEnergy() const =0
Returns the energy of the particle (at the vertex) in [GeV] computed from the particle's momentum and...
Tracker pulses as computed from TrackerData objects or as directly measured by a specific subdetector...
virtual bool isCompound() const =0
Return particles primary flag.
virtual int getCellID0() const =0
Same name as in CalorimeterHit, even though there are no 'cells' in this case.
virtual float getdV() const =0
Measurement error along v.
virtual float getEDep() const =0
The energy deposited on the hit [GeV].
virtual MCParticle * getMCParticle() const =0
Returns the MC particle that caused the hit.
virtual int getFlag() const =0
Returns the flag word.
virtual int getGeneratorStatus() const =0
Returns the status for particles as defined by the generator, typically 0 empty line 1 undecayed ...
virtual float getdEdxError() const =0
Error of dEdx.
virtual float getdZ() const =0
Measurement error along z.
virtual int getCellID1() const =0
Same name as in CalorimeterHit, even though there are no 'cells' in this case Optional, check/set flag(LCIO::RTHBIT_ID1)==1.
virtual LCCollection * getCollection(const std::string &name) const =0
Returns the collection for the given name.
virtual const double * getVertex() const =0
Returns the production vertex of the particle in [mm].
virtual int getNInt() const =0
Number of integer values stored in this object.
Simple interface to store generic named parameters of type int, float and string. ...
virtual const FloatVec & getDirectionError() const =0
Covariance matrix of the direction (3 Parameters).
virtual int getIntVal(int index) const =0
Returns the integer value for the given index.
virtual int getSimulatorStatus() const =0
Returns the status for particles from the simulation, e.g.
virtual int getNdf() const =0
Number of degrees of freedom of the track fit.
virtual bool isSubset() const =0
True if the collection holds a subset of objects from other collections.
virtual const float * getU() const =0
Direction of first measurement - given as (theta, phi).
Convenient class for decoding cellIDs from collection parameter LCIO::CellIDEncoding.
virtual int getCellID1() const =0
Returns the second detector specific (geometrical) cell id.
Int vector used for user extensions.
virtual const FloatVec & getCovMatrix() const =0
Covariance matrix of the reconstructed particle's 4vector (10 parameters).
virtual int getCellID1() const =0
Same name as in CalorimeterHit, even though there are no 'cells' in this case Optional, check/set flag(LCIO::THBIT_ID1)==1.
Float vector used for user extensions.
virtual float getZ0() const =0
Impact paramter of the track in (r-z).
virtual const float * getReferencePoint() const =0
Reference point of the track parameters, e.g.
virtual int getTimeStamp() const =0
Returns a time stamp for the hit.
virtual const std::string & getTypeName() const =0
Returns the type name of the collection - valid names are defined in LCIO.
virtual float getChi2() const =0
True if the reference point is the point of closest approach.
Simple interface to store generic user data.
virtual const FloatVec & getChargeValues() const =0
The corrected (calibrated) FADC spectrum.
virtual float getGoodnessOfPID() const =0
The overall goodness of the PID on a scale of [0;1].
virtual const std::string & getDetectorName() const =0
Returns the name of the detector setup used in the simulation.
virtual float getTanLambda() const =0
Lambda is the dip angle of the track in r-z at the reference point.
virtual float getTime() const =0
The time of the hit in [ns].
virtual float getEnergy() const =0
Returns the energy of the hit in [GeV].
virtual float getTime() const =0
Returns a time measurement associated with the adc values, e.g.
virtual const float * getPosition() const =0
Position of the cluster.
virtual int getCellID0() const =0
Same name as in CalorimeterHit, even though there are no 'cells' in this case.
The LCIO reconstructedParticle.
virtual int getType() const =0
Flagword that defines the type of cluster.
The LCIO Monte Carlo particle.
virtual int getType() const =0
Type of hit.
virtual float getZ0() const =0
Impact paramter of the track in (r-z).
virtual const float * getPosition() const =0
Returns the position of the hit in world coordinates.
virtual int getNumberOfElements() const =0
Returns the number of elements in the collection.
Persistent interface for LCIO ParticleIDs.
A single weighted relationship between two LCObjects.
virtual float getEDepError() const =0
The error measured on EDep [GeV].
virtual const IntVec & getSubdetectorHitNumbers() const =0
A vector that holds the number of hits in particular subdetectors.
const std::string & tail(const EVENT::Vertex *)
virtual float getCharge() const =0
Returns the particle's charge.
virtual int getCellID0() const =0
Returns the first detector specific (geometrical) cell id.
virtual const float * getPosition() const =0
Position of the vertex.
The generic calorimeter hit for real data (or simulation thereof).
virtual int getNMCContributions() const =0
Returns the number of MC contributions to the hit.
LCIO_LONG< T > lcio_long(const T &o, const EVENT::LCCollection *c)
virtual ReconstructedParticle * getAssociatedParticle() const =0
Returns Reconstructed Particle associated to the Vertex.
virtual int getCellID1() const =0
Same name as in CalorimeterHit, even though there are no 'cells' in this case Optional, check/set flag(LCIO::RTHPBIT_ID1)==1.
The main event interface.
Generic class for raw tracker data.
virtual int getQuality() const =0
The quality bit flag of the hit.
The generic collection used in LCIO.
virtual Vertex * getStartVertex() const =0
The start vertex associated to this particle.
A tracker hit on a cylindrical surface that runs parallel to the z-axis - the hit is stored as: x...
virtual LCObject * getFrom() const =0
The 'from' object of the given relation.
virtual int getAlgorithmType() const =0
Type of the algorithm/module that created this hypothesis - NOTE: must be unique within one collectio...
virtual int getCellID0() const =0
Returns the first detector specific (geometrical) cell id.
virtual float getPathLength() const =0
The path length of the particle in the sensitive material that resulted in this hit.
virtual int getEventNumber() const =0
Returns this event's number .
int id() const
Returns an object id for internal (debugging) use in LCIO.
virtual float getOmega() const =0
Omega is the signed curvature of the track in [1/mm].
static const int AtLastHit
virtual float getProbability() const =0
Probability of the vertex fit.
virtual int getCellID1() const =0
Returns the second detector specific (geometrical) cell id.
virtual int getCellID0() const =0
Same name as in CalorimeterHit, even though there are no 'cells' in this case.
virtual bool isDefault() const =0
True if collection is the default collection for the given type.
virtual int getQuality() const =0
The quality bit flag of the pulse - check/set collection parameters TrackerPulseQualityNames and Trac...
virtual int getCellID0() const =0
Returns the detector specific (geometrical) cell id.
virtual const FloatVec & getSubdetectorEnergies() const =0
A vector that holds the energy observed in a particular subdetectors.
virtual const double * getEndpoint() const =0
Returns the endpoint of the particle in [mm] if the endpoint has been set explicetly.
virtual const std::string & getStringVal(const std::string &key) const =0
Returns the first string value for the given key.
virtual const TrackVec & getTracks() const =0
The weights of cluster contributions to this particle.
virtual const LCParameters & getParameters() const =0
Parameters defined for this collection.
virtual float getTimeCont(int i) const =0
Returns the time in [ns] of the i-th contribution to the hit.
virtual float getEnergy() const =0
Returns the energy of the hit in [GeV].
virtual float getIPhi() const =0
Intrinsic direction of cluster at position: Phi.
virtual float getEnergy() const =0
Energy of the cluster.
virtual const ShortVec & getADCValues() const =0
The actual FADC spectrum.
virtual const double * getMomentum() const =0
The reconstructed particle's 3-momentum - only float used in files,.
virtual const double * getMomentum() const =0
Returns the particle's 3-momentum at the production vertex in [GeV].
Helper class to create and interpret the 32-bit flag word in LCCollections.
virtual float getdRPhi() const =0
Measurement error along RPhi.
virtual const MCParticleVec & getDaughters() const =0
Returns the daughters of this particle.
The generic calorimeter hit - created from SimCalorimeterHit or RawCalorimeterHit.
virtual ParticleID * getParticleIDUsed() const =0
The particle Id used for the kinematics of this particle.
virtual float getPhi() const =0
Phi of the track at the reference point.
static const int AtCalorimeter
virtual TrackerData * getTrackerData() const =0
Optionally the TrackerData that has been used to create the pulse can be stored with the pulse - NULL...
virtual const float * getReferencePoint() const =0
Reference point of the reconstructedParticle parameters.
virtual int getCellID0() const =0
Same name as in CalorimeterHit, even though there are no 'cells' in this case.
virtual double getMass() const =0
Mass of the reconstructed particle, set independently from four vector quantities.
virtual const std::string getTypeName() const =0
The type name of the user class (typically the class name) This type name is stored as a collection p...
virtual float getPhi() const =0
Phi of the track at the reference point.
virtual int getType() const =0
Flagword that defines the type of track.
virtual const LCObjectVec & getRawHits() const =0
The raw data hits.
virtual int getPDG() const =0
The PDG code of this id - UnknownPDG ( 999999 ) if unknown.
virtual float getTime() const =0
Returns the time of the hit in [ns].
virtual int id() const
Provide default implementation for id.