#include <PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h>
Definition at line 29 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
typedef Regions::const_iterator PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::IR [private] |
Definition at line 60 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
typedef std::vector<TrackingRegion* > PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::Regions [private] |
Definition at line 59 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo | ( | const edm::ParameterSet & | conf | ) |
Definition at line 15 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.cc.
References init().
:_conf(conf),seedCollection(0), hitsfactoryPSet(conf.getParameter<edm::ParameterSet>("OrderedHitsFactoryPSet")), creatorPSet(conf.getParameter<edm::ParameterSet>("SeedCreatorPSet")), regfactoryPSet(conf.getParameter<edm::ParameterSet>("RegionFactoryPSet")), theClusterCheck(conf.getParameter<edm::ParameterSet>("ClusterCheckPSet")), theSilentOnClusterCheck(conf.getParameter<edm::ParameterSet>("ClusterCheckPSet").getUntrackedParameter<bool>("silentClusterCheck",false)){ init(); }
PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::~PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo | ( | ) | [inline] |
Definition at line 33 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
{};
void PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::analyze | ( | const edm::Event & | event, |
const edm::EventSetup & | setup | ||
) |
Definition at line 44 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.cc.
References _conf, event(), edm::ParameterSet::getParameter(), edm::HandleBase::isValid(), loop(), myEsetup, myEvent, po, PrintRecoObjects::print(), regions, GlobalTrackingRegionProducerFromBeamSpot::regions(), seedCollection, HcalObjRepresent::setup(), ss, theClusterCheck, theRegionProducer, theSilentOnClusterCheck, ClusterChecker::tooManyClusters(), and vertexHandle.
Referenced by PhotonConversionTrajectorySeedProducerFromQuadruplets::produce().
{ myEsetup = &setup; myEvent = &event; if(seedCollection!=0) delete seedCollection; seedCollection= new TrajectorySeedCollection(); size_t clustsOrZero = theClusterCheck.tooManyClusters(event); if (clustsOrZero){ if (!theSilentOnClusterCheck) edm::LogError("TooManyClusters") << "Found too many clusters (" << clustsOrZero << "), bailing out.\n"; return ; } regions = theRegionProducer->regions(event,setup); event.getByLabel(_conf.getParameter<edm::InputTag>("primaryVerticesTag"), vertexHandle); if (!vertexHandle.isValid()){ edm::LogError("PhotonConversionFinderFromTracks") << "Error! Can't get the product primary Vertex Collection "<< _conf.getParameter<edm::InputTag>("primaryVerticesTag") << "\n"; return; } //Do the analysis loop(); #ifdef debugTSPFSLA std::stringstream ss; ss.str(""); ss << "\n++++++++++++++++++\n"; ss << "seed collection size " << seedCollection->size(); BOOST_FOREACH(TrajectorySeed tjS,*seedCollection){ po.print(ss, tjS); } edm::LogInfo("debugTrajSeedFromQuadruplets") << ss.str(); //------------------------------------------------- #endif }
void PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::clear | ( | void | ) |
Definition at line 27 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.cc.
References NULL, theHitsGenerator, theRegionProducer, and theSeedCreator.
Referenced by PhotonConversionTrajectorySeedProducerFromQuadruplets::endRun().
{ if(theHitsGenerator!=NULL) delete theHitsGenerator; if(theSeedCreator!=NULL) delete theSeedCreator; if(theRegionProducer!=NULL) delete theRegionProducer; }
TrajectorySeedCollection* PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::getTrajectorySeedCollection | ( | ) | [inline] |
Definition at line 39 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
References seedCollection.
Referenced by PhotonConversionTrajectorySeedProducerFromQuadruplets::produce().
{return seedCollection;}
void PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::init | ( | void | ) |
Definition at line 37 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.cc.
References creatorPSet, hitsfactoryPSet, regfactoryPSet, theHitsGenerator, theRegionProducer, and theSeedCreator.
Referenced by PhotonConversionTrajectorySeedProducerFromQuadruplets::beginRun(), and PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo().
bool PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::inspect | ( | const TrackingRegion & | region | ) | [private] |
Definition at line 123 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.cc.
References exception, myEsetup, myEvent, CombinedHitQuadrupletGeneratorForPhotonConversion::run(), seedCollection, OrderedSeedingHits::size(), ss, theHitsGenerator, theSeedCreator, SeedForPhotonConversionFromQuadruplets::trajectorySeed(), and cms::Exception::what().
Referenced by loop().
{ const OrderedSeedingHits & hitss = theHitsGenerator->run(region, *myEvent, *myEsetup); unsigned int nHitss = hitss.size(); #ifdef debugTSPFSLA ss << "\n nHitss " << nHitss << "\n"; #endif if (seedCollection->empty()) seedCollection->reserve(nHitss/2); // don't do multiple reserves in the case of multiple regions: it would make things even worse // as it will cause N re-allocations instead of the normal log(N)/log(2) unsigned int iHits=0, jHits=1; // // Trivial arbitration // // Vector to store old quad values std::vector<Quad> quadVector; for (; iHits < nHitss && jHits < nHitss; iHits+=2 , jHits+=2) { #ifdef debugTSPFSLA // ss << "\n iHits " << iHits << " " << jHits << "\n"; #endif //phits is the pair of hits for the positron const SeedingHitSet & phits = hitss[iHits]; //mhits is the pair of hits for the electron const SeedingHitSet & mhits = hitss[jHits]; //if (!theComparitor || theComparitor->compatible( hits, es) ) { try{ //FIXME (modify the interface of the seed generator if needed) //passing the region, that is centered around the primary vertex theSeedCreator->trajectorySeed(*seedCollection, phits, mhits, region, *myEsetup, ss, quadVector); }catch(cms::Exception& er){ edm::LogError("SeedingConversion") << " Problem in the Quad Seed creator " <<er.what()<<std::endl; }catch(std::exception& er){ edm::LogError("SeedingConversion") << " Problem in the Quad Seed creator " <<er.what()<<std::endl; } } quadVector.clear(); return true; }
void PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::loop | ( | ) | [private] |
Definition at line 88 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.cc.
References inspect(), reco::Vertex::position(), primaryVertex, PtMinSelector_cfg::ptMin, ss, funct::true, vertexHandle, reco::Vertex::xError(), and reco::Vertex::zError().
Referenced by analyze().
{ ss.str(""); float ptMin=0.1; BOOST_FOREACH(const reco::Vertex primaryVertex, *vertexHandle){ //FIXME currnetly using the first primaryVertex, should loop on the promaryVertexes GlobalTrackingRegion region(ptMin ,GlobalPoint( primaryVertex.position().x(), primaryVertex.position().y(), primaryVertex.position().z() ) ,primaryVertex.xError()*10 ,primaryVertex.zError()*10 ,true ); #ifdef debugTSPFSLA ss << "[PrintRegion] " << region.print() << std::endl; #endif inspect(region); } #ifdef debugTSPFSLA edm::LogInfo("debugTrajSeedFromQuadruplets") << ss.str(); #endif }
Definition at line 47 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by analyze().
Definition at line 54 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by init().
edm::ParameterSet PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::hitsfactoryPSet [private] |
Definition at line 54 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by init().
const edm::EventSetup* PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::myEsetup [private] |
Definition at line 67 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Definition at line 68 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Definition at line 70 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by analyze().
Definition at line 65 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by loop().
edm::ParameterSet PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::regfactoryPSet [private] |
Definition at line 54 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by init().
Definition at line 61 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by analyze().
TrajectorySeedCollection* PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::seedCollection [private] |
Definition at line 49 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by analyze(), getTrajectorySeedCollection(), and inspect().
std::stringstream PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::ss [private] |
Definition at line 72 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Definition at line 56 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by analyze().
CombinedHitQuadrupletGeneratorForPhotonConversion* PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::theHitsGenerator [private] |
Definition at line 50 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
GlobalTrackingRegionProducerFromBeamSpot* PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::theRegionProducer [private] |
Definition at line 52 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
SeedForPhotonConversionFromQuadruplets* PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::theSeedCreator [private] |
Definition at line 51 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Definition at line 57 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
Referenced by analyze().
reco::VertexCollection PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::vertexCollection [private] |
Definition at line 64 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.
edm::Handle<reco::VertexCollection> PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo::vertexHandle [private] |
Definition at line 63 of file PhotonConversionTrajectorySeedProducerFromQuadrupletsAlgo.h.