|
| 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 () 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) |
|
Definition at line 34 of file HFPMTHitAnalyzer.cc.
void HFPMTHitAnalyzer::analyzeHits |
( |
std::vector< PCaloHit > & |
hits, |
|
|
const std::vector< SimTrack > & |
tracks1 |
|
) |
| |
|
private |
Definition at line 230 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().
231 int nHit = hits.size();
232 float energy1[3], energy2[3], energy12[3];
233 float em1[3], had1[3], em2[3], had2[3], em12[3], had12[3];
234 for (
int i = 0;
i < 3;
i++) {
235 energy1[
i] = energy2[
i] = energy12[
i] = 0;
236 em1[
i] = em2[
i] = em12[
i] = 0;
237 had1[
i] = had2[
i] = had12[
i] = 0;
240 for (
int i = 0;
i < nHit;
i++) {
241 double energy = hits[
i].energy();
242 double em = hits[
i].energyEM();
243 double had = hits[
i].energyHad();
244 double time = hits[
i].time();
245 uint32_t id_ = hits[
i].id();
246 uint16_t pmtHit = hits[
i].depth();
247 uint16_t depthX = pmtHit;
249 << pmtHit <<
" E (e|h|t) " << em <<
" " << had <<
" " << energy <<
" Time " << time;
253 int subdet =
id.subdet();
254 int depth =
id.depth();
260 h_HFDepHit->Fill(
double(depth + 10 * depthX));
262 int ieta =
id.ietaAbs();
263 int iphi =
id.iphi();
269 h_HFEta[depthX - 1]->Fill(
double(ieta));
270 h_HFPhi[depthX - 1]->Fill(
double(iphi));
274 energy1[pmtHit] +=
energy;
275 energy12[pmtHit] +=
energy;
279 had12[pmtHit] += had;
292 energy2[pmtHit] +=
energy;
293 energy12[pmtHit] +=
energy;
297 had12[pmtHit] += had;
312 for (
int i = 0;
i < 3;
i++) {
322 edm::LogVerbatim(
"HFShower") <<
"HFPMTHitAnalyser:: Type " << i <<
" Energy 1|2| " << energy1[
i] <<
" "
323 << energy2[
i] <<
" " << energy12[
i] <<
" EM Energy 1|2| " << em1[
i] <<
" " << em2[
i]
324 <<
" " << 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 88 of file HFPMTHitAnalyzer.cc.
References event_no, 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.
95 <<
"please add it to config file";
98 h_HFDepHit = HFHitsDir.
make<TH1F>(
"Hit20",
"Depths in HF", 50, 0., 50.);
99 h_HFDepHit->GetXaxis()->SetTitle(
"Depths in HF");
100 for (
int i = 0;
i < 3;
i++) {
102 sprintf(sub,
"(PMT)");
104 sprintf(sub,
"(Bundle)");
106 sprintf(sub,
"(Jungle)");
107 sprintf(name,
"Eta%d",
i);
108 sprintf(title,
"Eta Index of hits in %s", sub);
110 h_HFEta[
i]->GetXaxis()->SetTitle(title);
111 sprintf(name,
"Phi%d",
i);
112 sprintf(title,
"Phi Index of hits in %s", sub);
114 h_HFPhi[
i]->GetXaxis()->SetTitle(title);
117 hHF_MC_e = HFSourcePart.
make<TH1F>(
"MCEnergy",
"Energy of Generated Particle", 1000, 0., 500.);
118 hHF_MC_e->GetXaxis()->SetTitle(
"Energy of Generated Particle");
122 for (
int i = 0;
i < 3;
i++) {
124 sprintf(sub,
"(Absorber)");
126 sprintf(sub,
"(PMT)");
128 sprintf(sub,
"(All)");
129 sprintf(name,
"Energy1%d",
i);
130 sprintf(title,
"Energy in depth 1 %s", sub);
132 hHF_e_1[
i]->GetXaxis()->SetTitle(title);
133 sprintf(name,
"Energy2%d",
i);
134 sprintf(title,
"Energy in depth 2 %s", sub);
136 hHF_e_2[
i]->GetXaxis()->SetTitle(title);
137 sprintf(name,
"Energy12%d",
i);
138 sprintf(title,
"Energy in depths 1,2 %s", sub);
140 hHF_e_12[
i]->GetXaxis()->SetTitle(title);
141 sprintf(name,
"Em1%d",
i);
142 sprintf(title,
"EM energy in depth 1 %s", sub);
144 hHF_em_1[
i]->GetXaxis()->SetTitle(title);
145 sprintf(name,
"Em2%d",
i);
146 sprintf(title,
"EM energy in depth 2 %s", sub);
148 hHF_em_2[
i]->GetXaxis()->SetTitle(title);
149 sprintf(name,
"Em12%d",
i);
150 sprintf(title,
"EM energy in depths 1,2 %s", sub);
153 sprintf(name,
"Had1%d",
i);
154 sprintf(title,
"Had energy in depth 1 %s", sub);
157 sprintf(name,
"Had2%d",
i);
158 sprintf(title,
"Had energy in depth 2 %s", sub);
161 sprintf(name,
"Had12%d",
i);
162 sprintf(title,
"Had energy in depths 1,2 %s", sub);
169 for (
int i = 0;
i < 3;
i++) {
171 sprintf(sub,
"(Absorber)");
173 sprintf(sub,
"(PMT)");
175 sprintf(sub,
"(All)");
176 sprintf(name,
"Time1Ewt%d",
i);
177 sprintf(title,
"Time (energy weighted) in depth 1 %s", sub);
180 sprintf(name,
"Time2Ewt%d",
i);
181 sprintf(title,
"Time (energy weighted) in depth 2 %s", sub);
184 sprintf(name,
"Time12Ewt%d",
i);
185 sprintf(title,
"Time (energy weighted) in depths 1,2 %s", sub);
188 sprintf(name,
"Time1%d",
i);
189 sprintf(title,
"Time in depth 1 %s", sub);
192 sprintf(name,
"Time2%d",
i);
193 sprintf(title,
"Time in depth 2 %s", sub);
196 sprintf(name,
"Time12%d",
i);
197 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