Go to the documentation of this file.00001
00002 #include <memory>
00003 #include <vector>
00004 #include <map>
00005
00006
00007 #include "FWCore/Framework/interface/Frameworkfwd.h"
00008 #include "FWCore/Framework/interface/EDProducer.h"
00009 #include "FWCore/Framework/interface/Event.h"
00010 #include "FWCore/Framework/interface/MakerMacros.h"
00011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00012 #include "FWCore/Framework/interface/ESHandle.h"
00013
00014 #include "DataFormats/Common/interface/Handle.h"
00015 #include "DataFormats/DetId/interface/DetId.h"
00016 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
00017
00018 #include "Geometry/CaloGeometry/interface/CaloGeometry.h"
00019 #include "Geometry/CaloTopology/interface/CaloTopology.h"
00020
00021 #include "TrackingTools/TrackAssociator/interface/TrackDetectorAssociator.h"
00022 #include "TrackingTools/TrackAssociator/interface/TrackAssociatorParameters.h"
00023 #include "TrackingTools/TrackAssociator/interface/DetIdAssociator.h"
00024 #include "TrackingTools/TrajectoryState/interface/FreeTrajectoryState.h"
00025
00026 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00027
00028 #include "AnalysisDataFormats/SUSYBSMObjects/interface/HSCParticle.h"
00029 #include "AnalysisDataFormats/SUSYBSMObjects/interface/HSCPCaloInfo.h"
00030
00031 class BetaCalculatorECAL {
00032
00033 public:
00034 BetaCalculatorECAL(const edm::ParameterSet& iConfig);
00035 void addInfoToCandidate(susybsm::HSCParticle& candidate, edm::Handle<reco::TrackCollection>& tracks, edm::Event& iEvent, const edm::EventSetup& iSetup, susybsm::HSCPCaloInfo& caloInfo);
00036
00037 private:
00038 int getDetailedTrackLengthInXtals(std::map<int,GlobalPoint>& trackExitPositionMap,
00039 std::map<int,float>& trackCrossedXtalMap,
00040 double& totalLengthCurved,
00041 GlobalPoint& internalPointCurved,
00042 GlobalPoint& externalPointCurved,
00043 const CaloGeometry* theGeometry,
00044 const CaloTopology * theTopology,
00045 const std::vector<SteppingHelixStateInfo>& neckLace);
00046 std::vector<SteppingHelixStateInfo> calcEcalDeposit(const FreeTrajectoryState* tkInnerState,
00047 const DetIdAssociator& associator);
00048 void addStepToXtal(std::map<int,GlobalPoint>& trackExitPositionMap,
00049 std::map<int,float>& trackCrossedXtalMap,
00050 DetId aDetId,
00051 float step,
00052 GlobalPoint point,
00053 const CaloSubdetectorGeometry* theSubdetGeometry);
00054
00055
00056 TrackDetectorAssociator trackAssociator_;
00057 TrackAssociatorParameters parameters_;
00058 edm::InputTag EBRecHitCollection_;
00059 edm::InputTag EERecHitCollection_;
00060
00061 edm::ESHandle<DetIdAssociator> ecalDetIdAssociator_;
00062 edm::ESHandle<MagneticField> bField_;
00063 edm::ESHandle<CaloGeometry> theCaloGeometry_;
00064
00065 };
00066
00067