All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
ReconstructedParticleImpl_CopyProcessor.h
Go to the documentation of this file.
1 #ifndef ReconstructedParticleImpl_CopyProcessor_H
2 #define ReconstructedParticleImpl_CopyProcessor_H 1
3 
4 #include "marlin/Processor.h"
5 #include "lcio.h"
6 
7 using namespace lcio;
8 using namespace marlin;
9 
10 /** ReconstructedParticleImpl_CopyProcessor <br>
11  *
12  * Copies an LCIOCollection of ReconstructedParticleImpl including copying each member attribute and each element of the member vectors.
13  * In addition, an LCRelation is created, linking the original ReconstructedParticleImpl to their copies.
14  * This indirect accessibility allows for principal compatibility with existing LCRelations, like recoMCTruthLink.
15  * Necessary input are the names of the one input and two output collections.
16  *
17  * For every member attribute or member vector there is a boolean optional parameter with which the copying of the respective element can be switched off by setting the parameter to *false*.
18  * This way, certain Marlin processors, that only modify the ReconstructedParticleImpl can be selectively run again instead of running the whole processor chain from the creation of the ReconstructedParticleImpl again.
19  * It was initially written to selectively re-run the LikelihoodPIDProcessor (part of HighLevelReco of MarlinStdReco) on existing DST-files after certain changes in the processor parameters were made post production.
20  * If the input collection does not exist in an event, or does not contain any elements, an empty instance of the output collection is added to the event.
21  *
22  * To use pre-existing LCRelations, use that relation to access the old ReconstructedParticleImpl, and then use the LCRelation created by this processor to access the new one (or the other way around).
23  *
24  * @author U. Einhaus, DESY
25  * @version $1$
26  */
27 
28 class ReconstructedParticleImpl_CopyProcessor : public Processor {
29 
30  public:
31 
32  virtual Processor* newProcessor() { return new ReconstructedParticleImpl_CopyProcessor ; }
33 
35 
36  virtual ~ReconstructedParticleImpl_CopyProcessor() = default;
37 
39 
41 
42 
43  virtual void init();
44 
45  //virtual void processRunHeader( LCRunHeader* run ) {};
46 
47  virtual void processEvent( LCEvent * evt );
48 
49  //virtual void check( LCEvent * evt ) {};
50 
51  virtual void end();
52 
53 
54  protected:
55 
56  std::string _description = "";
57  int _nEvt{};
58 
59  std::string _InputColName{};
60  std::string _OutputColName{};
61  std::string _RelationColName{};
62 
63  bool _copyType = true;
64  bool _copyMomentum = true;
65  bool _copyEnergy = true;
66  bool _copyCovMatrix = true;
67  bool _copyMass = true;
68  bool _copyCharge = true;
69  bool _copyReferencePoint = true;
70  bool _copyParticleIDs = true;
71  bool _copyParticleIDUsed = true;
72  bool _copyGoodnessOfPID = true;
73  bool _copyParticles = true;
74  bool _copyClusters = true;
75  bool _copyTracks = true;
76  bool _copyStartVertex = true;
77 
78 
79 };
80 
81 #endif