CMS 3D CMS Logo

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

Public Member Functions

 HGCalTB23Analyzer (edm::ParameterSet const &)
 
 ~HGCalTB23Analyzer () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, 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
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices 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 (edm::Event const &, edm::EventSetup const &) override
 
void analyzePassiveHits (edm::Handle< edm::PassiveHitContainer > const &hgcPh, int subdet)
 
void analyzeSimHits (int type, std::vector< PCaloHit > &hits, double zFront)
 
void analyzeSimTracks (edm::Handle< edm::SimTrackContainer > const &SimTk, edm::Handle< edm::SimVertexContainer > const &SimVtx)
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void endRun (edm::Run const &, edm::EventSetup const &) override
 

Static Private Member Functions

static bool sortTime (const std::pair< double, double > &i, const std::pair< double, double > &j)
 

Private Attributes

const bool addP_
 
std::unique_ptr< AHCalGeometryahcalGeom_
 
const std::string detectorBeam_
 
const std::string detectorBH_
 
const std::string detectorEE_
 
const std::string detectorFH_
 
const bool doBeam_
 
const bool doPassive_
 
const bool doPassiveBH_
 
const bool doPassiveEE_
 
const bool doPassiveHE_
 
const bool doSimHits_
 
const bool doTree_
 
const bool doTreeCell_
 
edm::Service< TFileServicefs_
 
const double gev2mip200_
 
const double gev2mip300_
 
TH1D * hBeam_
 
const HGCalDDDConstantshgcons_ [2]
 
std::vector< float > hgcPassiveBeamEnergy_
 
std::vector< int > hgcPassiveBeamID_
 
std::vector< std::string > hgcPassiveBeamName_
 
std::vector< float > hgcPassiveBHEnergy_
 
std::vector< int > hgcPassiveBHID_
 
std::vector< std::string > hgcPassiveBHName_
 
std::vector< float > hgcPassiveCMSEEnergy_
 
std::vector< int > hgcPassiveCMSEID_
 
std::vector< std::string > hgcPassiveCMSEName_
 
std::vector< float > hgcPassiveEEEnergy_
 
std::vector< int > hgcPassiveEEID_
 
std::vector< std::string > hgcPassiveEEName_
 
std::vector< float > hgcPassiveFHEnergy_
 
std::vector< int > hgcPassiveFHID_
 
std::vector< std::string > hgcPassiveFHName_
 
TH1D * hSimHitE_ [4]
 
TH1D * hSimHitEn_ [4]
 
TProfile2D * hSimHitLat_ [3]
 
std::vector< TH1D * > hSimHitLayEn1BH_
 
std::vector< TH1D * > hSimHitLayEn1EE_
 
std::vector< TH1D * > hSimHitLayEn1FH_
 
std::vector< TH1D * > hSimHitLayEn2BH_
 
std::vector< TH1D * > hSimHitLayEn2EE_
 
std::vector< TH1D * > hSimHitLayEn2FH_
 
std::vector< TH1D * > hSimHitLayEnBeam_
 
TProfile * hSimHitLng1_ [3]
 
TProfile * hSimHitLng2_ [3]
 
TProfile * hSimHitLng_ [3]
 
TH1D * hSimHitT_ [4]
 
std::vector< int > idBeams_
 
const bool ifBeam_
 
const bool ifBH_
 
const bool ifEE_
 
const bool ifFH_
 
const edm::InputTag labelGen_
 
const std::string labelHitBeam_
 
const std::string labelHitBH_
 
const std::string labelHitEE_
 
const std::string labelHitFH_
 
const edm::InputTag labelPassiveBeam_
 
const edm::InputTag labelPassiveBH_
 
const edm::InputTag labelPassiveCMSE_
 
const edm::InputTag labelPassiveEE_
 
const edm::InputTag labelPassiveFH_
 
int nBeamMC_
 
double pBeam_
 
std::vector< float > pBeamMC_
 
std::vector< int > pdgIdBeamMC_
 
double phiBeam_
 
std::vector< float > pxBeamMC_
 
std::vector< float > pyBeamMC_
 
std::vector< float > pzBeamMC_
 
std::vector< int > simHitCellColBH_
 
std::vector< float > simHitCellEnBeam_
 
std::vector< float > simHitCellEnBH_
 
std::vector< float > simHitCellEnEE_
 
std::vector< float > simHitCellEnFH_
 
std::vector< uint32_t > simHitCellIdBeam_
 
std::vector< uint32_t > simHitCellIdBH_
 
std::vector< uint32_t > simHitCellIdEE_
 
std::vector< uint32_t > simHitCellIdFH_
 
std::vector< int > simHitCellLayerBH_
 
std::vector< int > simHitCellRowBH_
 
std::vector< float > simHitCellTime15MipBH_
 
std::vector< float > simHitCellTime15MipEE_
 
std::vector< float > simHitCellTime15MipFH_
 
std::vector< float > simHitCellTimeFirstHitBH_
 
std::vector< float > simHitCellTimeFirstHitEE_
 
std::vector< float > simHitCellTimeFirstHitFH_
 
std::vector< float > simHitCellTimeLastHitBH_
 
std::vector< float > simHitCellTimeLastHitEE_
 
std::vector< float > simHitCellTimeLastHitFH_
 
std::vector< float > simHitLayEn1BH_
 
std::vector< float > simHitLayEn1EE_
 
std::vector< float > simHitLayEn1FH_
 
std::vector< float > simHitLayEn2BH_
 
std::vector< float > simHitLayEn2EE_
 
std::vector< float > simHitLayEn2FH_
 
std::vector< float > simHitLayEnBeam_
 
const double stoc_smear_time_200_
 
const double stoc_smear_time_300_
 
double thetaBeam_
 
const edm::EDGetTokenT< edm::HepMCProducttok_hepMC_
 
const edm::EDGetTokenT< edm::PassiveHitContainertok_hgcPHBeam_
 
const edm::EDGetTokenT< edm::PassiveHitContainertok_hgcPHBH_
 
const edm::EDGetTokenT< edm::PassiveHitContainertok_hgcPHCMSE_
 
const edm::EDGetTokenT< edm::PassiveHitContainertok_hgcPHEE_
 
const edm::EDGetTokenT< edm::PassiveHitContainertok_hgcPHFH_
 
const edm::EDGetTokenT< edm::PCaloHitContainertok_hitsBeam_
 
const edm::EDGetTokenT< edm::PCaloHitContainertok_hitsBH_
 
const edm::EDGetTokenT< edm::PCaloHitContainertok_hitsEE_
 
const edm::EDGetTokenT< edm::PCaloHitContainertok_hitsFH_
 
const edm::EDGetTokenT< edm::SimTrackContainertok_simTk_
 
const edm::EDGetTokenT< edm::SimVertexContainertok_simVtx_
 
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecordtokDDDEE_
 
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecordtokDDDFH_
 
TTree * tree_
 
double xBeam_
 
std::vector< float > xBeamMC_
 
double yBeam_
 
std::vector< float > yBeamMC_
 
double zBeam_
 
std::vector< float > zBeamMC_
 
const double zFrontBH_
 
const double zFrontEE_
 
const double zFrontFH_
 

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 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 51 of file HGCalTB23Analyzer.cc.

Constructor & Destructor Documentation

◆ HGCalTB23Analyzer()

HGCalTB23Analyzer::HGCalTB23Analyzer ( edm::ParameterSet const &  iConfig)
explicit

TIME SMEARING Const = 50ps = 0.05ns Stochastic is 4ns/Q(fC)

Definition at line 131 of file HGCalTB23Analyzer.cc.

References addP_, ahcalGeom_, detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doPassive_, doPassiveBH_, doPassiveEE_, doPassiveHE_, doSimHits_, edm::ParameterSet::getParameter(), gev2mip200_, gev2mip300_, idBeams_, ifBeam_, ifBH_, ifEE_, ifFH_, dqmdumpme::k, labelGen_, labelHitBeam_, labelHitBH_, labelHitEE_, labelHitFH_, stoc_smear_time_200_, stoc_smear_time_300_, zFrontBH_, zFrontEE_, and zFrontFH_.

132  : ifEE_(iConfig.getParameter<bool>("useEE")),
133  ifFH_(iConfig.getParameter<bool>("useFH")),
134  ifBH_(iConfig.getParameter<bool>("useBH")),
135  ifBeam_(iConfig.getParameter<bool>("useBeam")),
136  doSimHits_(iConfig.getParameter<bool>("doSimHits")),
137  doTree_(iConfig.getParameter<bool>("doTree")),
138  doTreeCell_(iConfig.getParameter<bool>("doTreeCell")),
139  doPassive_(iConfig.getParameter<bool>("doPassive")),
140  doPassiveEE_(iConfig.getParameter<bool>("doPassiveEE")),
141  doPassiveHE_(iConfig.getParameter<bool>("doPassiveHE")),
142  doPassiveBH_(iConfig.getParameter<bool>("doPassiveBH")),
143  addP_(iConfig.getParameter<bool>("addP")),
144  doBeam_(iConfig.getParameter<bool>("doBeam")),
145  detectorEE_(iConfig.getParameter<std::string>("detectorEE")),
146  detectorFH_(iConfig.getParameter<std::string>("detectorFH")),
147  detectorBH_(iConfig.getParameter<std::string>("detectorBH")),
148  detectorBeam_(iConfig.getParameter<std::string>("detectorBeam")),
149  zFrontEE_(iConfig.getParameter<double>("zFrontEE")),
150  zFrontFH_(iConfig.getParameter<double>("zFrontFH")),
151  zFrontBH_(iConfig.getParameter<double>("zFrontBH")),
152  gev2mip200_(iConfig.getUntrackedParameter<double>("gev2mip200", 57.0e-6)),
153  gev2mip300_(iConfig.getUntrackedParameter<double>("gev2mip300", 85.5e-6)),
154  stoc_smear_time_200_(iConfig.getUntrackedParameter<double>("stoc_smear_time_200", 10.24)),
155  stoc_smear_time_300_(iConfig.getUntrackedParameter<double>("stoc_smear_time_300", 15.5)),
156  labelGen_(iConfig.getParameter<edm::InputTag>("generatorSrc")),
157  labelHitEE_(iConfig.getParameter<std::string>("caloHitSrcEE")),
158  labelHitFH_(iConfig.getParameter<std::string>("caloHitSrcFH")),
159  labelHitBH_(iConfig.getParameter<std::string>("caloHitSrcBH")),
160  labelHitBeam_(iConfig.getParameter<std::string>("caloHitSrcBeam")),
161  labelPassiveEE_(iConfig.getParameter<edm::InputTag>("passiveEE")),
162  labelPassiveFH_(iConfig.getParameter<edm::InputTag>("passiveFH")),
163  labelPassiveBH_(iConfig.getParameter<edm::InputTag>("passiveBH")),
164  labelPassiveCMSE_(iConfig.getParameter<edm::InputTag>("passiveCMSE")),
165  labelPassiveBeam_(iConfig.getParameter<edm::InputTag>("passiveBeam")),
166  tok_hepMC_(consumes<edm::HepMCProduct>(labelGen_)),
167  tok_simTk_(consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"))),
168  tok_simVtx_(consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"))),
169  tok_hitsEE_(consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", labelHitEE_))),
170  tok_hitsFH_(consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", labelHitFH_))),
171  tok_hitsBH_(consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", labelHitBH_))),
172  tok_hitsBeam_(consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", labelHitBeam_))),
173  tok_hgcPHEE_(consumes<edm::PassiveHitContainer>(labelPassiveEE_)),
174  tok_hgcPHFH_(consumes<edm::PassiveHitContainer>(labelPassiveFH_)),
175  tok_hgcPHBH_(consumes<edm::PassiveHitContainer>(labelPassiveBH_)),
176  tok_hgcPHCMSE_(consumes<edm::PassiveHitContainer>(labelPassiveCMSE_)),
177  tok_hgcPHBeam_(consumes<edm::PassiveHitContainer>(labelPassiveBeam_)),
178  tokDDDEE_(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
180  tokDDDFH_(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
182  usesResource("TFileService");
183  ahcalGeom_ = std::make_unique<AHCalGeometry>(iConfig);
184 
185  // now do whatever initialization is needed
191  idBeams_ = (iConfig.getParameter<std::vector<int>>("idBeams"));
192 #ifdef EDM_ML_DEBUG
193  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: SimHits = " << doSimHits_ << " useDets " << ifEE_ << ":" << ifFH_
194  << ":" << ifBH_ << ":" << ifBeam_ << " zFront " << zFrontEE_ << ":" << zFrontFH_ << ":"
195  << zFrontBH_ << " IdBeam " << idBeams_.size() << ":";
196  for (unsigned int k = 0; k < idBeams_.size(); ++k)
197  edm::LogVerbatim("HGCSim") << " [" << k << "] " << idBeams_[k];
198  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: DoPassive " << doPassive_ << ":" << doPassiveEE_ << ":"
199  << doPassiveHE_ << ":" << doPassiveBH_;
200  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: MIP conversion factors " << gev2mip200_ << ":" << gev2mip300_
201  << " Time smearing " << stoc_smear_time_200_ << ":" << stoc_smear_time_300_ << " AddP "
202  << addP_;
203 #endif
204  if (idBeams_.empty())
205  idBeams_.push_back(1001);
206 
207 #ifdef EDM_ML_DEBUG
208  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: GeneratorSource = " << labelGen_;
209  if (ifEE_)
210  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: Detector " << detectorEE_ << " with tags " << labelHitEE_;
211  if (ifFH_)
212  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: Detector " << detectorFH_ << " with tags " << labelHitFH_;
213  if (ifBH_)
214  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: Detector " << detectorBH_ << " with tags " << labelHitBH_;
215  if (ifBeam_)
216  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: Detector " << detectorBeam_ << " with tags " << labelHitBeam_;
217 #endif
218 }
const edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
Log< level::Info, true > LogVerbatim
const edm::InputTag labelPassiveFH_
const double zFrontBH_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBeam_
std::unique_ptr< AHCalGeometry > ahcalGeom_
const edm::InputTag labelGen_
const std::string labelHitBH_
const edm::InputTag labelPassiveEE_
const edm::InputTag labelPassiveBeam_
const edm::InputTag labelPassiveCMSE_
const std::string detectorEE_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBH_
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHCMSE_
const std::string labelHitFH_
const double gev2mip200_
const double gev2mip300_
const std::string labelHitEE_
const std::string detectorBH_
const edm::InputTag labelPassiveBH_
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBeam_
const edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
const edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBH_
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHFH_
const double stoc_smear_time_200_
std::vector< int > idBeams_
const double zFrontFH_
const std::string detectorBeam_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDFH_
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHEE_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsFH_
const double zFrontEE_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDEE_
const std::string detectorFH_
const std::string labelHitBeam_
const double stoc_smear_time_300_

◆ ~HGCalTB23Analyzer()

HGCalTB23Analyzer::~HGCalTB23Analyzer ( )
overridedefault

Member Function Documentation

◆ analyze()

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

EE

FH

BH

CMSE

Beam

Implements edm::one::EDAnalyzerBase.

Definition at line 454 of file HGCalTB23Analyzer.cc.

References addP_, ahcalGeom_, analyzePassiveHits(), analyzeSimHits(), analyzeSimTracks(), detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doPassive_, doPassiveBH_, doPassiveEE_, doPassiveHE_, doSimHits_, doTree_, edm::HepMCProduct::GetEvent(), hBeam_, hgcons_, hgcPassiveBeamEnergy_, hgcPassiveBeamID_, hgcPassiveBeamName_, hgcPassiveBHEnergy_, hgcPassiveBHID_, hgcPassiveBHName_, hgcPassiveCMSEEnergy_, hgcPassiveCMSEID_, hgcPassiveCMSEName_, hgcPassiveEEEnergy_, hgcPassiveEEID_, hgcPassiveEEName_, hgcPassiveFHEnergy_, hgcPassiveFHID_, hgcPassiveFHName_, idBeams_, iEvent, ifBeam_, ifBH_, ifEE_, ifFH_, edm::HandleBase::isValid(), dqmdumpme::k, HGCalDDDConstants::layers(), AlCaHLTBitMon_ParallelJobs::p, simHitCellColBH_, simHitCellEnBeam_, simHitCellEnBH_, simHitCellEnEE_, simHitCellEnFH_, simHitCellIdBeam_, simHitCellIdBH_, simHitCellIdEE_, simHitCellIdFH_, simHitCellLayerBH_, simHitCellRowBH_, simHitCellTime15MipEE_, simHitCellTime15MipFH_, simHitCellTimeFirstHitEE_, simHitCellTimeFirstHitFH_, simHitCellTimeLastHitEE_, simHitCellTimeLastHitFH_, simHitLayEn1BH_, simHitLayEn1EE_, simHitLayEn1FH_, simHitLayEn2BH_, simHitLayEn2EE_, simHitLayEn2FH_, simHitLayEnBeam_, tok_hepMC_, tok_hgcPHBeam_, tok_hgcPHBH_, tok_hgcPHCMSE_, tok_hgcPHEE_, tok_hgcPHFH_, tok_hitsBeam_, tok_hitsBH_, tok_hitsEE_, tok_hitsFH_, tok_simTk_, tok_simVtx_, tree_, zFrontBH_, zFrontEE_, and zFrontFH_.

454  {
455  // Generator input
456  const edm::Handle<edm::HepMCProduct>& evtMC = iEvent.getHandle(tok_hepMC_);
457  if (!evtMC.isValid()) {
458  edm::LogWarning("HGCal") << "no HepMCProduct found";
459  } else {
460  const HepMC::GenEvent* myGenEvent = evtMC->GetEvent();
461  unsigned int k(0);
462  HepMC::FourVector pxyz(0, 0, 0, 0);
463  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
464  ++p, ++k) {
465  edm::LogVerbatim("HGCSim") << "Particle [" << k << "] with p " << (*p)->momentum().rho() << " theta "
466  << (*p)->momentum().theta() << " phi " << (*p)->momentum().phi() << " pxyz ("
467  << (*p)->momentum().px() << ", " << (*p)->momentum().py() << ", "
468  << (*p)->momentum().pz() << ")";
469  if (addP_) {
470  pxyz.setPx(pxyz.px() + (*p)->momentum().px());
471  pxyz.setPy(pxyz.py() + (*p)->momentum().py());
472  pxyz.setPz(pxyz.pz() + (*p)->momentum().pz());
473  pxyz.setE(pxyz.e() + (*p)->momentum().e());
474  } else if (!addP_ && (k == 0)) {
475  pxyz = (*p)->momentum();
476  }
477  }
478  hBeam_->Fill(pxyz.rho());
479  edm::LogVerbatim("HGCSim") << "Particle with p " << pxyz.rho() << " theta " << pxyz.theta() << " phi "
480  << pxyz.phi();
481  }
482 
483  // Now the Simhits
484  if (doSimHits_) {
485  const edm::Handle<edm::SimTrackContainer>& SimTk = iEvent.getHandle(tok_simTk_);
486  const edm::Handle<edm::SimVertexContainer>& SimVtx = iEvent.getHandle(tok_simVtx_);
487  analyzeSimTracks(SimTk, SimVtx);
488 
489  simHitLayEn1EE_.clear();
490  simHitLayEn2EE_.clear();
491  simHitLayEn1FH_.clear();
492  simHitLayEn2FH_.clear();
493  simHitLayEn1BH_.clear();
494  simHitLayEn2BH_.clear();
495  simHitLayEnBeam_.clear();
496  simHitCellIdEE_.clear();
497  simHitCellEnEE_.clear();
498  simHitCellIdFH_.clear();
499  simHitCellEnFH_.clear();
500  simHitCellIdBH_.clear();
501  simHitCellEnBH_.clear();
502  simHitCellIdBeam_.clear();
503  simHitCellEnBeam_.clear();
504  simHitCellColBH_.clear();
505  simHitCellRowBH_.clear();
506  simHitCellLayerBH_.clear();
508  simHitCellTime15MipEE_.clear();
509  simHitCellTimeLastHitEE_.clear();
511  simHitCellTime15MipFH_.clear();
512  simHitCellTimeLastHitFH_.clear();
513  std::vector<PCaloHit> caloHits;
514  if (ifEE_) {
515  simHitLayEn1EE_ = std::vector<float>(hgcons_[0]->layers(false), 0);
516  simHitLayEn2EE_ = std::vector<float>(hgcons_[0]->layers(true), 0);
517  const edm::Handle<edm::PCaloHitContainer>& theCaloHitContainers = iEvent.getHandle(tok_hitsEE_);
518  if (theCaloHitContainers.isValid()) {
519 #ifdef EDM_ML_DEBUG
520  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorEE_ << " has " << theCaloHitContainers->size()
521  << " hits";
522 #endif
523  caloHits.clear();
524  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
525  analyzeSimHits(0, caloHits, zFrontEE_);
526  } else {
527 #ifdef EDM_ML_DEBUG
528  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorEE_ << " !!!";
529 #endif
530  }
531  }
532  if (ifFH_) {
533  simHitLayEn1FH_ = std::vector<float>(hgcons_[1]->layers(false), 0);
534  simHitLayEn2FH_ = std::vector<float>(hgcons_[1]->layers(true), 0);
535  const edm::Handle<edm::PCaloHitContainer>& theCaloHitContainers = iEvent.getHandle(tok_hitsFH_);
536  if (theCaloHitContainers.isValid()) {
537 #ifdef EDM_ML_DEBUG
538  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorFH_ << " has " << theCaloHitContainers->size()
539  << " hits";
540 #endif
541  caloHits.clear();
542  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
543  analyzeSimHits(1, caloHits, zFrontFH_);
544  } else {
545 #ifdef EDM_ML_DEBUG
546  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorFH_ << " !!!";
547 #endif
548  }
549  }
550  if (ifBH_) {
551  simHitLayEn1BH_ = std::vector<float>(ahcalGeom_->maxDepth(), 0);
552  simHitLayEn2BH_ = std::vector<float>(ahcalGeom_->maxDepth(), 0);
553  const edm::Handle<edm::PCaloHitContainer>& theCaloHitContainers = iEvent.getHandle(tok_hitsBH_);
554  if (theCaloHitContainers.isValid()) {
555 #ifdef EDM_ML_DEBUG
556  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorBH_ << " has " << theCaloHitContainers->size()
557  << " hits";
558 #endif
559  caloHits.clear();
560  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
561  analyzeSimHits(2, caloHits, zFrontBH_);
562  } else {
563 #ifdef EDM_ML_DEBUG
564  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorBH_ << " !!!";
565 #endif
566  }
567  }
568  if (ifBeam_) {
569  simHitLayEnBeam_ = std::vector<float>(idBeams_.size(), 0);
570  const edm::Handle<edm::PCaloHitContainer>& theCaloHitContainers = iEvent.getHandle(tok_hitsBeam_);
571  if (theCaloHitContainers.isValid()) {
572 #ifdef EDM_ML_DEBUG
573  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorBeam_ << " has "
574  << theCaloHitContainers->size() << " hits";
575 #endif
576  caloHits.clear();
577  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
578  analyzeSimHits(3, caloHits, 0.0);
579  } else {
580 #ifdef EDM_ML_DEBUG
581  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorBeam_ << " !!!";
582 #endif
583  }
584  }
585  } // if (doSimHits_)
586 
588  if (doPassive_) {
590  hgcPassiveEEEnergy_.clear();
591  hgcPassiveEEName_.clear();
592  hgcPassiveEEID_.clear();
593  if (doPassiveEE_) {
594  const edm::Handle<edm::PassiveHitContainer>& hgcPHEE = iEvent.getHandle(tok_hgcPHEE_);
595  analyzePassiveHits(hgcPHEE, 1);
596  }
598  hgcPassiveFHEnergy_.clear();
599  hgcPassiveFHName_.clear();
600  hgcPassiveFHID_.clear();
601  if (doPassiveHE_) {
602  const edm::Handle<edm::PassiveHitContainer>& hgcPHFH = iEvent.getHandle(tok_hgcPHFH_);
603  analyzePassiveHits(hgcPHFH, 2);
604  }
606  hgcPassiveBHEnergy_.clear();
607  hgcPassiveBHName_.clear();
608  hgcPassiveBHID_.clear();
609  if (doPassiveBH_) {
610  const edm::Handle<edm::PassiveHitContainer>& hgcPHBH = iEvent.getHandle(tok_hgcPHBH_);
611  analyzePassiveHits(hgcPHBH, 3);
612  }
614  hgcPassiveCMSEEnergy_.clear();
615  hgcPassiveCMSEName_.clear();
616  hgcPassiveCMSEID_.clear();
617  const edm::Handle<edm::PassiveHitContainer>& hgcPHCMSE = iEvent.getHandle(tok_hgcPHCMSE_);
618  analyzePassiveHits(hgcPHCMSE, 4);
620  hgcPassiveBeamName_.clear();
621  hgcPassiveBeamEnergy_.clear();
622  hgcPassiveBeamID_.clear();
623  const edm::Handle<edm::PassiveHitContainer>& hgcPHBeam = iEvent.getHandle(tok_hgcPHBeam_);
624  analyzePassiveHits(hgcPHBeam, 5);
625  }
626 
627  if ((doSimHits_ || doPassive_) && (doTree_))
628  tree_->Fill();
629 } // void HGCalTB23Analyzer::analyze
const edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
std::vector< std::string > hgcPassiveEEName_
std::vector< float > simHitCellTimeLastHitFH_
Log< level::Info, true > LogVerbatim
std::vector< uint32_t > simHitCellIdFH_
std::vector< float > hgcPassiveFHEnergy_
const double zFrontBH_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBeam_
std::vector< float > simHitLayEnBeam_
std::unique_ptr< AHCalGeometry > ahcalGeom_
std::vector< float > hgcPassiveBeamEnergy_
std::vector< float > hgcPassiveCMSEEnergy_
std::vector< int > hgcPassiveFHID_
const HGCalDDDConstants * hgcons_[2]
std::vector< float > simHitLayEn1EE_
std::vector< std::string > hgcPassiveCMSEName_
std::vector< std::string > hgcPassiveFHName_
std::vector< float > simHitLayEn2EE_
std::vector< float > simHitLayEn1BH_
std::vector< int > hgcPassiveCMSEID_
const std::string detectorEE_
std::vector< float > simHitCellEnBH_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBH_
std::vector< float > hgcPassiveBHEnergy_
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHCMSE_
std::vector< float > hgcPassiveEEEnergy_
std::vector< uint32_t > simHitCellIdBeam_
void analyzeSimTracks(edm::Handle< edm::SimTrackContainer > const &SimTk, edm::Handle< edm::SimVertexContainer > const &SimVtx)
void analyzeSimHits(int type, std::vector< PCaloHit > &hits, double zFront)
std::vector< float > simHitLayEn1FH_
std::vector< uint32_t > simHitCellIdEE_
const std::string detectorBH_
unsigned int layers(bool reco) const
std::vector< int > hgcPassiveEEID_
std::vector< float > simHitLayEn2BH_
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
std::vector< uint32_t > simHitCellIdBH_
std::vector< float > simHitLayEn2FH_
std::vector< float > simHitCellEnEE_
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBeam_
std::vector< int > hgcPassiveBeamID_
const edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
std::vector< int > simHitCellLayerBH_
std::vector< float > simHitCellEnFH_
std::vector< float > simHitCellTime15MipEE_
std::vector< float > simHitCellTimeFirstHitEE_
std::vector< int > hgcPassiveBHID_
std::vector< float > simHitCellTime15MipFH_
const edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
std::vector< float > simHitCellTimeFirstHitFH_
std::vector< int > simHitCellColBH_
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBH_
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHFH_
bool isValid() const
Definition: HandleBase.h:70
std::vector< int > idBeams_
std::vector< float > simHitCellTimeLastHitEE_
const double zFrontFH_
const std::string detectorBeam_
void analyzePassiveHits(edm::Handle< edm::PassiveHitContainer > const &hgcPh, int subdet)
std::vector< std::string > hgcPassiveBeamName_
std::vector< float > simHitCellEnBeam_
Log< level::Warning, false > LogWarning
const edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHEE_
const edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsFH_
const double zFrontEE_
std::vector< std::string > hgcPassiveBHName_
const std::string detectorFH_
std::vector< int > simHitCellRowBH_

◆ analyzePassiveHits()

void HGCalTB23Analyzer::analyzePassiveHits ( edm::Handle< edm::PassiveHitContainer > const &  hgcPh,
int  subdet 
)
private

Definition at line 1035 of file HGCalTB23Analyzer.cc.

References hcalRecHitTable_cff::energy, hgcPassiveBeamEnergy_, hgcPassiveBeamID_, hgcPassiveBeamName_, hgcPassiveBHEnergy_, hgcPassiveBHID_, hgcPassiveBHName_, hgcPassiveCMSEEnergy_, hgcPassiveCMSEID_, hgcPassiveCMSEName_, hgcPassiveEEEnergy_, hgcPassiveEEID_, hgcPassiveEEName_, hgcPassiveFHEnergy_, hgcPassiveFHID_, hgcPassiveFHName_, l1ctLayer2EG_cff::id, Skims_PA_cff::name, AlCaHLTBitMon_QueryRunRegistry::string, hcalRecHitTable_cff::time, and findQualityFiles::v.

Referenced by analyze().

1035  {
1036  for (const auto& v : *hgcPH) {
1037  double energy = v.energy();
1038  std::string name = v.vname();
1039  unsigned int id = v.id();
1040 #ifdef EDM_ML_DEBUG
1041  double time = v.time();
1042  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer::analyzePassiveHits:Energy:"
1043  << "Time:Name:Id : " << energy << ":" << time << ":" << name << ":" << id;
1044 #endif
1045 
1046  if (subdet == 1) {
1047  hgcPassiveEEEnergy_.push_back(energy);
1048  hgcPassiveEEName_.push_back(name);
1049  hgcPassiveEEID_.push_back(id);
1050  } else if (subdet == 2) {
1051  hgcPassiveFHEnergy_.push_back(energy);
1052  hgcPassiveFHName_.push_back(name);
1053  hgcPassiveFHID_.push_back(id);
1054  } else if (subdet == 3) {
1055  hgcPassiveBHEnergy_.push_back(energy);
1056  hgcPassiveBHName_.push_back(name);
1057  hgcPassiveBHID_.push_back(id);
1058  } else if (subdet == 4) {
1059  hgcPassiveCMSEEnergy_.push_back(energy);
1060  hgcPassiveCMSEName_.push_back(name);
1061  hgcPassiveCMSEID_.push_back(id);
1062  } else if (subdet == 5) {
1063  hgcPassiveBeamEnergy_.push_back(energy);
1064  hgcPassiveBeamName_.push_back(name);
1065  hgcPassiveBeamID_.push_back(id);
1066  }
1067  }
1068 }
std::vector< std::string > hgcPassiveEEName_
Log< level::Info, true > LogVerbatim
std::vector< float > hgcPassiveFHEnergy_
std::vector< float > hgcPassiveBeamEnergy_
std::vector< float > hgcPassiveCMSEEnergy_
std::vector< int > hgcPassiveFHID_
std::vector< std::string > hgcPassiveCMSEName_
std::vector< std::string > hgcPassiveFHName_
std::vector< int > hgcPassiveCMSEID_
std::vector< float > hgcPassiveBHEnergy_
std::vector< float > hgcPassiveEEEnergy_
std::vector< int > hgcPassiveEEID_
std::vector< int > hgcPassiveBeamID_
std::vector< int > hgcPassiveBHID_
std::vector< std::string > hgcPassiveBeamName_
std::vector< std::string > hgcPassiveBHName_

◆ analyzeSimHits()

void HGCalTB23Analyzer::analyzeSimHits ( int  type,
std::vector< PCaloHit > &  hits,
double  zFront 
)
private

storing time of each pcalohit in each cell ///SJ

now sort the vector of each cell hits

id: reco and ID[id]: sim ID

once it is sorted now start adding the energy

Definition at line 631 of file HGCalTB23Analyzer.cc.

References ahcalGeom_, HGCalDDDConstants::cellThickness(), cuy::col, debug, TauDecayModes::dec, electronHcalTowerIsolationLcone_cfi::Depth, hcalRecHitTable_cff::depth, AHCalDetId::depth(), relativeConstraints::empty, mps_fire::end, hcalRecHitTable_cff::energy, dqmdumpme::first, gev2mip200_, gev2mip300_, HcalOther, hgcons_, hfClusterShapes_cfi::hits, hSimHitE_, hSimHitEn_, hSimHitLat_, hSimHitLayEn1BH_, hSimHitLayEn1EE_, hSimHitLayEn1FH_, hSimHitLayEn2BH_, hSimHitLayEn2EE_, hSimHitLayEn2FH_, hSimHitLayEnBeam_, hSimHitLng1_, hSimHitLng2_, hSimHitLng_, hSimHitT_, mps_fire::i, AHCalDetId::icol(), AHCalDetId::icolAbs(), l1ctLayer2EG_cff::id, idBeams_, heavyIonCSV_trainingSettings::idx, AHCalDetId::irow(), AHCalDetId::irowAbs(), dqmdumpme::k, nano_mu_digi_cff::layer, HGCSiliconDetId::layer(), HGCalDDDConstants::locateCell(), nhits, HGCalTestNumbering::packHexagonIndex(), edm::second(), nano_mu_digi_cff::sector, simHitCellColBH_, simHitCellEnBeam_, simHitCellEnBH_, simHitCellEnEE_, simHitCellEnFH_, simHitCellIdBeam_, simHitCellIdBH_, simHitCellIdEE_, simHitCellIdFH_, simHitCellLayerBH_, simHitCellRowBH_, simHitCellTime15MipEE_, simHitCellTime15MipFH_, simHitCellTimeFirstHitEE_, simHitCellTimeFirstHitFH_, simHitCellTimeLastHitEE_, simHitCellTimeLastHitFH_, simHitLayEn1BH_, simHitLayEn1EE_, simHitLayEn1FH_, simHitLayEn2BH_, simHitLayEn2EE_, simHitLayEn2FH_, simHitLayEnBeam_, HGCalDDDConstants::simToReco(), findQualityFiles::size, jetUpdater_cfi::sort, sortTime(), stoc_smear_time_200_, stoc_smear_time_300_, HcalDetId::subdet(), nano_mu_digi_cff::subsector, Calorimetry_cff::thickness, DiMuonV_cfg::threshold, hcalRecHitTable_cff::time, HGCalTestNumbering::unpackHexagonIndex(), HcalTestBeamNumbering::unpackIndex(), HGCalWaferIndex::waferU(), HGCSiliconDetId::waferU(), HGCalWaferIndex::waferV(), HGCSiliconDetId::waferV(), HGCalDDDConstants::waferZ(), geometryCSVtoXML::xx, geometryCSVtoXML::xy, AHCalDetId::zside(), and ecaldqm::zside().

Referenced by analyze().

631  {
632  std::map<uint32_t, double> map_hits, map_hitn;
633  std::map<uint32_t, double> map_hittime_firsthit, map_hittime_lasthit, map_hittime_15Mip;
634  std::map<int, double> map_hitDepth, map_hitWafer;
635  std::map<int, std::pair<uint32_t, double>> map_hitLayer, map_hitCell;
636  double entot(0);
637  std::map<uint32_t, double> nhits;
638  std::map<uint32_t, int> ID, Depth;
639  std::map<uint32_t, double> GeV2Mip;
640  std::map<uint32_t, double> StochTermTime;
641  std::vector<int> nSimLayers;
643  std::map<uint32_t, std::vector<std::pair<double, double>>> map_hitTimeEn;
644  //bool debug = true;
645  bool debug = false;
646  for (unsigned int i = 0; i < hits.size(); i++) {
647  double energy = hits[i].energy();
648  double time = hits[i].time();
649  uint32_t id = hits[i].id();
650  entot += energy;
651  int subdet, zside, layer, sector, subsector(0), cell, depth(0), idx(0);
652  if (type == 2) {
653  subdet = HcalDetId(id).subdet();
654  if (subdet != HcalOther)
655  continue;
656  AHCalDetId hid(id);
657  layer = depth = hid.depth();
658  zside = hid.zside();
659  sector = hid.irow();
660  cell = hid.icol();
661  idx = ((hid.irowAbs() * 100) + (hid.icolAbs()));
662  if (debug)
663  edm::LogVerbatim("HGCSim") << "depth, sector, cell " << depth << ":" << sector << ":" << cell;
664  } else if (type == 3) {
665  HcalTestBeamNumbering::unpackIndex(id, subdet, layer, sector, cell);
666  depth = layer;
667  zside = 1;
668  idx = subdet * 1000 + layer;
669  layer = idx;
670  } else {
672  depth = hgcons_[type]->simToReco(cell, layer, sector, true).second;
673  idx = sector * 1000 + cell;
674 #ifdef EDM_ML_DEBUG
675  std::pair<float, float> xy = hgcons_[type]->locateCell(cell, layer, sector, false);
676  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer::detId " << std::hex << id << std::dec << " Layer:Wafer:Cell "
677  << layer << ":" << sector << ":" << cell << " Position " << xy.first << ":"
678  << xy.second << ":" << hgcons_[type]->waferZ(layer, false);
679 #endif
680  }
681 #ifdef EDM_ML_DEBUG
682  edm::LogVerbatim("HGCSim") << "SimHit:Hit[" << i << "] Id " << subdet << ":" << zside << ":" << layer << ":"
683  << sector << ":" << subsector << ":" << cell << ":" << depth << " Energy " << energy
684  << " Time " << time;
685 #endif
686  if (map_hits.count(id) != 0) {
687  map_hits[id] += energy;
688  } else {
689  map_hits[id] = energy;
690  }
691  if (map_hitLayer.count(layer) != 0) {
692  double ee = energy + map_hitLayer[layer].second;
693  map_hitLayer[layer] = std::make_pair(id, ee);
694  } else {
695  map_hitLayer[layer] = std::make_pair(id, energy);
696  }
697  if (map_hitWafer.count(sector) != 0)
698  map_hitWafer[sector] += energy;
699  else
700  map_hitWafer[sector] = energy;
701  if (depth >= 0) {
702  if (map_hitCell.count(idx) != 0) {
703  double ee = energy + map_hitCell[idx].second;
704  map_hitCell[idx] = std::make_pair(id, ee);
705  } else {
706  map_hitCell[idx] = std::make_pair(id, energy);
707  }
708  if (debug) {
709  if (type == 1)
710  edm::LogVerbatim("HGCSim") << "EE, depth is and map_hitDepth[depth] " << depth << " " << map_hitDepth[depth];
711  if (type == 2)
712  edm::LogVerbatim("HGCSim") << "BH, depth is and map_hitDepth[depth] " << depth << " " << map_hitDepth[depth];
713  }
714  if (map_hitDepth.count(depth) != 0) {
715  map_hitDepth[depth] += energy;
716  } else {
717  map_hitDepth[depth] = energy;
718  }
719  uint32_t idn =
720  (type >= 2) ? id : HGCalTestNumbering::packHexagonIndex(subdet, zside, depth, sector, subsector, cell);
721  map_hitTimeEn[idn].push_back(std::make_pair(time, energy));
722  GeV2Mip[idn] = gev2mip300_;
723  StochTermTime[idn] = stoc_smear_time_300_;
724  ID[idn] = id;
725  Depth[idn] = depth;
726  if (map_hitn.count(idn) != 0) {
727  map_hitn[idn] += energy;
728  ++nhits[idn];
729  } else {
730  map_hitn[idn] = energy;
731  nhits[idn] = 1;
732  }
733  }
734  hSimHitT_[type]->Fill(time, energy);
735  }
736 
737  if (type < 2) { //store only for EE and FH
738  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer:: " << map_hitWafer.size() << " wafers are hit in type " << type;
739  for (auto itr = map_hitWafer.begin(); itr != map_hitWafer.end(); ++itr)
740  edm::LogVerbatim("HGCSim") << "Wafer: " << itr->first << " Deposited Energy " << itr->second;
742  for (const auto& itr : map_hitTimeEn) {
743  uint32_t id = itr.first;
744  int waferU(-99), waferV(-99);
746  waferU = HGCSiliconDetId(ID[id]).waferU();
747  waferV = HGCSiliconDetId(ID[id]).waferV();
748  double layer = HGCSiliconDetId(id).layer();
750  if (debug)
751  edm::LogVerbatim("HGCSim") << "wafer is : depth (reco) " << waferU << ":" << waferV << " " << Depth[id]
752  << "\ntype : layer : wafer thickness " << type << " " << layer << " " << thickness
753  << "\nID(sim) and id(reco) " << std::hex << ID[id] << " " << id << std::dec;
754  if (thickness == 300) {
755  GeV2Mip[id] = gev2mip300_;
756  StochTermTime[id] = stoc_smear_time_300_;
757  } else if (thickness == 200) {
758  GeV2Mip[id] = gev2mip200_;
759  StochTermTime[id] = stoc_smear_time_200_;
760  }
761  //first sort
762  std::sort(map_hitTimeEn[id].begin(), map_hitTimeEn[id].end(), sortTime);
764  double threshold = 15.;
765  double totE = 0.;
766  double totEbeforeThreshold = 0.;
767  double timebeforeThreshold = 0.;
768  double timeAtThresohld = 0.;
769  for (unsigned int ihit = 0; ihit < map_hitTimeEn[id].size(); ihit++) {
770  double energy = (map_hitTimeEn[id].at(ihit)).second / GeV2Mip[id];
771  totE += energy;
772  double time = (map_hitTimeEn[id].at(ihit)).first;
773  if (debug)
774  edm::LogVerbatim("HGCSim") << "Tot E till now : time of that E : GeV2Mip[id] is " << totE << " " << time
775  << " " << GeV2Mip[id];
776  if (totE < threshold) {
777  totEbeforeThreshold = totE;
778  timebeforeThreshold = time;
779  } else {
780  timeAtThresohld =
781  (threshold - totEbeforeThreshold) * (time - timebeforeThreshold) / (totE - totEbeforeThreshold) +
782  timebeforeThreshold;
783  map_hittime_15Mip[id] = timeAtThresohld;
784  if (debug)
785  edm::LogVerbatim("HGCSim") << "ihit : energyBefore : timeBefore : energyTot : timeTot : timeAt15MIP "
786  << ihit << " " << totEbeforeThreshold << " " << timebeforeThreshold << " "
787  << totE << " " << time << " " << map_hittime_15Mip[id];
788  break;
789  }
790  }
791  if (!map_hitTimeEn[id].empty()) {
792  map_hittime_firsthit[id] = (map_hitTimeEn[id].at(0)).first;
793  map_hittime_lasthit[id] = (map_hitTimeEn[id].at(map_hitTimeEn[id].size() - 1)).first;
794  if (map_hittime_15Mip[id] < map_hittime_firsthit[id])
795  map_hittime_15Mip[id] = map_hittime_firsthit[id];
796  /*
798  double firsthit_sm = ran3.Gaus(map_hittime_firsthit_vtxCorr[id], StochTermTime[id]);
799  double lasthit_sm = ran3.Gaus(map_hittime_lasthit_vtxCorr[id], StochTermTime[id]);
800  double threshmiphit_sm = ran3.Gaus(map_hittime_15Mip_vtxCorr[id], StochTermTime[id]);
801  */
802  }
803 
804  if (totE < threshold)
805  map_hittime_15Mip[id] = -99;
806  if (debug)
807  edm::LogVerbatim("HGCSim") << "id : first hit time : last hit time " << id << " " << map_hittime_firsthit[id]
808  << " " << map_hittime_lasthit[id] << "\nFinally for this cell, time is "
809  << map_hittime_15Mip[id];
810  }
811  }
812 
813  hSimHitEn_[type]->Fill(entot);
814  for (const auto& itr : map_hits) {
815  hSimHitE_[type]->Fill(itr.second);
816  }
817 
818  if (debug)
819  edm::LogVerbatim("HGCSim") << "Now looping over map_hitLayer";
820  for (const auto& itr : map_hitLayer) {
821  int layer = (type == 2) ? itr.first : (itr.first - 1);
822  double energy = (itr.second).second;
823  double zp(0);
824  if (type < 2)
825  zp = hgcons_[type]->waferZ(layer + 1, false);
826  else if (type == 2)
827  zp = ahcalGeom_->getZ(AHCalDetId((itr.second).first));
828 #ifdef EDM_ML_DEBUG
829  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer + 1 << " Z " << zp << ":" << zp - zFront << " E " << energy;
830 #endif
831  if (type < 3) {
832  hSimHitLng_[type]->Fill(zp - zFront, energy);
833  hSimHitLng2_[type]->Fill(layer + 1, energy);
834  }
835  if (type == 0) {
836  if (layer < static_cast<int>(hSimHitLayEn1EE_.size())) {
838  hSimHitLayEn1EE_[layer]->Fill(energy);
839  }
840  } else if (type == 1) {
841  if (layer < static_cast<int>(hSimHitLayEn1FH_.size())) {
843  hSimHitLayEn1FH_[layer]->Fill(energy);
844  }
845  } else if (type == 2) {
846  if (debug)
847  edm::LogVerbatim("HGCSim") << "layer < hSimHitLayEn1BH_.size()";
848  if (layer < static_cast<int>(hSimHitLayEn1BH_.size())) {
850  hSimHitLayEn1BH_[layer]->Fill(energy);
851  }
852  } else {
853  for (unsigned int k = 0; k < idBeams_.size(); ++k) {
854  if (layer + 1 == idBeams_[k]) {
856  hSimHitLayEnBeam_[k]->Fill(energy);
857  break;
858  }
859  }
860  }
861  }
862  for (const auto& itr : map_hitDepth) {
863  int layer = (type == 2) ? itr.first : (itr.first - 1);
864  double energy = itr.second;
865 #ifdef EDM_ML_DEBUG
866  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer + 1 << " " << energy;
867 #endif
868  hSimHitLng1_[type]->Fill(layer + 1, energy);
869  if (type == 0) {
870  if (layer < static_cast<int>(hSimHitLayEn2EE_.size())) {
872  hSimHitLayEn2EE_[layer]->Fill(energy);
873  }
874  } else if (type == 1) {
875  if (layer < static_cast<int>(hSimHitLayEn2FH_.size())) {
877  hSimHitLayEn2FH_[layer]->Fill(energy);
878  }
879  } else if (type == 2) {
880  if (debug)
881  edm::LogVerbatim("HGCSim") << "Inside map_hitDepth, layer no. " << layer;
882  if (layer < static_cast<int>(hSimHitLayEn2BH_.size())) {
884  hSimHitLayEn2BH_[layer]->Fill(energy);
885  }
886  }
887  }
888 
889  if (debug)
890  edm::LogVerbatim("HGCSim") << "Now looping over map_hitCell";
891  if (type < 3) {
892  for (const auto& itr : map_hitCell) {
893  uint32_t id = ((itr.second).first);
894  double energy = ((itr.second).second);
895  std::pair<float, float> xy(0, 0);
896  double xx(0);
897  if (type == 2) {
898  xy = ahcalGeom_->getXY(AHCalDetId(id));
899  xx = xy.first;
900  } else {
901  int subdet, zside, layer, sector, subsector, cell;
903  xy = hgcons_[type]->locateCell(cell, layer, sector, false);
904  double zp = hgcons_[type]->waferZ(layer, false);
905  xx = (zp < 0) ? -xy.first : xy.first;
906  }
907  hSimHitLat_[type]->Fill(xx, xy.second, energy);
908  }
909  }
910 
911  for (const auto& itr : map_hitn) {
912  uint32_t id = itr.first;
913  double energy = itr.second;
914  if (type == 0) {
915  double time_firsthit = map_hittime_firsthit[id];
916  double time15Mip = map_hittime_15Mip[id];
917  double time_lasthit = map_hittime_lasthit[id];
918  simHitCellIdEE_.push_back(id);
919  simHitCellEnEE_.push_back(energy);
920  simHitCellTimeFirstHitEE_.push_back(time_firsthit);
921  simHitCellTime15MipEE_.push_back(time15Mip);
922  simHitCellTimeLastHitEE_.push_back(time_lasthit);
923  if (debug && (energy / GeV2Mip[id] < 15) && (map_hittime_15Mip[id] > 0))
924  edm::LogVerbatim("HGCSim") << "FOUND!!!!rechit energy : Finally for this cell, time is " << energy / GeV2Mip[id]
925  << " " << map_hittime_15Mip[id];
926  } else if (type == 1) {
927  double time_firsthit = map_hittime_firsthit[id];
928  double time15Mip = map_hittime_15Mip[id];
929  double time_lasthit = map_hittime_lasthit[id];
930  simHitCellIdFH_.push_back(id);
931  simHitCellEnFH_.push_back(energy);
932  simHitCellTimeFirstHitFH_.push_back(time_firsthit);
933  simHitCellTime15MipFH_.push_back(time15Mip);
934  simHitCellTimeLastHitFH_.push_back(time_lasthit);
935  } else if (type == 2) {
936  simHitCellIdBH_.push_back(id);
937  simHitCellEnBH_.push_back(energy);
938  AHCalDetId hid(id);
939  int row = hid.irow();
940  int col = hid.icol();
941  int layer = hid.depth();
942  simHitCellColBH_.push_back(col);
943  simHitCellRowBH_.push_back(row);
944  simHitCellLayerBH_.push_back(layer);
945 #ifdef EDM_ML_DEBUG
946  edm::LogVerbatim("HGCSim") << "ID: " << std::hex << id << std::dec << " Layer: " << layer << " col: " << col
947  << " row: " << row;
948 #endif
949  } else if (type == 3) {
950  simHitCellIdBeam_.push_back(id);
951  simHitCellEnBeam_.push_back(energy);
952  }
953  }
954 }
size
Write out results.
std::vector< TH1D * > hSimHitLayEn2BH_
double waferZ(int layer, bool reco) const
std::vector< float > simHitCellTimeLastHitFH_
Log< level::Info, true > LogVerbatim
std::vector< uint32_t > simHitCellIdFH_
TProfile * hSimHitLng1_[3]
std::vector< float > simHitLayEnBeam_
int32_t waferU(const int32_t index)
std::unique_ptr< AHCalGeometry > ahcalGeom_
static bool sortTime(const std::pair< double, double > &i, const std::pair< double, double > &j)
uint32_t ID
Definition: Definitions.h:24
static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell)
const HGCalDDDConstants * hgcons_[2]
std::vector< float > simHitLayEn1EE_
int zside(DetId const &)
std::vector< float > simHitLayEn2EE_
std::vector< float > simHitLayEn1BH_
std::vector< TH1D * > hSimHitLayEnBeam_
U second(std::pair< T, U > const &p)
std::vector< float > simHitCellEnBH_
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
constexpr int32_t waferV() const
std::vector< TH1D * > hSimHitLayEn2FH_
std::vector< TH1D * > hSimHitLayEn1BH_
std::vector< uint32_t > simHitCellIdBeam_
const double gev2mip200_
const double gev2mip300_
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
std::vector< float > simHitLayEn1FH_
std::vector< uint32_t > simHitCellIdEE_
std::vector< float > simHitLayEn2BH_
std::vector< TH1D * > hSimHitLayEn2EE_
TProfile * hSimHitLng2_[3]
std::vector< uint32_t > simHitCellIdBH_
std::vector< float > simHitLayEn2FH_
std::vector< float > simHitCellEnEE_
std::vector< TH1D * > hSimHitLayEn1EE_
std::vector< int > simHitCellLayerBH_
#define debug
Definition: HDRShower.cc:19
std::vector< float > simHitCellEnFH_
std::vector< float > simHitCellTime15MipEE_
std::vector< float > simHitCellTimeFirstHitEE_
std::vector< float > simHitCellTime15MipFH_
double cellThickness(int layer, int waferU, int waferV) const
std::vector< float > simHitCellTimeFirstHitFH_
constexpr int32_t layer() const
get the layer #
std::vector< int > simHitCellColBH_
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
const double stoc_smear_time_200_
std::vector< int > idBeams_
std::vector< float > simHitCellTimeLastHitEE_
int32_t waferV(const int32_t index)
col
Definition: cuy.py:1009
std::vector< float > simHitCellEnBeam_
TProfile * hSimHitLng_[3]
static void unpackIndex(const uint32_t &idx, int &det, int &lay, int &x, int &y)
constexpr int32_t waferU() const
std::vector< int > simHitCellRowBH_
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
TProfile2D * hSimHitLat_[3]
const double stoc_smear_time_300_
std::vector< TH1D * > hSimHitLayEn1FH_

◆ analyzeSimTracks()

void HGCalTB23Analyzer::analyzeSimTracks ( edm::Handle< edm::SimTrackContainer > const &  SimTk,
edm::Handle< edm::SimVertexContainer > const &  SimVtx 
)
private

Definition at line 956 of file HGCalTB23Analyzer.cc.

References addP_, doBeam_, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::iv, M_PI, nBeamMC_, pBeam_, pBeamMC_, pdgIdBeamMC_, phiBeam_, pxBeamMC_, pyBeamMC_, pzBeamMC_, thetaBeam_, xBeam_, xBeamMC_, yBeam_, yBeamMC_, zBeam_, and zBeamMC_.

Referenced by analyze().

957  {
958  xBeam_ = yBeam_ = zBeam_ = pBeam_ = -9999;
959  nBeamMC_ = thetaBeam_ = phiBeam_ = -9999;
960  int nParBeam = 0;
961  int vertIndex(-1);
962  if (doBeam_) {
963  pdgIdBeamMC_.clear();
964  xBeamMC_.clear();
965  yBeamMC_.clear();
966  zBeamMC_.clear();
967  pxBeamMC_.clear();
968  pyBeamMC_.clear();
969  pzBeamMC_.clear();
970  pBeamMC_.clear();
971  }
972  std::vector<float> verX, verY, verZ;
973  verX.clear();
974  verY.clear();
975  verZ.clear();
976  for (const auto& simVtxItr : *SimVtx) {
977  verX.push_back(simVtxItr.position().X());
978  verY.push_back(simVtxItr.position().Y());
979  verZ.push_back(simVtxItr.position().Z());
980  }
981 #ifdef EDM_ML_DEBUG
982  edm::LogVerbatim("HGCSim") << "Size of track " << SimTk->size();
983 #endif
984  HepMC::FourVector pxyz(0, 0, 0, 0);
985  for (const auto& simTrkItr : *SimTk) {
986  if (addP_ && !(simTrkItr.noGenpart())) {
987  pxyz.setPx(pxyz.px() + simTrkItr.momentum().px());
988  pxyz.setPy(pxyz.py() + simTrkItr.momentum().py());
989  pxyz.setPz(pxyz.pz() + simTrkItr.momentum().pz());
990  pxyz.setE(pxyz.e() + simTrkItr.momentum().e());
991 #ifdef EDM_ML_DEBUG
992  edm::LogVerbatim("HGCSim") << "Track " << simTrkItr.trackId() << " Vertex " << simTrkItr.vertIndex() << " Type "
993  << simTrkItr.type() << " Charge " << simTrkItr.charge() << " px "
994  << simTrkItr.momentum().px() << " py " << simTrkItr.momentum().py() << " pz "
995  << simTrkItr.momentum().pz() << " P " << simTrkItr.momentum().P() << " GenIndex "
996  << simTrkItr.genpartIndex();
997  edm::LogVerbatim("HGCSim") << "Vertex " << simTrkItr.vertIndex()
998  << " position-> X: " << verX[simTrkItr.vertIndex()]
999  << " Y: " << verY[simTrkItr.vertIndex()] << " Z: " << verZ[simTrkItr.vertIndex()];
1000 #endif
1001  }
1002  if (doBeam_ && !(simTrkItr.noGenpart())) {
1003  nParBeam++;
1004  pdgIdBeamMC_.push_back(simTrkItr.type());
1005  xBeamMC_.push_back(verX[simTrkItr.vertIndex()]);
1006  yBeamMC_.push_back(verY[simTrkItr.vertIndex()]);
1007  zBeamMC_.push_back(verZ[simTrkItr.vertIndex()]);
1008  pxBeamMC_.push_back(simTrkItr.momentum().px());
1009  pyBeamMC_.push_back(simTrkItr.momentum().py());
1010  pzBeamMC_.push_back(simTrkItr.momentum().pz());
1011  pBeamMC_.push_back(simTrkItr.momentum().P());
1012  } else if (!addP_ && (vertIndex == -1)) {
1013  pxyz = simTrkItr.momentum();
1014  }
1015  if (vertIndex == -1)
1016  vertIndex = simTrkItr.vertIndex();
1017  }
1018  nBeamMC_ = nParBeam;
1019  pBeam_ = pxyz.rho();
1020  thetaBeam_ = pxyz.theta();
1021  phiBeam_ = pxyz.phi();
1022  if (phiBeam_ < 0)
1023  phiBeam_ += (2 * M_PI);
1024  if (vertIndex != -1 && vertIndex < static_cast<int>(SimVtx->size())) {
1025  edm::SimVertexContainer::const_iterator simVtxItr = SimVtx->begin();
1026  for (int iv = 0; iv < vertIndex; iv++)
1027  simVtxItr++;
1028  edm::LogVerbatim("HGCSim") << "Vertex " << vertIndex << " position " << simVtxItr->position();
1029  xBeam_ = verX[0];
1030  yBeam_ = verY[0];
1031  zBeam_ = verZ[0];
1032  }
1033 }
Log< level::Info, true > LogVerbatim
std::vector< int > pdgIdBeamMC_
std::vector< float > zBeamMC_
std::vector< float > pxBeamMC_
std::vector< float > pBeamMC_
#define M_PI
std::vector< float > pyBeamMC_
std::vector< float > yBeamMC_
std::vector< float > xBeamMC_
std::vector< float > pzBeamMC_

◆ beginJob()

void HGCalTB23Analyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 268 of file HGCalTB23Analyzer.cc.

References detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doBeam_, doPassive_, doPassiveBH_, doPassiveEE_, doPassiveHE_, doSimHits_, doTree_, doTreeCell_, fs_, hBeam_, hgcPassiveBeamEnergy_, hgcPassiveBeamID_, hgcPassiveBeamName_, hgcPassiveBHEnergy_, hgcPassiveBHID_, hgcPassiveBHName_, hgcPassiveCMSEEnergy_, hgcPassiveCMSEID_, hgcPassiveCMSEName_, hgcPassiveEEEnergy_, hgcPassiveEEID_, hgcPassiveEEName_, hgcPassiveFHEnergy_, hgcPassiveFHID_, hgcPassiveFHName_, hSimHitE_, hSimHitEn_, hSimHitLat_, hSimHitLng1_, hSimHitLng2_, hSimHitLng_, hSimHitT_, mps_fire::i, ifBeam_, ifBH_, ifEE_, ifFH_, TFileService::make(), Skims_PA_cff::name, nBeamMC_, pBeam_, pBeamMC_, pdgIdBeamMC_, phiBeam_, pxBeamMC_, pyBeamMC_, pzBeamMC_, simHitCellColBH_, simHitCellEnBeam_, simHitCellEnBH_, simHitCellEnEE_, simHitCellEnFH_, simHitCellIdBeam_, simHitCellIdBH_, simHitCellIdEE_, simHitCellIdFH_, simHitCellLayerBH_, simHitCellRowBH_, simHitCellTime15MipEE_, simHitCellTime15MipFH_, simHitCellTimeFirstHitEE_, simHitCellTimeFirstHitFH_, simHitCellTimeLastHitEE_, simHitCellTimeLastHitFH_, simHitLayEn1BH_, simHitLayEn1EE_, simHitLayEn1FH_, simHitLayEn2BH_, simHitLayEn2EE_, simHitLayEn2FH_, AlCaHLTBitMon_QueryRunRegistry::string, thetaBeam_, runGCPTkAlMap::title, tree_, xBeam_, xBeamMC_, yBeam_, yBeamMC_, zBeam_, and zBeamMC_.

268  {
269  char name[40], title[100];
270  hBeam_ = fs_->make<TH1D>("BeamP", "Beam Momentum", 1000, 0, 1000.0);
271  for (int i = 0; i < 3; ++i) {
272  bool book(ifEE_);
274  if (i == 1) {
275  book = ifFH_;
276  det = detectorFH_;
277  } else if (i == 2) {
278  book = ifBH_;
279  det = detectorBH_;
280  }
281 
282  if (doSimHits_ && book) {
283  sprintf(name, "SimHitEn%s", det.c_str());
284  sprintf(title, "Sim Hit Energy for %s", det.c_str());
285  hSimHitE_[i] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
286  sprintf(name, "SimHitEnX%s", det.c_str());
287  sprintf(title, "Sim Hit Energy for %s", det.c_str());
288  hSimHitEn_[i] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
289  sprintf(name, "SimHitTm%s", det.c_str());
290  sprintf(title, "Sim Hit Timing for %s", det.c_str());
291  hSimHitT_[i] = fs_->make<TH1D>(name, title, 5000, 0., 500.0);
292  sprintf(name, "SimHitLat%s", det.c_str());
293  sprintf(title, "Lateral Shower profile (Sim Hit) for %s", det.c_str());
294  hSimHitLat_[i] = fs_->make<TProfile2D>(name, title, 100, -100., 100., 100, -100., 100.);
295  sprintf(name, "SimHitLng%s", det.c_str());
296  sprintf(title, "Longitudinal Shower profile (Sim Hit) for %s", det.c_str());
297  hSimHitLng_[i] = fs_->make<TProfile>(name, title, 50, 0., 100.);
298  sprintf(name, "SimHitLng1%s", det.c_str());
299  sprintf(title, "Longitudinal Shower profile (Layer) for %s", det.c_str());
300  hSimHitLng1_[i] = fs_->make<TProfile>(name, title, 200, 0., 100.);
301  sprintf(name, "SimHitLng2%s", det.c_str());
302  sprintf(title, "Longitudinal Shower profile (Layer) for %s", det.c_str());
303  hSimHitLng2_[i] = fs_->make<TProfile>(name, title, 200, 0., 100.);
304  }
305  }
306  if (ifBeam_ && doSimHits_) {
307  sprintf(name, "SimHitEn%s", detectorBeam_.c_str());
308  sprintf(title, "Sim Hit Energy for %s", detectorBeam_.c_str());
309  hSimHitE_[3] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
310  sprintf(name, "SimHitEnX%s", detectorBeam_.c_str());
311  sprintf(title, "Sim Hit Energy for %s", detectorBeam_.c_str());
312  hSimHitEn_[3] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
313  sprintf(name, "SimHitTm%s", detectorBeam_.c_str());
314  sprintf(title, "Sim Hit Timing for %s", detectorBeam_.c_str());
315  hSimHitT_[3] = fs_->make<TH1D>(name, title, 5000, 0., 500.0);
316  }
317  if (doSimHits_ && doTree_) {
318  tree_ = fs_->make<TTree>("HGCTB", "SimHitEnergy");
319  tree_->Branch("simHitLayEn1EE", &simHitLayEn1EE_);
320  tree_->Branch("simHitLayEn2EE", &simHitLayEn2EE_);
321  tree_->Branch("simHitLayEn1FH", &simHitLayEn1FH_);
322  tree_->Branch("simHitLayEn2FH", &simHitLayEn2FH_);
323  tree_->Branch("simHitLayEn1BH", &simHitLayEn1BH_);
324  tree_->Branch("simHitLayEn2BH", &simHitLayEn2BH_);
325  tree_->Branch("xBeam", &xBeam_, "xBeam/D");
326  tree_->Branch("yBeam", &yBeam_, "yBeam/D");
327  tree_->Branch("zBeam", &zBeam_, "zBeam/D");
328  tree_->Branch("pBeam", &pBeam_, "pBeam/D");
329  tree_->Branch("thetaBeam", &thetaBeam_, "thetaBeam/D");
330  tree_->Branch("phiBeam", &phiBeam_, "phiBeam/D");
331  if (doBeam_) {
332  tree_->Branch("nBeamMC", &nBeamMC_, "nBeamMC/I");
333  tree_->Branch("pdgIdBeamMC", &pdgIdBeamMC_);
334  tree_->Branch("xBeamMC", &xBeamMC_);
335  tree_->Branch("yBeamMC", &yBeamMC_);
336  tree_->Branch("zBeamMC", &zBeamMC_);
337  tree_->Branch("pxBeamMC", &pxBeamMC_);
338  tree_->Branch("pyBeamMC", &pyBeamMC_);
339  tree_->Branch("pzBeamMC", &pzBeamMC_);
340  tree_->Branch("pBeamMC", &pBeamMC_);
341  }
342  if (doTreeCell_) {
343  tree_->Branch("simHitCellIdEE", &simHitCellIdEE_);
344  tree_->Branch("simHitCellEnEE", &simHitCellEnEE_);
345  tree_->Branch("simHitCellIdFH", &simHitCellIdFH_);
346  tree_->Branch("simHitCellEnFH", &simHitCellEnFH_);
347  tree_->Branch("simHitCellIdBH", &simHitCellIdBH_);
348  tree_->Branch("simHitCellEnBH", &simHitCellEnBH_);
349  tree_->Branch("simHitCellIdBeam", &simHitCellIdBeam_);
350  tree_->Branch("simHitCellEnBeam", &simHitCellEnBeam_);
351 
352  tree_->Branch("simHitCellColBH", &simHitCellColBH_);
353  tree_->Branch("simHitCellRowBH", &simHitCellRowBH_);
354  tree_->Branch("simHitCellLayerBH", &simHitCellLayerBH_);
355  tree_->Branch("simHitCellTimeFirstHitEE", &simHitCellTimeFirstHitEE_);
356  tree_->Branch("simHitCellTimeFirstHitFH", &simHitCellTimeFirstHitFH_);
357  //tree_->Branch("simHitCellTimeFirstHitBH", &simHitCellTimeFirstHitBH_);
358  tree_->Branch("simHitCellTime15MipEE", &simHitCellTime15MipEE_);
359  tree_->Branch("simHitCellTime15MipFH", &simHitCellTime15MipFH_);
360  //tree_->Branch("simHitCellTime15MipBH", &simHitCellTime15MipBH_);
361  tree_->Branch("simHitCellTimeLastHitEE", &simHitCellTimeLastHitEE_);
362  tree_->Branch("simHitCellTimeLastHitFH", &simHitCellTimeLastHitFH_);
363  //tree_->Branch("simHitCellTimeLastHitBH", &simHitCellTimeLastHitBH_);
364  }
365  }
366 
367  if (doPassive_ && doTree_) {
368  if (doPassiveEE_) {
369  tree_->Branch("hgcPassiveEEEnergy", &hgcPassiveEEEnergy_);
370  tree_->Branch("hgcPassiveEEName", &hgcPassiveEEName_);
371  tree_->Branch("hgcPassiveEEID", &hgcPassiveEEID_);
372  }
373  if (doPassiveHE_) {
374  tree_->Branch("hgcPassiveFHEnergy", &hgcPassiveFHEnergy_);
375  tree_->Branch("hgcPassiveFHName", &hgcPassiveFHName_);
376  tree_->Branch("hgcPassiveFHID", &hgcPassiveFHID_);
377  }
378  if (doPassiveBH_) {
379  tree_->Branch("hgcPassiveBHEnergy", &hgcPassiveBHEnergy_);
380  tree_->Branch("hgcPassiveBHName", &hgcPassiveBHName_);
381  tree_->Branch("hgcPassiveBHID", &hgcPassiveBHID_);
382  }
383  tree_->Branch("hgcPassiveCMSEEnergy", &hgcPassiveCMSEEnergy_);
384  tree_->Branch("hgcPassiveCMSEName", &hgcPassiveCMSEName_);
385  tree_->Branch("hgcPassiveCMSEID", &hgcPassiveCMSEID_);
386  tree_->Branch("hgcPassiveBeamEnergy", &hgcPassiveBeamEnergy_);
387  tree_->Branch("hgcPassiveBeamName", &hgcPassiveBeamName_);
388  tree_->Branch("hgcPassiveBeamID", &hgcPassiveBeamID_);
389  }
390 }
edm::Service< TFileService > fs_
std::vector< std::string > hgcPassiveEEName_
std::vector< float > simHitCellTimeLastHitFH_
std::vector< int > pdgIdBeamMC_
std::vector< uint32_t > simHitCellIdFH_
std::vector< float > hgcPassiveFHEnergy_
TProfile * hSimHitLng1_[3]
std::vector< float > hgcPassiveBeamEnergy_
std::vector< float > hgcPassiveCMSEEnergy_
std::vector< float > zBeamMC_
std::vector< int > hgcPassiveFHID_
std::vector< float > pxBeamMC_
std::vector< float > simHitLayEn1EE_
std::vector< std::string > hgcPassiveCMSEName_
std::vector< std::string > hgcPassiveFHName_
std::vector< float > simHitLayEn2EE_
std::vector< float > simHitLayEn1BH_
std::vector< int > hgcPassiveCMSEID_
const std::string detectorEE_
std::vector< float > simHitCellEnBH_
std::vector< float > hgcPassiveBHEnergy_
std::vector< float > pBeamMC_
std::vector< float > hgcPassiveEEEnergy_
std::vector< uint32_t > simHitCellIdBeam_
std::vector< float > simHitLayEn1FH_
std::vector< uint32_t > simHitCellIdEE_
const std::string detectorBH_
std::vector< int > hgcPassiveEEID_
std::vector< float > simHitLayEn2BH_
TProfile * hSimHitLng2_[3]
std::vector< uint32_t > simHitCellIdBH_
std::vector< float > simHitLayEn2FH_
std::vector< float > simHitCellEnEE_
std::vector< int > hgcPassiveBeamID_
std::vector< float > pyBeamMC_
std::vector< int > simHitCellLayerBH_
std::vector< float > simHitCellEnFH_
std::vector< float > simHitCellTime15MipEE_
std::vector< float > simHitCellTimeFirstHitEE_
std::vector< int > hgcPassiveBHID_
std::vector< float > simHitCellTime15MipFH_
std::vector< float > simHitCellTimeFirstHitFH_
std::vector< int > simHitCellColBH_
std::vector< float > simHitCellTimeLastHitEE_
const std::string detectorBeam_
std::vector< std::string > hgcPassiveBeamName_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
std::vector< float > simHitCellEnBeam_
TProfile * hSimHitLng_[3]
std::vector< float > yBeamMC_
std::vector< std::string > hgcPassiveBHName_
const std::string detectorFH_
std::vector< float > xBeamMC_
std::vector< int > simHitCellRowBH_
TProfile2D * hSimHitLat_[3]
std::vector< float > pzBeamMC_

◆ beginRun()

void HGCalTB23Analyzer::beginRun ( edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 392 of file HGCalTB23Analyzer.cc.

References ahcalGeom_, detectorBeam_, detectorBH_, detectorEE_, detectorFH_, fs_, edm::EventSetup::getData(), hgcons_, hSimHitLayEn1BH_, hSimHitLayEn1EE_, hSimHitLayEn1FH_, hSimHitLayEn2BH_, hSimHitLayEn2EE_, hSimHitLayEn2FH_, hSimHitLayEnBeam_, idBeams_, ifBeam_, ifBH_, ifEE_, ifFH_, MainPageGenerator::l, HGCalDDDConstants::layers(), TFileService::make(), Skims_PA_cff::name, runGCPTkAlMap::title, tokDDDEE_, and tokDDDFH_.

392  {
393  char name[40], title[100];
394  if (ifEE_) {
395  hgcons_[0] = &iSetup.getData(tokDDDEE_);
396  for (unsigned int l = 0; l < hgcons_[0]->layers(false); ++l) {
397  sprintf(name, "SimHitEnA%d%s", l, detectorEE_.c_str());
398  sprintf(title, "Sim Hit Energy in SIM layer %d for %s", l + 1, detectorEE_.c_str());
399  hSimHitLayEn1EE_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
400  if (l % 3 == 0) {
401  sprintf(name, "SimHitEnB%d%s", (l / 3 + 1), detectorEE_.c_str());
402  sprintf(title, "Sim Hit Energy in layer %d for %s", (l / 3 + 1), detectorEE_.c_str());
403  hSimHitLayEn2EE_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
404  }
405  }
406 #ifdef EDM_ML_DEBUG
407  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer::" << detectorEE_ << " defined with " << hgcons_[0]->layers(false)
408  << " layers";
409 #endif
410  } else {
411  hgcons_[0] = nullptr;
412  }
413 
414  if (ifFH_) {
415  hgcons_[1] = &iSetup.getData(tokDDDFH_);
416  for (unsigned int l = 0; l < hgcons_[1]->layers(false); ++l) {
417  sprintf(name, "SimHitEnA%d%s", l, detectorFH_.c_str());
418  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorFH_.c_str());
419  hSimHitLayEn1FH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
420  if (l % 3 == 0) {
421  sprintf(name, "SimHitEnB%d%s", (l / 3 + 1), detectorFH_.c_str());
422  sprintf(title, "Sim Hit Energy in layer %d for %s", (l / 3 + 1), detectorFH_.c_str());
423  hSimHitLayEn2FH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
424  }
425  }
426 #ifdef EDM_ML_DEBUG
427  edm::LogVerbatim("HGCSim") << "HGCalTB23Analyzer::" << detectorFH_ << " defined with " << hgcons_[1]->layers(false)
428  << " layers";
429 #endif
430  } else {
431  hgcons_[1] = nullptr;
432  }
433 
434  if (ifBH_) {
435  for (int l = 0; l < ahcalGeom_->maxDepth(); ++l) {
436  sprintf(name, "SimHitEnA%d%s", l, detectorBH_.c_str());
437  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorBH_.c_str());
438  hSimHitLayEn1BH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
439  sprintf(name, "SimHitEnB%d%s", l, detectorBH_.c_str());
440  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorBH_.c_str());
441  hSimHitLayEn2BH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
442  }
443  }
444 
445  if (ifBeam_) {
446  for (unsigned int l = 0; l < idBeams_.size(); ++l) {
447  sprintf(name, "SimHitEna%d%s", l, detectorBeam_.c_str());
448  sprintf(title, "Sim Hit Energy in type %d for %s", idBeams_[l], detectorBeam_.c_str());
449  hSimHitLayEnBeam_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
450  }
451  }
452 }
edm::Service< TFileService > fs_
std::vector< TH1D * > hSimHitLayEn2BH_
Log< level::Info, true > LogVerbatim
std::unique_ptr< AHCalGeometry > ahcalGeom_
const HGCalDDDConstants * hgcons_[2]
std::vector< TH1D * > hSimHitLayEnBeam_
const std::string detectorEE_
std::vector< TH1D * > hSimHitLayEn2FH_
std::vector< TH1D * > hSimHitLayEn1BH_
const std::string detectorBH_
unsigned int layers(bool reco) const
std::vector< TH1D * > hSimHitLayEn2EE_
std::vector< TH1D * > hSimHitLayEn1EE_
std::vector< int > idBeams_
const std::string detectorBeam_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDFH_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDEE_
const std::string detectorFH_
std::vector< TH1D * > hSimHitLayEn1FH_

◆ endRun()

void HGCalTB23Analyzer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate

Definition at line 61 of file HGCalTB23Analyzer.cc.

61 {}

◆ fillDescriptions()

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

Definition at line 220 of file HGCalTB23Analyzer.cc.

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

220  {
222  desc.add<std::string>("detectorEE", "HGCalEESensitive");
223  desc.add<bool>("useEE", true);
224  desc.add<double>("zFrontEE", 0.0);
225  desc.add<std::string>("caloHitSrcEE", "HGCHitsEE");
226  desc.add<std::string>("detectorFH", "HGCalHESiliconSensitive");
227  desc.add<bool>("useFH", false);
228  desc.add<double>("zFrontFH", 0.0);
229  desc.add<std::string>("caloHitSrcFH", "HGCHitsHEfront");
230  desc.add<std::string>("detectorBH", "AHCal");
231  desc.add<bool>("useBH", false);
232  desc.add<double>("zFrontBH", 0.0);
233  desc.add<std::string>("caloHitSrcBH", "HcalHits");
234  desc.add<std::string>("detectorBeam", "HcalTB06BeamDetector");
235  desc.add<bool>("useBeam", false);
236  desc.add<std::string>("caloHitSrcBeam", "HcalTB06BeamHits");
237  std::vector<int> ids = {
238  1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005};
239  desc.add<std::vector<int>>("idBeams", ids);
240  desc.add<edm::InputTag>("generatorSrc", edm::InputTag("generatorSmeared"));
241  desc.add<edm::InputTag>("passiveEE", edm::InputTag("g4SimHits", "HGCalEEPassiveHits"));
242  desc.add<edm::InputTag>("passiveFH", edm::InputTag("g4SimHits", "HGCalHEPassiveHits"));
243  desc.add<edm::InputTag>("passiveBH", edm::InputTag("g4SimHits", "HGCalAHPassiveHits"));
244  desc.add<edm::InputTag>("passiveCMSE", edm::InputTag("g4SimHits", "CMSEPassiveHits"));
245  desc.add<edm::InputTag>("passiveBeam", edm::InputTag("g4SimHits", "HGCalBeamPassiveHits"));
246 
247  desc.add<bool>("doSimHits", true);
248  desc.add<bool>("doTree", true);
249  desc.add<bool>("doTreeCell", true);
250  desc.add<bool>("doPassive", false);
251  desc.add<bool>("doPassiveEE", false);
252  desc.add<bool>("doPassiveHE", false);
253  desc.add<bool>("doPassiveBH", false);
254  desc.add<bool>("addP", false);
255  desc.add<bool>("doBeam", false);
256  desc.addUntracked<double>("gev2mip200", 57.0e-6);
257  desc.addUntracked<double>("gev2mip300", 85.5e-6);
258  desc.addUntracked<double>("stoc_smear_time_200", 10.24);
259  desc.addUntracked<double>("stoc_smear_time_300", 15.5);
260  desc.addUntracked<int>("maxDepth", 12);
261  desc.addUntracked<double>("deltaX", 30.0); // Size of tile along X
262  desc.addUntracked<double>("deltaY", 30.0); // Size of tile along Y
263  desc.addUntracked<double>("deltaZ", 81.0); // Thickness of a single layer
264  desc.addUntracked<double>("zFirst", 17.6); // Position of the center
265  descriptions.add("HGCalTB23Analyzer", desc);
266 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ sortTime()

bool HGCalTB23Analyzer::sortTime ( const std::pair< double, double > &  i,
const std::pair< double, double > &  j 
)
staticprivate

Definition at line 1070 of file HGCalTB23Analyzer.cc.

References mps_fire::i, and dqmiolumiharvest::j.

Referenced by analyzeSimHits().

1070  {
1071  return i.first < j.first;
1072 }

Member Data Documentation

◆ addP_

const bool HGCalTB23Analyzer::addP_
private

Definition at line 74 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), analyzeSimTracks(), and HGCalTB23Analyzer().

◆ ahcalGeom_

std::unique_ptr<AHCalGeometry> HGCalTB23Analyzer::ahcalGeom_
private

Definition at line 70 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), analyzeSimHits(), beginRun(), and HGCalTB23Analyzer().

◆ detectorBeam_

const std::string HGCalTB23Analyzer::detectorBeam_
private

Definition at line 76 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTB23Analyzer().

◆ detectorBH_

const std::string HGCalTB23Analyzer::detectorBH_
private

Definition at line 76 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTB23Analyzer().

◆ detectorEE_

const std::string HGCalTB23Analyzer::detectorEE_
private

Definition at line 75 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTB23Analyzer().

◆ detectorFH_

const std::string HGCalTB23Analyzer::detectorFH_
private

Definition at line 75 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTB23Analyzer().

◆ doBeam_

const bool HGCalTB23Analyzer::doBeam_
private

Definition at line 74 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ doPassive_

const bool HGCalTB23Analyzer::doPassive_
private

Definition at line 74 of file HGCalTB23Analyzer.cc.

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

◆ doPassiveBH_

const bool HGCalTB23Analyzer::doPassiveBH_
private

Definition at line 74 of file HGCalTB23Analyzer.cc.

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

◆ doPassiveEE_

const bool HGCalTB23Analyzer::doPassiveEE_
private

Definition at line 74 of file HGCalTB23Analyzer.cc.

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

◆ doPassiveHE_

const bool HGCalTB23Analyzer::doPassiveHE_
private

Definition at line 74 of file HGCalTB23Analyzer.cc.

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

◆ doSimHits_

const bool HGCalTB23Analyzer::doSimHits_
private

Definition at line 73 of file HGCalTB23Analyzer.cc.

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

◆ doTree_

const bool HGCalTB23Analyzer::doTree_
private

Definition at line 73 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), and beginJob().

◆ doTreeCell_

const bool HGCalTB23Analyzer::doTreeCell_
private

Definition at line 73 of file HGCalTB23Analyzer.cc.

Referenced by beginJob().

◆ fs_

edm::Service<TFileService> HGCalTB23Analyzer::fs_
private

Definition at line 69 of file HGCalTB23Analyzer.cc.

Referenced by beginJob(), and beginRun().

◆ gev2mip200_

const double HGCalTB23Analyzer::gev2mip200_
private

Definition at line 78 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and HGCalTB23Analyzer().

◆ gev2mip300_

const double HGCalTB23Analyzer::gev2mip300_
private

Definition at line 78 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and HGCalTB23Analyzer().

◆ hBeam_

TH1D * HGCalTB23Analyzer::hBeam_
private

Definition at line 96 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), and beginJob().

◆ hgcons_

const HGCalDDDConstants* HGCalTB23Analyzer::hgcons_[2]
private

Definition at line 71 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), analyzeSimHits(), and beginRun().

◆ hgcPassiveBeamEnergy_

std::vector<float> HGCalTB23Analyzer::hgcPassiveBeamEnergy_
private

Definition at line 118 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveBeamID_

std::vector<int> HGCalTB23Analyzer::hgcPassiveBeamID_
private

Definition at line 121 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveBeamName_

std::vector<std::string> HGCalTB23Analyzer::hgcPassiveBeamName_
private

Definition at line 120 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveBHEnergy_

std::vector<float> HGCalTB23Analyzer::hgcPassiveBHEnergy_
private

Definition at line 117 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveBHID_

std::vector<int> HGCalTB23Analyzer::hgcPassiveBHID_
private

Definition at line 121 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveBHName_

std::vector<std::string> HGCalTB23Analyzer::hgcPassiveBHName_
private

Definition at line 119 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveCMSEEnergy_

std::vector<float> HGCalTB23Analyzer::hgcPassiveCMSEEnergy_
private

Definition at line 117 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveCMSEID_

std::vector<int> HGCalTB23Analyzer::hgcPassiveCMSEID_
private

Definition at line 121 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveCMSEName_

std::vector<std::string> HGCalTB23Analyzer::hgcPassiveCMSEName_
private

Definition at line 119 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveEEEnergy_

std::vector<float> HGCalTB23Analyzer::hgcPassiveEEEnergy_
private

Definition at line 117 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveEEID_

std::vector<int> HGCalTB23Analyzer::hgcPassiveEEID_
private

Definition at line 121 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveEEName_

std::vector<std::string> HGCalTB23Analyzer::hgcPassiveEEName_
private

Definition at line 119 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveFHEnergy_

std::vector<float> HGCalTB23Analyzer::hgcPassiveFHEnergy_
private

Definition at line 117 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveFHID_

std::vector<int> HGCalTB23Analyzer::hgcPassiveFHID_
private

Definition at line 121 of file HGCalTB23Analyzer.cc.

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

◆ hgcPassiveFHName_

std::vector<std::string> HGCalTB23Analyzer::hgcPassiveFHName_
private

Definition at line 119 of file HGCalTB23Analyzer.cc.

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

◆ hSimHitE_

TH1D* HGCalTB23Analyzer::hSimHitE_[4]
private

Definition at line 96 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

◆ hSimHitEn_

TH1D * HGCalTB23Analyzer::hSimHitEn_[4]
private

Definition at line 96 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

◆ hSimHitLat_

TProfile2D* HGCalTB23Analyzer::hSimHitLat_[3]
private

Definition at line 99 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

◆ hSimHitLayEn1BH_

std::vector<TH1D*> HGCalTB23Analyzer::hSimHitLayEn1BH_
private

Definition at line 102 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

◆ hSimHitLayEn1EE_

std::vector<TH1D*> HGCalTB23Analyzer::hSimHitLayEn1EE_
private

Definition at line 100 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

◆ hSimHitLayEn1FH_

std::vector<TH1D*> HGCalTB23Analyzer::hSimHitLayEn1FH_
private

Definition at line 101 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

◆ hSimHitLayEn2BH_

std::vector<TH1D*> HGCalTB23Analyzer::hSimHitLayEn2BH_
private

Definition at line 102 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

◆ hSimHitLayEn2EE_

std::vector<TH1D*> HGCalTB23Analyzer::hSimHitLayEn2EE_
private

Definition at line 100 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

◆ hSimHitLayEn2FH_

std::vector<TH1D*> HGCalTB23Analyzer::hSimHitLayEn2FH_
private

Definition at line 101 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

◆ hSimHitLayEnBeam_

std::vector<TH1D*> HGCalTB23Analyzer::hSimHitLayEnBeam_
private

Definition at line 103 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

◆ hSimHitLng1_

TProfile * HGCalTB23Analyzer::hSimHitLng1_[3]
private

Definition at line 97 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

◆ hSimHitLng2_

TProfile* HGCalTB23Analyzer::hSimHitLng2_[3]
private

Definition at line 98 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

◆ hSimHitLng_

TProfile* HGCalTB23Analyzer::hSimHitLng_[3]
private

Definition at line 97 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

◆ hSimHitT_

TH1D * HGCalTB23Analyzer::hSimHitT_[4]
private

Definition at line 96 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

◆ idBeams_

std::vector<int> HGCalTB23Analyzer::idBeams_
private

Definition at line 79 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), analyzeSimHits(), beginRun(), and HGCalTB23Analyzer().

◆ ifBeam_

const bool HGCalTB23Analyzer::ifBeam_
private

Definition at line 72 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTB23Analyzer().

◆ ifBH_

const bool HGCalTB23Analyzer::ifBH_
private

Definition at line 72 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTB23Analyzer().

◆ ifEE_

const bool HGCalTB23Analyzer::ifEE_
private

Definition at line 72 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTB23Analyzer().

◆ ifFH_

const bool HGCalTB23Analyzer::ifFH_
private

Definition at line 72 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), beginJob(), beginRun(), and HGCalTB23Analyzer().

◆ labelGen_

const edm::InputTag HGCalTB23Analyzer::labelGen_
private

Definition at line 80 of file HGCalTB23Analyzer.cc.

Referenced by HGCalTB23Analyzer().

◆ labelHitBeam_

const std::string HGCalTB23Analyzer::labelHitBeam_
private

Definition at line 81 of file HGCalTB23Analyzer.cc.

Referenced by HGCalTB23Analyzer().

◆ labelHitBH_

const std::string HGCalTB23Analyzer::labelHitBH_
private

Definition at line 81 of file HGCalTB23Analyzer.cc.

Referenced by HGCalTB23Analyzer().

◆ labelHitEE_

const std::string HGCalTB23Analyzer::labelHitEE_
private

Definition at line 81 of file HGCalTB23Analyzer.cc.

Referenced by HGCalTB23Analyzer().

◆ labelHitFH_

const std::string HGCalTB23Analyzer::labelHitFH_
private

Definition at line 81 of file HGCalTB23Analyzer.cc.

Referenced by HGCalTB23Analyzer().

◆ labelPassiveBeam_

const edm::InputTag HGCalTB23Analyzer::labelPassiveBeam_
private

Definition at line 83 of file HGCalTB23Analyzer.cc.

◆ labelPassiveBH_

const edm::InputTag HGCalTB23Analyzer::labelPassiveBH_
private

Definition at line 82 of file HGCalTB23Analyzer.cc.

◆ labelPassiveCMSE_

const edm::InputTag HGCalTB23Analyzer::labelPassiveCMSE_
private

Definition at line 83 of file HGCalTB23Analyzer.cc.

◆ labelPassiveEE_

const edm::InputTag HGCalTB23Analyzer::labelPassiveEE_
private

Definition at line 82 of file HGCalTB23Analyzer.cc.

◆ labelPassiveFH_

const edm::InputTag HGCalTB23Analyzer::labelPassiveFH_
private

Definition at line 82 of file HGCalTB23Analyzer.cc.

◆ nBeamMC_

int HGCalTB23Analyzer::nBeamMC_
private

Definition at line 125 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ pBeam_

double HGCalTB23Analyzer::pBeam_
private

Definition at line 123 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ pBeamMC_

std::vector<float> HGCalTB23Analyzer::pBeamMC_
private

Definition at line 128 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ pdgIdBeamMC_

std::vector<int> HGCalTB23Analyzer::pdgIdBeamMC_
private

Definition at line 126 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ phiBeam_

double HGCalTB23Analyzer::phiBeam_
private

Definition at line 124 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ pxBeamMC_

std::vector<float> HGCalTB23Analyzer::pxBeamMC_
private

Definition at line 128 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ pyBeamMC_

std::vector<float> HGCalTB23Analyzer::pyBeamMC_
private

Definition at line 128 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ pzBeamMC_

std::vector<float> HGCalTB23Analyzer::pzBeamMC_
private

Definition at line 128 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ simHitCellColBH_

std::vector<int> HGCalTB23Analyzer::simHitCellColBH_
private

Definition at line 112 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellEnBeam_

std::vector<float> HGCalTB23Analyzer::simHitCellEnBeam_
private

Definition at line 111 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellEnBH_

std::vector<float> HGCalTB23Analyzer::simHitCellEnBH_
private

Definition at line 111 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellEnEE_

std::vector<float> HGCalTB23Analyzer::simHitCellEnEE_
private

Definition at line 110 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellEnFH_

std::vector<float> HGCalTB23Analyzer::simHitCellEnFH_
private

Definition at line 110 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellIdBeam_

std::vector<uint32_t> HGCalTB23Analyzer::simHitCellIdBeam_
private

Definition at line 109 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellIdBH_

std::vector<uint32_t> HGCalTB23Analyzer::simHitCellIdBH_
private

Definition at line 109 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellIdEE_

std::vector<uint32_t> HGCalTB23Analyzer::simHitCellIdEE_
private

Definition at line 108 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellIdFH_

std::vector<uint32_t> HGCalTB23Analyzer::simHitCellIdFH_
private

Definition at line 108 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellLayerBH_

std::vector<int> HGCalTB23Analyzer::simHitCellLayerBH_
private

Definition at line 112 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellRowBH_

std::vector<int> HGCalTB23Analyzer::simHitCellRowBH_
private

Definition at line 112 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellTime15MipBH_

std::vector<float> HGCalTB23Analyzer::simHitCellTime15MipBH_
private

Definition at line 114 of file HGCalTB23Analyzer.cc.

◆ simHitCellTime15MipEE_

std::vector<float> HGCalTB23Analyzer::simHitCellTime15MipEE_
private

Definition at line 114 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellTime15MipFH_

std::vector<float> HGCalTB23Analyzer::simHitCellTime15MipFH_
private

Definition at line 114 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellTimeFirstHitBH_

std::vector<float> HGCalTB23Analyzer::simHitCellTimeFirstHitBH_
private

Definition at line 113 of file HGCalTB23Analyzer.cc.

◆ simHitCellTimeFirstHitEE_

std::vector<float> HGCalTB23Analyzer::simHitCellTimeFirstHitEE_
private

Definition at line 113 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellTimeFirstHitFH_

std::vector<float> HGCalTB23Analyzer::simHitCellTimeFirstHitFH_
private

Definition at line 113 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellTimeLastHitBH_

std::vector<float> HGCalTB23Analyzer::simHitCellTimeLastHitBH_
private

Definition at line 115 of file HGCalTB23Analyzer.cc.

◆ simHitCellTimeLastHitEE_

std::vector<float> HGCalTB23Analyzer::simHitCellTimeLastHitEE_
private

Definition at line 115 of file HGCalTB23Analyzer.cc.

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

◆ simHitCellTimeLastHitFH_

std::vector<float> HGCalTB23Analyzer::simHitCellTimeLastHitFH_
private

Definition at line 115 of file HGCalTB23Analyzer.cc.

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

◆ simHitLayEn1BH_

std::vector<float> HGCalTB23Analyzer::simHitLayEn1BH_
private

Definition at line 106 of file HGCalTB23Analyzer.cc.

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

◆ simHitLayEn1EE_

std::vector<float> HGCalTB23Analyzer::simHitLayEn1EE_
private

Definition at line 104 of file HGCalTB23Analyzer.cc.

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

◆ simHitLayEn1FH_

std::vector<float> HGCalTB23Analyzer::simHitLayEn1FH_
private

Definition at line 105 of file HGCalTB23Analyzer.cc.

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

◆ simHitLayEn2BH_

std::vector<float> HGCalTB23Analyzer::simHitLayEn2BH_
private

Definition at line 106 of file HGCalTB23Analyzer.cc.

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

◆ simHitLayEn2EE_

std::vector<float> HGCalTB23Analyzer::simHitLayEn2EE_
private

Definition at line 104 of file HGCalTB23Analyzer.cc.

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

◆ simHitLayEn2FH_

std::vector<float> HGCalTB23Analyzer::simHitLayEn2FH_
private

Definition at line 105 of file HGCalTB23Analyzer.cc.

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

◆ simHitLayEnBeam_

std::vector<float> HGCalTB23Analyzer::simHitLayEnBeam_
private

Definition at line 107 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), and analyzeSimHits().

◆ stoc_smear_time_200_

const double HGCalTB23Analyzer::stoc_smear_time_200_
private

Definition at line 78 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and HGCalTB23Analyzer().

◆ stoc_smear_time_300_

const double HGCalTB23Analyzer::stoc_smear_time_300_
private

Definition at line 78 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimHits(), and HGCalTB23Analyzer().

◆ thetaBeam_

double HGCalTB23Analyzer::thetaBeam_
private

Definition at line 124 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ tok_hepMC_

const edm::EDGetTokenT<edm::HepMCProduct> HGCalTB23Analyzer::tok_hepMC_
private

Definition at line 85 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hgcPHBeam_

const edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTB23Analyzer::tok_hgcPHBeam_
private

Definition at line 91 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hgcPHBH_

const edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTB23Analyzer::tok_hgcPHBH_
private

Definition at line 91 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hgcPHCMSE_

const edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTB23Analyzer::tok_hgcPHCMSE_
private

Definition at line 91 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hgcPHEE_

const edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTB23Analyzer::tok_hgcPHEE_
private

Definition at line 90 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hgcPHFH_

const edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTB23Analyzer::tok_hgcPHFH_
private

Definition at line 90 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hitsBeam_

const edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTB23Analyzer::tok_hitsBeam_
private

Definition at line 89 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hitsBH_

const edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTB23Analyzer::tok_hitsBH_
private

Definition at line 89 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hitsEE_

const edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTB23Analyzer::tok_hitsEE_
private

Definition at line 88 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_hitsFH_

const edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTB23Analyzer::tok_hitsFH_
private

Definition at line 88 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_simTk_

const edm::EDGetTokenT<edm::SimTrackContainer> HGCalTB23Analyzer::tok_simTk_
private

Definition at line 86 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tok_simVtx_

const edm::EDGetTokenT<edm::SimVertexContainer> HGCalTB23Analyzer::tok_simVtx_
private

Definition at line 87 of file HGCalTB23Analyzer.cc.

Referenced by analyze().

◆ tokDDDEE_

const edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> HGCalTB23Analyzer::tokDDDEE_
private

Definition at line 92 of file HGCalTB23Analyzer.cc.

Referenced by beginRun().

◆ tokDDDFH_

const edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> HGCalTB23Analyzer::tokDDDFH_
private

Definition at line 93 of file HGCalTB23Analyzer.cc.

Referenced by beginRun().

◆ tree_

TTree* HGCalTB23Analyzer::tree_
private

Definition at line 95 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), and beginJob().

◆ xBeam_

double HGCalTB23Analyzer::xBeam_
private

Definition at line 123 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ xBeamMC_

std::vector<float> HGCalTB23Analyzer::xBeamMC_
private

Definition at line 127 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ yBeam_

double HGCalTB23Analyzer::yBeam_
private

Definition at line 123 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ yBeamMC_

std::vector<float> HGCalTB23Analyzer::yBeamMC_
private

Definition at line 127 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ zBeam_

double HGCalTB23Analyzer::zBeam_
private

Definition at line 123 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ zBeamMC_

std::vector<float> HGCalTB23Analyzer::zBeamMC_
private

Definition at line 127 of file HGCalTB23Analyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

◆ zFrontBH_

const double HGCalTB23Analyzer::zFrontBH_
private

Definition at line 77 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), and HGCalTB23Analyzer().

◆ zFrontEE_

const double HGCalTB23Analyzer::zFrontEE_
private

Definition at line 77 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), and HGCalTB23Analyzer().

◆ zFrontFH_

const double HGCalTB23Analyzer::zFrontFH_
private

Definition at line 77 of file HGCalTB23Analyzer.cc.

Referenced by analyze(), and HGCalTB23Analyzer().