12 #include "IO/LCReader.h"
13 #include "IO/LCWriter.h"
14 #include "EVENT/LCEvent.h"
15 #include <EVENT/ReconstructedParticle.h>
16 #include "EVENT/MCParticle.h"
24 LCIOStorer(
const char* inputfile = NULL,
const char* outputfile = NULL,
bool autoread =
true,
bool autowrite =
false,
const char* outPrefix = 0);
28 bool Next(
bool autovertex =
false,
bool autojet =
false);
29 void SetEvent(lcio::LCEvent* event);
30 void SetColorSinglets(vector<MCParticle*>& mcps, vector<MCColorSinglet*>& mccs);
34 void InitMCPPFOCollections(
const char* pfoColName,
const char* mcColName,
const char* mcpfoColName);
35 void InitPFOCollections(
const char* pfoColName);
38 void InitVertexCollection(
const char* lcioName,
const char* flavtagName,
bool readnow =
true);
39 void InitJetCollection(
const char* lcioName,
const char* flavtagName,
bool readnow =
true,
bool readvtx =
true,
const char* vtxname = 0);
47 void ReadVertices(
const char* vtxname, vector<const Vertex*>* lcficol);
48 void ReadJets(
const char* jetname, vector<const Jet*>* lcficol,
const char* vtxrelname = 0);
51 void WriteVertices(
const char* vertexName,
const char* outName = 0,
const char* outRPName = 0);
52 void WriteVertices(
VertexVec* pvvtx,
const char* newName,
const char* newRPName = 0);
53 void WriteJets(
const char* jetName,
const char* outName = 0,
bool writeVertex =
true,
const char* vtxName = 0,
const char* relName = 0);
57 void WritePID(lcio::LCCollection* lciocol, lcio::ReconstructedParticle* lciojet,
const lcfiplus::Jet* lcfijet,
const char* paramname);
58 void WriteAllPIDs(lcio::LCCollection* lciocol, lcio::ReconstructedParticle* lciojet,
const lcfiplus::Jet* lcfijet);
66 static bool energy_sort_pfo(lcio::ReconstructedParticle* a, lcio::ReconstructedParticle* b);
69 _readSubdetectorEnergies = flag;
72 _trackHitOrdering = flag;
75 _updateVertexRPDaughters = flag;
78 _ignoreLackOfVertexRP = flag;
82 _pidAlgoName = algoName;
86 return _readSubdetectorEnergies;
89 return _trackHitOrdering;
92 return _updateVertexRPDaughters;
95 return _ignoreLackOfVertexRP;
99 return _pidAlgoName.c_str();
103 virtual void GetCallback(
const char* name,
const char* classname);
106 lcio::LCEvent* _event;
107 lcio::LCReader* _reader;
108 lcio::LCWriter* _writer;
111 map<string, vector<lcfiplus::MCParticle*> *> _importMCPCols;
112 map<string, vector<lcfiplus::MCColorSinglet*> *> _importMCCSCols;
113 map<string, pair<vector<lcfiplus::Track*> *, vector<lcfiplus::Neutral*> *> >_importPFOCols;
114 map<string, pair<string,string> > _importMCPFOLinkCols;
115 map<string, vector<const lcfiplus::Vertex*> *> _importVertexCols;
116 map<string, vector<const lcfiplus::Jet*> *> _importJetCols;
119 map<lcfiplus::Track*, lcio::ReconstructedParticle*> _trackLCIORel;
120 map<lcfiplus::Neutral*, lcio::ReconstructedParticle*> _neutralLCIORel;
121 map<lcfiplus::MCParticle*, lcio::MCParticle*> _mcpLCIORel;
122 map<const lcfiplus::Vertex*, lcio::Vertex*> _vtxLCIORel;
123 map<const lcfiplus::Jet*, lcio::ReconstructedParticle*> _jetLCIORel;
126 map<lcio::ReconstructedParticle*, lcfiplus::Track*> _trackLCIORel2;
127 map<lcio::ReconstructedParticle*, lcfiplus::Neutral*> _neutralLCIORel2;
128 map<lcio::MCParticle*, lcfiplus::MCParticle*> _mcpLCIORel2;
129 map<lcio::Vertex*, const lcfiplus::Vertex*> _vtxLCIORel2;
130 map<lcio::ReconstructedParticle*, const lcfiplus::Jet*> _jetLCIORel2;
137 bool _readSubdetectorEnergies;
138 int _trackHitOrdering;
139 bool _updateVertexRPDaughters;
140 bool _ignoreLackOfVertexRP;
bool getReadSubdetectorEnergies() const
Definition: LCIOStorer.h:85
bool getIgnoreLackOfVertexRP() const
Definition: LCIOStorer.h:94
bool getUpdateVertexRPDaughters() const
Definition: LCIOStorer.h:91
Definition: LCIOStorer.h:22
Definition: EventStore.h:17
const char * getParticleIDAlgorithmName()
Definition: LCIOStorer.h:98
void setReadSubdetectorEnergies(bool flag)
Definition: LCIOStorer.h:68
void setIgnoreLackOfVertexRP(bool flag)
Definition: LCIOStorer.h:77
void setUpdateVertexRPDaughters(bool flag)
Definition: LCIOStorer.h:74
void setTrackHitOrdering(int flag)
Definition: LCIOStorer.h:71
Definition: lcfiplus.h:980
void setParticleIDAlgorithmName(const char *algoName)
Definition: LCIOStorer.h:81
int getTrackHitOrdering() const
Definition: LCIOStorer.h:88
const vector< const Vertex * > VertexVec
Definition: lcfiplus.h:79