21 #include "EVENT/LCIO.h"
22 #include "EVENT/LCCollection.h"
23 #include "IMPL/ReconstructedParticleImpl.h"
24 #include "IMPL/LCCollectionVec.h"
34 SatoruJetFinderProcessor::SatoruJetFinderProcessor()
35 : Processor(
"SatoruJetFinderProcessor")
37 _description=
"A multi algorithm jet finder";
42 registerInputCollection( LCIO::RECONSTRUCTEDPARTICLE,
44 "Collection of reconstructed particles",
46 std::string(
"Unset") );
48 registerOutputCollection( LCIO::RECONSTRUCTEDPARTICLE,
50 "Name of collection with the found jets",
52 std::string(
"Unset") );
54 registerOptionalParameter(
"Debug",
58 registerOptionalParameter(
"SuccessTag",
59 "Name of parameter added to event in case of successful jet finding",
61 std::string(
"JetsFound") );
67 registerProcessorParameter(
"Mode",
68 "Select predefined algorithms for jet finding"
71 std::string(
"manual") );
74 registerOptionalParameter(
"NJetRequested",
75 "Force everything to N jets"
76 "(if supported by current mode)",
79 registerOptionalParameter(
"YCut",
80 "YCut for jet finding algorithm"
81 "(if supported by current mode)",
84 registerOptionalParameter(
"RCone",
85 "Half cone opening angle for cone jet finding "
86 "algorithm with variable number of jet",
88 registerOptionalParameter(
"EpsCone",
89 "Jet energycut for cone jet finding algorithm "
90 "with variable number of jets",
95 registerOptionalParameter(
"GlobalMode",
96 "mode for manual alogorithm selection, "
97 "see documentation for details",
101 registerOptionalParameter(
"Threshold",
102 "Threshold, if mode is \"manual\"",
105 registerOptionalParameter(
"PrimaryJetFindingMode",
106 "Primary jet finding mode, if mode is \"manual\"",
109 registerOptionalParameter(
"SecondJetFindingMode",
110 "Secong jet finding mode, if mode is \"manual\"",
114 registerOptionalParameter(
"MergingMode",
115 "Merging mode, if mode is \"manual\"",
118 registerOptionalParameter(
"MergingThreshold",
119 "Merging threshold, if mode is \"manual\"",
128 streamlog_out(DEBUG4) <<
"SatoruJetFinderProcessor::init() " << name()
130 <<
" parameters: " << std::endl
134 _writeTag = parameters()->isParameterSet(
"SuccessTag");
138 streamlog_out(DEBUG4) <<
"jet finding mode:" <<
_jetFindingMode << endl;
219 int nenflow = enflowcol->getNumberOfElements();
221 for (
int ienflow=0; ienflow<nenflow ; ienflow++){
222 ReconstructedParticle* enflow =
223 dynamic_cast<ReconstructedParticle*
>
224 (enflowcol->getElementAt( ienflow ));
225 for(
int i=0;i<3;i++){
235 streamlog_out(DEBUG4) <<
"Px,Py,Pz,E: "<<
245 int DimensionOfInputArray=4;
246 int DimensionOfOutputArray=4;
247 int MaximalNumberOfJets=20;
269 streamlog_out(DEBUG4) <<
" " << endl;
272 ReconstructedParticleImpl* Jets =
new ReconstructedParticleImpl;
273 float momentum[3],energy;
278 Jets->setMomentum(momentum);
279 Jets->setEnergy(energy);
281 double mass = energy*energy - momentum[0]*momentum[0] - momentum[1]*momentum[1] - momentum[2]*momentum[2];
282 mass = (mass > 0) ? sqrt(mass) : 0;
287 ReconstructedParticle* enflow =
288 dynamic_cast<ReconstructedParticle*
>
289 (enflowcol->getElementAt(iobj));
290 Jets->addParticle(enflow);
293 JetsCol->addElement(Jets);
297 JetsCol->parameters().setValue(
"YMinus",
_YMinus );
298 JetsCol->parameters().setValue(
"YPlus" ,
_YPlus );
304 if ( JetsCol->getNumberOfElements() > 0 )
int PointerParticleToJets[450]
void syjkrn_(const char *GlobalModus_, int &NJetRequested_, float &Threshold_, int &PrimaryJetFindingMode_, float *YCut_, int &MergingMode_, float &MergingThreshold_, int &SecondJetFindingMode_, int &NumberOfPartons_, int &DimensionOfInputArray_, float *PPartons_, int &MaximalNumberOfJets_, int &NJetsFound_, int *PointerParicleToJet_, int &DimensionOfOutputArray_, float *PJets_, float &YMinus_, float &YPlus_, int &IError_, int GlobalModusLenght_)
SatoruJetsArray _jetsWorkArray
SatoruJetFinderProcessor aSatoruJetFinderProcessor
virtual void end()
Called after data processing for clean up.
virtual void processRunHeader(LCRunHeader *run)
Called for every run.
int _secondJetFindingMode
int _primaryJetFindingMode
void putPartons(LCEvent *evt)
virtual void init()
Called at the begin of the job before anything is read.
A universal jetfinder module developed by Satoru Yamashita.
void getJets(LCEvent *evt, LCCollection *JetsCol)
void goSatoru(LCEvent *evt, LCCollection *JetsCol)
virtual void processEvent(LCEvent *evt)
Called for every event - the working horse.
std::string _jetFindingMode
std::string _outputCollection
std::string _inputCollection
std::vector< LCCollection * > LCCollectionVec
void callSatoru(LCEvent *evt)
SatoruPartonArray _partonsWorkArray