CMS 3D CMS Logo

ElectronPixelSeedAnalyzer Class Reference

Description: rereading of electron seeds for verification. More...

#include <RecoEgamma/Examples/plugins/ElectronPixelSeedAnalyzer.h>

Inheritance diagram for ElectronPixelSeedAnalyzer:

edm::EDAnalyzer

List of all members.

Public Member Functions

virtual void analyze (const edm::Event &e, const edm::EventSetup &c)
virtual void beginJob (edm::EventSetup const &iSetup)
 ElectronPixelSeedAnalyzer (const edm::ParameterSet &conf)
virtual ~ElectronPixelSeedAnalyzer ()

Private Attributes

TH1F * histeclu_
TH1F * histeffeta_
TH1F * histeffpt_
TH1F * histeMC_
TH1F * histeoverp_
TH1F * histeta_
TH1F * histetaclu_
TH1F * histetaMC_
TH1F * histetclu_
TFile * histfile_
TH1I * histnbclus_
TH1I * histnbseeds_
TH1I * histnrseeds_
TH1F * histp_
TH1F * histpt_
TH1F * histptMC_
TH1F * histq_
edm::InputTag inputCollection_
std::vector< std::pair
< std::pair< const GeomDet *,
GlobalPoint >,
TrajectoryStateOnSurface > > 
mapTsos2_
std::vector< std::pair< const
GeomDet *,
TrajectoryStateOnSurface > > 
mapTsos_
float mcEnergy [10]
float mcEta [10]
float mcPhi [10]
float mcPt [10]
float mcQ [10]
edm::ESHandle< TrackerGeometrypDD
float seedDphi1 [10]
float seedDphi2 [10]
float seedDrz1 [10]
float seedDrz2 [10]
float seedEta [10]
int seedLayer1 [10]
int seedLayer2 [10]
float seedMomentum [10]
float seedPhi [10]
float seedPhi1 [10]
float seedPhi2 [10]
float seedPt [10]
float seedQ [10]
float seedRz1 [10]
float seedRz2 [10]
int seedSide1 [10]
int seedSide2 [10]
int seedSubdet1 [10]
int seedSubdet2 [10]
float superclusterEnergy [10]
float superclusterEt [10]
float superclusterEta [10]
float superclusterPhi [10]
edm::ESHandle< MagneticFieldtheMagField
TrajectoryStateTransform transformer_
TTree * tree_


Detailed Description

Description: rereading of electron seeds for verification.

Implementation: <Notes on="" implementation>="">

Definition at line 37 of file ElectronPixelSeedAnalyzer.h.


Constructor & Destructor Documentation

ElectronPixelSeedAnalyzer::ElectronPixelSeedAnalyzer ( const edm::ParameterSet conf  )  [explicit]

Definition at line 79 of file ElectronPixelSeedAnalyzer.cc.

References edm::ParameterSet::getParameter(), histfile_, and inputCollection_.

00080 {
00081   histfile_ = new
00082   TFile("electronpixelseeds.root","RECREATE");
00083   
00084   inputCollection_=conf.getParameter<edm::InputTag>("inputCollection");
00085 }  

ElectronPixelSeedAnalyzer::~ElectronPixelSeedAnalyzer (  )  [virtual]

Definition at line 87 of file ElectronPixelSeedAnalyzer.cc.

References histfile_, and tree_.

00088 {
00089  
00090   // do anything here that needs to be done at desctruction time
00091   // (e.g. close files, deallocate resources etc.)
00092   tree_->Print();
00093   histfile_->Write();
00094   histfile_->Close();
00095 }


Member Function Documentation

void ElectronPixelSeedAnalyzer::analyze ( const edm::Event e,
const edm::EventSetup c 
) [virtual]

Implements edm::EDAnalyzer.

Definition at line 148 of file ElectronPixelSeedAnalyzer.cc.

References alongMomentum, deltaR(), DetId::det(), lat::endl(), relval_parameters_module::energy, eta, PV3DBase< T, PVType, FrameType >::eta(), funct::exp(), edm::Event::getByLabel(), edm::Event::getByType(), TrajectoryStateOnSurface::globalMomentum(), TrajectoryStateOnSurface::globalPosition(), histeMC_, histeoverp_, histeta_, histetaclu_, histetaMC_, histetclu_, histnbclus_, histnbseeds_, histnrseeds_, histpt_, histptMC_, histq_, edm::Event::id(), inputCollection_, int, TrajectoryStateOnSurface::isValid(), it, TrajectoryStateOnSurface::localPosition(), LogDebug, lp, PV3DBase< T, PVType, FrameType >::mag(), mcEnergy, mcEta, mcPhi, mcPt, mcQ, FreeTrajectoryState::momentum(), oppositeToMomentum, p, pDD, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), phi, pi, FreeTrajectoryState::position(), funct::pow(), edm::Handle< T >::product(), PropagatorWithMaterial::propagate(), r, range, DetId::rawId(), seedDphi1, seedDphi2, seedDrz1, seedDrz2, seedEta, seedLayer1, seedLayer2, seedMomentum, seedPhi, seedPhi1, seedPhi2, seedPt, seedQ, seedRz1, seedRz2, seedSide1, seedSide2, seedSubdet1, seedSubdet2, funct::sin(), funct::sqrt(), DetId::subdetId(), superclusterEnergy, superclusterEt, superclusterEta, superclusterPhi, GeomDet::surface(), t, theMagField, Surface::toGlobal(), GeomDet::toGlobal(), transformer_, TrajectoryStateTransform::transientState(), tree_, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

00149 {
00150   
00151   // rereads the seeds for test purposes
00152   typedef edm::OwnVector<TrackingRecHit> recHitContainer;
00153   typedef recHitContainer::const_iterator const_iterator;
00154   typedef std::pair<const_iterator,const_iterator> range;
00155   
00156   
00157   // get beam spot
00158   edm::Handle<reco::BeamSpot> theBeamSpot;
00159   e.getByType(theBeamSpot);
00160 
00161   // get seeds
00162   
00163   edm::Handle<ElectronPixelSeedCollection> elSeeds;
00164   e.getByLabel(inputCollection_,elSeeds); 
00165   edm::LogInfo("")<<"\n\n =================> Treating event "<<e.id()<<" Number of seeds "<<elSeeds.product()->size();
00166   int is=0;
00167    
00168   FTSFromVertexToPointFactory   myFTS;  
00169   float mass=.000511; // electron propagation
00170   PropagatorWithMaterial* prop1stLayer = new PropagatorWithMaterial(oppositeToMomentum,mass,&(*theMagField));
00171   PropagatorWithMaterial* prop2ndLayer = new PropagatorWithMaterial(alongMomentum,mass,&(*theMagField));
00172 
00173   float dphi1=0., dphi2=0., drz1=0., drz2=0.;
00174   float phi1=0., phi2=0., rz1=0., rz2=0.;
00175   
00176   for( ElectronPixelSeedCollection::const_iterator MyS= (*elSeeds).begin(); MyS != (*elSeeds).end(); ++MyS) {
00177     
00178     LogDebug("") <<"\nSeed nr "<<is<<": ";
00179     range r=(*MyS).recHits();
00180      LogDebug("")<<" Number of RecHits= "<<(*MyS).nHits();
00181     const GeomDet *det1=0;const GeomDet *det2=0;
00182 
00183     TrajectorySeed::const_iterator it=r.first;
00184     DetId id1 = (*it).geographicalId();
00185     det1 = pDD->idToDet(id1);
00186     LogDebug("") <<" First hit local x,y,z "<<(*it).localPosition()<<" det "<<id1.det()<<" subdet "<<id1.subdetId();
00187     LogDebug("") <<" First hit global  "<<det1->toGlobal((*it).localPosition());
00188     //std::cout <<" First hit local x,y,z "<<(*it).localPosition()<<" det "<<id1.det()<<" subdet "<<id1.subdetId()<< std::endl;
00189     //std::cout <<" First hit global  "<<det1->toGlobal((*it).localPosition())<< std::endl;
00190     it++;
00191     DetId id2 = (*it).geographicalId();
00192     det2 = pDD->idToDet(id2);
00193     LogDebug("") <<" Second hit local x,y,z "<<(*it).localPosition()<<" det "<<id2.det()<<" subdet "<<id2.subdetId();
00194     LogDebug("") <<" Second hit global  "<<det2->toGlobal((*it).localPosition());
00195     //std::cout <<" Second hit local x,y,z "<<(*it).localPosition()<<" det "<<id2.det()<<" subdet "<<id2.subdetId()<< std::endl;
00196     //std::cout <<" Second hit global  "<<det2->toGlobal((*it).localPosition()) << std::endl;
00197 
00198     // state on last det
00199     const GeomDet *det=0;  
00200     for (TrackingRecHitCollection::const_iterator rhits=r.first; rhits!=r.second; rhits++) det = pDD->idToDet(((*rhits)).geographicalId());    
00201     TrajectoryStateOnSurface t= transformer_.transientState((*MyS).startingState(), &(det->surface()), &(*theMagField));
00202 
00203     // debug
00204     
00205     LogDebug("")<<" ElectronPixelSeed outermost state position: "<<t.globalPosition();
00206     LogDebug("")<<" ElectronPixelSeed outermost state momentum: "<<t.globalMomentum();
00207     edm::Ref<SuperClusterCollection> theClus=(*MyS).superCluster();
00208     LogDebug("")<<" ElectronPixelSeed superCluster energy: "<<theClus->energy()<<", position: "<<theClus->position();
00209     LogDebug("")<<" ElectronPixelSeed outermost state Pt: "<<t.globalMomentum().perp();
00210     LogDebug("")<<" ElectronPixelSeed supercluster Et: "<<theClus->energy()*sin(2.*atan(exp(-theClus->position().eta())));
00211     LogDebug("")<<" ElectronPixelSeed outermost momentum direction eta: "<<t.globalMomentum().eta();
00212     LogDebug("")<<" ElectronPixelSeed supercluster eta: "<<theClus->position().eta();
00213     LogDebug("")<<" ElectronPixelSeed seed charge: "<<(*MyS).getCharge();
00214     LogDebug("")<<" ElectronPixelSeed E/p: "<<theClus->energy()/t.globalMomentum().mag();
00215 
00216     // retreive SC and compute distances between hit position and prediction the same
00217     // way as in the PixelHitMatcher
00218         
00219     // inputs are charge, cluster position, vertex position, cluster energy and B field
00220     int charge = int((*MyS).getCharge());
00221     GlobalPoint xmeas(theClus->position().x(),theClus->position().y(),theClus->position().z()); 
00222     GlobalPoint vprim(theBeamSpot->position().x(),theBeamSpot->position().y(),theBeamSpot->position().z());
00223     float energy = theClus->energy();
00224 
00225     FreeTrajectoryState fts = myFTS(&(*theMagField),xmeas, vprim, 
00226                                  energy, charge);
00227     //std::cout << "[PixelHitMatcher::compatibleSeeds] fts position, momentum " <<
00228     // fts.parameters().position() << " " << fts.parameters().momentum() << std::endl; 
00229 
00230     PerpendicularBoundPlaneBuilder bpb;
00231     TrajectoryStateOnSurface tsos(fts, *bpb(fts.position(), fts.momentum()));
00232   
00233     //      TrajectorySeed::range r=(*seeds.product())[i].recHits();
00234    // TrajectorySeed::range r=(*seeds)[i].recHits();
00235 
00236     // first Hit
00237     it=r.first;
00238     DetId id=(*it).geographicalId();
00239     const GeomDet *geomdet=pDD->idToDet((*it).geographicalId());
00240     LocalPoint lp=(*it).localPosition();
00241     GlobalPoint hitPos=geomdet->surface().toGlobal(lp);
00242 
00243     TrajectoryStateOnSurface tsos1;
00244     tsos1 = prop1stLayer->propagate(tsos,geomdet->surface()) ;
00245 
00246     if (tsos1.isValid()) {
00247 
00248       std::pair<bool,double> est;
00249 
00250       //UB add test on phidiff
00251       float SCl_phi = xmeas.phi();
00252       float localDphi = SCl_phi-hitPos.phi();
00253       if(localDphi>CLHEP::pi)localDphi-=(2*CLHEP::pi);
00254       if(localDphi<-CLHEP::pi)localDphi+=(2*CLHEP::pi);
00255       if(fabs(localDphi)>2.5)continue;
00256 
00257       phi1 = hitPos.phi();
00258       dphi1 = hitPos.phi() - tsos1.globalPosition().phi();
00259       rz1 = hitPos.perp(); 
00260       drz1 = hitPos.perp() - tsos1.globalPosition().perp();
00261       if (id.subdetId()%2==1) {
00262         drz1 = hitPos.z() - tsos1.globalPosition().z();
00263         rz1 = hitPos.z();
00264       }
00265       
00266       // now second Hit
00267       it++;
00268       DetId id2=(*it).geographicalId();
00269       const GeomDet *geomdet2=pDD->idToDet((*it).geographicalId());
00270       TrajectoryStateOnSurface tsos2;
00271 
00272       // compute the z vertex from the cluster point and the found pixel hit
00273       double pxHit1z = hitPos.z();
00274       double pxHit1x = hitPos.x();
00275       double pxHit1y = hitPos.y();      
00276       double r1diff = (pxHit1x-vprim.x())*(pxHit1x-vprim.x()) + (pxHit1y-vprim.y())*(pxHit1y-vprim.y());
00277       r1diff=sqrt(r1diff);
00278       double r2diff = (xmeas.x()-pxHit1x)*(xmeas.x()-pxHit1x) + (xmeas.y()-pxHit1y)*(xmeas.y()-pxHit1y);
00279       r2diff=sqrt(r2diff);
00280       double zVertexPred = pxHit1z - r1diff*(xmeas.z()-pxHit1z)/r2diff;
00281 
00282       GlobalPoint vertexPred(vprim.x(),vprim.y(),zVertexPred);
00283 
00284       FreeTrajectoryState fts2 = myFTS(&(*theMagField),hitPos,vertexPred,energy, charge);
00285       tsos2 = prop2ndLayer->propagate(fts2,geomdet2->surface()) ;
00286 
00287       if (tsos2.isValid()) {
00288         LocalPoint lp2=(*it).localPosition();
00289         GlobalPoint hitPos2=geomdet2->surface().toGlobal(lp2); 
00290         phi2 = hitPos2.phi();
00291         dphi2 = hitPos2.phi() - tsos2.globalPosition().phi();
00292         rz2 = hitPos2.perp();
00293         drz2 = hitPos2.perp() - tsos2.globalPosition().perp();
00294         if (id2.subdetId()%2==1) {
00295           rz2 = hitPos2.z();
00296           drz2 = hitPos2.z() - tsos2.globalPosition().z();
00297         }
00298       }
00299 
00300     } 
00301 
00302     // fill the tree and histos
00303     
00304     histpt_->Fill(t.globalMomentum().perp());
00305     histetclu_->Fill(theClus->energy()*sin(2.*atan(exp(-theClus->position().eta()))));
00306     histeta_->Fill(t.globalMomentum().eta());
00307     histetaclu_->Fill(theClus->position().eta());
00308     histq_->Fill((*MyS).getCharge());
00309     histeoverp_->Fill(theClus->energy()/t.globalMomentum().mag());   
00310     
00311     if (is<10) {
00312       superclusterEnergy[is] = theClus->energy();
00313       superclusterEta[is] = theClus->position().eta();
00314       superclusterPhi[is] = theClus->position().phi();
00315       superclusterEt[is] = theClus->energy()*sin(2.*atan(exp(-theClus->position().eta())));
00316       seedMomentum[is] = t.globalMomentum().mag();
00317       seedEta[is] = t.globalMomentum().eta();
00318       seedPhi[is] = t.globalMomentum().phi();
00319       seedPt[is] = t.globalMomentum().perp();
00320       seedQ[is] = (*MyS).getCharge();
00321       seedSubdet1[is] = id1.subdetId();
00322       switch (seedSubdet1[is]) {
00323         case 1:
00324           {
00325           PXBDetId pxbid1( id1.rawId() );
00326           seedLayer1[is] = pxbid1.layer();
00327           seedSide1[is] = 0;
00328           break;
00329           }
00330         case 2:
00331         {
00332           PXFDetId pxfid1( id1.rawId() );
00333           seedLayer1[is] = pxfid1.disk();
00334           seedSide1[is] = pxfid1.side();
00335           break;
00336           }
00337         case 3:
00338           {
00339           TIBDetId tibid1( id1.rawId() );
00340           seedLayer1[is] = tibid1.layer();
00341           seedSide1[is] = 0;
00342           break;
00343           }
00344         case 4:
00345           {
00346           TIDDetId tidid1( id1.rawId() );
00347           seedLayer1[is] = tidid1.wheel();
00348           seedSide1[is] = tidid1.side();
00349           break;
00350           }
00351         case 5:
00352           {
00353           TOBDetId tobid1( id1.rawId() );
00354           seedLayer1[is] = tobid1.layer();
00355           seedSide1[is] = 0;
00356           break;
00357           }
00358         case 6:
00359           {
00360           TECDetId tecid1( id1.rawId() );
00361           seedLayer1[is] = tecid1.wheel();
00362           seedSide1[is] = tecid1.side();          
00363           break;
00364           }
00365       }
00366       seedPhi1[is] = phi1;
00367       seedRz1[is] = rz1;
00368       seedDphi1[is] = dphi1;
00369       seedDrz1[is] = drz1;
00370       seedSubdet2[is] = id2.subdetId();
00371       switch (seedSubdet2[is]) {
00372         case 1:
00373           {
00374           PXBDetId pxbid2( id2.rawId() );
00375           seedLayer2[is] = pxbid2.layer();
00376           seedSide2[is] = 0;
00377           break;
00378           }
00379         case 2:
00380           {
00381           PXFDetId pxfid2( id2.rawId() );
00382           seedLayer2[is] = pxfid2.disk();
00383           seedSide2[is] = pxfid2.side();
00384           break;
00385           }
00386         case 3:
00387           {
00388           TIBDetId tibid2( id2.rawId() );
00389           seedLayer2[is] = tibid2.layer();
00390           seedSide2[is] = 0;
00391           break;
00392           }
00393         case 4:
00394           {
00395           TIDDetId tidid2( id2.rawId() );
00396           seedLayer2[is] = tidid2.wheel();
00397           seedSide2[is] = tidid2.side();
00398           break;
00399           }
00400         case 5:
00401           {
00402           TOBDetId tobid2( id2.rawId() );
00403           seedLayer2[is] = tobid2.layer();
00404           seedSide2[is] = 0;
00405           break;
00406           }
00407         case 6:
00408           {
00409           TECDetId tecid2( id2.rawId() );
00410           seedLayer2[is] = tecid2.wheel();
00411           seedSide2[is] = tecid2.side();          
00412           break;
00413           }
00414       }
00415       seedDphi2[is] = dphi2;
00416       seedDrz2[is] = drz2;
00417       seedPhi2[is] = phi2;
00418       seedRz2[is] = rz2;
00419     }
00420     
00421     is++;
00422     
00423   }
00424   
00425   histnbseeds_->Fill(elSeeds.product()->size());
00426 
00427   // get input clusters 
00428 
00429   edm::Handle<SuperClusterCollection> clusters;
00430   //CC to be changed according to supercluster input
00431   e.getByLabel("correctedHybridSuperClusters", clusters); 
00432   histnbclus_->Fill(clusters.product()->size());
00433   if (clusters.product()->size()>0) histnrseeds_->Fill(elSeeds.product()->size());
00434   
00435   // get MC information
00436   
00437   edm::Handle<edm::HepMCProduct> HepMCEvt;
00438   // this one is empty branch in current test files
00439   //e.getByLabel("VtxSmeared", "", HepMCEvt);
00440   e.getByLabel("source", "", HepMCEvt);
00441   
00442   const HepMC::GenEvent* MCEvt = HepMCEvt->GetEvent();
00443   HepMC::GenParticle* genPc=0;
00444   HepMC::FourVector pAssSim;
00445   int ip=0;
00446   for (HepMC::GenEvent::particle_const_iterator partIter = MCEvt->particles_begin();
00447    partIter != MCEvt->particles_end(); ++partIter) { 
00448 
00449     for (HepMC::GenEvent::vertex_const_iterator vertIter = MCEvt->vertices_begin();
00450      vertIter != MCEvt->vertices_end(); ++vertIter) {
00451 
00452       //      CLHEP::HepLorentzVector creation = (*partIter)->CreationVertex();
00453       HepMC::GenVertex * creation = (*partIter)->production_vertex();
00454       //      CLHEP::HepLorentzVector momentum = (*partIter)->Momentum();
00455       HepMC::FourVector momentum = (*partIter)->momentum();
00456       //      HepPDT::ParticleID id = (*partIter)->particleID();  // electrons and positrons are 11 and -11
00457        int id = (*partIter)->pdg_id();  // electrons and positrons are 11 and -11
00458      LogDebug("")  << "MC particle id " << id << ", creationVertex " << (*creation) << " cm, initialMomentum " << momentum.mag() << " GeV/c" << std::endl;
00459 
00460       if (id == 11 || id == -11) {
00461 
00462       // single primary electrons or electrons from Zs or Ws
00463       HepMC::GenParticle* mother = 0;
00464       if ( (*partIter)->production_vertex() )  {
00465        if ( (*partIter)->production_vertex()->particles_begin(HepMC::parents) != 
00466            (*partIter)->production_vertex()->particles_end(HepMC::parents))  
00467             mother = *((*partIter)->production_vertex()->particles_begin(HepMC::parents));
00468       } 
00469       if ( ((mother == 0) || ((mother != 0) && (mother->pdg_id() == 23))
00470                           || ((mother != 0) && (mother->pdg_id() == 32))
00471                           || ((mother != 0) && (fabs(mother->pdg_id()) == 24)))) {  
00472       genPc=(*partIter);
00473       pAssSim = genPc->momentum();
00474 
00475       if (pAssSim.perp()> 100. || fabs(pAssSim.eta())> 2.5) continue;
00476                                
00477       // looking for the best matching gsf electron
00478       bool okSeedFound = false;
00479       double seedOkRatio = 999999.;
00480 
00481       // find best matched seed
00482       reco::ElectronPixelSeed bestElectronSeed;
00483       for( ElectronPixelSeedCollection::const_iterator gsfIter= (*elSeeds).begin(); gsfIter != (*elSeeds).end(); ++gsfIter) {   
00484         
00485     range r=gsfIter->recHits();
00486     const GeomDet *det=0;      
00487     for (TrackingRecHitCollection::const_iterator rhits=r.first; rhits!=r.second; rhits++) det = pDD->idToDet(((*rhits)).geographicalId());    
00488     TrajectoryStateOnSurface t= transformer_.transientState(gsfIter->startingState(), &(det->surface()), &(*theMagField));
00489 
00490         float eta = t.globalMomentum().eta();
00491         float phi = t.globalMomentum().phi();
00492         float p = t.globalMomentum().mag();
00493         double deltaR = sqrt(pow((eta-pAssSim.eta()),2) + pow((phi-pAssSim.phi()),2));
00494         if ( deltaR < 0.05 ){
00495         //if ( (genPc->pdg_id() == 11) && (gsfIter->charge() < 0.) || (genPc->pdg_id() == -11) &&
00496         //(gsfIter->charge() > 0.) ){
00497           double tmpSeedRatio = p/pAssSim.t();
00498           if ( fabs(tmpSeedRatio-1) < fabs(seedOkRatio-1) ) {
00499             seedOkRatio = tmpSeedRatio;
00500             bestElectronSeed=*gsfIter;
00501             okSeedFound = true;
00502           } 
00503         //} 
00504         } 
00505       } // loop over rec ele to look for the best one   
00506 
00507       // analysis when the mc track is found
00508      if (okSeedFound){
00509 
00510         histptMC_->Fill(pAssSim.perp());
00511         histetaMC_->Fill(pAssSim.eta());
00512         histeMC_->Fill(pAssSim.rho());
00513         if (ip<10) {
00514           mcEnergy[ip] = pAssSim.rho();
00515           mcEta[ip] = pAssSim.eta();
00516           mcPhi[ip] = pAssSim.phi();
00517           mcPt[ip] = pAssSim.perp();
00518           mcQ[ip] = ((id == 11) ? -1.: +1.);
00519         }
00520       }
00521       }
00522 
00523     }
00524     
00525     }
00526     
00527     ip++;
00528    
00529   }  
00530     
00531   tree_->Fill();
00532   
00533 }

void ElectronPixelSeedAnalyzer::beginJob ( edm::EventSetup const &  iSetup  )  [virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file ElectronPixelSeedAnalyzer.cc.

References edm::EventSetup::get(), histeclu_, histeffeta_, histeffpt_, histeMC_, histeoverp_, histeta_, histetaclu_, histetaMC_, histetclu_, histnbclus_, histnbseeds_, histnrseeds_, histp_, histpt_, histptMC_, histq_, mcEnergy, mcEta, mcPhi, mcPt, mcQ, pDD, seedDphi1, seedDphi2, seedDrz1, seedDrz2, seedEta, seedLayer1, seedLayer2, seedMomentum, seedPhi, seedPhi1, seedPhi2, seedPt, seedQ, seedRz1, seedRz2, seedSide1, seedSide2, seedSubdet1, seedSubdet2, superclusterEnergy, superclusterEt, superclusterEta, superclusterPhi, theMagField, and tree_.

00097                                                                   {
00098   iSetup.get<TrackerDigiGeometryRecord> ().get(pDD); 
00099   iSetup.get<IdealMagneticFieldRecord>().get(theMagField);
00100   tree_ = new TTree("ElectronPixelSeeds","ElectronPixelSeed validation ntuple");
00101   tree_->Branch("mcEnergy",mcEnergy,"mcEnergy[10]/F");
00102   tree_->Branch("mcEta",mcEta,"mcEta[10]/F");
00103   tree_->Branch("mcPhi",mcPhi,"mcPhi[10]/F");
00104   tree_->Branch("mcPt",mcPt,"mcPt[10]/F");
00105   tree_->Branch("mcQ",mcQ,"mcQ[10]/F");
00106   tree_->Branch("superclusterEnergy",superclusterEnergy,"superclusterEnergy[10]/F");
00107   tree_->Branch("superclusterEta",superclusterEta,"superclusterEta[10]/F");
00108   tree_->Branch("superclusterPhi",superclusterPhi,"superclusterPhi[10]/F");
00109   tree_->Branch("superclusterEt",superclusterEt,"superclusterEt[10]/F");
00110   tree_->Branch("seedMomentum",seedMomentum,"seedMomentum[10]/F");
00111   tree_->Branch("seedEta",seedEta,"seedEta[10]/F");
00112   tree_->Branch("seedPhi",seedPhi,"seedPhi[10]/F");
00113   tree_->Branch("seedPt",seedPt,"seedPt[10]/F");
00114   tree_->Branch("seedQ",seedQ,"seedQ[10]/F");
00115   tree_->Branch("seedSubdet1",seedSubdet1,"seedSubdet1[10]/I");
00116   tree_->Branch("seedLayer1",seedLayer1,"seedLayer1[10]/I");
00117   tree_->Branch("seedSide1",seedSide1,"seedSide1[10]/I");
00118   tree_->Branch("seedPhi1",seedPhi1,"seedPhi1[10]/F");
00119   tree_->Branch("seedDphi1",seedDphi1,"seedDphi1[10]/F");
00120   tree_->Branch("seedDrz1",seedDrz1,"seedDrz1[10]/F");
00121   tree_->Branch("seedRz1",seedRz1,"seedRz1[10]/F");
00122   tree_->Branch("seedSubdet2",seedSubdet2,"seedSubdet2[10]/I");
00123   tree_->Branch("seedLayer2",seedLayer2,"seedLayer2[10]/I");
00124   tree_->Branch("seedSide2",seedSide2,"seedSide2[10]/I");
00125   tree_->Branch("seedPhi2",seedPhi2,"seedPhi2[10]/F");
00126   tree_->Branch("seedDphi2",seedDphi2,"seedDphi2[10]/F");
00127   tree_->Branch("seedRz2",seedRz2,"seedRz2[10]/F");
00128   tree_->Branch("seedDrz2",seedDrz2,"seedDrz2[10]/F");
00129   histeMC_ = new TH1F("eMC","MC particle energy",100,0.,100.);
00130   histp_ = new TH1F("p","seed p",100,0.,100.);
00131   histeclu_ = new TH1F("clus energy","supercluster energy",100,0.,100.);
00132   histpt_ = new TH1F("pt","seed pt",100,0.,100.);
00133   histptMC_ = new TH1F("ptMC","MC particle pt",100,0.,100.);
00134   histetclu_ = new TH1F("Et","supercluster Et",100,0.,100.);
00135   histeffpt_ = new TH1F("pt eff","seed effciency vs pt",100,0.,100.);
00136   histeta_ = new TH1F("seed eta","seed eta",100,-2.5,2.5);
00137   histetaMC_ = new TH1F("etaMC","MC particle eta",100,-2.5,2.5);
00138   histetaclu_ = new TH1F("clus eta","supercluster eta",100,-2.5,2.5);
00139   histeffeta_ = new TH1F("eta eff","seed effciency vs eta",100,-2.5,2.5);
00140   histq_ = new TH1F("q","seed charge",100,-2.5,2.5);
00141   histeoverp_ = new TH1F("E/p","seed E/p",100,0.,10.);
00142   histnbseeds_ = new TH1I("nrs","Nr of seeds ",50,0.,25.);
00143   histnbclus_ = new TH1I("nrclus","Nr of superclusters ",50,0.,25.);
00144   histnrseeds_ = new TH1I("ns","Nr of seeds if clusters",50,0.,25.);
00145 }     


Member Data Documentation

TH1F* ElectronPixelSeedAnalyzer::histeclu_ [private]

Definition at line 65 of file ElectronPixelSeedAnalyzer.h.

Referenced by beginJob().

TH1F* ElectronPixelSeedAnalyzer::histeffeta_ [private]

Definition at line 73 of file ElectronPixelSeedAnalyzer.h.

Referenced by beginJob().

TH1F* ElectronPixelSeedAnalyzer::histeffpt_ [private]

Definition at line 69 of file ElectronPixelSeedAnalyzer.h.

Referenced by beginJob().

TH1F* ElectronPixelSeedAnalyzer::histeMC_ [private]

Definition at line 63 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* ElectronPixelSeedAnalyzer::histeoverp_ [private]

Definition at line 75 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* ElectronPixelSeedAnalyzer::histeta_ [private]

Definition at line 70 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* ElectronPixelSeedAnalyzer::histetaclu_ [private]

Definition at line 72 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* ElectronPixelSeedAnalyzer::histetaMC_ [private]

Definition at line 71 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* ElectronPixelSeedAnalyzer::histetclu_ [private]

Definition at line 68 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TFile* ElectronPixelSeedAnalyzer::histfile_ [private]

Definition at line 53 of file ElectronPixelSeedAnalyzer.h.

Referenced by ElectronPixelSeedAnalyzer(), and ~ElectronPixelSeedAnalyzer().

TH1I* ElectronPixelSeedAnalyzer::histnbclus_ [private]

Definition at line 78 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1I* ElectronPixelSeedAnalyzer::histnbseeds_ [private]

Definition at line 77 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1I* ElectronPixelSeedAnalyzer::histnrseeds_ [private]

Definition at line 76 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* ElectronPixelSeedAnalyzer::histp_ [private]

Definition at line 64 of file ElectronPixelSeedAnalyzer.h.

Referenced by beginJob().

TH1F* ElectronPixelSeedAnalyzer::histpt_ [private]

Definition at line 66 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* ElectronPixelSeedAnalyzer::histptMC_ [private]

Definition at line 67 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TH1F* ElectronPixelSeedAnalyzer::histq_ [private]

Definition at line 74 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

edm::InputTag ElectronPixelSeedAnalyzer::inputCollection_ [private]

Definition at line 80 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and ElectronPixelSeedAnalyzer().

std::vector<std::pair<std::pair<const GeomDet*,GlobalPoint>, TrajectoryStateOnSurface> > ElectronPixelSeedAnalyzer::mapTsos2_ [private]

Definition at line 82 of file ElectronPixelSeedAnalyzer.h.

std::vector<std::pair<const GeomDet*, TrajectoryStateOnSurface> > ElectronPixelSeedAnalyzer::mapTsos_ [private]

Definition at line 81 of file ElectronPixelSeedAnalyzer.h.

float ElectronPixelSeedAnalyzer::mcEnergy[10] [private]

Definition at line 55 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::mcEta[10] [private]

Definition at line 55 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::mcPhi[10] [private]

Definition at line 55 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::mcPt[10] [private]

Definition at line 55 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::mcQ[10] [private]

Definition at line 55 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

edm::ESHandle<TrackerGeometry> ElectronPixelSeedAnalyzer::pDD [private]

Definition at line 51 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedDphi1[10] [private]

Definition at line 61 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedDphi2[10] [private]

Definition at line 61 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedDrz1[10] [private]

Definition at line 61 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedDrz2[10] [private]

Definition at line 61 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedEta[10] [private]

Definition at line 57 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

int ElectronPixelSeedAnalyzer::seedLayer1[10] [private]

Definition at line 59 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

int ElectronPixelSeedAnalyzer::seedLayer2[10] [private]

Definition at line 59 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedMomentum[10] [private]

Definition at line 57 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedPhi[10] [private]

Definition at line 57 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedPhi1[10] [private]

Definition at line 62 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedPhi2[10] [private]

Definition at line 62 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedPt[10] [private]

Definition at line 57 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedQ[10] [private]

Definition at line 57 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedRz1[10] [private]

Definition at line 62 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::seedRz2[10] [private]

Definition at line 62 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

int ElectronPixelSeedAnalyzer::seedSide1[10] [private]

Definition at line 60 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

int ElectronPixelSeedAnalyzer::seedSide2[10] [private]

Definition at line 60 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

int ElectronPixelSeedAnalyzer::seedSubdet1[10] [private]

Definition at line 58 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

int ElectronPixelSeedAnalyzer::seedSubdet2[10] [private]

Definition at line 58 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::superclusterEnergy[10] [private]

Definition at line 56 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::superclusterEt[10] [private]

Definition at line 56 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::superclusterEta[10] [private]

Definition at line 56 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

float ElectronPixelSeedAnalyzer::superclusterPhi[10] [private]

Definition at line 56 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

edm::ESHandle<MagneticField> ElectronPixelSeedAnalyzer::theMagField [private]

Definition at line 52 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), and beginJob().

TrajectoryStateTransform ElectronPixelSeedAnalyzer::transformer_ [private]

Definition at line 50 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze().

TTree* ElectronPixelSeedAnalyzer::tree_ [private]

Definition at line 54 of file ElectronPixelSeedAnalyzer.h.

Referenced by analyze(), beginJob(), and ~ElectronPixelSeedAnalyzer().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:20:20 2009 for CMSSW by  doxygen 1.5.4