199 using namespace reco;
209 vs_sell = vertices3->size();
211 vzr_sell = vertices3->begin()->z();
219 double tower_eta, tower_phi;
220 double tower_energyet, tower_energyet_e, tower_energyet_h;
221 double s1,
s2, s13,s23,s14,s24,s15,s25,s16,s26;
228 tower_eta =
j->eta();
229 tower_phi =
j->phi();
230 tower_energyet_e =
j->emEt();
231 tower_energyet_h =
j->hadEt();
232 tower_energyet = tower_energyet_e + tower_energyet_h;
234 s1 =
sin(2.*tower_phi);
235 s2 =
cos(2.*tower_phi);
236 s13 =
sin(3.*tower_phi);
237 s23 =
cos(3.*tower_phi);
238 s14 =
sin(4.*tower_phi);
239 s24 =
cos(4.*tower_phi);
240 s15 =
sin(5.*tower_phi);
241 s25 =
cos(5.*tower_phi);
242 s16 =
sin(6.*tower_phi);
243 s26 =
cos(6.*tower_phi);
245 if(tower_energyet<
minet_)
continue;
246 if(tower_energyet>
maxet_)
continue;;
287 for(reco::TrackCollection::const_iterator
j = tracks->begin();
j != tracks->end();
j++){
297 double vzErr =0.0, vxErr=0.0, vyErr=0.0;
298 if(vertex->size()>0) {
299 vtxPoint=vertex->begin()->position();
300 vzErr=vertex->begin()->zError();
301 vxErr=vertex->begin()->xError();
302 vyErr=vertex->begin()->yError();
304 bool accepted =
true;
305 bool isPixel =
false;
307 if (
j->numberOfValidHits() < 7 ) isPixel =
true;
310 double d0=0.0, dz=0.0, d0sigma=0.0, dzsigma=0.0;
311 d0 = -1.*
j->dxy(vtxPoint);
312 dz =
j->dz(vtxPoint);
313 d0sigma =
sqrt(
j->d0Error()*
j->d0Error()+vxErr*vyErr);
314 dzsigma =
sqrt(
j->dzError()*
j->dzError()+vzErr*vzErr);
320 if ( fabs(dz/dzsigma) >
dzerr_ ) accepted =
false;
323 if (
j->normalizedChi2() >
chi2_ ) accepted =
false;
330 if ( fabs(dz/dzsigma) > 3 ) accepted =
false;
331 if ( fabs(d0/d0sigma) > 3 ) accepted =
false;
334 if (
j->ptError()/
j->pt() > 0.05 ) accepted =
false;
337 if (
j->numberOfValidHits() < 12 ) accepted =
false;
340 track_eta =
j->eta();
341 track_phi =
j->phi();
343 double s =
sin(2*track_phi);
344 double c =
cos(2*track_phi);
345 double s3 =
sin(3*track_phi);
346 double c3 =
cos(3*track_phi);
347 double s4 =
sin(4*track_phi);
348 double c4 =
cos(4*track_phi);
349 double s5 =
sin(5*track_phi);
350 double c5 =
cos(5*track_phi);
351 double s6 =
sin(6*track_phi);
352 double c6 =
cos(6*track_phi);
358 if(track_pt<
minpt_)
continue;
359 if(track_pt>
maxpt_)
continue;
395 for(
int i = 0;
i<9;
i++) {
396 evtplaneOutput->push_back(*ep[
i]);
401 if(
EPNames[
i].rfind(
"Ecal")!=string::npos) {
402 evtplaneOutput->push_back(*ep[
i]);
405 if(
EPNames[
i].rfind(
"Hcal")!=string::npos) {
406 evtplaneOutput->push_back(*ep[
i]);
409 evtplaneOutput->push_back(*ep[
i]);
413 iEvent.
put(evtplaneOutput,
"recoLevel");
double getAngle(double &ang, double &sv, double &cv)
edm::EDGetTokenT< reco::VertexCollection > vtxCollection_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
std::vector< CaloTower >::const_iterator const_iterator
std::vector< Vertex > VertexCollection
collection of Vertex objects
const std::string EPNames[]
GenPlane * rp[NumEPNames]
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Cos< T >::type cos(const T &t)
std::vector< EvtPlane > EvtPlaneCollection
edm::EDGetTokenT< CaloTowerCollection > caloCollection_
edm::EDGetTokenT< reco::TrackCollection > trackCollection_
void addParticle(double w, double s, double c, double eta)
XYZPointD XYZPoint
point in space with cartesian internal representation
static const int NumEPNames
void reset(double vett[256])