|
| HFPMTHitAnalyzer (const edm::ParameterSet &) |
|
| ~HFPMTHitAnalyzer () override |
|
| EDAnalyzer ()=default |
|
| EDAnalyzer (const EDAnalyzer &)=delete |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
const EDAnalyzer & | operator= (const EDAnalyzer &)=delete |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () const final |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const |
|
bool | wantsStreamRuns () const |
|
| ~EDAnalyzerBase () override |
|
std::vector< ConsumesInfo > | consumesInfo () 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 |
|
EDConsumerBase & | operator= (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) |
|
|
typedef EDAnalyzerBase | ModuleType |
|
typedef ProductLabels | Labels |
|
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 () |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
void | resetItemsToGetFrom (BranchType iType) |
|
Definition at line 34 of file HFPMTHitAnalyzer.cc.
void HFPMTHitAnalyzer::analyzeHits |
( |
std::vector< PCaloHit > & |
hits, |
|
|
const std::vector< SimTrack > & |
tracks1 |
|
) |
| |
|
private |
Definition at line 223 of file HFPMTHitAnalyzer.cc.
References TauDecayModes::dec, HLT_FULL_cff::depth, relval_parameters_module::energy, event_no, h_HFDepHit, h_HFEta, h_HFPhi, HcalForward, hHF1_time, hHF1_time_Ewt, hHF2_time, hHF2_time_Ewt, hHF_e_1, hHF_e_12, hHF_e_2, hHF_em_1, hHF_em_12, hHF_em_2, hHF_had_1, hHF_had_12, hHF_had_2, and mps_fire::i.
Referenced by analyze().
224 int nHit = hits.size();
225 float energy1[3], energy2[3], energy12[3];
226 float em1[3], had1[3], em2[3], had2[3], em12[3], had12[3];
227 for (
int i = 0;
i < 3;
i++) {
228 energy1[
i] = energy2[
i] = energy12[
i] = 0;
229 em1[
i] = em2[
i] = em12[
i] = 0;
230 had1[
i] = had2[
i] = had12[
i] = 0;
233 for (
int i = 0;
i < nHit;
i++) {
234 double energy = hits[
i].energy();
235 double em = hits[
i].energyEM();
236 double had = hits[
i].energyHad();
237 double time = hits[
i].time();
238 uint32_t id_ = hits[
i].id();
239 uint16_t pmtHit = hits[
i].depth();
240 uint16_t depthX = pmtHit;
242 << pmtHit <<
" E (e|h|t) " << em <<
" " << had <<
" " << energy <<
" Time " << time;
246 int subdet =
id.subdet();
247 int depth =
id.depth();
253 h_HFDepHit->Fill(
double(depth + 10 * depthX));
255 int ieta =
id.ietaAbs();
256 int iphi =
id.iphi();
262 h_HFEta[depthX - 1]->Fill(
double(ieta));
263 h_HFPhi[depthX - 1]->Fill(
double(iphi));
267 energy1[pmtHit] +=
energy;
268 energy12[pmtHit] +=
energy;
272 had12[pmtHit] += had;
285 energy2[pmtHit] +=
energy;
286 energy12[pmtHit] +=
energy;
290 had12[pmtHit] += had;
305 for (
int i = 0;
i < 3;
i++) {
315 edm::LogVerbatim(
"HFShower") <<
"HFPMTHitAnalyser:: Type " << i <<
" Energy 1|2| " << energy1[
i] <<
" "
316 << energy2[
i] <<
" " << energy12[
i] <<
" EM Energy 1|2| " << em1[
i] <<
" " << em2[
i]
317 <<
" " << em12[
i] <<
" Had Energy 1|2| " << had1[
i] <<
" " << had2[
i] <<
" "
Log< level::Info, true > LogVerbatim
void HFPMTHitAnalyzer::beginJob |
( |
void |
| ) |
|
|
overrideprivatevirtual |
Reimplemented from edm::one::EDAnalyzerBase.
Definition at line 86 of file HFPMTHitAnalyzer.cc.
References event_no, compareTotals::fs, h_HFDepHit, h_HFEta, h_HFPhi, hHF12_time, hHF12_time_Ewt, hHF1_time, hHF1_time_Ewt, hHF2_time, hHF2_time_Ewt, hHF_e_1, hHF_e_12, hHF_e_2, hHF_em_1, hHF_em_12, hHF_em_2, hHF_had_1, hHF_had_12, hHF_had_2, hHF_MC_e, mps_fire::i, edm::Service< T >::isAvailable(), TFileDirectory::make(), TFileService::mkdir(), mergeVDriftHistosByStation::name, and runGCPTkAlMap::title.
93 <<
"please add it to config file";
96 h_HFDepHit = HFHitsDir.
make<TH1F>(
"Hit20",
"Depths in HF", 50, 0., 50.);
97 h_HFDepHit->GetXaxis()->SetTitle(
"Depths in HF");
98 for (
int i = 0;
i < 3;
i++) {
100 sprintf(sub,
"(PMT)");
102 sprintf(sub,
"(Bundle)");
104 sprintf(sub,
"(Jungle)");
105 sprintf(name,
"Eta%d",
i);
106 sprintf(title,
"Eta Index of hits in %s", sub);
108 h_HFEta[
i]->GetXaxis()->SetTitle(title);
109 sprintf(name,
"Phi%d",
i);
110 sprintf(title,
"Phi Index of hits in %s", sub);
112 h_HFPhi[
i]->GetXaxis()->SetTitle(title);
115 hHF_MC_e = HFSourcePart.
make<TH1F>(
"MCEnergy",
"Energy of Generated Particle", 1000, 0., 500.);
116 hHF_MC_e->GetXaxis()->SetTitle(
"Energy of Generated Particle");
120 for (
int i = 0;
i < 3;
i++) {
122 sprintf(sub,
"(Absorber)");
124 sprintf(sub,
"(PMT)");
126 sprintf(sub,
"(All)");
127 sprintf(name,
"Energy1%d",
i);
128 sprintf(title,
"Energy in depth 1 %s", sub);
130 hHF_e_1[
i]->GetXaxis()->SetTitle(title);
131 sprintf(name,
"Energy2%d",
i);
132 sprintf(title,
"Energy in depth 2 %s", sub);
134 hHF_e_2[
i]->GetXaxis()->SetTitle(title);
135 sprintf(name,
"Energy12%d",
i);
136 sprintf(title,
"Energy in depths 1,2 %s", sub);
138 hHF_e_12[
i]->GetXaxis()->SetTitle(title);
139 sprintf(name,
"Em1%d",
i);
140 sprintf(title,
"EM energy in depth 1 %s", sub);
142 hHF_em_1[
i]->GetXaxis()->SetTitle(title);
143 sprintf(name,
"Em2%d",
i);
144 sprintf(title,
"EM energy in depth 2 %s", sub);
146 hHF_em_2[
i]->GetXaxis()->SetTitle(title);
147 sprintf(name,
"Em12%d",
i);
148 sprintf(title,
"EM energy in depths 1,2 %s", sub);
151 sprintf(name,
"Had1%d",
i);
152 sprintf(title,
"Had energy in depth 1 %s", sub);
155 sprintf(name,
"Had2%d",
i);
156 sprintf(title,
"Had energy in depth 2 %s", sub);
159 sprintf(name,
"Had12%d",
i);
160 sprintf(title,
"Had energy in depths 1,2 %s", sub);
167 for (
int i = 0;
i < 3;
i++) {
169 sprintf(sub,
"(Absorber)");
171 sprintf(sub,
"(PMT)");
173 sprintf(sub,
"(All)");
174 sprintf(name,
"Time1Ewt%d",
i);
175 sprintf(title,
"Time (energy weighted) in depth 1 %s", sub);
178 sprintf(name,
"Time2Ewt%d",
i);
179 sprintf(title,
"Time (energy weighted) in depth 2 %s", sub);
182 sprintf(name,
"Time12Ewt%d",
i);
183 sprintf(title,
"Time (energy weighted) in depths 1,2 %s", sub);
186 sprintf(name,
"Time1%d",
i);
187 sprintf(title,
"Time in depth 1 %s", sub);
190 sprintf(name,
"Time2%d",
i);
191 sprintf(title,
"Time in depth 2 %s", sub);
194 sprintf(name,
"Time12%d",
i);
195 sprintf(title,
"Time in depths 1,2 %s", sub);
T * make(const Args &...args) const
make new ROOT object
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory