7 const std::vector<fastjet::PseudoJet>
10 const std::vector<int>* typeIdx )
15 Event workEventJet = workEvent;
19 std::set< int > typeSet[3];
25 for (
size_t i=0;
i<3;
i++ )
28 for (
size_t j=0;
j<typeIdx[
i].size();
j++ )
37 int pos = typeIdx[
i][
j];
40 for (
int ip=2; ip<pos; ip++ )
46 if ( hepeup.
MOTHUP[ip].first == hepeup.
MOTHUP[ip].second )
53 typeSet[
i].insert( pos );
66 for (
int i = 0;
i < workEventJet.size(); ++
i)
69 if (!workEventJet[
i].isFinal())
continue;
77 int id = workEventJet[
i].idAbs();
80 workEventJet[
i].statusNeg();
86 int idx = workEventJet[
i].daughter1();
97 if (typeSet[1].
find(idx) != typeSet[1].
end() ||
98 typeSet[2].
find(idx) != typeSet[2].
end())
100 workEventJet[
i].statusNeg();
110 idx =
event[
idx].mother1();
118 if (typeSet[1].
find(idx) != typeSet[1].
end())
break;
124 workEventJet[
i].statusNeg();
129 idx =
event[
idx].mother1();
162 for (
int i=0;
i<workEventJet.size();
i++ )
167 if ( workEventJet[
i].
status() < 0 )
continue;
179 fastjet::PseudoJet partTmp = workEventJet[
i];
191 int parentId = fullEvent[pos].mother1();
192 int parentPrevId = 0;
195 while ( parentId > 0 )
197 if ( parentId == fullEvent[counter].mother2() )
199 parentPrevId = parentId;
201 parentId = fullEvent[parentPrevId].mother1();
209 if ( (parentId < parentPrevId) || parentId < fullEvent[counter].mother2() )
213 if (
abs(fullEvent[counter].
status()) == 22 ||
abs(fullEvent[counter].
status()) == 23 )
222 parentPrevId = parentId;
223 parentId = fullEvent[parentPrevId].mother1();
226 else if ( parentId > parentPrevId || parentId > pos )
234 if (
abs(fullEvent[parentId].
status()) == 22 ||
abs(fullEvent[parentId].
status())== 23 )
238 if (
abs(fullEvent[parentId].
status()) < 22 )
249 #include "HepMC/HEPEVT_Wrapper.h"
252 const std::vector<fastjet::PseudoJet>
255 const std::vector<int>* )
260 HepMC::HEPEVT_Wrapper::zero_everything();
264 std::vector<int> Py8PartonIdx;
265 Py8PartonIdx.clear();
266 std::vector<int> HEPEVTPartonIdx;
267 HEPEVTPartonIdx.clear();
273 int Py8PartonCounter = 0;
274 int HEPEVTPartonCounter = 0;
278 for (
int iprt=1; iprt<
event.size(); iprt++ )
281 if (
abs(part.status()) < 22 )
continue;
284 Py8PartonCounter = iprt;
290 for (
int iprt=2; iprt<hepeup.
NUP; iprt++ )
293 HepMC::HEPEVT_Wrapper::set_id( index, hepeup.
IDUP[iprt] );
294 HepMC::HEPEVT_Wrapper::set_status( index, 2 );
295 HepMC::HEPEVT_Wrapper::set_momentum( index, hepeup.
PUP[iprt][0], hepeup.
PUP[iprt][1], hepeup.
PUP[iprt][2], hepeup.
PUP[iprt][4] );
296 HepMC::HEPEVT_Wrapper::set_mass( index, hepeup.
PUP[iprt][4] );
298 HepMC::HEPEVT_Wrapper::set_parents( index, 0, 0 );
299 HepMC::HEPEVT_Wrapper::set_children( index, 0, 0 );
300 if ( hepeup.
MOTHUP[iprt].first > 2 && hepeup.
MOTHUP[iprt].second > 2 )
302 HEPEVTPartonCounter++;
305 Py8PartonIdx.push_back( Py8PartonCounter );
307 HEPEVTPartonIdx.push_back( HEPEVTPartonCounter);
308 HEPEVTPartonCounter++;
311 HepMC::HEPEVT_Wrapper::set_number_entries( index );
316 for (
int iprt=1; iprt<workEvent.size(); iprt++ )
323 if ( part.status() < 51 )
continue;
325 HepMC::HEPEVT_Wrapper::set_id( index, part.id() );
328 HepMC::HEPEVT_Wrapper::set_status( index, 1 );
329 HepMC::HEPEVT_Wrapper::set_momentum( index, part.px(), part.py(), part.pz(), part.e() );
330 HepMC::HEPEVT_Wrapper::set_mass( index, part.m() );
331 HepMC::HEPEVT_Wrapper::set_position( index, part.xProd(), part.yProd(), part.zProd(), part.tProd() );
332 HepMC::HEPEVT_Wrapper::set_parents( index, 0, 0 );
334 HepMC::HEPEVT_Wrapper::set_children( index, 0, 0 );
340 if ( parentId <= 0 )
continue;
342 for (
int idx=0;
idx<(int)Py8PartonIdx.size();
idx++ )
344 if ( parentId == Py8PartonIdx[
idx] )
346 int idx1 = HEPEVTPartonIdx[
idx];
347 HepMC::HEPEVT_Wrapper::set_parents( index, idx1+1, idx1+1 );
354 HepMC::HEPEVT_Wrapper::set_number_entries( index );
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
const HEPEUP * getHEPEUP() const
std::vector< std::pair< int, int > > MOTHUP
std::vector< FiveVector > PUP
Abs< T >::type abs(const T &t)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
static std::atomic< unsigned int > counter
static unsigned int const shift