CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
IsolatedTracksHcalScale Class Reference
Inheritance diagram for IsolatedTracksHcalScale:
edm::one::EDAnalyzer< edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 IsolatedTracksHcalScale (const edm::ParameterSet &)
 
 ~IsolatedTracksHcalScale () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void clearTreeVectors ()
 
void endJob () override
 

Private Attributes

double a_charIsoR_
 
double a_coneR_
 
double a_mipR_
 
double a_neutIsoR_
 
bool doMC_
 
std::string minQuality_
 
int myverbose_
 
int nEventProc_
 
spr::trackSelectionParameters selectionParameters_
 
int t_Bunch
 
std::vector< double > * t_conehmaxNearP
 
std::vector< double > * t_e11x11_20Sig
 
std::vector< double > * t_e15x15_20Sig
 
std::vector< double > * t_eECALDR
 
std::vector< double > * t_eECALDR_1
 
std::vector< double > * t_eECALDR_2
 
std::vector< double > * t_eHCALDR
 
std::vector< double > * t_eHCALDRHB
 
std::vector< double > * t_eMipDR
 
std::vector< double > * t_eMipDR_1
 
std::vector< double > * t_eMipDR_2
 
int t_EvtNo
 
std::vector< double > * t_hCone
 
std::vector< double > * t_hConeHB
 
std::vector< double > * t_hsim
 
std::vector< double > * t_hsimInfoCharHad
 
std::vector< double > * t_hsimInfoMatched
 
std::vector< int > * t_hsimInfoNCharHad
 
std::vector< double > * t_hsimInfoNeutHad
 
std::vector< int > * t_hsimInfoNMatched
 
std::vector< int > * t_hsimInfoNNeutHad
 
std::vector< int > * t_hsimInfoNPhoton
 
std::vector< int > * t_hsimInfoNRest
 
std::vector< int > * t_hsimInfoNTotal
 
std::vector< double > * t_hsimInfoPdgMatched
 
std::vector< double > * t_hsimInfoPhoton
 
std::vector< double > * t_hsimInfoRest
 
std::vector< double > * t_hsimInfoTotal
 
int t_Lumi
 
std::vector< int > * t_nSimHits
 
int t_nTracks
 
int t_RunNo
 
std::vector< double > * t_trackEta
 
std::vector< double > * t_trackHcalEta
 
std::vector< double > * t_trackHcalPhi
 
std::vector< double > * t_trackP
 
std::vector< double > * t_trackPhi
 
std::vector< double > * t_trackPt
 
std::string theTrackQuality_
 
double tMaxE_
 
double tMinE_
 
edm::EDGetTokenT< reco::BeamSpottok_bs_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_caloEB_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_caloEE_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_caloHH_
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordtok_caloTopology_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EB_
 
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcdtok_ecalChStatus_
 
edm::EDGetTokenT< EcalRecHitCollectiontok_EE_
 
edm::EDGetTokenT< reco::TrackCollectiontok_genTrack_
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordtok_geom_
 
edm::EDGetTokenT< HBHERecHitCollectiontok_hbhe_
 
edm::ESGetToken< MagneticField, IdealMagneticFieldRecordtok_magField_
 
edm::EDGetTokenT< reco::VertexCollectiontok_recVtx_
 
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcdtok_sevlv_
 
edm::EDGetTokenT< edm::SimTrackContainertok_simTk_
 
edm::EDGetTokenT< edm::SimVertexContainertok_simVtx_
 
TrackerHitAssociator::Config trackerHitAssociatorConfig_
 
TTree * tree_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 99 of file IsolatedTracksHcalScale.cc.

Constructor & Destructor Documentation

◆ IsolatedTracksHcalScale()

IsolatedTracksHcalScale::IsolatedTracksHcalScale ( const edm::ParameterSet iConfig)
explicit

Definition at line 161 of file IsolatedTracksHcalScale.cc.

References a_charIsoR_, a_coneR_, a_mipR_, a_neutIsoR_, doMC_, edm::ParameterSet::getUntrackedParameter(), HLT_2022v14_cff::InputTag, TFileService::kSharedResource, spr::trackSelectionParameters::maxChi2, spr::trackSelectionParameters::maxDpOverP, spr::trackSelectionParameters::maxDxyPV, spr::trackSelectionParameters::maxDzPV, spr::trackSelectionParameters::maxInMiss, spr::trackSelectionParameters::maxOutMiss, spr::trackSelectionParameters::minLayerCrossed, spr::trackSelectionParameters::minOuterHit, spr::trackSelectionParameters::minPt, spr::trackSelectionParameters::minQuality, myverbose_, reco::TrackBase::qualityByName(), selectionParameters_, theTrackQuality_, tMaxE_, tMinE_, tok_bs_, tok_caloEB_, tok_caloEE_, tok_caloHH_, tok_caloTopology_, tok_EB_, tok_ecalChStatus_, tok_EE_, tok_genTrack_, tok_geom_, tok_hbhe_, tok_magField_, tok_recVtx_, tok_sevlv_, tok_simTk_, tok_simVtx_, and StandaloneTrackMonitor_cfi::trackQuality.

162  : doMC_(iConfig.getUntrackedParameter<bool>("DoMC", false)),
163  myverbose_(iConfig.getUntrackedParameter<int>("Verbosity", 5)),
164  theTrackQuality_(iConfig.getUntrackedParameter<std::string>("TrackQuality", "highPurity")),
165  a_mipR_(iConfig.getUntrackedParameter<double>("ConeRadiusMIP", 14.0)),
166  a_coneR_(iConfig.getUntrackedParameter<double>("ConeRadius", 34.98)),
167  tMinE_(iConfig.getUntrackedParameter<double>("TimeMinCutECAL", -500.)),
168  tMaxE_(iConfig.getUntrackedParameter<double>("TimeMaxCutECAL", 500.)),
170  usesResource(TFileService::kSharedResource);
171 
172  //now do what ever initialization is needed
174  selectionParameters_.minPt = iConfig.getUntrackedParameter<double>("MinTrackPt", 10.0);
176  selectionParameters_.maxDxyPV = iConfig.getUntrackedParameter<double>("MaxDxyPV", 0.2);
177  selectionParameters_.maxDzPV = iConfig.getUntrackedParameter<double>("MaxDzPV", 5.0);
178  selectionParameters_.maxChi2 = iConfig.getUntrackedParameter<double>("MaxChi2", 5.0);
179  selectionParameters_.maxDpOverP = iConfig.getUntrackedParameter<double>("MaxDpOverP", 0.1);
180  selectionParameters_.minOuterHit = iConfig.getUntrackedParameter<int>("MinOuterHit", 4);
181  selectionParameters_.minLayerCrossed = iConfig.getUntrackedParameter<int>("MinLayerCrossed", 8);
182  selectionParameters_.maxInMiss = iConfig.getUntrackedParameter<int>("MaxInMiss", 0);
183  selectionParameters_.maxOutMiss = iConfig.getUntrackedParameter<int>("MaxOutMiss", 0);
184  a_charIsoR_ = a_coneR_ + 28.9;
185  a_neutIsoR_ = a_charIsoR_ * 0.726;
186 
187  tok_genTrack_ = consumes<reco::TrackCollection>(edm::InputTag("generalTracks"));
188  tok_recVtx_ = consumes<reco::VertexCollection>(edm::InputTag("offlinePrimaryVertices"));
189  tok_bs_ = consumes<reco::BeamSpot>(edm::InputTag("offlineBeamSpot"));
190  tok_EB_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEB"));
191  tok_EE_ = consumes<EcalRecHitCollection>(edm::InputTag("ecalRecHit", "EcalRecHitsEE"));
192  tok_hbhe_ = consumes<HBHERecHitCollection>(edm::InputTag("hbhereco"));
193  tok_simTk_ = consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"));
194  tok_simVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"));
195  tok_caloEB_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEB"));
196  tok_caloEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "EcalHitsEE"));
197  tok_caloHH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", "HcalHits"));
198 
199  if (myverbose_ >= 0) {
200  edm::LogVerbatim("IsoTrack") << "Parameters read from config file \n"
201  << " doMC " << doMC_ << "\t myverbose " << myverbose_ << "\t minPt "
202  << selectionParameters_.minPt << "\t theTrackQuality " << theTrackQuality_
203  << "\t minQuality " << selectionParameters_.minQuality << "\t maxDxyPV "
205  << "\t maxChi2 " << selectionParameters_.maxChi2 << "\t maxDpOverP "
206  << selectionParameters_.maxDpOverP << "\t minOuterHit "
207  << selectionParameters_.minOuterHit << "\t minLayerCrossed "
208  << selectionParameters_.minLayerCrossed << "\t maxInMiss "
209  << selectionParameters_.maxInMiss << "\t maxOutMiss "
210  << selectionParameters_.maxOutMiss << "\t a_coneR " << a_coneR_ << "\t a_charIsoR "
211  << a_charIsoR_ << "\t a_neutIsoR " << a_neutIsoR_ << "\t a_mipR " << a_mipR_
212  << "\t time Range (" << tMinE_ << ":" << tMaxE_ << ")";
213  }
214 
215  tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
216  tok_caloTopology_ = esConsumes<CaloTopology, CaloTopologyRecord>();
217  tok_magField_ = esConsumes<MagneticField, IdealMagneticFieldRecord>();
218  tok_ecalChStatus_ = esConsumes<EcalChannelStatus, EcalChannelStatusRcd>();
219  tok_sevlv_ = esConsumes<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd>();
220 }
static const std::string kSharedResource
Definition: TFileService.h:76
Log< level::Info, true > LogVerbatim
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
TrackerHitAssociator::Config trackerHitAssociatorConfig_
TrackQuality
track quality
Definition: TrackBase.h:150
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
T getUntrackedParameter(std::string const &, T const &) const
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
spr::trackSelectionParameters selectionParameters_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
static TrackQuality qualityByName(const std::string &name)
Definition: TrackBase.cc:126
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
reco::TrackBase::TrackQuality minQuality
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_

◆ ~IsolatedTracksHcalScale()

IsolatedTracksHcalScale::~IsolatedTracksHcalScale ( )
inlineoverride

Definition at line 102 of file IsolatedTracksHcalScale.cc.

102 {}

Member Function Documentation

◆ analyze()

void IsolatedTracksHcalScale::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 243 of file IsolatedTracksHcalScale.cc.

References a_charIsoR_, a_coneR_, a_mipR_, a_neutIsoR_, Calorimetry_cff::bField, spr::chargeIsolationCone(), clearTreeVectors(), doMC_, spr::eCone_ecal(), spr::eCone_hcal(), spr::eECALmatrix(), edm::EventSetup::getData(), spr::goodTrack(), photonIsolationHIProducer_cfi::hbhe, HcalBarrel, HcalDetId::ieta(), iEvent, HcalDetId::iphi(), edm::HandleBase::isValid(), reco::TrackBase::momentum(), myverbose_, nEventProc_, BeamSpotPI::nTracks, reco::TrackBase::p(), reco::BeamSpot::position(), spr::propagateCALO(), reco::TrackBase::pt(), selectionParameters_, t_Bunch, t_conehmaxNearP, t_e11x11_20Sig, t_e15x15_20Sig, t_eECALDR, t_eECALDR_1, t_eECALDR_2, t_eHCALDR, t_eHCALDRHB, t_eMipDR, t_eMipDR_1, t_eMipDR_2, t_EvtNo, t_hCone, t_hConeHB, t_hsim, t_hsimInfoCharHad, t_hsimInfoMatched, t_hsimInfoNCharHad, t_hsimInfoNeutHad, t_hsimInfoNMatched, t_hsimInfoNNeutHad, t_hsimInfoNPhoton, t_hsimInfoNRest, t_hsimInfoNTotal, t_hsimInfoPdgMatched, t_hsimInfoPhoton, t_hsimInfoRest, t_hsimInfoTotal, t_Lumi, t_nSimHits, t_RunNo, t_trackEta, t_trackHcalEta, t_trackHcalPhi, t_trackP, t_trackPhi, t_trackPt, theTrackQuality_, tMaxE_, tMinE_, tok_bs_, tok_caloEB_, tok_caloEE_, tok_caloHH_, tok_caloTopology_, tok_EB_, tok_ecalChStatus_, tok_EE_, tok_genTrack_, tok_geom_, tok_hbhe_, tok_magField_, tok_recVtx_, tok_sevlv_, tok_simTk_, tok_simVtx_, trackerHitAssociatorConfig_, tree_, x, y, and z.

243  {
244  const CaloGeometry *geo = &iSetup.getData(tok_geom_);
245  const MagneticField *bField = &iSetup.getData(tok_magField_);
246  const EcalChannelStatus *theEcalChStatus = &iSetup.getData(tok_ecalChStatus_);
247  const EcalSeverityLevelAlgo *sevlv = &iSetup.getData(tok_sevlv_);
248  const CaloTopology *caloTopology = &iSetup.getData(tok_caloTopology_);
249 
251 
252  ++nEventProc_;
253 
254  t_RunNo = iEvent.id().run();
255  t_EvtNo = iEvent.id().event();
256  t_Lumi = iEvent.luminosityBlock();
257  t_Bunch = iEvent.bunchCrossing();
258  if (myverbose_ > 0)
259  edm::LogVerbatim("IsoTrack") << nEventProc_ << " Run " << t_RunNo << " Event " << t_EvtNo << " Lumi " << t_Lumi
260  << " Bunch " << t_Bunch;
261 
263  iEvent.getByToken(tok_genTrack_, trkCollection);
264 
266  iEvent.getByToken(tok_recVtx_, recVtxs);
267 
268  // Get the beamspot
269  edm::Handle<reco::BeamSpot> beamSpotH;
270  iEvent.getByToken(tok_bs_, beamSpotH);
271 
272  math::XYZPoint leadPV(0, 0, 0);
273  if (!recVtxs->empty() && !((*recVtxs)[0].isFake())) {
274  leadPV = math::XYZPoint((*recVtxs)[0].x(), (*recVtxs)[0].y(), (*recVtxs)[0].z());
275  } else if (beamSpotH.isValid()) {
276  leadPV = beamSpotH->position();
277  }
278 
279  if (myverbose_ > 0) {
280  edm::LogVerbatim("IsoTrack") << "Primary Vertex " << leadPV;
281  if (beamSpotH.isValid())
282  edm::LogVerbatim("IsoTrack") << "Beam Spot " << beamSpotH->position();
283  }
284 
285  std::vector<spr::propagatedTrackDirection> trkCaloDirections;
286  spr::propagateCALO(trkCollection, geo, bField, theTrackQuality_, trkCaloDirections, (myverbose_ > 2));
287  std::vector<spr::propagatedTrackDirection>::const_iterator trkDetItr;
288 
289  edm::Handle<EcalRecHitCollection> barrelRecHitsHandle;
290  edm::Handle<EcalRecHitCollection> endcapRecHitsHandle;
291  iEvent.getByToken(tok_EB_, barrelRecHitsHandle);
292  iEvent.getByToken(tok_EE_, endcapRecHitsHandle);
293 
295  iEvent.getByToken(tok_hbhe_, hbhe);
296  const HBHERecHitCollection Hithbhe = *(hbhe.product());
297 
298  //get Handles to SimTracks and SimHits
301 
302  //get Handles to PCaloHitContainers of eb/ee/hbhe
306 
307  //associates tracker rechits/simhits to a track
308  std::unique_ptr<TrackerHitAssociator> associate;
309 
310  if (doMC_) {
311  iEvent.getByToken(tok_simTk_, SimTk);
312  iEvent.getByToken(tok_simVtx_, SimVtx);
313  iEvent.getByToken(tok_caloEB_, pcaloeb);
314  iEvent.getByToken(tok_caloEE_, pcaloee);
315  iEvent.getByToken(tok_caloHH_, pcalohh);
316  associate = std::make_unique<TrackerHitAssociator>(iEvent, trackerHitAssociatorConfig_);
317  }
318 
319  unsigned int nTracks = 0;
320  for (trkDetItr = trkCaloDirections.begin(), nTracks = 0; trkDetItr != trkCaloDirections.end();
321  trkDetItr++, nTracks++) {
322  const reco::Track *pTrack = &(*(trkDetItr->trkItr));
323  if (spr::goodTrack(pTrack, leadPV, selectionParameters_, (myverbose_ > 2)) && trkDetItr->okECAL &&
324  trkDetItr->okHCAL) {
325  int nRH_eMipDR = 0, nRH_eDR = 0, nNearTRKs = 0, nRecHitsCone = -99;
326  double distFromHotCell = -99.0, distFromHotCell2 = -99.0;
327  int ietaHotCell = -99, iphiHotCell = -99;
328  int ietaHotCell2 = -99, iphiHotCell2 = -99;
329  GlobalPoint gposHotCell(0., 0., 0.), gposHotCell2(0., 0., 0.);
330  std::vector<DetId> coneRecHitDetIds, coneRecHitDetIds2;
331  std::pair<double, bool> e11x11_20SigP, e15x15_20SigP;
332  double hCone = spr::eCone_hcal(geo,
333  hbhe,
334  trkDetItr->pointHCAL,
335  trkDetItr->pointECAL,
336  a_coneR_,
337  trkDetItr->directionHCAL,
338  nRecHitsCone,
339  coneRecHitDetIds,
340  distFromHotCell,
341  ietaHotCell,
342  iphiHotCell,
343  gposHotCell,
344  -1);
345  double hConeHB = spr::eCone_hcal(geo,
346  hbhe,
347  trkDetItr->pointHCAL,
348  trkDetItr->pointECAL,
349  a_coneR_,
350  trkDetItr->directionHCAL,
351  nRecHitsCone,
352  coneRecHitDetIds,
353  distFromHotCell,
354  ietaHotCell,
355  iphiHotCell,
356  gposHotCell,
357  (int)(HcalBarrel));
358  double eHCALDR = spr::eCone_hcal(geo,
359  hbhe,
360  trkDetItr->pointHCAL,
361  trkDetItr->pointECAL,
362  a_charIsoR_,
363  trkDetItr->directionHCAL,
364  nRecHitsCone,
365  coneRecHitDetIds2,
366  distFromHotCell2,
367  ietaHotCell2,
368  iphiHotCell2,
369  gposHotCell2,
370  -1);
371  double eHCALDRHB = spr::eCone_hcal(geo,
372  hbhe,
373  trkDetItr->pointHCAL,
374  trkDetItr->pointECAL,
375  a_charIsoR_,
376  trkDetItr->directionHCAL,
377  nRecHitsCone,
378  coneRecHitDetIds2,
379  distFromHotCell2,
380  ietaHotCell2,
381  iphiHotCell2,
382  gposHotCell2,
383  (int)(HcalBarrel));
384 
385  double conehmaxNearP =
386  spr::chargeIsolationCone(nTracks, trkCaloDirections, a_charIsoR_, nNearTRKs, (myverbose_ > 3));
387 
388  double eMipDR = spr::eCone_ecal(geo,
389  barrelRecHitsHandle,
390  endcapRecHitsHandle,
391  trkDetItr->pointHCAL,
392  trkDetItr->pointECAL,
393  a_mipR_,
394  trkDetItr->directionECAL,
395  nRH_eMipDR);
396  double eECALDR = spr::eCone_ecal(geo,
397  barrelRecHitsHandle,
398  endcapRecHitsHandle,
399  trkDetItr->pointHCAL,
400  trkDetItr->pointECAL,
401  a_neutIsoR_,
402  trkDetItr->directionECAL,
403  nRH_eDR);
404  double eMipDR_1 = spr::eCone_ecal(geo,
405  barrelRecHitsHandle,
406  endcapRecHitsHandle,
407  trkDetItr->pointHCAL,
408  trkDetItr->pointECAL,
409  a_mipR_,
410  trkDetItr->directionECAL,
411  nRH_eMipDR,
412  0.030,
413  0.150);
414  double eECALDR_1 = spr::eCone_ecal(geo,
415  barrelRecHitsHandle,
416  endcapRecHitsHandle,
417  trkDetItr->pointHCAL,
418  trkDetItr->pointECAL,
419  a_neutIsoR_,
420  trkDetItr->directionECAL,
421  nRH_eDR,
422  0.030,
423  0.150);
424  double eMipDR_2 = spr::eCone_ecal(geo,
425  barrelRecHitsHandle,
426  endcapRecHitsHandle,
427  trkDetItr->pointHCAL,
428  trkDetItr->pointECAL,
429  a_mipR_,
430  trkDetItr->directionECAL,
431  nRH_eMipDR,
432  0.060,
433  0.300);
434  double eECALDR_2 = spr::eCone_ecal(geo,
435  barrelRecHitsHandle,
436  endcapRecHitsHandle,
437  trkDetItr->pointHCAL,
438  trkDetItr->pointECAL,
439  a_neutIsoR_,
440  trkDetItr->directionECAL,
441  nRH_eDR,
442  0.060,
443  0.300);
444 
445  HcalDetId closestCell = (HcalDetId)(trkDetItr->detIdHCAL);
446 
447  e11x11_20SigP = spr::eECALmatrix(trkDetItr->detIdECAL,
448  barrelRecHitsHandle,
449  endcapRecHitsHandle,
450  *theEcalChStatus,
451  geo,
452  caloTopology,
453  sevlv,
454  5,
455  5,
456  0.060,
457  0.300,
458  tMinE_,
459  tMaxE_);
460  e15x15_20SigP = spr::eECALmatrix(trkDetItr->detIdECAL,
461  barrelRecHitsHandle,
462  endcapRecHitsHandle,
463  *theEcalChStatus,
464  geo,
465  caloTopology,
466  sevlv,
467  7,
468  7,
469  0.060,
470  0.300,
471  tMinE_,
472  tMaxE_);
473 
474  // Fill the tree Branches here
475  t_trackP->push_back(pTrack->p());
476  t_trackPt->push_back(pTrack->pt());
477  t_trackEta->push_back(pTrack->momentum().eta());
478  t_trackPhi->push_back(pTrack->momentum().phi());
479  t_trackHcalEta->push_back(closestCell.ieta());
480  t_trackHcalPhi->push_back(closestCell.iphi());
481  t_hCone->push_back(hCone);
482  t_conehmaxNearP->push_back(conehmaxNearP);
483  t_eMipDR->push_back(eMipDR);
484  t_eECALDR->push_back(eECALDR);
485  t_eHCALDR->push_back(eHCALDR);
486  t_e11x11_20Sig->push_back(e11x11_20SigP.first);
487  t_e15x15_20Sig->push_back(e15x15_20SigP.first);
488  t_eMipDR_1->push_back(eMipDR_1);
489  t_eECALDR_1->push_back(eECALDR_1);
490  t_eMipDR_2->push_back(eMipDR_2);
491  t_eECALDR_2->push_back(eECALDR_2);
492  t_hConeHB->push_back(hConeHB);
493  t_eHCALDRHB->push_back(eHCALDRHB);
494 
495  if (myverbose_ > 0) {
496  edm::LogVerbatim("IsoTrack") << "Track p " << pTrack->p() << " pt " << pTrack->pt() << " eta "
497  << pTrack->momentum().eta() << " phi " << pTrack->momentum().phi()
498  << " ieta/iphi (" << closestCell.ieta() << ", " << closestCell.iphi()
499  << ") Energy in cone " << hCone << " Charge Isolation " << conehmaxNearP
500  << " eMIP (" << eMipDR << ", " << eMipDR_1 << ", " << eMipDR_2 << ")"
501  << " Neutral isolation (ECAL) (" << eECALDR - eMipDR << ", "
502  << eECALDR_1 - eMipDR_1 << ", " << eECALDR_2 - eMipDR_2 << ") (ECAL NxN) "
503  << e15x15_20SigP.first - e11x11_20SigP.first << " (HCAL) " << eHCALDR - hCone;
504  }
505 
506  if (doMC_) {
507  int nSimHits = -999;
508  double hsim;
509  std::map<std::string, double> hsimInfo;
510  std::vector<int> multiplicity;
511  hsim = spr::eCone_hcal(
512  geo, pcalohh, trkDetItr->pointHCAL, trkDetItr->pointECAL, a_coneR_, trkDetItr->directionHCAL, nSimHits);
513  hsimInfo = spr::eHCALSimInfoCone(iEvent,
514  pcalohh,
515  SimTk,
516  SimVtx,
517  pTrack,
518  *associate,
519  geo,
520  trkDetItr->pointHCAL,
521  trkDetItr->pointECAL,
522  a_coneR_,
523  trkDetItr->directionHCAL,
524  multiplicity);
525 
526  t_hsimInfoMatched->push_back(hsimInfo["eMatched"]);
527  t_hsimInfoRest->push_back(hsimInfo["eRest"]);
528  t_hsimInfoPhoton->push_back(hsimInfo["eGamma"]);
529  t_hsimInfoNeutHad->push_back(hsimInfo["eNeutralHad"]);
530  t_hsimInfoCharHad->push_back(hsimInfo["eChargedHad"]);
531  t_hsimInfoPdgMatched->push_back(hsimInfo["pdgMatched"]);
532  t_hsimInfoTotal->push_back(hsimInfo["eTotal"]);
533 
534  t_hsimInfoNMatched->push_back(multiplicity.at(0));
535  t_hsimInfoNTotal->push_back(multiplicity.at(1));
536  t_hsimInfoNNeutHad->push_back(multiplicity.at(2));
537  t_hsimInfoNCharHad->push_back(multiplicity.at(3));
538  t_hsimInfoNPhoton->push_back(multiplicity.at(4));
539  t_hsimInfoNRest->push_back(multiplicity.at(5));
540 
541  t_hsim->push_back(hsim);
542  t_nSimHits->push_back(nSimHits);
543 
544  if (myverbose_ > 0) {
545  edm::LogVerbatim("IsoTrack") << "Matched (E) " << hsimInfo["eMatched"] << " (N) " << multiplicity.at(0)
546  << " Rest (E) " << hsimInfo["eRest"] << " (N) " << multiplicity.at(1)
547  << " Gamma (E) " << hsimInfo["eGamma"] << " (N) " << multiplicity.at(2)
548  << " Neutral Had (E) " << hsimInfo["eNeutralHad"] << " (N) "
549  << multiplicity.at(3) << " Charged Had (E) " << hsimInfo["eChargedHad"]
550  << " (N) " << multiplicity.at(4) << " Total (E) " << hsimInfo["eTotal"]
551  << " (N) " << multiplicity.at(5) << " PDG " << hsimInfo["pdgMatched"]
552  << " Total E " << hsim << " NHit " << nSimHits;
553  }
554  }
555  }
556  }
557 
558  tree_->Fill();
559 }
double eCone_hcal(const CaloGeometry *geo, edm::Handle< T > &hits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double hbThr=-100, double heThr=-100, double hfThr=-100, double hoThr=-100, double tMin=-500, double tMax=500, int detOnly=-1, int useRaw=0, bool debug=false)
Log< level::Info, true > LogVerbatim
std::vector< double > * t_hsimInfoMatched
std::vector< double > * t_eHCALDR
std::vector< spr::propagatedTrackID > propagateCALO(edm::Handle< reco::TrackCollection > &trkCollection, const CaloGeometry *geo, const MagneticField *bField, const std::string &theTrackQuality, bool debug=false)
edm::ESGetToken< CaloTopology, CaloTopologyRecord > tok_caloTopology_
std::vector< int > * t_hsimInfoNRest
std::vector< double > * t_hCone
edm::EDGetTokenT< HBHERecHitCollection > tok_hbhe_
std::vector< int > * t_hsimInfoNTotal
const Point & position() const
position
Definition: BeamSpot.h:59
std::vector< int > * t_hsimInfoNCharHad
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEE_
TrackerHitAssociator::Config trackerHitAssociatorConfig_
std::vector< int > * t_hsimInfoNMatched
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > tok_magField_
edm::EDGetTokenT< EcalRecHitCollection > tok_EE_
std::vector< double > * t_hsim
std::vector< double > * t_hsimInfoNeutHad
std::vector< double > * t_eMipDR_2
std::vector< int > * t_hsimInfoNPhoton
double chargeIsolationCone(unsigned int trkIndex, std::vector< spr::propagatedTrackDirection > &trkDirs, double dR, int &nNearTRKs, bool debug=false)
double pt() const
track transverse momentum
Definition: TrackBase.h:637
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< EcalRecHitCollection > tok_EB_
std::vector< double > * t_e11x11_20Sig
std::vector< int > * t_hsimInfoNNeutHad
bool goodTrack(const reco::Track *pTrack, math::XYZPoint leadPV, trackSelectionParameters parameters, bool debug=false)
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloEB_
constexpr int ieta() const
get the cell ieta
Definition: HcalDetId.h:155
spr::trackSelectionParameters selectionParameters_
edm::EDGetTokenT< reco::VertexCollection > tok_recVtx_
std::vector< double > * t_trackEta
std::vector< double > * t_eECALDR_2
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
std::vector< double > * t_eECALDR
double eCone_ecal(const CaloGeometry *geo, edm::Handle< T > &barrelhits, edm::Handle< T > &endcaphits, const GlobalPoint &hpoint1, const GlobalPoint &point1, double dR, const GlobalVector &trackMom, int &nRecHits, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > tok_ecalChStatus_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
std::vector< double > * t_eMipDR_1
std::vector< double > * t_trackPt
edm::ESGetToken< EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd > tok_sevlv_
std::vector< double > * t_trackHcalEta
std::vector< double > * t_trackP
std::vector< double > * t_eECALDR_1
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
std::vector< double > * t_trackHcalPhi
const Vector & momentum() const
track momentum vector
Definition: TrackBase.h:664
std::vector< double > * t_hsimInfoPhoton
bool isValid() const
Definition: HandleBase.h:70
std::vector< double > * t_hsimInfoTotal
edm::EDGetTokenT< edm::PCaloHitContainer > tok_caloHH_
std::vector< double > * t_hsimInfoCharHad
edm::EDGetTokenT< reco::TrackCollection > tok_genTrack_
std::vector< double > * t_trackPhi
std::vector< double > * t_eHCALDRHB
std::vector< double > * t_hsimInfoPdgMatched
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > tok_geom_
edm::EDGetTokenT< reco::BeamSpot > tok_bs_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
constexpr int iphi() const
get the cell iphi
Definition: HcalDetId.h:157
std::vector< double > * t_hConeHB
std::vector< double > * t_hsimInfoRest
std::vector< double > * t_conehmaxNearP
std::vector< double > * t_e15x15_20Sig
std::vector< double > * t_eMipDR
double eECALmatrix(const DetId &detId, edm::Handle< T > &hitsEB, edm::Handle< T > &hitsEE, const CaloGeometry *geo, const CaloTopology *caloTopology, int ieta, int iphi, double ebThr=-100, double eeThr=-100, double tMin=-500, double tMax=500, bool debug=false)

◆ beginJob()

void IsolatedTracksHcalScale::beginJob ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 561 of file IsolatedTracksHcalScale.cc.

References doMC_, compareTotals::fs, nEventProc_, t_Bunch, t_conehmaxNearP, t_e11x11_20Sig, t_e15x15_20Sig, t_eECALDR, t_eECALDR_1, t_eECALDR_2, t_eHCALDR, t_eHCALDRHB, t_eMipDR, t_eMipDR_1, t_eMipDR_2, t_hCone, t_hConeHB, t_hsim, t_hsimInfoCharHad, t_hsimInfoMatched, t_hsimInfoNCharHad, t_hsimInfoNeutHad, t_hsimInfoNMatched, t_hsimInfoNNeutHad, t_hsimInfoNPhoton, t_hsimInfoNRest, t_hsimInfoNTotal, t_hsimInfoPdgMatched, t_hsimInfoPhoton, t_hsimInfoRest, t_hsimInfoTotal, t_Lumi, t_nSimHits, t_RunNo, t_trackEta, t_trackHcalEta, t_trackHcalPhi, t_trackP, t_trackPhi, t_trackPt, and tree_.

561  {
562  nEventProc_ = 0;
564 
566  tree_ = fs->make<TTree>("tree", "tree");
567  tree_->SetAutoSave(10000);
568 
569  tree_->Branch("t_RunNo", &t_RunNo, "t_RunNo/I");
570  tree_->Branch("t_Lumi", &t_Lumi, "t_Lumi/I");
571  tree_->Branch("t_Bunch", &t_Bunch, "t_Bunch/I");
572 
573  t_trackP = new std::vector<double>();
574  t_trackPt = new std::vector<double>();
575  t_trackEta = new std::vector<double>();
576  t_trackPhi = new std::vector<double>();
577  t_trackHcalEta = new std::vector<double>();
578  t_trackHcalPhi = new std::vector<double>();
579  t_hCone = new std::vector<double>();
580  t_conehmaxNearP = new std::vector<double>();
581  t_eMipDR = new std::vector<double>();
582  t_eECALDR = new std::vector<double>();
583  t_eHCALDR = new std::vector<double>();
584  t_e11x11_20Sig = new std::vector<double>();
585  t_e15x15_20Sig = new std::vector<double>();
586  t_eMipDR_1 = new std::vector<double>();
587  t_eECALDR_1 = new std::vector<double>();
588  t_eMipDR_2 = new std::vector<double>();
589  t_eECALDR_2 = new std::vector<double>();
590  t_hConeHB = new std::vector<double>();
591  t_eHCALDRHB = new std::vector<double>();
592 
593  tree_->Branch("t_trackP", "std::vector<double>", &t_trackP);
594  tree_->Branch("t_trackPt", "std::vector<double>", &t_trackPt);
595  tree_->Branch("t_trackEta", "std::vector<double>", &t_trackEta);
596  tree_->Branch("t_trackPhi", "std::vector<double>", &t_trackPhi);
597  tree_->Branch("t_trackHcalEta", "std::vector<double>", &t_trackHcalEta);
598  tree_->Branch("t_trackHcalPhi", "std::vector<double>", &t_trackHcalPhi);
599  tree_->Branch("t_hCone", "std::vector<double>", &t_hCone);
600  tree_->Branch("t_conehmaxNearP", "std::vector<double>", &t_conehmaxNearP);
601  tree_->Branch("t_eMipDR", "std::vector<double>", &t_eMipDR);
602  tree_->Branch("t_eECALDR", "std::vector<double>", &t_eECALDR);
603  tree_->Branch("t_eHCALDR", "std::vector<double>", &t_eHCALDR);
604  tree_->Branch("t_e11x11_20Sig", "std::vector<double>", &t_e11x11_20Sig);
605  tree_->Branch("t_e15x15_20Sig", "std::vector<double>", &t_e15x15_20Sig);
606  tree_->Branch("t_eMipDR_1", "std::vector<double>", &t_eMipDR_1);
607  tree_->Branch("t_eECALDR_1", "std::vector<double>", &t_eECALDR_1);
608  tree_->Branch("t_eMipDR_2", "std::vector<double>", &t_eMipDR_2);
609  tree_->Branch("t_eECALDR_2", "std::vector<double>", &t_eECALDR_2);
610  tree_->Branch("t_hConeHB", "std::vector<double>", &t_hConeHB);
611  tree_->Branch("t_eHCALDRHB", "std::vector<double>", &t_eHCALDRHB);
612 
613  if (doMC_) {
614  t_hsimInfoMatched = new std::vector<double>();
615  t_hsimInfoRest = new std::vector<double>();
616  t_hsimInfoPhoton = new std::vector<double>();
617  t_hsimInfoNeutHad = new std::vector<double>();
618  t_hsimInfoCharHad = new std::vector<double>();
619  t_hsimInfoPdgMatched = new std::vector<double>();
620  t_hsimInfoTotal = new std::vector<double>();
621  t_hsimInfoNMatched = new std::vector<int>();
622  t_hsimInfoNTotal = new std::vector<int>();
623  t_hsimInfoNNeutHad = new std::vector<int>();
624  t_hsimInfoNCharHad = new std::vector<int>();
625  t_hsimInfoNPhoton = new std::vector<int>();
626  t_hsimInfoNRest = new std::vector<int>();
627  t_hsim = new std::vector<double>();
628  t_nSimHits = new std::vector<int>();
629 
630  tree_->Branch("t_hsimInfoMatched", "std::vector<double>", &t_hsimInfoMatched);
631  tree_->Branch("t_hsimInfoRest", "std::vector<double>", &t_hsimInfoRest);
632  tree_->Branch("t_hsimInfoPhoton", "std::vector<double>", &t_hsimInfoPhoton);
633  tree_->Branch("t_hsimInfoNeutHad", "std::vector<double>", &t_hsimInfoNeutHad);
634  tree_->Branch("t_hsimInfoCharHad", "std::vector<double>", &t_hsimInfoCharHad);
635  tree_->Branch("t_hsimInfoPdgMatched", "std::vector<double>", &t_hsimInfoPdgMatched);
636  tree_->Branch("t_hsimInfoTotal", "std::vector<double>", &t_hsimInfoTotal);
637  tree_->Branch("t_hsimInfoNMatched", "std::vector<int>", &t_hsimInfoNMatched);
638  tree_->Branch("t_hsimInfoNTotal", "std::vector<int>", &t_hsimInfoNTotal);
639  tree_->Branch("t_hsimInfoNNeutHad", "std::vector<int>", &t_hsimInfoNNeutHad);
640  tree_->Branch("t_hsimInfoNCharHad", "std::vector<int>", &t_hsimInfoNCharHad);
641  tree_->Branch("t_hsimInfoNPhoton", "std::vector<int>", &t_hsimInfoNPhoton);
642  tree_->Branch("t_hsimInfoNRest", "std::vector<int>", &t_hsimInfoNRest);
643  tree_->Branch("t_hsim", "std::vector<double>", &t_hsim);
644  tree_->Branch("t_nSimHits", "std::vector<int>", &t_nSimHits);
645  }
646 }
std::vector< double > * t_hsimInfoMatched
std::vector< double > * t_eHCALDR
std::vector< int > * t_hsimInfoNRest
std::vector< double > * t_hCone
std::vector< int > * t_hsimInfoNTotal
std::vector< int > * t_hsimInfoNCharHad
std::vector< int > * t_hsimInfoNMatched
std::vector< double > * t_hsim
std::vector< double > * t_hsimInfoNeutHad
std::vector< double > * t_eMipDR_2
std::vector< int > * t_hsimInfoNPhoton
std::vector< double > * t_e11x11_20Sig
std::vector< int > * t_hsimInfoNNeutHad
std::vector< double > * t_trackEta
std::vector< double > * t_eECALDR_2
std::vector< double > * t_eECALDR
std::vector< double > * t_eMipDR_1
std::vector< double > * t_trackPt
std::vector< double > * t_trackHcalEta
std::vector< double > * t_trackP
std::vector< double > * t_eECALDR_1
std::vector< double > * t_trackHcalPhi
std::vector< double > * t_hsimInfoPhoton
std::vector< double > * t_hsimInfoTotal
std::vector< double > * t_hsimInfoCharHad
std::vector< double > * t_trackPhi
std::vector< double > * t_eHCALDRHB
std::vector< double > * t_hsimInfoPdgMatched
std::vector< double > * t_hConeHB
std::vector< double > * t_hsimInfoRest
std::vector< double > * t_conehmaxNearP
std::vector< double > * t_e15x15_20Sig
std::vector< double > * t_eMipDR

◆ clearTreeVectors()

void IsolatedTracksHcalScale::clearTreeVectors ( )
private

Definition at line 650 of file IsolatedTracksHcalScale.cc.

References doMC_, t_conehmaxNearP, t_e11x11_20Sig, t_e15x15_20Sig, t_eECALDR, t_eECALDR_1, t_eECALDR_2, t_eHCALDR, t_eHCALDRHB, t_eMipDR, t_eMipDR_1, t_eMipDR_2, t_hCone, t_hConeHB, t_hsim, t_hsimInfoCharHad, t_hsimInfoMatched, t_hsimInfoNCharHad, t_hsimInfoNeutHad, t_hsimInfoNMatched, t_hsimInfoNNeutHad, t_hsimInfoNPhoton, t_hsimInfoNRest, t_hsimInfoNTotal, t_hsimInfoPdgMatched, t_hsimInfoPhoton, t_hsimInfoRest, t_hsimInfoTotal, t_nSimHits, t_trackEta, t_trackHcalEta, t_trackHcalPhi, t_trackP, t_trackPhi, and t_trackPt.

Referenced by analyze().

650  {
651  t_trackP->clear();
652  t_trackPt->clear();
653  t_trackEta->clear();
654  t_trackPhi->clear();
655  t_trackHcalEta->clear();
656  t_trackHcalPhi->clear();
657  t_hCone->clear();
658  t_conehmaxNearP->clear();
659  t_eMipDR->clear();
660  t_eECALDR->clear();
661  t_eHCALDR->clear();
662  t_e11x11_20Sig->clear();
663  t_e15x15_20Sig->clear();
664  t_eMipDR_1->clear();
665  t_eECALDR_1->clear();
666  t_eMipDR_2->clear();
667  t_eECALDR_2->clear();
668  t_hConeHB->clear();
669  t_eHCALDRHB->clear();
670 
671  if (doMC_) {
672  t_hsimInfoMatched->clear();
673  t_hsimInfoRest->clear();
674  t_hsimInfoPhoton->clear();
675  t_hsimInfoNeutHad->clear();
676  t_hsimInfoCharHad->clear();
677  t_hsimInfoPdgMatched->clear();
678  t_hsimInfoTotal->clear();
679  t_hsimInfoNMatched->clear();
680  t_hsimInfoNTotal->clear();
681  t_hsimInfoNNeutHad->clear();
682  t_hsimInfoNCharHad->clear();
683  t_hsimInfoNPhoton->clear();
684  t_hsimInfoNRest->clear();
685  t_hsim->clear();
686  t_nSimHits->clear();
687  }
688 }
std::vector< double > * t_hsimInfoMatched
std::vector< double > * t_eHCALDR
std::vector< int > * t_hsimInfoNRest
std::vector< double > * t_hCone
std::vector< int > * t_hsimInfoNTotal
std::vector< int > * t_hsimInfoNCharHad
std::vector< int > * t_hsimInfoNMatched
std::vector< double > * t_hsim
std::vector< double > * t_hsimInfoNeutHad
std::vector< double > * t_eMipDR_2
std::vector< int > * t_hsimInfoNPhoton
std::vector< double > * t_e11x11_20Sig
std::vector< int > * t_hsimInfoNNeutHad
std::vector< double > * t_trackEta
std::vector< double > * t_eECALDR_2
std::vector< double > * t_eECALDR
std::vector< double > * t_eMipDR_1
std::vector< double > * t_trackPt
std::vector< double > * t_trackHcalEta
std::vector< double > * t_trackP
std::vector< double > * t_eECALDR_1
std::vector< double > * t_trackHcalPhi
std::vector< double > * t_hsimInfoPhoton
std::vector< double > * t_hsimInfoTotal
std::vector< double > * t_hsimInfoCharHad
std::vector< double > * t_trackPhi
std::vector< double > * t_eHCALDRHB
std::vector< double > * t_hsimInfoPdgMatched
std::vector< double > * t_hConeHB
std::vector< double > * t_hsimInfoRest
std::vector< double > * t_conehmaxNearP
std::vector< double > * t_e15x15_20Sig
std::vector< double > * t_eMipDR

◆ endJob()

void IsolatedTracksHcalScale::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 648 of file IsolatedTracksHcalScale.cc.

References nEventProc_.

Referenced by o2olib.O2ORunMgr::executeJob().

648 { edm::LogVerbatim("IsoTrack") << "Number of Events Processed " << nEventProc_; }
Log< level::Info, true > LogVerbatim

◆ fillDescriptions()

void IsolatedTracksHcalScale::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 222 of file IsolatedTracksHcalScale.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

222  {
224  desc.addUntracked<bool>("doMC", false);
225  desc.addUntracked<int>("Verbosity", 0);
226  desc.addUntracked<std::string>("TrackQuality", "highPurity");
227  desc.addUntracked<double>("MinTrackPt", 10.0);
228  desc.addUntracked<double>("MaxDxyPV", 0.02);
229  desc.addUntracked<double>("MaxDzPV", 0.02);
230  desc.addUntracked<double>("MaxChi2", 5.0);
231  desc.addUntracked<double>("MaxDpOverP", 0.1);
232  desc.addUntracked<int>("MinOuterHit", 4);
233  desc.addUntracked<int>("MinLayerCrossed", 8);
234  desc.addUntracked<int>("MaxInMiss", 0);
235  desc.addUntracked<int>("MaxOutMiss", 0);
236  desc.addUntracked<double>("ConeRadius", 34.98);
237  desc.addUntracked<double>("ConeRadiusMIP", 14.0);
238  desc.addUntracked<double>("TimeMinCutECAL", -500.0);
239  desc.addUntracked<double>("TimeMaxCutECAL", 500.0);
240  descriptions.add("isolatedTracksHcalScale", desc);
241 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

Member Data Documentation

◆ a_charIsoR_

double IsolatedTracksHcalScale::a_charIsoR_
private

Definition at line 118 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ a_coneR_

double IsolatedTracksHcalScale::a_coneR_
private

Definition at line 118 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ a_mipR_

double IsolatedTracksHcalScale::a_mipR_
private

Definition at line 118 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ a_neutIsoR_

double IsolatedTracksHcalScale::a_neutIsoR_
private

Definition at line 118 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ doMC_

bool IsolatedTracksHcalScale::doMC_
private

◆ minQuality_

std::string IsolatedTracksHcalScale::minQuality_
private

Definition at line 116 of file IsolatedTracksHcalScale.cc.

◆ myverbose_

int IsolatedTracksHcalScale::myverbose_
private

Definition at line 115 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ nEventProc_

int IsolatedTracksHcalScale::nEventProc_
private

Definition at line 142 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and endJob().

◆ selectionParameters_

spr::trackSelectionParameters IsolatedTracksHcalScale::selectionParameters_
private

Definition at line 117 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ t_Bunch

int IsolatedTracksHcalScale::t_Bunch
private

Definition at line 146 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and beginJob().

◆ t_conehmaxNearP

std::vector<double> * IsolatedTracksHcalScale::t_conehmaxNearP
private

Definition at line 149 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_e11x11_20Sig

std::vector<double>* IsolatedTracksHcalScale::t_e11x11_20Sig
private

Definition at line 150 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_e15x15_20Sig

std::vector<double> * IsolatedTracksHcalScale::t_e15x15_20Sig
private

Definition at line 150 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_eECALDR

std::vector<double> * IsolatedTracksHcalScale::t_eECALDR
private

Definition at line 149 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_eECALDR_1

std::vector<double> * IsolatedTracksHcalScale::t_eECALDR_1
private

Definition at line 151 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_eECALDR_2

std::vector<double> * IsolatedTracksHcalScale::t_eECALDR_2
private

Definition at line 151 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_eHCALDR

std::vector<double> * IsolatedTracksHcalScale::t_eHCALDR
private

Definition at line 148 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_eHCALDRHB

std::vector<double> * IsolatedTracksHcalScale::t_eHCALDRHB
private

Definition at line 152 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_eMipDR

std::vector<double> * IsolatedTracksHcalScale::t_eMipDR
private

Definition at line 149 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_eMipDR_1

std::vector<double>* IsolatedTracksHcalScale::t_eMipDR_1
private

Definition at line 151 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_eMipDR_2

std::vector<double> * IsolatedTracksHcalScale::t_eMipDR_2
private

Definition at line 151 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_EvtNo

int IsolatedTracksHcalScale::t_EvtNo
private

Definition at line 146 of file IsolatedTracksHcalScale.cc.

Referenced by analyze().

◆ t_hCone

std::vector<double>* IsolatedTracksHcalScale::t_hCone
private

Definition at line 149 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hConeHB

std::vector<double>* IsolatedTracksHcalScale::t_hConeHB
private

Definition at line 152 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsim

std::vector<double> * IsolatedTracksHcalScale::t_hsim
private

Definition at line 155 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoCharHad

std::vector<double> * IsolatedTracksHcalScale::t_hsimInfoCharHad
private

Definition at line 154 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoMatched

std::vector<double>* IsolatedTracksHcalScale::t_hsimInfoMatched
private

Definition at line 153 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoNCharHad

std::vector<int>* IsolatedTracksHcalScale::t_hsimInfoNCharHad
private

Definition at line 157 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoNeutHad

std::vector<double>* IsolatedTracksHcalScale::t_hsimInfoNeutHad
private

Definition at line 154 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoNMatched

std::vector<int>* IsolatedTracksHcalScale::t_hsimInfoNMatched
private

Definition at line 156 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoNNeutHad

std::vector<int> * IsolatedTracksHcalScale::t_hsimInfoNNeutHad
private

Definition at line 156 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoNPhoton

std::vector<int> * IsolatedTracksHcalScale::t_hsimInfoNPhoton
private

Definition at line 157 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoNRest

std::vector<int> * IsolatedTracksHcalScale::t_hsimInfoNRest
private

Definition at line 157 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoNTotal

std::vector<int> * IsolatedTracksHcalScale::t_hsimInfoNTotal
private

Definition at line 156 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoPdgMatched

std::vector<double> * IsolatedTracksHcalScale::t_hsimInfoPdgMatched
private

Definition at line 154 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoPhoton

std::vector<double> * IsolatedTracksHcalScale::t_hsimInfoPhoton
private

Definition at line 153 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoRest

std::vector<double> * IsolatedTracksHcalScale::t_hsimInfoRest
private

Definition at line 153 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_hsimInfoTotal

std::vector<double>* IsolatedTracksHcalScale::t_hsimInfoTotal
private

Definition at line 155 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_Lumi

int IsolatedTracksHcalScale::t_Lumi
private

Definition at line 146 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and beginJob().

◆ t_nSimHits

std::vector<int>* IsolatedTracksHcalScale::t_nSimHits
private

Definition at line 158 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_nTracks

int IsolatedTracksHcalScale::t_nTracks
private

Definition at line 146 of file IsolatedTracksHcalScale.cc.

◆ t_RunNo

int IsolatedTracksHcalScale::t_RunNo
private

Definition at line 146 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and beginJob().

◆ t_trackEta

std::vector<double> * IsolatedTracksHcalScale::t_trackEta
private

Definition at line 147 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_trackHcalEta

std::vector<double>* IsolatedTracksHcalScale::t_trackHcalEta
private

Definition at line 148 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_trackHcalPhi

std::vector<double> * IsolatedTracksHcalScale::t_trackHcalPhi
private

Definition at line 148 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_trackP

std::vector<double>* IsolatedTracksHcalScale::t_trackP
private

Definition at line 147 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_trackPhi

std::vector<double> * IsolatedTracksHcalScale::t_trackPhi
private

Definition at line 147 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ t_trackPt

std::vector<double> * IsolatedTracksHcalScale::t_trackPt
private

Definition at line 147 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), beginJob(), and clearTreeVectors().

◆ theTrackQuality_

std::string IsolatedTracksHcalScale::theTrackQuality_
private

Definition at line 116 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tMaxE_

double IsolatedTracksHcalScale::tMaxE_
private

Definition at line 119 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tMinE_

double IsolatedTracksHcalScale::tMinE_
private

Definition at line 119 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_bs_

edm::EDGetTokenT<reco::BeamSpot> IsolatedTracksHcalScale::tok_bs_
private

Definition at line 125 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_caloEB_

edm::EDGetTokenT<edm::PCaloHitContainer> IsolatedTracksHcalScale::tok_caloEB_
private

Definition at line 132 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_caloEE_

edm::EDGetTokenT<edm::PCaloHitContainer> IsolatedTracksHcalScale::tok_caloEE_
private

Definition at line 133 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_caloHH_

edm::EDGetTokenT<edm::PCaloHitContainer> IsolatedTracksHcalScale::tok_caloHH_
private

Definition at line 134 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_caloTopology_

edm::ESGetToken<CaloTopology, CaloTopologyRecord> IsolatedTracksHcalScale::tok_caloTopology_
private

Definition at line 137 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_EB_

edm::EDGetTokenT<EcalRecHitCollection> IsolatedTracksHcalScale::tok_EB_
private

Definition at line 126 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_ecalChStatus_

edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> IsolatedTracksHcalScale::tok_ecalChStatus_
private

Definition at line 139 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_EE_

edm::EDGetTokenT<EcalRecHitCollection> IsolatedTracksHcalScale::tok_EE_
private

Definition at line 127 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_genTrack_

edm::EDGetTokenT<reco::TrackCollection> IsolatedTracksHcalScale::tok_genTrack_
private

Definition at line 123 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_geom_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> IsolatedTracksHcalScale::tok_geom_
private

Definition at line 136 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_hbhe_

edm::EDGetTokenT<HBHERecHitCollection> IsolatedTracksHcalScale::tok_hbhe_
private

Definition at line 128 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_magField_

edm::ESGetToken<MagneticField, IdealMagneticFieldRecord> IsolatedTracksHcalScale::tok_magField_
private

Definition at line 138 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_recVtx_

edm::EDGetTokenT<reco::VertexCollection> IsolatedTracksHcalScale::tok_recVtx_
private

Definition at line 124 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_sevlv_

edm::ESGetToken<EcalSeverityLevelAlgo, EcalSeverityLevelAlgoRcd> IsolatedTracksHcalScale::tok_sevlv_
private

Definition at line 140 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_simTk_

edm::EDGetTokenT<edm::SimTrackContainer> IsolatedTracksHcalScale::tok_simTk_
private

Definition at line 130 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ tok_simVtx_

edm::EDGetTokenT<edm::SimVertexContainer> IsolatedTracksHcalScale::tok_simVtx_
private

Definition at line 131 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and IsolatedTracksHcalScale().

◆ trackerHitAssociatorConfig_

TrackerHitAssociator::Config IsolatedTracksHcalScale::trackerHitAssociatorConfig_
private

Definition at line 121 of file IsolatedTracksHcalScale.cc.

Referenced by analyze().

◆ tree_

TTree* IsolatedTracksHcalScale::tree_
private

Definition at line 144 of file IsolatedTracksHcalScale.cc.

Referenced by analyze(), and beginJob().