13 #include <EVENT/LCCollection.h>
14 #include <IMPL/LCCollectionVec.h>
15 #include <IMPL/ReconstructedParticleImpl.h>
16 #include <EVENT/MCParticle.h>
17 #include <EVENT/Cluster.h>
18 #include <EVENT/Track.h>
19 #include <UTIL/LCTOOLS.h>
20 #include <EVENT/ReconstructedParticle.h>
22 using namespace lcio ;
23 using namespace marlin ;
31 _description =
"YThresh finds the crossover value of the yCut variable from NMin to NMin+1 jets found using durhamycut";
34 registerInputCollection( LCIO::RECONSTRUCTEDPARTICLE,
35 "RecoParticleCollection",
36 "Name of the input ReconstructedParticle collection",
38 std::string(
"RecoParticles"));
40 registerProcessorParameter(
"NMin",
41 "min number of jets, ie. NMin=2 will give y23 variable",
45 registerProcessorParameter(
"PrintOutput",
46 "toggle print text output",
50 registerProcessorParameter(
"NIterations",
51 "number of iterations",
55 registerProcessorParameter(
"NMinParticles",
56 "min num particles for ythresh calculation",
60 registerProcessorParameter(
"YStart",
61 "starting value for yCut",
108 ymax=(float)
_yCut[0];
111 for(
int i=1;i<=
_nIter;i++){
114 else _yCut[0]-=ymax/(pow(2.,i+1));
123 stringstream tempStream;
125 string yname=tempStream.str();
126 recoColl->parameters().setValue(yname.c_str(),
_yCut[0]);
129 streamlog_out( DEBUG4 ) <<
"YThresh Event "<<
_nEvt<<
" "<<yname<<
"="<<
_yCut[0]<<endl;
134 float epsilon=ymax/(pow(2.,
_nIter));
144 if(!(n1==_nMin && n2==_nMin+1))
145 streamlog_out( WARNING ) <<
"ERROR INCORRECT YTHRESH VALUE OBTAINED"<<endl;
149 }
catch(DataNotAvailableException &
e){
150 streamlog_out( WARNING ) <<
"YThresh: cannot find collection "<<
_inputCollection.c_str()<<endl;
159 int nenflow = enflowcol->getNumberOfElements();
161 for (
int ienflow=0; ienflow<nenflow ; ienflow++){
162 ReconstructedParticle* enflow =
163 dynamic_cast<ReconstructedParticle*
>
164 (enflowcol->getElementAt( ienflow ));
165 for(
int i=0;i<3;i++){
173 int DimensionOfInputArray=4;
174 int DimensionOfOutputArray=4;
175 int MaximalNumberOfJets=20;
189 DimensionOfInputArray,
194 DimensionOfOutputArray,
211 streamlog_out( DEBUG4 ) <<
"YThresh::end() " << name()
212 <<
" processed " <<
_nEvt <<
" events in " <<
_nRun <<
" runs "
int _primaryJetFindingMode
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_)
virtual void processRunHeader(LCRunHeader *run)
SatoruJetsArray _jetsWorkArray
std::string _inputCollection
virtual void processEvent(LCEvent *evt)
SatoruPartonArray _partonsWorkArray
void putPartons(LCEvent *evt)
void callSatoru(LCEvent *evt)
int _secondJetFindingMode
virtual void check(LCEvent *evt)