CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
HGCalTBAnalyzer Class Reference
Inheritance diagram for HGCalTBAnalyzer:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 HGCalTBAnalyzer (edm::ParameterSet const &)
 
 ~HGCalTBAnalyzer () override
 
- 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

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

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &) override
 
template<class T1 >
void analyzeDigi (int type, const T1 &detId, uint16_t adc)
 
void analyzePassiveHits (edm::Handle< edm::PassiveHitContainer > const &hgcPh, int subdet)
 
void analyzeRecHits (int type, edm::Handle< HGCRecHitCollection > &hits)
 
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 doDigis_
 
const bool doPassive_
 
const bool doPassiveBH_
 
const bool doPassiveEE_
 
const bool doPassiveHE_
 
const bool doRecHits_
 
const bool doSimHits_
 
const bool doTree_
 
const bool doTreeCell_
 
edm::Service< TFileServicefs_
 
const double gev2mip200_
 
const double gev2mip300_
 
TH1D * hBeam_
 
TH1D * hDigiADC_ [3]
 
TH1D * hDigiLng_ [2]
 
TH2D * hDigiOcc_ [3]
 
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_
 
const HGCalGeometryhgeom_ [2]
 
TH1D * hRecHitE_ [3]
 
TProfile2D * hRecHitLat_ [3]
 
TProfile * hRecHitLng1_ [3]
 
TProfile * hRecHitLng_ [3]
 
TH2D * hRecHitOcc_ [3]
 
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_
 
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_
 
const int sampleIndex_
 
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_
 
edm::EDGetToken tok_digiBH_
 
edm::EDGetToken tok_digiEE_
 
edm::EDGetToken tok_digiFH_
 
edm::EDGetTokenT
< edm::HepMCProduct
tok_hepMC_
 
edm::EDGetTokenT
< edm::PassiveHitContainer
tok_hgcPHBeam_
 
edm::EDGetTokenT
< edm::PassiveHitContainer
tok_hgcPHBH_
 
edm::EDGetTokenT
< edm::PassiveHitContainer
tok_hgcPHCMSE_
 
edm::EDGetTokenT
< edm::PassiveHitContainer
tok_hgcPHEE_
 
edm::EDGetTokenT
< edm::PassiveHitContainer
tok_hgcPHFH_
 
edm::EDGetToken tok_hitrBH_
 
edm::EDGetToken tok_hitrEE_
 
edm::EDGetToken tok_hitrFH_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
tok_hitsBeam_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
tok_hitsBH_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
tok_hitsEE_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
tok_hitsFH_
 
edm::EDGetTokenT
< edm::SimTrackContainer
tok_simTk_
 
edm::EDGetTokenT
< edm::SimVertexContainer
tok_simVtx_
 
edm::ESGetToken
< HGCalDDDConstants,
IdealGeometryRecord
tokDDDEE_
 
edm::ESGetToken
< HGCalDDDConstants,
IdealGeometryRecord
tokDDDFH_
 
edm::ESGetToken< HGCalGeometry,
IdealGeometryRecord
tokGeomEE_
 
edm::ESGetToken< HGCalGeometry,
IdealGeometryRecord
tokGeomFH_
 
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< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
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 54 of file HGCalTBAnalyzer.cc.

Constructor & Destructor Documentation

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

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

Passive hits

Definition at line 143 of file HGCalTBAnalyzer.cc.

References addP_, ahcalGeom_, detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doDigis_, doPassive_, doPassiveBH_, doPassiveEE_, doPassiveHE_, doRecHits_, doSimHits_, edm::ParameterSet::getParameter(), gev2mip200_, gev2mip300_, iConfig, idBeams_, ifBeam_, ifBH_, ifEE_, ifFH_, HLT_FULL_cff::InputTag, isotrackApplyRegressor::k, sampleIndex_, stoc_smear_time_200_, stoc_smear_time_300_, AlCaHLTBitMon_QueryRunRegistry::string, createJobs::tmp, tok_digiBH_, tok_digiEE_, tok_digiFH_, tok_hepMC_, tok_hgcPHBeam_, tok_hgcPHBH_, tok_hgcPHCMSE_, tok_hgcPHEE_, tok_hgcPHFH_, tok_hitrBH_, tok_hitrEE_, tok_hitrFH_, tok_hitsBeam_, tok_hitsBH_, tok_hitsEE_, tok_hitsFH_, tok_simTk_, tok_simVtx_, tokDDDEE_, tokDDDFH_, tokGeomEE_, tokGeomFH_, zFrontBH_, zFrontEE_, and zFrontFH_.

144  : ifEE_(iConfig.getParameter<bool>("useEE")),
145  ifFH_(iConfig.getParameter<bool>("useFH")),
146  ifBH_(iConfig.getParameter<bool>("useBH")),
147  ifBeam_(iConfig.getParameter<bool>("useBeam")),
148  doSimHits_(iConfig.getParameter<bool>("doSimHits")),
149  doDigis_(iConfig.getParameter<bool>("doDigis")),
150  doRecHits_(iConfig.getParameter<bool>("doRecHits")),
151  doTree_(iConfig.getParameter<bool>("doTree")),
152  doTreeCell_(iConfig.getParameter<bool>("doTreeCell")),
153  doPassive_(iConfig.getParameter<bool>("doPassive")),
154  doPassiveEE_(iConfig.getParameter<bool>("doPassiveEE")),
155  doPassiveHE_(iConfig.getParameter<bool>("doPassiveHE")),
156  doPassiveBH_(iConfig.getParameter<bool>("doPassiveBH")),
157  addP_(iConfig.getParameter<bool>("addP")),
158  doBeam_(iConfig.getParameter<bool>("doBeam")),
159  detectorEE_(iConfig.getParameter<std::string>("detectorEE")),
160  detectorFH_(iConfig.getParameter<std::string>("detectorFH")),
161  detectorBH_(iConfig.getParameter<std::string>("detectorBH")),
162  detectorBeam_(iConfig.getParameter<std::string>("detectorBeam")),
163  zFrontEE_(iConfig.getParameter<double>("zFrontEE")),
164  zFrontFH_(iConfig.getParameter<double>("zFrontFH")),
165  zFrontBH_(iConfig.getParameter<double>("zFrontBH")),
166  sampleIndex_(iConfig.getParameter<int>("sampleIndex")),
167  gev2mip200_(iConfig.getUntrackedParameter<double>("gev2mip200", 57.0e-6)),
168  gev2mip300_(iConfig.getUntrackedParameter<double>("gev2mip300", 85.5e-6)),
169  stoc_smear_time_200_(iConfig.getUntrackedParameter<double>("stoc_smear_time_200", 10.24)),
170  stoc_smear_time_300_(iConfig.getUntrackedParameter<double>("stoc_smear_time_300", 15.5)) {
171  usesResource("TFileService");
172  ahcalGeom_ = std::make_unique<AHCalGeometry>(iConfig);
173 
174  // now do whatever initialization is needed
180  idBeams_ = (iConfig.getParameter<std::vector<int>>("idBeams"));
181 #ifdef EDM_ML_DEBUG
182  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: SimHits = " << doSimHits_ << " Digis = " << doDigis_ << ":"
183  << sampleIndex_ << " RecHits = " << doRecHits_ << " useDets " << ifEE_ << ":" << ifFH_
184  << ":" << ifBH_ << ":" << ifBeam_ << " zFront " << zFrontEE_ << ":" << zFrontFH_ << ":"
185  << zFrontBH_ << " IdBeam " << idBeams_.size() << ":";
186  for (unsigned int k = 0; k < idBeams_.size(); ++k)
187  edm::LogVerbatim("HGCSim") << " [" << k << "] " << idBeams_[k];
188  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: DoPassive " << doPassive_ << ":" << doPassiveEE_ << ":"
189  << doPassiveHE_ << ":" << doPassiveBH_;
190  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: MIP conversion factors " << gev2mip200_ << ":" << gev2mip300_
191  << " Time smearing " << stoc_smear_time_200_ << ":" << stoc_smear_time_300_ << " AddP "
192  << addP_;
193 #endif
194  if (idBeams_.empty())
195  idBeams_.push_back(1001);
196 
197  edm::InputTag tmp0 = iConfig.getParameter<edm::InputTag>("generatorSrc");
198  tok_hepMC_ = consumes<edm::HepMCProduct>(tmp0);
199 
200 #ifdef EDM_ML_DEBUG
201  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: GeneratorSource = " << tmp0;
202 #endif
203  std::string tmp1 = iConfig.getParameter<std::string>("caloHitSrcEE");
204  tok_hitsEE_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", tmp1));
205  tok_simTk_ = consumes<edm::SimTrackContainer>(edm::InputTag("g4SimHits"));
206  tok_simVtx_ = consumes<edm::SimVertexContainer>(edm::InputTag("g4SimHits"));
207  edm::InputTag tmp2 = iConfig.getParameter<edm::InputTag>("digiSrcEE");
208  tok_digiEE_ = consumes<HGCalDigiCollection>(tmp2);
209  edm::InputTag tmp3 = iConfig.getParameter<edm::InputTag>("recHitSrcEE");
210  tok_hitrEE_ = consumes<HGCRecHitCollection>(tmp3);
211 #ifdef EDM_ML_DEBUG
212  if (ifEE_) {
213  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: Detector " << detectorEE_ << " with tags " << tmp1 << ", " << tmp2
214  << ", " << tmp3;
215  }
216 #endif
217  tmp1 = iConfig.getParameter<std::string>("caloHitSrcFH");
218  tok_hitsFH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", tmp1));
219  tmp2 = iConfig.getParameter<edm::InputTag>("digiSrcFH");
220  tok_digiFH_ = consumes<HGCalDigiCollection>(tmp2);
221  tmp3 = iConfig.getParameter<edm::InputTag>("recHitSrcFH");
222  tok_hitrFH_ = consumes<HGCRecHitCollection>(tmp3);
223 #ifdef EDM_ML_DEBUG
224  if (ifFH_)
225  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: Detector " << detectorFH_ << " with tags " << tmp1 << ", " << tmp2
226  << ", " << tmp3;
227 #endif
228  tmp1 = iConfig.getParameter<std::string>("caloHitSrcBH");
229  tok_hitsBH_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", tmp1));
230  tmp2 = iConfig.getParameter<edm::InputTag>("digiSrcBH");
231  tok_digiBH_ = consumes<HGCalDigiCollection>(tmp2);
232  tmp3 = iConfig.getParameter<edm::InputTag>("recHitSrcBH");
233  tok_hitrBH_ = consumes<HGCRecHitCollection>(tmp3);
234 
236  edm::InputTag tmp = iConfig.getParameter<edm::InputTag>("passiveEE");
237  tok_hgcPHEE_ = consumes<edm::PassiveHitContainer>(tmp);
238 
239  tmp = iConfig.getParameter<edm::InputTag>("passiveFH");
240  tok_hgcPHFH_ = consumes<edm::PassiveHitContainer>(tmp);
241 
242  tmp = iConfig.getParameter<edm::InputTag>("passiveBH");
243  tok_hgcPHBH_ = consumes<edm::PassiveHitContainer>(tmp);
244 
245  tmp = iConfig.getParameter<edm::InputTag>("passiveCMSE");
246  tok_hgcPHCMSE_ = consumes<edm::PassiveHitContainer>(tmp);
247 
248  tmp = iConfig.getParameter<edm::InputTag>("passiveBeam");
249  tok_hgcPHBeam_ = consumes<edm::PassiveHitContainer>(tmp);
250 
251 #ifdef EDM_ML_DEBUG
252  if (ifBH_)
253  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: Detector " << detectorBH_ << " with tags " << tmp1 << ", " << tmp2
254  << ", " << tmp3;
255 #endif
256  tmp1 = iConfig.getParameter<std::string>("caloHitSrcBeam");
257  tok_hitsBeam_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", tmp1));
258 #ifdef EDM_ML_DEBUG
259  if (ifBeam_)
260  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer:: Detector " << detectorBeam_ << " with tags " << tmp1;
261 #endif
262  if (ifEE_) {
263  tokDDDEE_ =
264  esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorEE_));
265  tokGeomEE_ =
266  esConsumes<HGCalGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorEE_));
267  }
268  if (ifFH_) {
269  tokDDDFH_ =
270  esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorFH_));
271  tokGeomFH_ =
272  esConsumes<HGCalGeometry, IdealGeometryRecord, edm::Transition::BeginRun>(edm::ESInputTag("", detectorFH_));
273  }
274 }
Log< level::Info, true > LogVerbatim
const bool doTree_
const double stoc_smear_time_200_
const std::string detectorBH_
edm::EDGetToken tok_hitrBH_
const std::string detectorBeam_
edm::EDGetToken tok_digiFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsFH_
const bool doRecHits_
const double zFrontFH_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBeam_
const double gev2mip300_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDFH_
const double zFrontBH_
const bool doPassiveEE_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBH_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > tokGeomEE_
const bool doBeam_
std::unique_ptr< AHCalGeometry > ahcalGeom_
std::vector< int > idBeams_
const double zFrontEE_
const bool ifBeam_
const double stoc_smear_time_300_
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
const bool doPassive_
edm::EDGetToken tok_hitrFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBeam_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
const int sampleIndex_
const bool doPassiveBH_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHEE_
const bool doSimHits_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBH_
const bool doDigis_
const bool doTreeCell_
const bool doPassiveHE_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDEE_
edm::EDGetToken tok_digiBH_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > tokGeomFH_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHFH_
tmp
align.sh
Definition: createJobs.py:716
const double gev2mip200_
edm::EDGetToken tok_hitrEE_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
const std::string detectorEE_
edm::EDGetToken tok_digiEE_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHCMSE_
const std::string detectorFH_
HGCalTBAnalyzer::~HGCalTBAnalyzer ( )
override

Definition at line 276 of file HGCalTBAnalyzer.cc.

276 {}

Member Function Documentation

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

EE

FH

BH

CMSE

Beam

Implements edm::one::EDAnalyzerBase.

Definition at line 563 of file HGCalTBAnalyzer.cc.

References gpuClustering::adc, addP_, ahcalGeom_, analyzeDigi(), analyzePassiveHits(), analyzeRecHits(), analyzeSimHits(), analyzeSimTracks(), edm::HandleBase::clear(), HGCSample::data(), detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doDigis_, doPassive_, doPassiveBH_, doPassiveEE_, doPassiveHE_, doRecHits_, doSimHits_, doTree_, edm::Event::getByToken(), hBeam_, hgcons_, hgcPassiveBeamEnergy_, hgcPassiveBeamID_, hgcPassiveBeamName_, hgcPassiveBHEnergy_, hgcPassiveBHID_, hgcPassiveBHName_, hgcPassiveCMSEEnergy_, hgcPassiveCMSEID_, hgcPassiveCMSEName_, hgcPassiveEEEnergy_, hgcPassiveEEID_, hgcPassiveEEName_, hgcPassiveFHEnergy_, hgcPassiveFHID_, hgcPassiveFHName_, idBeams_, ifBeam_, ifBH_, ifEE_, ifFH_, edm::HandleBase::isValid(), isotrackApplyRegressor::k, HGCalDDDConstants::layers(), AlCaHLTBitMon_ParallelJobs::p, sampleIndex_, 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_digiEE_, tok_digiFH_, tok_hepMC_, tok_hgcPHBeam_, tok_hgcPHBH_, tok_hgcPHCMSE_, tok_hgcPHEE_, tok_hgcPHFH_, tok_hitrEE_, tok_hitrFH_, tok_hitsBeam_, tok_hitsBH_, tok_hitsEE_, tok_hitsFH_, tok_simTk_, tok_simVtx_, tree_, zFrontBH_, zFrontEE_, and zFrontFH_.

563  {
564  // Generator input
566  iEvent.getByToken(tok_hepMC_, evtMC);
567  if (!evtMC.isValid()) {
568  edm::LogWarning("HGCal") << "no HepMCProduct found";
569  } else {
570  const HepMC::GenEvent* myGenEvent = evtMC->GetEvent();
571  unsigned int k(0);
572  HepMC::FourVector pxyz(0, 0, 0, 0);
573  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
574  ++p, ++k) {
575  edm::LogVerbatim("HGCSim") << "Particle [" << k << "] with p " << (*p)->momentum().rho() << " theta "
576  << (*p)->momentum().theta() << " phi " << (*p)->momentum().phi() << " pxyz ("
577  << (*p)->momentum().px() << ", " << (*p)->momentum().py() << ", "
578  << (*p)->momentum().pz() << ")";
579  if (addP_) {
580  pxyz.setPx(pxyz.px() + (*p)->momentum().px());
581  pxyz.setPy(pxyz.py() + (*p)->momentum().py());
582  pxyz.setPz(pxyz.pz() + (*p)->momentum().pz());
583  pxyz.setE(pxyz.e() + (*p)->momentum().e());
584  } else if (!addP_ && (k == 0)) {
585  pxyz = (*p)->momentum();
586  }
587  }
588  hBeam_->Fill(pxyz.rho());
589  edm::LogVerbatim("HGCSim") << "Particle with p " << pxyz.rho() << " theta " << pxyz.theta() << " phi "
590  << pxyz.phi();
591  }
592 
593  // Now the Simhits
594  if (doSimHits_) {
596  iEvent.getByToken(tok_simTk_, SimTk);
598  iEvent.getByToken(tok_simVtx_, SimVtx);
599  analyzeSimTracks(SimTk, SimVtx);
600 
601  simHitLayEn1EE_.clear();
602  simHitLayEn2EE_.clear();
603  simHitLayEn1FH_.clear();
604  simHitLayEn2FH_.clear();
605  simHitLayEn1BH_.clear();
606  simHitLayEn2BH_.clear();
607  simHitLayEnBeam_.clear();
608  simHitCellIdEE_.clear();
609  simHitCellEnEE_.clear();
610  simHitCellIdFH_.clear();
611  simHitCellEnFH_.clear();
612  simHitCellIdBH_.clear();
613  simHitCellEnBH_.clear();
614  simHitCellIdBeam_.clear();
615  simHitCellEnBeam_.clear();
616  simHitCellColBH_.clear();
617  simHitCellRowBH_.clear();
618  simHitCellLayerBH_.clear();
620  simHitCellTime15MipEE_.clear();
621  simHitCellTimeLastHitEE_.clear();
623  simHitCellTime15MipFH_.clear();
624  simHitCellTimeLastHitFH_.clear();
625  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
626  std::vector<PCaloHit> caloHits;
627  if (ifEE_) {
628  simHitLayEn1EE_ = std::vector<float>(hgcons_[0]->layers(false), 0);
629  simHitLayEn2EE_ = std::vector<float>(hgcons_[0]->layers(true), 0);
630  iEvent.getByToken(tok_hitsEE_, theCaloHitContainers);
631  if (theCaloHitContainers.isValid()) {
632 #ifdef EDM_ML_DEBUG
633  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorEE_ << " has " << theCaloHitContainers->size()
634  << " hits";
635 #endif
636  caloHits.clear();
637  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
638  analyzeSimHits(0, caloHits, zFrontEE_);
639  } else {
640 #ifdef EDM_ML_DEBUG
641  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorEE_ << " !!!";
642 #endif
643  }
644  }
645  if (ifFH_) {
646  simHitLayEn1FH_ = std::vector<float>(hgcons_[1]->layers(false), 0);
647  simHitLayEn2FH_ = std::vector<float>(hgcons_[1]->layers(true), 0);
648  iEvent.getByToken(tok_hitsFH_, theCaloHitContainers);
649  if (theCaloHitContainers.isValid()) {
650 #ifdef EDM_ML_DEBUG
651  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorFH_ << " has " << theCaloHitContainers->size()
652  << " hits";
653 #endif
654  caloHits.clear();
655  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
656  analyzeSimHits(1, caloHits, zFrontFH_);
657  } else {
658 #ifdef EDM_ML_DEBUG
659  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorFH_ << " !!!";
660 #endif
661  }
662  }
663  if (ifBH_) {
664  simHitLayEn1BH_ = std::vector<float>(ahcalGeom_->maxDepth(), 0);
665  simHitLayEn2BH_ = std::vector<float>(ahcalGeom_->maxDepth(), 0);
666  iEvent.getByToken(tok_hitsBH_, theCaloHitContainers);
667  if (theCaloHitContainers.isValid()) {
668 #ifdef EDM_ML_DEBUG
669  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorBH_ << " has " << theCaloHitContainers->size()
670  << " hits";
671 #endif
672  caloHits.clear();
673  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
674  analyzeSimHits(2, caloHits, zFrontBH_);
675  } else {
676 #ifdef EDM_ML_DEBUG
677  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorBH_ << " !!!";
678 #endif
679  }
680  }
681  if (ifBeam_) {
682  simHitLayEnBeam_ = std::vector<float>(idBeams_.size(), 0);
683  iEvent.getByToken(tok_hitsBeam_, theCaloHitContainers);
684  if (theCaloHitContainers.isValid()) {
685 #ifdef EDM_ML_DEBUG
686  edm::LogVerbatim("HGCSim") << "PcalohitContainer for " << detectorBeam_ << " has "
687  << theCaloHitContainers->size() << " hits";
688 #endif
689  caloHits.clear();
690  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
691  analyzeSimHits(3, caloHits, 0.0);
692  } else {
693 #ifdef EDM_ML_DEBUG
694  edm::LogVerbatim("HGCSim") << "PCaloHitContainer does not exist for " << detectorBeam_ << " !!!";
695 #endif
696  }
697  }
698  } // if (doSimHits_)
699 
701  if (doPassive_) {
703  hgcPassiveEEEnergy_.clear();
704  hgcPassiveEEName_.clear();
705  hgcPassiveEEID_.clear();
706  if (doPassiveEE_) {
708  iEvent.getByToken(tok_hgcPHEE_, hgcPHEE);
709  analyzePassiveHits(hgcPHEE, 1);
710  }
712  hgcPassiveFHEnergy_.clear();
713  hgcPassiveFHName_.clear();
714  hgcPassiveFHID_.clear();
715  if (doPassiveHE_) {
717  iEvent.getByToken(tok_hgcPHFH_, hgcPHFH);
718  analyzePassiveHits(hgcPHFH, 2);
719  }
721  hgcPassiveBHEnergy_.clear();
722  hgcPassiveBHName_.clear();
723  hgcPassiveBHID_.clear();
724  if (doPassiveBH_) {
726  iEvent.getByToken(tok_hgcPHBH_, hgcPHBH);
727  analyzePassiveHits(hgcPHBH, 3);
728  }
730  hgcPassiveCMSEEnergy_.clear();
731  hgcPassiveCMSEName_.clear();
732  hgcPassiveCMSEID_.clear();
734  iEvent.getByToken(tok_hgcPHCMSE_, hgcPHCMSE);
735  analyzePassiveHits(hgcPHCMSE, 4);
737  hgcPassiveBeamName_.clear();
738  hgcPassiveBeamEnergy_.clear();
739  hgcPassiveBeamID_.clear();
741  iEvent.getByToken(tok_hgcPHBeam_, hgcPHBeam);
742  analyzePassiveHits(hgcPHBeam, 5);
743  }
744 
745  if ((doSimHits_ || doPassive_) && (doTree_))
746  tree_->Fill();
747 
748  // Now the Digis
749  if (doDigis_) {
750  if (ifEE_) {
751  edm::Handle<HGCalDigiCollection> theDigiContainers;
752  iEvent.getByToken(tok_digiEE_, theDigiContainers);
753  if (theDigiContainers.isValid()) {
754 #ifdef EDM_ML_DEBUG
755  edm::LogVerbatim("HGCSim") << "HGCDigiCintainer for " << detectorEE_ << " with " << theDigiContainers->size()
756  << " element(s)";
757 #endif
758  for (const auto& it : *theDigiContainers) {
759  HGCalDetId detId = (it.id());
760  const HGCSample& hgcSample = it.sample(sampleIndex_);
761  uint16_t adc = hgcSample.data();
762  analyzeDigi(0, detId, adc);
763  }
764  }
765  }
766  if (ifFH_) {
767  edm::Handle<HGCalDigiCollection> theDigiContainers;
768  iEvent.getByToken(tok_digiFH_, theDigiContainers);
769  if (theDigiContainers.isValid()) {
770 #ifdef EDM_ML_DEBUG
771  edm::LogVerbatim("HGCSim") << "HGCDigiContainer for " << detectorFH_ << " with " << theDigiContainers->size()
772  << " element(s)";
773 #endif
774  for (const auto& it : *theDigiContainers) {
775  HGCalDetId detId = (it.id());
776  const HGCSample& hgcSample = it.sample(sampleIndex_);
777  uint16_t adc = hgcSample.data();
778  analyzeDigi(1, detId, adc);
779  }
780  }
781  }
782  }
783 
784  // The Rechits
785  if (doRecHits_) {
786  edm::Handle<HGCRecHitCollection> theCaloHitContainers;
787  if (ifEE_) {
788  iEvent.getByToken(tok_hitrEE_, theCaloHitContainers);
789  if (theCaloHitContainers.isValid()) {
790 #ifdef EDM_ML_DEBUG
791  edm::LogVerbatim("HGCSim") << "HGCRecHitCollection for " << detectorEE_ << " has "
792  << theCaloHitContainers->size() << " hits";
793 #endif
794  analyzeRecHits(0, theCaloHitContainers);
795  } else {
796 #ifdef EDM_ML_DEBUG
797  edm::LogVerbatim("HGCSim") << "HGCRecHitCollection does not exist for " << detectorEE_ << " !!!";
798 #endif
799  }
800  }
801  if (ifFH_) {
802  iEvent.getByToken(tok_hitrFH_, theCaloHitContainers);
803  if (theCaloHitContainers.isValid()) {
804 #ifdef EDM_ML_DEBUG
805  edm::LogVerbatim("HGCSim") << "HGCRecHitCollection for " << detectorFH_ << " has "
806  << theCaloHitContainers->size() << " hits";
807 #endif
808  analyzeRecHits(1, theCaloHitContainers);
809  } else {
810 #ifdef EDM_ML_DEBUG
811  edm::LogVerbatim("HGCSim") << "HGCRecHitCollection does not exist for " << detectorFH_ << " !!!";
812 #endif
813  } // else
814  } // if (ifFH_)
815  } // if (doRecHits_)
816 
817 } // void HGCalTBAnalyzer::analyze
std::vector< float > simHitLayEn2EE_
Log< level::Info, true > LogVerbatim
const bool doTree_
std::vector< float > hgcPassiveBeamEnergy_
std::vector< float > simHitLayEn2BH_
std::vector< uint32_t > simHitCellIdFH_
void analyzeSimTracks(edm::Handle< edm::SimTrackContainer > const &SimTk, edm::Handle< edm::SimVertexContainer > const &SimVtx)
const std::string detectorBH_
const std::string detectorBeam_
std::vector< std::string > hgcPassiveFHName_
std::vector< float > simHitLayEn1EE_
std::vector< float > hgcPassiveBHEnergy_
std::vector< int > hgcPassiveBeamID_
edm::EDGetToken tok_digiFH_
std::vector< float > simHitCellTimeLastHitFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsFH_
const bool doRecHits_
std::vector< std::string > hgcPassiveBHName_
const double zFrontFH_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBeam_
std::vector< float > hgcPassiveCMSEEnergy_
std::vector< int > hgcPassiveEEID_
std::vector< float > hgcPassiveEEEnergy_
wrapper for a data word
Definition: HGCSample.h:13
std::vector< float > simHitCellEnFH_
const double zFrontBH_
const bool doPassiveEE_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBH_
void analyzeSimHits(int type, std::vector< PCaloHit > &hits, double zFront)
int iEvent
Definition: GenABIO.cc:224
unsigned int layers(bool reco) const
std::unique_ptr< AHCalGeometry > ahcalGeom_
std::vector< int > idBeams_
std::vector< int > simHitCellColBH_
void analyzeRecHits(int type, edm::Handle< HGCRecHitCollection > &hits)
std::vector< std::string > hgcPassiveCMSEName_
const double zFrontEE_
const bool ifBeam_
edm::EDGetTokenT< edm::SimTrackContainer > tok_simTk_
std::vector< int > simHitCellLayerBH_
std::vector< int > simHitCellRowBH_
const bool doPassive_
std::vector< float > simHitCellTimeFirstHitEE_
const HGCalDDDConstants * hgcons_[2]
edm::EDGetToken tok_hitrFH_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsBeam_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
std::vector< float > simHitCellTimeFirstHitFH_
bool isValid() const
Definition: HandleBase.h:70
std::vector< uint32_t > simHitCellIdBH_
const int sampleIndex_
void analyzePassiveHits(edm::Handle< edm::PassiveHitContainer > const &hgcPh, int subdet)
std::vector< float > simHitCellTime15MipEE_
const bool doPassiveBH_
std::vector< std::string > hgcPassiveBeamName_
std::vector< float > hgcPassiveFHEnergy_
std::vector< float > simHitCellTimeLastHitEE_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHEE_
std::vector< int > hgcPassiveCMSEID_
const bool doSimHits_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHBH_
const bool doDigis_
std::vector< float > simHitCellEnBeam_
std::vector< std::string > hgcPassiveEEName_
std::vector< float > simHitCellTime15MipFH_
void analyzeDigi(int type, const T1 &detId, uint16_t adc)
std::vector< int > hgcPassiveBHID_
const bool doPassiveHE_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hitsEE_
std::vector< float > simHitLayEn1FH_
std::vector< int > hgcPassiveFHID_
std::vector< float > simHitCellEnBH_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHFH_
Log< level::Warning, false > LogWarning
std::vector< float > simHitLayEn1BH_
std::vector< uint32_t > simHitCellIdEE_
std::vector< float > simHitCellEnEE_
uint16_t data() const
Definition: HGCSample.h:70
std::vector< uint32_t > simHitCellIdBeam_
edm::EDGetToken tok_hitrEE_
std::vector< float > simHitLayEn2FH_
edm::EDGetTokenT< edm::SimVertexContainer > tok_simVtx_
const std::string detectorEE_
uint16_t *__restrict__ uint16_t const *__restrict__ adc
edm::EDGetToken tok_digiEE_
edm::EDGetTokenT< edm::PassiveHitContainer > tok_hgcPHCMSE_
const std::string detectorFH_
std::vector< float > simHitLayEnBeam_
template<class T1 >
void HGCalTBAnalyzer::analyzeDigi ( int  type,
const T1 &  detId,
uint16_t  adc 
)
private

Definition at line 1223 of file HGCalTBAnalyzer.cc.

References HGCalGeometry::getPosition(), hDigiADC_, hDigiLng_, hDigiOcc_, and hgeom_.

Referenced by analyze().

1223  {
1224  DetId id1 = DetId(detId.rawId());
1225  GlobalPoint global = hgeom_[type]->getPosition(id1);
1226  hDigiOcc_[type]->Fill(global.x(), global.y());
1227  hDigiLng_[type]->Fill(global.z());
1228  hDigiADC_[type]->Fill(adc);
1229 }
GlobalPoint getPosition(const DetId &id) const
const HGCalGeometry * hgeom_[2]
Definition: DetId.h:17
uint16_t *__restrict__ uint16_t const *__restrict__ adc
void HGCalTBAnalyzer::analyzePassiveHits ( edm::Handle< edm::PassiveHitContainer > const &  hgcPh,
int  subdet 
)
private

Definition at line 1281 of file HGCalTBAnalyzer.cc.

References relval_parameters_module::energy, hgcPassiveBeamEnergy_, hgcPassiveBeamID_, hgcPassiveBeamName_, hgcPassiveBHEnergy_, hgcPassiveBHID_, hgcPassiveBHName_, hgcPassiveCMSEEnergy_, hgcPassiveCMSEID_, hgcPassiveCMSEName_, hgcPassiveEEEnergy_, hgcPassiveEEID_, hgcPassiveEEName_, hgcPassiveFHEnergy_, hgcPassiveFHID_, hgcPassiveFHName_, gpuClustering::id, mergeVDriftHistosByStation::name, AlCaHLTBitMon_QueryRunRegistry::string, and findQualityFiles::v.

Referenced by analyze().

1281  {
1282  for (const auto& v : *hgcPH) {
1283  double energy = v.energy();
1284  std::string name = v.vname();
1285  unsigned int id = v.id();
1286 #ifdef EDM_ML_DEBUG
1287  double time = v.time();
1288  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::analyzePassiveHits:Energy:"
1289  << "Time:Name:Id : " << energy << ":" << time << ":" << name << ":" << id;
1290 #endif
1291 
1292  if (subdet == 1) {
1293  hgcPassiveEEEnergy_.push_back(energy);
1294  hgcPassiveEEName_.push_back(name);
1295  hgcPassiveEEID_.push_back(id);
1296  } else if (subdet == 2) {
1297  hgcPassiveFHEnergy_.push_back(energy);
1298  hgcPassiveFHName_.push_back(name);
1299  hgcPassiveFHID_.push_back(id);
1300  } else if (subdet == 3) {
1301  hgcPassiveBHEnergy_.push_back(energy);
1302  hgcPassiveBHName_.push_back(name);
1303  hgcPassiveBHID_.push_back(id);
1304  } else if (subdet == 4) {
1305  hgcPassiveCMSEEnergy_.push_back(energy);
1306  hgcPassiveCMSEName_.push_back(name);
1307  hgcPassiveCMSEID_.push_back(id);
1308  } else if (subdet == 5) {
1309  hgcPassiveBeamEnergy_.push_back(energy);
1310  hgcPassiveBeamName_.push_back(name);
1311  hgcPassiveBeamID_.push_back(id);
1312  }
1313  }
1314 }
Log< level::Info, true > LogVerbatim
std::vector< float > hgcPassiveBeamEnergy_
uint16_t *__restrict__ id
std::vector< std::string > hgcPassiveFHName_
std::vector< float > hgcPassiveBHEnergy_
std::vector< int > hgcPassiveBeamID_
std::vector< std::string > hgcPassiveBHName_
std::vector< float > hgcPassiveCMSEEnergy_
std::vector< int > hgcPassiveEEID_
std::vector< float > hgcPassiveEEEnergy_
std::vector< std::string > hgcPassiveCMSEName_
std::vector< std::string > hgcPassiveBeamName_
std::vector< float > hgcPassiveFHEnergy_
std::vector< int > hgcPassiveCMSEID_
std::vector< std::string > hgcPassiveEEName_
std::vector< int > hgcPassiveBHID_
std::vector< int > hgcPassiveFHID_
void HGCalTBAnalyzer::analyzeRecHits ( int  type,
edm::Handle< HGCRecHitCollection > &  hits 
)
private

Definition at line 1231 of file HGCalTBAnalyzer.cc.

References HGCalDetId::cell(), relval_parameters_module::energy, first, HGCalGeometry::getPosition(), hgcons_, hgeom_, hRecHitE_, hRecHitLat_, hRecHitLng1_, hRecHitLng_, hRecHitOcc_, HGCalDetId::layer(), phase1PixelTopology::layer, edm::second(), HGCalDDDConstants::waferTypeL(), HGCalDDDConstants::waferZ(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze().

1231  {
1232  std::map<int, double> map_hitLayer;
1233  std::map<int, std::pair<DetId, double>> map_hitCell;
1234  for (const auto& it : *hits) {
1235  DetId detId = it.id();
1236  GlobalPoint global = hgeom_[type]->getPosition(detId);
1237  double energy = it.energy();
1238  int layer = HGCalDetId(detId).layer();
1239  int cell = HGCalDetId(detId).cell();
1240 #ifdef EDM_ML_DEBUG
1241  edm::LogVerbatim("HGCSim") << "Layer thickness " << hgcons_[type]->waferTypeL(HGCalDetId(detId).wafer());
1242 #endif
1243  hRecHitOcc_[type]->Fill(global.x(), global.y(), energy);
1244  hRecHitE_[type]->Fill(energy);
1245  if (map_hitLayer.count(layer) != 0) {
1246  map_hitLayer[layer] += energy;
1247  } else {
1248  map_hitLayer[layer] = energy;
1249  }
1250  if (map_hitCell.count(cell) != 0) {
1251  double ee = energy + map_hitCell[cell].second;
1252  map_hitCell[cell] = std::pair<uint32_t, double>(detId, ee);
1253  } else {
1254  map_hitCell[cell] = std::pair<uint32_t, double>(detId, energy);
1255  }
1256 #ifdef EDM_ML_DEBUG
1257  edm::LogVerbatim("HGCSim") << "RecHit: " << layer << " " << global.x() << " " << global.y() << " " << global.z()
1258  << " " << energy;
1259 #endif
1260  }
1261 
1262  for (const auto& itr : map_hitLayer) {
1263  int layer = itr.first;
1264  double energy = itr.second;
1265  double zp = hgcons_[type]->waferZ(layer, true);
1266 #ifdef EDM_ML_DEBUG
1267  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer << " " << zp << " " << energy;
1268 #endif
1269  hRecHitLng_[type]->Fill(zp, energy);
1270  hRecHitLng1_[type]->Fill(layer, energy);
1271  }
1272 
1273  for (const auto& itr : map_hitCell) {
1274  DetId detId = ((itr.second).first);
1275  double energy = ((itr.second).second);
1276  GlobalPoint global = hgeom_[type]->getPosition(detId);
1277  hRecHitLat_[type]->Fill(global.x(), global.y(), energy);
1278  }
1279 }
Log< level::Info, true > LogVerbatim
TProfile * hRecHitLng_[3]
T y() const
Definition: PV3DBase.h:60
GlobalPoint getPosition(const DetId &id) const
constexpr std::array< uint8_t, layerIndexSize > layer
U second(std::pair< T, U > const &p)
const HGCalGeometry * hgeom_[2]
T z() const
Definition: PV3DBase.h:61
const HGCalDDDConstants * hgcons_[2]
int waferTypeL(int wafer) const
double waferZ(int layer, bool reco) const
Definition: DetId.h:17
TProfile2D * hRecHitLat_[3]
int cell() const
get the absolute value of the cell #&#39;s in x and y
Definition: HGCalDetId.h:37
T x() const
Definition: PV3DBase.h:59
int layer() const
get the layer #
Definition: HGCalDetId.h:46
TProfile * hRecHitLng1_[3]
void HGCalTBAnalyzer::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 819 of file HGCalTBAnalyzer.cc.

References ahcalGeom_, SplitLinear::begin, HGCalDDDConstants::cellThickness(), cuy::col, debug, TauDecayModes::dec, g4TestOverlap_cfg::Depth, AHCalDetId::depth(), HLT_FULL_cff::depth, relativeConstraints::empty, dataset::end, relval_parameters_module::energy, first, gev2mip200_, gev2mip300_, HcalOther, hgcons_, hSimHitE_, hSimHitEn_, hSimHitLat_, hSimHitLayEn1BH_, hSimHitLayEn1EE_, hSimHitLayEn1FH_, hSimHitLayEn2BH_, hSimHitLayEn2EE_, hSimHitLayEn2FH_, hSimHitLayEnBeam_, hSimHitLng1_, hSimHitLng2_, hSimHitLng_, hSimHitT_, mps_fire::i, AHCalDetId::icol(), AHCalDetId::icolAbs(), gpuClustering::id, idBeams_, AHCalDetId::irow(), AHCalDetId::irowAbs(), isotrackApplyRegressor::k, HGCalDetId::layer(), phase1PixelTopology::layer, HGCalDDDConstants::locateCell(), nhits, HGCalTestNumbering::packHexagonIndex(), edm::second(), 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, sortTime(), stoc_smear_time_200_, stoc_smear_time_300_, HcalDetId::subdet(), TrackerMaterial_cfi::thickness, dtDQMClient_cfg::threshold, HGCalTestNumbering::unpackHexagonIndex(), HcalTestBeamNumbering::unpackIndex(), HGCalDetId::wafer(), HGCalDDDConstants::waferZ(), xy(), AHCalDetId::zside(), and ecaldqm::zside().

Referenced by analyze().

819  {
820  std::map<uint32_t, double> map_hits, map_hitn;
821  std::map<uint32_t, double> map_hittime_firsthit, map_hittime_lasthit, map_hittime_15Mip;
822  std::map<int, double> map_hitDepth, map_hitWafer;
823  std::map<int, std::pair<uint32_t, double>> map_hitLayer, map_hitCell;
824  double entot(0);
825  std::map<uint32_t, double> nhits;
826  std::map<uint32_t, int> ID, Depth;
827  std::map<uint32_t, double> GeV2Mip;
828  std::map<uint32_t, double> StochTermTime;
829  std::vector<int> nSimLayers;
831  std::map<uint32_t, std::vector<std::pair<double, double>>> map_hitTimeEn;
832  //bool debug = true;
833  bool debug = false;
834  for (unsigned int i = 0; i < hits.size(); i++) {
835  double energy = hits[i].energy();
836  double time = hits[i].time();
837  uint32_t id = hits[i].id();
838  entot += energy;
839  int subdet, zside, layer, sector, subsector(0), cell, depth(0), idx(0);
840  if (type == 2) {
841  subdet = HcalDetId(id).subdet();
842  if (subdet != HcalOther)
843  continue;
844  AHCalDetId hid(id);
845  layer = depth = hid.depth();
846  zside = hid.zside();
847  sector = hid.irow();
848  cell = hid.icol();
849  idx = ((hid.irowAbs() * 100) + (hid.icolAbs()));
850  if (debug)
851  edm::LogVerbatim("HGCSim") << "depth, sector, cell " << depth << ":" << sector << ":" << cell;
852  } else if (type == 3) {
853  HcalTestBeamNumbering::unpackIndex(id, subdet, layer, sector, cell);
854  depth = layer;
855  zside = 1;
856  idx = subdet * 1000 + layer;
857  layer = idx;
858  } else {
859  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector, subsector, cell);
860  depth = hgcons_[type]->simToReco(cell, layer, sector, true).second;
861  idx = sector * 1000 + cell;
862 #ifdef EDM_ML_DEBUG
863  std::pair<float, float> xy = hgcons_[type]->locateCell(cell, layer, sector, false);
864  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::detId " << std::hex << id << std::dec << " Layer:Wafer:Cell "
865  << layer << ":" << sector << ":" << cell << " Position " << xy.first << ":"
866  << xy.second << ":" << hgcons_[type]->waferZ(layer, false);
867 #endif
868  }
869 #ifdef EDM_ML_DEBUG
870  edm::LogVerbatim("HGCSim") << "SimHit:Hit[" << i << "] Id " << subdet << ":" << zside << ":" << layer << ":"
871  << sector << ":" << subsector << ":" << cell << ":" << depth << " Energy " << energy
872  << " Time " << time;
873 #endif
874  if (map_hits.count(id) != 0) {
875  map_hits[id] += energy;
876  } else {
877  map_hits[id] = energy;
878  }
879  if (map_hitLayer.count(layer) != 0) {
880  double ee = energy + map_hitLayer[layer].second;
881  map_hitLayer[layer] = std::make_pair(id, ee);
882  } else {
883  map_hitLayer[layer] = std::make_pair(id, energy);
884  }
885  if (map_hitWafer.count(sector) != 0)
886  map_hitWafer[sector] += energy;
887  else
888  map_hitWafer[sector] = energy;
889  if (depth >= 0) {
890  if (map_hitCell.count(idx) != 0) {
891  double ee = energy + map_hitCell[idx].second;
892  map_hitCell[idx] = std::make_pair(id, ee);
893  } else {
894  map_hitCell[idx] = std::make_pair(id, energy);
895  }
896  if (debug) {
897  if (type == 1)
898  edm::LogVerbatim("HGCSim") << "EE, depth is and map_hitDepth[depth] " << depth << " " << map_hitDepth[depth];
899  if (type == 2)
900  edm::LogVerbatim("HGCSim") << "BH, depth is and map_hitDepth[depth] " << depth << " " << map_hitDepth[depth];
901  }
902  if (map_hitDepth.count(depth) != 0) {
903  map_hitDepth[depth] += energy;
904  } else {
905  map_hitDepth[depth] = energy;
906  }
907  uint32_t idn =
908  (type >= 2) ? id : HGCalTestNumbering::packHexagonIndex(subdet, zside, depth, sector, subsector, cell);
909  map_hitTimeEn[idn].push_back(std::make_pair(time, energy));
910  GeV2Mip[idn] = gev2mip300_;
911  StochTermTime[idn] = stoc_smear_time_300_;
912  ID[idn] = id;
913  Depth[idn] = depth;
914  if (map_hitn.count(idn) != 0) {
915  map_hitn[idn] += energy;
916  ++nhits[idn];
917  } else {
918  map_hitn[idn] = energy;
919  nhits[idn] = 1;
920  }
921  }
922  hSimHitT_[type]->Fill(time, energy);
923  }
924 
925  if (type < 2) { //store only for EE and FH
926  edm::LogVerbatim("HGCSim") << "HGCalTAnalyzer:: " << map_hitWafer.size() << " wafers are hit in type " << type;
927  for (auto itr = map_hitWafer.begin(); itr != map_hitWafer.end(); ++itr)
928  edm::LogVerbatim("HGCSim") << "Wafer: " << itr->first << " Deposited Energy " << itr->second;
930  for (const auto& itr : map_hitTimeEn) {
931  uint32_t id = itr.first;
932  int wafer = -99;
934  wafer = HGCalDetId(ID[id]).wafer();
935  double layer = HGCalDetId(id).layer();
936  double thickness = hgcons_[type]->cellThickness(layer, wafer, 0);
937  if (debug)
938  edm::LogVerbatim("HGCSim") << "wafer is : depth (reco) " << wafer << " " << Depth[id]
939  << "\ntype : layer : wafer thickness " << type << " " << layer << " " << thickness
940  << "\nID(sim) and id(reco) " << std::hex << ID[id] << " " << id << std::dec;
941  if (thickness == 300) {
942  GeV2Mip[id] = gev2mip300_;
943  StochTermTime[id] = stoc_smear_time_300_;
944  } else if (thickness == 200) {
945  GeV2Mip[id] = gev2mip200_;
946  StochTermTime[id] = stoc_smear_time_200_;
947  }
948  //first sort
949  std::sort(map_hitTimeEn[id].begin(), map_hitTimeEn[id].end(), sortTime);
951  double threshold = 15.;
952  double totE = 0.;
953  double totEbeforeThreshold = 0.;
954  double timebeforeThreshold = 0.;
955  double timeAtThresohld = 0.;
956  for (unsigned int ihit = 0; ihit < map_hitTimeEn[id].size(); ihit++) {
957  double energy = (map_hitTimeEn[id].at(ihit)).second / GeV2Mip[id];
958  totE += energy;
959  double time = (map_hitTimeEn[id].at(ihit)).first;
960  if (debug)
961  edm::LogVerbatim("HGCSim") << "Tot E till now : time of that E : GeV2Mip[id] is " << totE << " " << time
962  << " " << GeV2Mip[id];
963  if (totE < threshold) {
964  totEbeforeThreshold = totE;
965  timebeforeThreshold = time;
966  } else {
967  timeAtThresohld =
968  (threshold - totEbeforeThreshold) * (time - timebeforeThreshold) / (totE - totEbeforeThreshold) +
969  timebeforeThreshold;
970  map_hittime_15Mip[id] = timeAtThresohld;
971  if (debug)
972  edm::LogVerbatim("HGCSim") << "ihit : energyBefore : timeBefore : energyTot : timeTot : timeAt15MIP "
973  << ihit << " " << totEbeforeThreshold << " " << timebeforeThreshold << " "
974  << totE << " " << time << " " << map_hittime_15Mip[id];
975  break;
976  }
977  }
978  if (!map_hitTimeEn[id].empty()) {
979  map_hittime_firsthit[id] = (map_hitTimeEn[id].at(0)).first;
980  map_hittime_lasthit[id] = (map_hitTimeEn[id].at(map_hitTimeEn[id].size() - 1)).first;
981  if (map_hittime_15Mip[id] < map_hittime_firsthit[id])
982  map_hittime_15Mip[id] = map_hittime_firsthit[id];
983  /*
985  double firsthit_sm = ran3.Gaus(map_hittime_firsthit_vtxCorr[id], StochTermTime[id]);
986  double lasthit_sm = ran3.Gaus(map_hittime_lasthit_vtxCorr[id], StochTermTime[id]);
987  double threshmiphit_sm = ran3.Gaus(map_hittime_15Mip_vtxCorr[id], StochTermTime[id]);
988  */
989  }
990 
991  if (totE < threshold)
992  map_hittime_15Mip[id] = -99;
993  if (debug)
994  edm::LogVerbatim("HGCSim") << "id : first hit time : last hit time " << id << " " << map_hittime_firsthit[id]
995  << " " << map_hittime_lasthit[id] << "\nFinally for this cell, time is "
996  << map_hittime_15Mip[id];
997  }
998  }
999 
1000  hSimHitEn_[type]->Fill(entot);
1001  for (const auto& itr : map_hits) {
1002  hSimHitE_[type]->Fill(itr.second);
1003  }
1004 
1005  if (debug)
1006  edm::LogVerbatim("HGCSim") << "Now looping over map_hitLayer";
1007  for (const auto& itr : map_hitLayer) {
1008  int layer = (type == 2) ? itr.first : (itr.first - 1);
1009  double energy = (itr.second).second;
1010  double zp(0);
1011  if (type < 2)
1012  zp = hgcons_[type]->waferZ(layer + 1, false);
1013  else if (type == 2)
1014  zp = ahcalGeom_->getZ(AHCalDetId((itr.second).first));
1015 #ifdef EDM_ML_DEBUG
1016  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer + 1 << " Z " << zp << ":" << zp - zFront << " E " << energy;
1017 #endif
1018  if (type < 3) {
1019  hSimHitLng_[type]->Fill(zp - zFront, energy);
1020  hSimHitLng2_[type]->Fill(layer + 1, energy);
1021  }
1022  if (type == 0) {
1023  if (layer < static_cast<int>(hSimHitLayEn1EE_.size())) {
1025  hSimHitLayEn1EE_[layer]->Fill(energy);
1026  }
1027  } else if (type == 1) {
1028  if (layer < static_cast<int>(hSimHitLayEn1FH_.size())) {
1030  hSimHitLayEn1FH_[layer]->Fill(energy);
1031  }
1032  } else if (type == 2) {
1033  if (debug)
1034  edm::LogVerbatim("HGCSim") << "layer < hSimHitLayEn1BH_.size()";
1035  if (layer < static_cast<int>(hSimHitLayEn1BH_.size())) {
1037  hSimHitLayEn1BH_[layer]->Fill(energy);
1038  }
1039  } else {
1040  for (unsigned int k = 0; k < idBeams_.size(); ++k) {
1041  if (layer + 1 == idBeams_[k]) {
1043  hSimHitLayEnBeam_[k]->Fill(energy);
1044  break;
1045  }
1046  }
1047  }
1048  }
1049  for (const auto& itr : map_hitDepth) {
1050  int layer = (type == 2) ? itr.first : (itr.first - 1);
1051  double energy = itr.second;
1052 #ifdef EDM_ML_DEBUG
1053  edm::LogVerbatim("HGCSim") << "SimHit:Layer " << layer + 1 << " " << energy;
1054 #endif
1055  hSimHitLng1_[type]->Fill(layer + 1, energy);
1056  if (type == 0) {
1057  if (layer < static_cast<int>(hSimHitLayEn2EE_.size())) {
1059  hSimHitLayEn2EE_[layer]->Fill(energy);
1060  }
1061  } else if (type == 1) {
1062  if (layer < static_cast<int>(hSimHitLayEn2FH_.size())) {
1064  hSimHitLayEn2FH_[layer]->Fill(energy);
1065  }
1066  } else if (type == 2) {
1067  if (debug)
1068  edm::LogVerbatim("HGCSim") << "Inside map_hitDepth, layer no. " << layer;
1069  if (layer < static_cast<int>(hSimHitLayEn2BH_.size())) {
1071  hSimHitLayEn2BH_[layer]->Fill(energy);
1072  }
1073  }
1074  }
1075 
1076  if (debug)
1077  edm::LogVerbatim("HGCSim") << "Now looping over map_hitCell";
1078  if (type < 3) {
1079  for (const auto& itr : map_hitCell) {
1080  uint32_t id = ((itr.second).first);
1081  double energy = ((itr.second).second);
1082  std::pair<float, float> xy(0, 0);
1083  double xx(0);
1084  if (type == 2) {
1085  xy = ahcalGeom_->getXY(AHCalDetId(id));
1086  xx = xy.first;
1087  } else {
1088  int subdet, zside, layer, sector, subsector, cell;
1089  HGCalTestNumbering::unpackHexagonIndex(id, subdet, zside, layer, sector, subsector, cell);
1090  xy = hgcons_[type]->locateCell(cell, layer, sector, false);
1091  double zp = hgcons_[type]->waferZ(layer, false);
1092  xx = (zp < 0) ? -xy.first : xy.first;
1093  }
1094  hSimHitLat_[type]->Fill(xx, xy.second, energy);
1095  }
1096  }
1097 
1098  for (const auto& itr : map_hitn) {
1099  uint32_t id = itr.first;
1100  double energy = itr.second;
1101  if (type == 0) {
1102  double time_firsthit = map_hittime_firsthit[id];
1103  double time15Mip = map_hittime_15Mip[id];
1104  double time_lasthit = map_hittime_lasthit[id];
1105  simHitCellIdEE_.push_back(id);
1106  simHitCellEnEE_.push_back(energy);
1107  simHitCellTimeFirstHitEE_.push_back(time_firsthit);
1108  simHitCellTime15MipEE_.push_back(time15Mip);
1109  simHitCellTimeLastHitEE_.push_back(time_lasthit);
1110  if (debug && (energy / GeV2Mip[id] < 15) && (map_hittime_15Mip[id] > 0))
1111  edm::LogVerbatim("HGCSim") << "FOUND!!!!rechit energy : Finally for this cell, time is " << energy / GeV2Mip[id]
1112  << " " << map_hittime_15Mip[id];
1113  } else if (type == 1) {
1114  double time_firsthit = map_hittime_firsthit[id];
1115  double time15Mip = map_hittime_15Mip[id];
1116  double time_lasthit = map_hittime_lasthit[id];
1117  simHitCellIdFH_.push_back(id);
1118  simHitCellEnFH_.push_back(energy);
1119  simHitCellTimeFirstHitFH_.push_back(time_firsthit);
1120  simHitCellTime15MipFH_.push_back(time15Mip);
1121  simHitCellTimeLastHitFH_.push_back(time_lasthit);
1122  } else if (type == 2) {
1123  simHitCellIdBH_.push_back(id);
1124  simHitCellEnBH_.push_back(energy);
1125  AHCalDetId hid(id);
1126  int row = hid.irow();
1127  int col = hid.icol();
1128  int layer = hid.depth();
1129  simHitCellColBH_.push_back(col);
1130  simHitCellRowBH_.push_back(row);
1131  simHitCellLayerBH_.push_back(layer);
1132 #ifdef EDM_ML_DEBUG
1133  edm::LogVerbatim("HGCSim") << "ID: " << std::hex << id << std::dec << " Layer: " << layer << " col: " << col
1134  << " row: " << row;
1135 #endif
1136  } else if (type == 3) {
1137  simHitCellIdBeam_.push_back(id);
1138  simHitCellEnBeam_.push_back(energy);
1139  }
1140  }
1141 }
std::vector< TH1D * > hSimHitLayEn2EE_
std::vector< float > simHitLayEn2EE_
Log< level::Info, true > LogVerbatim
const double stoc_smear_time_200_
std::vector< float > simHitLayEn2BH_
std::vector< uint32_t > simHitCellIdFH_
uint16_t *__restrict__ id
double cellThickness(int layer, int waferU, int waferV) const
TProfile * hSimHitLng1_[3]
TProfile * hSimHitLng2_[3]
std::vector< float > simHitLayEn1EE_
uint32_t ID
Definition: Definitions.h:24
static uint32_t packHexagonIndex(int subdet, int z, int lay, int wafer, int celltyp, int cell)
static bool sortTime(const std::pair< double, double > &i, const std::pair< double, double > &j)
std::vector< float > simHitCellTimeLastHitFH_
int zside(DetId const &)
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
const double gev2mip300_
std::vector< float > simHitCellEnFH_
constexpr std::array< uint8_t, layerIndexSize > layer
TProfile2D * hSimHitLat_[3]
U second(std::pair< T, U > const &p)
std::vector< TH1D * > hSimHitLayEn1EE_
constexpr HcalSubdetector subdet() const
get the subdetector
Definition: HcalDetId.h:138
std::pair< int, int > simToReco(int cell, int layer, int mod, bool half) const
std::vector< TH1D * > hSimHitLayEn2BH_
std::unique_ptr< AHCalGeometry > ahcalGeom_
std::vector< int > idBeams_
std::vector< int > simHitCellColBH_
const double stoc_smear_time_300_
std::vector< int > simHitCellLayerBH_
std::vector< TH1D * > hSimHitLayEnBeam_
std::vector< int > simHitCellRowBH_
std::vector< float > simHitCellTimeFirstHitEE_
const HGCalDDDConstants * hgcons_[2]
int wafer() const
get the wafer #
Definition: HGCalDetId.h:40
std::vector< float > simHitCellTimeFirstHitFH_
std::vector< TH1D * > hSimHitLayEn1FH_
std::vector< uint32_t > simHitCellIdBH_
double waferZ(int layer, bool reco) const
std::vector< float > simHitCellTime15MipEE_
Basic2DVector< T > xy() const
std::vector< float > simHitCellTimeLastHitEE_
#define debug
Definition: HDRShower.cc:19
std::vector< float > simHitCellEnBeam_
TProfile * hSimHitLng_[3]
std::vector< float > simHitCellTime15MipFH_
string end
Definition: dataset.py:937
std::vector< float > simHitLayEn1FH_
std::vector< float > simHitCellEnBH_
static void unpackIndex(const uint32_t &idx, int &det, int &lay, int &x, int &y)
int col
Definition: cuy.py:1009
std::vector< float > simHitLayEn1BH_
std::vector< uint32_t > simHitCellIdEE_
std::vector< TH1D * > hSimHitLayEn1BH_
const double gev2mip200_
std::vector< float > simHitCellEnEE_
std::vector< uint32_t > simHitCellIdBeam_
std::vector< float > simHitLayEn2FH_
tuple size
Write out results.
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
int layer() const
get the layer #
Definition: HGCalDetId.h:46
std::vector< TH1D * > hSimHitLayEn2FH_
std::vector< float > simHitLayEnBeam_
void HGCalTBAnalyzer::analyzeSimTracks ( edm::Handle< edm::SimTrackContainer > const &  SimTk,
edm::Handle< edm::SimVertexContainer > const &  SimVtx 
)
private

Definition at line 1143 of file HGCalTBAnalyzer.cc.

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

Referenced by analyze().

1144  {
1145  xBeam_ = yBeam_ = zBeam_ = pBeam_ = -9999;
1146  nBeamMC_ = thetaBeam_ = phiBeam_ = -9999;
1147  int nParBeam = 0;
1148  int vertIndex(-1);
1149  if (doBeam_) {
1150  pdgIdBeamMC_.clear();
1151  xBeamMC_.clear();
1152  yBeamMC_.clear();
1153  zBeamMC_.clear();
1154  pxBeamMC_.clear();
1155  pyBeamMC_.clear();
1156  pzBeamMC_.clear();
1157  pBeamMC_.clear();
1158  }
1159  std::vector<float> verX, verY, verZ;
1160  verX.clear();
1161  verY.clear();
1162  verZ.clear();
1163  for (const auto& simVtxItr : *SimVtx) {
1164  verX.push_back(simVtxItr.position().X());
1165  verY.push_back(simVtxItr.position().Y());
1166  verZ.push_back(simVtxItr.position().Z());
1167  }
1168 #ifdef EDM_ML_DEBUG
1169  edm::LogVerbatim("HGCSim") << "Size of track " << SimTk->size();
1170 #endif
1171  HepMC::FourVector pxyz(0, 0, 0, 0);
1172  for (const auto& simTrkItr : *SimTk) {
1173  if (addP_ && !(simTrkItr.noGenpart())) {
1174  pxyz.setPx(pxyz.px() + simTrkItr.momentum().px());
1175  pxyz.setPy(pxyz.py() + simTrkItr.momentum().py());
1176  pxyz.setPz(pxyz.pz() + simTrkItr.momentum().pz());
1177  pxyz.setE(pxyz.e() + simTrkItr.momentum().e());
1178 #ifdef EDM_ML_DEBUG
1179  edm::LogVerbatim("HGCSim") << "Track " << simTrkItr.trackId() << " Vertex " << simTrkItr.vertIndex() << " Type "
1180  << simTrkItr.type() << " Charge " << simTrkItr.charge() << " px "
1181  << simTrkItr.momentum().px() << " py " << simTrkItr.momentum().py() << " pz "
1182  << simTrkItr.momentum().pz() << " P " << simTrkItr.momentum().P() << " GenIndex "
1183  << simTrkItr.genpartIndex();
1184  edm::LogVerbatim("HGCSim") << "Vertex " << simTrkItr.vertIndex()
1185  << " position-> X: " << verX[simTrkItr.vertIndex()]
1186  << " Y: " << verY[simTrkItr.vertIndex()] << " Z: " << verZ[simTrkItr.vertIndex()];
1187 #endif
1188  }
1189  if (doBeam_ && !(simTrkItr.noGenpart())) {
1190  nParBeam++;
1191  pdgIdBeamMC_.push_back(simTrkItr.type());
1192  xBeamMC_.push_back(verX[simTrkItr.vertIndex()]);
1193  yBeamMC_.push_back(verY[simTrkItr.vertIndex()]);
1194  zBeamMC_.push_back(verZ[simTrkItr.vertIndex()]);
1195  pxBeamMC_.push_back(simTrkItr.momentum().px());
1196  pyBeamMC_.push_back(simTrkItr.momentum().py());
1197  pzBeamMC_.push_back(simTrkItr.momentum().pz());
1198  pBeamMC_.push_back(simTrkItr.momentum().P());
1199  } else if (!addP_ && (vertIndex == -1)) {
1200  pxyz = simTrkItr.momentum();
1201  }
1202  if (vertIndex == -1)
1203  vertIndex = simTrkItr.vertIndex();
1204  }
1205  nBeamMC_ = nParBeam;
1206  pBeam_ = pxyz.rho();
1207  thetaBeam_ = pxyz.theta();
1208  phiBeam_ = pxyz.phi();
1209  if (phiBeam_ < 0)
1210  phiBeam_ += (2 * M_PI);
1211  if (vertIndex != -1 && vertIndex < static_cast<int>(SimVtx->size())) {
1212  edm::SimVertexContainer::const_iterator simVtxItr = SimVtx->begin();
1213  for (int iv = 0; iv < vertIndex; iv++)
1214  simVtxItr++;
1215  edm::LogVerbatim("HGCSim") << "Vertex " << vertIndex << " position " << simVtxItr->position();
1216  xBeam_ = verX[0];
1217  yBeam_ = verY[0];
1218  zBeam_ = verZ[0];
1219  }
1220 }
Log< level::Info, true > LogVerbatim
std::vector< float > pxBeamMC_
int32_t *__restrict__ iv
std::vector< float > zBeamMC_
std::vector< float > pBeamMC_
std::vector< float > xBeamMC_
std::vector< float > pyBeamMC_
const bool doBeam_
std::vector< float > yBeamMC_
std::vector< int > pdgIdBeamMC_
#define M_PI
std::vector< float > pzBeamMC_
void HGCalTBAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 335 of file HGCalTBAnalyzer.cc.

References detectorBeam_, detectorBH_, detectorEE_, detectorFH_, doBeam_, doDigis_, doPassive_, doPassiveBH_, doPassiveEE_, doPassiveHE_, doRecHits_, doSimHits_, doTree_, doTreeCell_, fs_, hBeam_, hDigiADC_, hDigiLng_, hDigiOcc_, hgcPassiveBeamEnergy_, hgcPassiveBeamID_, hgcPassiveBeamName_, hgcPassiveBHEnergy_, hgcPassiveBHID_, hgcPassiveBHName_, hgcPassiveCMSEEnergy_, hgcPassiveCMSEID_, hgcPassiveCMSEName_, hgcPassiveEEEnergy_, hgcPassiveEEID_, hgcPassiveEEName_, hgcPassiveFHEnergy_, hgcPassiveFHID_, hgcPassiveFHName_, hRecHitE_, hRecHitLat_, hRecHitLng1_, hRecHitLng_, hRecHitOcc_, hSimHitE_, hSimHitEn_, hSimHitLat_, hSimHitLng1_, hSimHitLng2_, hSimHitLng_, hSimHitT_, mps_fire::i, ifBeam_, ifBH_, ifEE_, ifFH_, TFileService::make(), mergeVDriftHistosByStation::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_.

335  {
336  char name[40], title[100];
337  hBeam_ = fs_->make<TH1D>("BeamP", "Beam Momentum", 1000, 0, 1000.0);
338  for (int i = 0; i < 3; ++i) {
339  bool book(ifEE_);
341  if (i == 1) {
342  book = ifFH_;
343  det = detectorFH_;
344  } else if (i == 2) {
345  book = ifBH_;
346  det = detectorBH_;
347  }
348 
349  if (doSimHits_ && book) {
350  sprintf(name, "SimHitEn%s", det.c_str());
351  sprintf(title, "Sim Hit Energy for %s", det.c_str());
352  hSimHitE_[i] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
353  sprintf(name, "SimHitEnX%s", det.c_str());
354  sprintf(title, "Sim Hit Energy for %s", det.c_str());
355  hSimHitEn_[i] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
356  sprintf(name, "SimHitTm%s", det.c_str());
357  sprintf(title, "Sim Hit Timing for %s", det.c_str());
358  hSimHitT_[i] = fs_->make<TH1D>(name, title, 5000, 0., 500.0);
359  sprintf(name, "SimHitLat%s", det.c_str());
360  sprintf(title, "Lateral Shower profile (Sim Hit) for %s", det.c_str());
361  hSimHitLat_[i] = fs_->make<TProfile2D>(name, title, 100, -100., 100., 100, -100., 100.);
362  sprintf(name, "SimHitLng%s", det.c_str());
363  sprintf(title, "Longitudinal Shower profile (Sim Hit) for %s", det.c_str());
364  hSimHitLng_[i] = fs_->make<TProfile>(name, title, 50, 0., 100.);
365  sprintf(name, "SimHitLng1%s", det.c_str());
366  sprintf(title, "Longitudinal Shower profile (Layer) for %s", det.c_str());
367  hSimHitLng1_[i] = fs_->make<TProfile>(name, title, 200, 0., 100.);
368  sprintf(name, "SimHitLng2%s", det.c_str());
369  sprintf(title, "Longitudinal Shower profile (Layer) for %s", det.c_str());
370  hSimHitLng2_[i] = fs_->make<TProfile>(name, title, 200, 0., 100.);
371  }
372 
373  if (doDigis_ && book) {
374  sprintf(name, "DigiADC%s", det.c_str());
375  sprintf(title, "ADC at Digi level for %s", det.c_str());
376  hDigiADC_[i] = fs_->make<TH1D>(name, title, 100, 0., 100.0);
377  sprintf(name, "DigiOcc%s", det.c_str());
378  sprintf(title, "Occupancy (Digi)for %s", det.c_str());
379  hDigiOcc_[i] = fs_->make<TH2D>(name, title, 100, -10., 10., 100, -10., 10.);
380  sprintf(name, "DigiLng%s", det.c_str());
381  sprintf(title, "Longitudinal Shower profile (Digi) for %s", det.c_str());
382  hDigiLng_[i] = fs_->make<TH1D>(name, title, 100, 0., 10.);
383  }
384 
385  if (doRecHits_ && book) {
386  sprintf(name, "RecHitEn%s", det.c_str());
387  sprintf(title, "Rec Hit Energy for %s", det.c_str());
388  hRecHitE_[i] = fs_->make<TH1D>(name, title, 1000, 0., 10.0);
389  sprintf(name, "RecHitOcc%s", det.c_str());
390  sprintf(title, "Occupancy (Rec Hit)for %s", det.c_str());
391  hRecHitOcc_[i] = fs_->make<TH2D>(name, title, 100, -10., 10., 100, -10., 10.);
392  sprintf(name, "RecHitLat%s", det.c_str());
393  sprintf(title, "Lateral Shower profile (Rec Hit) for %s", det.c_str());
394  hRecHitLat_[i] = fs_->make<TProfile2D>(name, title, 100, -10., 10., 100, -10., 10.);
395  sprintf(name, "RecHitLng%s", det.c_str());
396  sprintf(title, "Longitudinal Shower profile (Rec Hit) for %s", det.c_str());
397  hRecHitLng_[i] = fs_->make<TProfile>(name, title, 100, 0., 10.);
398  sprintf(name, "RecHitLng1%s", det.c_str());
399  sprintf(title, "Longitudinal Shower profile vs Layer for %s", det.c_str());
400  hRecHitLng1_[i] = fs_->make<TProfile>(name, title, 120, 0., 60.);
401  }
402  }
403  if (ifBeam_ && doSimHits_) {
404  sprintf(name, "SimHitEn%s", detectorBeam_.c_str());
405  sprintf(title, "Sim Hit Energy for %s", detectorBeam_.c_str());
406  hSimHitE_[3] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
407  sprintf(name, "SimHitEnX%s", detectorBeam_.c_str());
408  sprintf(title, "Sim Hit Energy for %s", detectorBeam_.c_str());
409  hSimHitEn_[3] = fs_->make<TH1D>(name, title, 100000, 0., 0.2);
410  sprintf(name, "SimHitTm%s", detectorBeam_.c_str());
411  sprintf(title, "Sim Hit Timing for %s", detectorBeam_.c_str());
412  hSimHitT_[3] = fs_->make<TH1D>(name, title, 5000, 0., 500.0);
413  }
414  if (doSimHits_ && doTree_) {
415  tree_ = fs_->make<TTree>("HGCTB", "SimHitEnergy");
416  tree_->Branch("simHitLayEn1EE", &simHitLayEn1EE_);
417  tree_->Branch("simHitLayEn2EE", &simHitLayEn2EE_);
418  tree_->Branch("simHitLayEn1FH", &simHitLayEn1FH_);
419  tree_->Branch("simHitLayEn2FH", &simHitLayEn2FH_);
420  tree_->Branch("simHitLayEn1BH", &simHitLayEn1BH_);
421  tree_->Branch("simHitLayEn2BH", &simHitLayEn2BH_);
422  tree_->Branch("xBeam", &xBeam_, "xBeam/D");
423  tree_->Branch("yBeam", &yBeam_, "yBeam/D");
424  tree_->Branch("zBeam", &zBeam_, "zBeam/D");
425  tree_->Branch("pBeam", &pBeam_, "pBeam/D");
426  tree_->Branch("thetaBeam", &thetaBeam_, "thetaBeam/D");
427  tree_->Branch("phiBeam", &phiBeam_, "phiBeam/D");
428  if (doBeam_) {
429  tree_->Branch("nBeamMC", &nBeamMC_, "nBeamMC/I");
430  tree_->Branch("pdgIdBeamMC", &pdgIdBeamMC_);
431  tree_->Branch("xBeamMC", &xBeamMC_);
432  tree_->Branch("yBeamMC", &yBeamMC_);
433  tree_->Branch("zBeamMC", &zBeamMC_);
434  tree_->Branch("pxBeamMC", &pxBeamMC_);
435  tree_->Branch("pyBeamMC", &pyBeamMC_);
436  tree_->Branch("pzBeamMC", &pzBeamMC_);
437  tree_->Branch("pBeamMC", &pBeamMC_);
438  }
439  if (doTreeCell_) {
440  tree_->Branch("simHitCellIdEE", &simHitCellIdEE_);
441  tree_->Branch("simHitCellEnEE", &simHitCellEnEE_);
442  tree_->Branch("simHitCellIdFH", &simHitCellIdFH_);
443  tree_->Branch("simHitCellEnFH", &simHitCellEnFH_);
444  tree_->Branch("simHitCellIdBH", &simHitCellIdBH_);
445  tree_->Branch("simHitCellEnBH", &simHitCellEnBH_);
446  tree_->Branch("simHitCellIdBeam", &simHitCellIdBeam_);
447  tree_->Branch("simHitCellEnBeam", &simHitCellEnBeam_);
448 
449  tree_->Branch("simHitCellColBH", &simHitCellColBH_);
450  tree_->Branch("simHitCellRowBH", &simHitCellRowBH_);
451  tree_->Branch("simHitCellLayerBH", &simHitCellLayerBH_);
452  tree_->Branch("simHitCellTimeFirstHitEE", &simHitCellTimeFirstHitEE_);
453  tree_->Branch("simHitCellTimeFirstHitFH", &simHitCellTimeFirstHitFH_);
454  //tree_->Branch("simHitCellTimeFirstHitBH", &simHitCellTimeFirstHitBH_);
455  tree_->Branch("simHitCellTime15MipEE", &simHitCellTime15MipEE_);
456  tree_->Branch("simHitCellTime15MipFH", &simHitCellTime15MipFH_);
457  //tree_->Branch("simHitCellTime15MipBH", &simHitCellTime15MipBH_);
458  tree_->Branch("simHitCellTimeLastHitEE", &simHitCellTimeLastHitEE_);
459  tree_->Branch("simHitCellTimeLastHitFH", &simHitCellTimeLastHitFH_);
460  //tree_->Branch("simHitCellTimeLastHitBH", &simHitCellTimeLastHitBH_);
461  }
462  }
463 
464  if (doPassive_ && doTree_) {
465  if (doPassiveEE_) {
466  tree_->Branch("hgcPassiveEEEnergy", &hgcPassiveEEEnergy_);
467  tree_->Branch("hgcPassiveEEName", &hgcPassiveEEName_);
468  tree_->Branch("hgcPassiveEEID", &hgcPassiveEEID_);
469  }
470  if (doPassiveHE_) {
471  tree_->Branch("hgcPassiveFHEnergy", &hgcPassiveFHEnergy_);
472  tree_->Branch("hgcPassiveFHName", &hgcPassiveFHName_);
473  tree_->Branch("hgcPassiveFHID", &hgcPassiveFHID_);
474  }
475  if (doPassiveBH_) {
476  tree_->Branch("hgcPassiveBHEnergy", &hgcPassiveBHEnergy_);
477  tree_->Branch("hgcPassiveBHName", &hgcPassiveBHName_);
478  tree_->Branch("hgcPassiveBHID", &hgcPassiveBHID_);
479  }
480  tree_->Branch("hgcPassiveCMSEEnergy", &hgcPassiveCMSEEnergy_);
481  tree_->Branch("hgcPassiveCMSEName", &hgcPassiveCMSEName_);
482  tree_->Branch("hgcPassiveCMSEID", &hgcPassiveCMSEID_);
483  tree_->Branch("hgcPassiveBeamEnergy", &hgcPassiveBeamEnergy_);
484  tree_->Branch("hgcPassiveBeamName", &hgcPassiveBeamName_);
485  tree_->Branch("hgcPassiveBeamID", &hgcPassiveBeamID_);
486  }
487 }
std::vector< float > simHitLayEn2EE_
const bool doTree_
std::vector< float > hgcPassiveBeamEnergy_
std::vector< float > simHitLayEn2BH_
std::vector< uint32_t > simHitCellIdFH_
std::vector< float > pxBeamMC_
const std::string detectorBH_
const std::string detectorBeam_
TProfile * hSimHitLng1_[3]
TProfile * hSimHitLng2_[3]
TProfile * hRecHitLng_[3]
std::vector< std::string > hgcPassiveFHName_
std::vector< float > simHitLayEn1EE_
std::vector< float > hgcPassiveBHEnergy_
std::vector< float > zBeamMC_
std::vector< float > pBeamMC_
std::vector< float > xBeamMC_
std::vector< int > hgcPassiveBeamID_
edm::Service< TFileService > fs_
std::vector< float > pyBeamMC_
std::vector< float > simHitCellTimeLastHitFH_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
const bool doRecHits_
std::vector< std::string > hgcPassiveBHName_
std::vector< float > hgcPassiveCMSEEnergy_
std::vector< int > hgcPassiveEEID_
std::vector< float > hgcPassiveEEEnergy_
std::vector< float > simHitCellEnFH_
TProfile2D * hSimHitLat_[3]
const bool doPassiveEE_
const bool doBeam_
std::vector< float > yBeamMC_
std::vector< int > pdgIdBeamMC_
std::vector< int > simHitCellColBH_
std::vector< std::string > hgcPassiveCMSEName_
const bool ifBeam_
std::vector< int > simHitCellLayerBH_
std::vector< int > simHitCellRowBH_
const bool doPassive_
std::vector< float > simHitCellTimeFirstHitEE_
std::vector< float > simHitCellTimeFirstHitFH_
std::vector< uint32_t > simHitCellIdBH_
std::vector< float > simHitCellTime15MipEE_
const bool doPassiveBH_
std::vector< std::string > hgcPassiveBeamName_
std::vector< float > hgcPassiveFHEnergy_
std::vector< float > simHitCellTimeLastHitEE_
std::vector< int > hgcPassiveCMSEID_
TProfile2D * hRecHitLat_[3]
const bool doSimHits_
const bool doDigis_
std::vector< float > simHitCellEnBeam_
TProfile * hSimHitLng_[3]
const bool doTreeCell_
std::vector< float > pzBeamMC_
std::vector< std::string > hgcPassiveEEName_
std::vector< float > simHitCellTime15MipFH_
std::vector< int > hgcPassiveBHID_
const bool doPassiveHE_
std::vector< float > simHitLayEn1FH_
std::vector< int > hgcPassiveFHID_
std::vector< float > simHitCellEnBH_
std::vector< float > simHitLayEn1BH_
std::vector< uint32_t > simHitCellIdEE_
std::vector< float > simHitCellEnEE_
std::vector< uint32_t > simHitCellIdBeam_
std::vector< float > simHitLayEn2FH_
const std::string detectorEE_
TProfile * hRecHitLng1_[3]
const std::string detectorFH_
void HGCalTBAnalyzer::beginRun ( edm::Run const &  ,
edm::EventSetup const &  iSetup 
)
overrideprivate

Definition at line 489 of file HGCalTBAnalyzer.cc.

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

489  {
490  char name[40], title[100];
491  if (ifEE_) {
492  hgcons_[0] = &iSetup.getData(tokDDDEE_);
493  if (doDigis_ || doRecHits_) {
494  hgeom_[0] = &iSetup.getData(tokGeomEE_);
495  } else {
496  hgeom_[0] = nullptr;
497  }
498  for (unsigned int l = 0; l < hgcons_[0]->layers(false); ++l) {
499  sprintf(name, "SimHitEnA%d%s", l, detectorEE_.c_str());
500  sprintf(title, "Sim Hit Energy in SIM layer %d for %s", l + 1, detectorEE_.c_str());
501  hSimHitLayEn1EE_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
502  if (l % 3 == 0) {
503  sprintf(name, "SimHitEnB%d%s", (l / 3 + 1), detectorEE_.c_str());
504  sprintf(title, "Sim Hit Energy in layer %d for %s", (l / 3 + 1), detectorEE_.c_str());
505  hSimHitLayEn2EE_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
506  }
507  }
508 #ifdef EDM_ML_DEBUG
509  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::" << detectorEE_ << " defined with " << hgcons_[0]->layers(false)
510  << " layers";
511 #endif
512  } else {
513  hgcons_[0] = nullptr;
514  hgeom_[0] = nullptr;
515  }
516 
517  if (ifFH_) {
518  hgcons_[1] = &iSetup.getData(tokDDDFH_);
519  if (doDigis_ || doRecHits_) {
520  hgeom_[1] = &iSetup.getData(tokGeomFH_);
521  } else {
522  hgeom_[1] = nullptr;
523  }
524  for (unsigned int l = 0; l < hgcons_[1]->layers(false); ++l) {
525  sprintf(name, "SimHitEnA%d%s", l, detectorFH_.c_str());
526  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorFH_.c_str());
527  hSimHitLayEn1FH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
528  if (l % 3 == 0) {
529  sprintf(name, "SimHitEnB%d%s", (l / 3 + 1), detectorFH_.c_str());
530  sprintf(title, "Sim Hit Energy in layer %d for %s", (l / 3 + 1), detectorFH_.c_str());
531  hSimHitLayEn2FH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
532  }
533  }
534 #ifdef EDM_ML_DEBUG
535  edm::LogVerbatim("HGCSim") << "HGCalTBAnalyzer::" << detectorFH_ << " defined with " << hgcons_[1]->layers(false)
536  << " layers";
537 #endif
538  } else {
539  hgcons_[1] = nullptr;
540  hgeom_[1] = nullptr;
541  }
542 
543  if (ifBH_) {
544  for (int l = 0; l < ahcalGeom_->maxDepth(); ++l) {
545  sprintf(name, "SimHitEnA%d%s", l, detectorBH_.c_str());
546  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorBH_.c_str());
547  hSimHitLayEn1BH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
548  sprintf(name, "SimHitEnB%d%s", l, detectorBH_.c_str());
549  sprintf(title, "Sim Hit Energy in layer %d for %s", l + 1, detectorBH_.c_str());
550  hSimHitLayEn2BH_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
551  }
552  }
553 
554  if (ifBeam_) {
555  for (unsigned int l = 0; l < idBeams_.size(); ++l) {
556  sprintf(name, "SimHitEna%d%s", l, detectorBeam_.c_str());
557  sprintf(title, "Sim Hit Energy in type %d for %s", idBeams_[l], detectorBeam_.c_str());
558  hSimHitLayEnBeam_.push_back(fs_->make<TH1D>(name, title, 100000, 0., 0.2));
559  }
560  }
561 }
std::vector< TH1D * > hSimHitLayEn2EE_
Log< level::Info, true > LogVerbatim
const std::string detectorBH_
const std::string detectorBeam_
edm::Service< TFileService > fs_
T * make(const Args &...args) const
make new ROOT object
Definition: TFileService.h:64
const bool doRecHits_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDFH_
std::vector< TH1D * > hSimHitLayEn1EE_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > tokGeomEE_
std::vector< TH1D * > hSimHitLayEn2BH_
unsigned int layers(bool reco) const
std::unique_ptr< AHCalGeometry > ahcalGeom_
std::vector< int > idBeams_
const HGCalGeometry * hgeom_[2]
const bool ifBeam_
std::vector< TH1D * > hSimHitLayEnBeam_
const HGCalDDDConstants * hgcons_[2]
std::vector< TH1D * > hSimHitLayEn1FH_
const bool doDigis_
edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tokDDDEE_
edm::ESGetToken< HGCalGeometry, IdealGeometryRecord > tokGeomFH_
std::vector< TH1D * > hSimHitLayEn1BH_
const std::string detectorEE_
std::vector< TH1D * > hSimHitLayEn2FH_
const std::string detectorFH_
void HGCalTBAnalyzer::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate

Definition at line 64 of file HGCalTBAnalyzer.cc.

64 {}
void HGCalTBAnalyzer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 278 of file HGCalTBAnalyzer.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

278  {
280  desc.add<std::string>("detectorEE", "HGCalEESensitive");
281  desc.add<bool>("useEE", true);
282  desc.add<double>("zFrontEE", 0.0);
283  desc.add<std::string>("caloHitSrcEE", "HGCHitsEE");
284  desc.add<edm::InputTag>("digiSrcEE", edm::InputTag("hgcalDigis", "EE"));
285  desc.add<edm::InputTag>("recHitSrcEE", edm::InputTag("HGCalRecHit", "HGCEERecHits"));
286  desc.add<std::string>("detectorFH", "HGCalHESiliconSensitive");
287  desc.add<bool>("useFH", false);
288  desc.add<double>("zFrontFH", 0.0);
289  desc.add<std::string>("caloHitSrcFH", "HGCHitsHEfront");
290  desc.add<edm::InputTag>("digiSrcFH", edm::InputTag("hgcalDigis", "HEfront"));
291  desc.add<edm::InputTag>("recHitSrcFH", edm::InputTag("HGCalRecHit", "HGCHEFRecHits"));
292  desc.add<std::string>("detectorBH", "AHCal");
293  desc.add<bool>("useBH", false);
294  desc.add<double>("zFrontBH", 0.0);
295  desc.add<std::string>("caloHitSrcBH", "HcalHits");
296  desc.add<edm::InputTag>("digiSrcBH", edm::InputTag("hgcalDigis", "HEback"));
297  desc.add<edm::InputTag>("recHitSrcBH", edm::InputTag("HGCalRecHit", "HGCHEBRecHits"));
298  desc.add<std::string>("detectorBeam", "HcalTB06BeamDetector");
299  desc.add<bool>("useBeam", false);
300  desc.add<std::string>("caloHitSrcBeam", "HcalTB06BeamHits");
301  std::vector<int> ids = {
302  1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1011, 1012, 1013, 1014, 2001, 2002, 2003, 2004, 2005};
303  desc.add<std::vector<int>>("idBeams", ids);
304  desc.add<edm::InputTag>("generatorSrc", edm::InputTag("generatorSmeared"));
305  desc.add<edm::InputTag>("passiveEE", edm::InputTag("g4SimHits", "HGCalEEPassiveHits"));
306  desc.add<edm::InputTag>("passiveFH", edm::InputTag("g4SimHits", "HGCalHEPassiveHits"));
307  desc.add<edm::InputTag>("passiveBH", edm::InputTag("g4SimHits", "HGCalAHPassiveHits"));
308  desc.add<edm::InputTag>("passiveCMSE", edm::InputTag("g4SimHits", "CMSEPassiveHits"));
309  desc.add<edm::InputTag>("passiveBeam", edm::InputTag("g4SimHits", "HGCalBeamPassiveHits"));
310 
311  desc.add<bool>("doSimHits", true);
312  desc.add<bool>("doDigis", true);
313  desc.add<bool>("doRecHits", true);
314  desc.add<int>("sampleIndex", 0);
315  desc.add<bool>("doTree", true);
316  desc.add<bool>("doTreeCell", true);
317  desc.add<bool>("doPassive", false);
318  desc.add<bool>("doPassiveEE", false);
319  desc.add<bool>("doPassiveHE", false);
320  desc.add<bool>("doPassiveBH", false);
321  desc.add<bool>("addP", false);
322  desc.add<bool>("doBeam", false);
323  desc.addUntracked<double>("gev2mip200", 57.0e-6);
324  desc.addUntracked<double>("gev2mip300", 85.5e-6);
325  desc.addUntracked<double>("stoc_smear_time_200", 10.24);
326  desc.addUntracked<double>("stoc_smear_time_300", 15.5);
327  desc.addUntracked<int>("maxDepth", 12);
328  desc.addUntracked<double>("deltaX", 30.0); // Size of tile along X
329  desc.addUntracked<double>("deltaY", 30.0); // Size of tile along Y
330  desc.addUntracked<double>("deltaZ", 81.0); // Thickness of a single layer
331  desc.addUntracked<double>("zFirst", 17.6); // Position of the center
332  descriptions.add("HGCalTBAnalyzer", desc);
333 }
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
bool HGCalTBAnalyzer::sortTime ( const std::pair< double, double > &  i,
const std::pair< double, double > &  j 
)
staticprivate

Definition at line 1316 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits().

1316  {
1317  return i.first < j.first;
1318 }

Member Data Documentation

const bool HGCalTBAnalyzer::addP_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 76 of file HGCalTBAnalyzer.cc.

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

const std::string HGCalTBAnalyzer::detectorBeam_
private

Definition at line 84 of file HGCalTBAnalyzer.cc.

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

const std::string HGCalTBAnalyzer::detectorBH_
private

Definition at line 84 of file HGCalTBAnalyzer.cc.

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

const std::string HGCalTBAnalyzer::detectorEE_
private

Definition at line 83 of file HGCalTBAnalyzer.cc.

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

const std::string HGCalTBAnalyzer::detectorFH_
private

Definition at line 83 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::doBeam_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

const bool HGCalTBAnalyzer::doDigis_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::doPassive_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::doPassiveBH_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::doPassiveEE_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::doPassiveHE_
private

Definition at line 82 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::doRecHits_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::doSimHits_
private

Definition at line 80 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::doTree_
private

Definition at line 81 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

const bool HGCalTBAnalyzer::doTreeCell_
private

Definition at line 81 of file HGCalTBAnalyzer.cc.

Referenced by beginJob().

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

Definition at line 75 of file HGCalTBAnalyzer.cc.

Referenced by beginJob(), and beginRun().

const double HGCalTBAnalyzer::gev2mip200_
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and HGCalTBAnalyzer().

const double HGCalTBAnalyzer::gev2mip300_
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and HGCalTBAnalyzer().

TH1D * HGCalTBAnalyzer::hBeam_
private

Definition at line 106 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

TH1D* HGCalTBAnalyzer::hDigiADC_[3]
private

Definition at line 105 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

TH1D * HGCalTBAnalyzer::hDigiLng_[2]
private

Definition at line 105 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

TH2D* HGCalTBAnalyzer::hDigiOcc_[3]
private

Definition at line 107 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), and beginJob().

const HGCalDDDConstants* HGCalTBAnalyzer::hgcons_[2]
private

Definition at line 77 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 130 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 133 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 132 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 129 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 133 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 131 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 129 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 133 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 131 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 129 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 133 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 131 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 129 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 133 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 131 of file HGCalTBAnalyzer.cc.

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

const HGCalGeometry* HGCalTBAnalyzer::hgeom_[2]
private

Definition at line 78 of file HGCalTBAnalyzer.cc.

Referenced by analyzeDigi(), analyzeRecHits(), and beginRun().

TH1D* HGCalTBAnalyzer::hRecHitE_[3]
private

Definition at line 106 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile2D * HGCalTBAnalyzer::hRecHitLat_[3]
private

Definition at line 111 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile * HGCalTBAnalyzer::hRecHitLng1_[3]
private

Definition at line 110 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hRecHitLng_[3]
private

Definition at line 110 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TH2D * HGCalTBAnalyzer::hRecHitOcc_[3]
private

Definition at line 107 of file HGCalTBAnalyzer.cc.

Referenced by analyzeRecHits(), and beginJob().

TH1D* HGCalTBAnalyzer::hSimHitE_[4]
private

Definition at line 104 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TH1D * HGCalTBAnalyzer::hSimHitEn_[4]
private

Definition at line 106 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile2D* HGCalTBAnalyzer::hSimHitLat_[3]
private

Definition at line 111 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

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

Definition at line 114 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 112 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 113 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 114 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 112 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 113 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

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

Definition at line 115 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginRun().

TProfile * HGCalTBAnalyzer::hSimHitLng1_[3]
private

Definition at line 108 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hSimHitLng2_[3]
private

Definition at line 109 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TProfile* HGCalTBAnalyzer::hSimHitLng_[3]
private

Definition at line 108 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

TH1D * HGCalTBAnalyzer::hSimHitT_[4]
private

Definition at line 104 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and beginJob().

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

Definition at line 88 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::ifBeam_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::ifBH_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::ifEE_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

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

const bool HGCalTBAnalyzer::ifFH_
private

Definition at line 79 of file HGCalTBAnalyzer.cc.

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

int HGCalTBAnalyzer::nBeamMC_
private

Definition at line 137 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::pBeam_
private

Definition at line 135 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

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

Definition at line 140 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

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

Definition at line 138 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::phiBeam_
private

Definition at line 136 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

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

Definition at line 140 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

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

Definition at line 140 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

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

Definition at line 140 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

const int HGCalTBAnalyzer::sampleIndex_
private

Definition at line 86 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 124 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 123 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 123 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 122 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 122 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 121 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 121 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 120 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 120 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 124 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 124 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 126 of file HGCalTBAnalyzer.cc.

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

Definition at line 126 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 126 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 125 of file HGCalTBAnalyzer.cc.

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

Definition at line 125 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 125 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 127 of file HGCalTBAnalyzer.cc.

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

Definition at line 127 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 127 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 118 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 116 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 117 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 118 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 116 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 117 of file HGCalTBAnalyzer.cc.

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

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

Definition at line 119 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and analyzeSimHits().

const double HGCalTBAnalyzer::stoc_smear_time_200_
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and HGCalTBAnalyzer().

const double HGCalTBAnalyzer::stoc_smear_time_300_
private

Definition at line 87 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimHits(), and HGCalTBAnalyzer().

double HGCalTBAnalyzer::thetaBeam_
private

Definition at line 136 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

edm::EDGetToken HGCalTBAnalyzer::tok_digiBH_
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_digiEE_
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_digiFH_
private

Definition at line 93 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::HepMCProduct> HGCalTBAnalyzer::tok_hepMC_
private

Definition at line 95 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTBAnalyzer::tok_hgcPHBeam_
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTBAnalyzer::tok_hgcPHBH_
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTBAnalyzer::tok_hgcPHCMSE_
private

Definition at line 97 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTBAnalyzer::tok_hgcPHEE_
private

Definition at line 96 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PassiveHitContainer> HGCalTBAnalyzer::tok_hgcPHFH_
private

Definition at line 96 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrBH_
private

Definition at line 94 of file HGCalTBAnalyzer.cc.

Referenced by HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrEE_
private

Definition at line 94 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetToken HGCalTBAnalyzer::tok_hitrFH_
private

Definition at line 94 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTBAnalyzer::tok_hitsBeam_
private

Definition at line 90 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTBAnalyzer::tok_hitsBH_
private

Definition at line 90 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTBAnalyzer::tok_hitsEE_
private

Definition at line 89 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalTBAnalyzer::tok_hitsFH_
private

Definition at line 89 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 91 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

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

Definition at line 92 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> HGCalTBAnalyzer::tokDDDEE_
private

Definition at line 98 of file HGCalTBAnalyzer.cc.

Referenced by beginRun(), and HGCalTBAnalyzer().

edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> HGCalTBAnalyzer::tokDDDFH_
private

Definition at line 100 of file HGCalTBAnalyzer.cc.

Referenced by beginRun(), and HGCalTBAnalyzer().

edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalTBAnalyzer::tokGeomEE_
private

Definition at line 99 of file HGCalTBAnalyzer.cc.

Referenced by beginRun(), and HGCalTBAnalyzer().

edm::ESGetToken<HGCalGeometry, IdealGeometryRecord> HGCalTBAnalyzer::tokGeomFH_
private

Definition at line 101 of file HGCalTBAnalyzer.cc.

Referenced by beginRun(), and HGCalTBAnalyzer().

TTree* HGCalTBAnalyzer::tree_
private

Definition at line 103 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and beginJob().

double HGCalTBAnalyzer::xBeam_
private

Definition at line 135 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

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

Definition at line 139 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::yBeam_
private

Definition at line 135 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

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

Definition at line 139 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

double HGCalTBAnalyzer::zBeam_
private

Definition at line 135 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

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

Definition at line 139 of file HGCalTBAnalyzer.cc.

Referenced by analyzeSimTracks(), and beginJob().

const double HGCalTBAnalyzer::zFrontBH_
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

const double HGCalTBAnalyzer::zFrontEE_
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().

const double HGCalTBAnalyzer::zFrontFH_
private

Definition at line 85 of file HGCalTBAnalyzer.cc.

Referenced by analyze(), and HGCalTBAnalyzer().