Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
cvn::CVNCosmicEventDump Class Reference
Inheritance diagram for cvn::CVNCosmicEventDump:
art::EDAnalyzer art::EventObserverBase art::Consumer art::EngineCreator

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 CVNCosmicEventDump (fhicl::ParameterSet const &pset)
 
 ~CVNCosmicEventDump ()
 
void analyze (const art::Event &evt)
 
void reconfigure (const fhicl::ParameterSet &pset)
 
void beginJob ()
 
void endJob ()
 
std::string workerType () const
 
bool modifiesEvent () const
 
void registerProducts (MasterProductRegistry &, ProductDescriptions &, ModuleDescription const &)
 
std::string const & processName () const
 
bool wantAllEvents () const
 
bool wantEvent (Event const &e)
 
fhicl::ParameterSetID selectorConfig () const
 
art::Handle< art::TriggerResultsgetTriggerResults (Event const &e) const
 
template<typename T , BranchType = InEvent>
ProductToken< Tconsumes (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< Tconsumes (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void consumesMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > consumesView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TconsumesView (InputTag const &it)
 
template<typename T , BranchType = InEvent>
ProductToken< TmayConsume (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ProductToken< TmayConsume (InputTag const &it)
 
template<typename T , BranchType = InEvent>
void mayConsumeMany ()
 
template<typename Element , BranchType = InEvent>
ViewToken< Element > mayConsumeView (InputTag const &)
 
template<typename T , art::BranchType BT>
art::ViewToken< TmayConsumeView (InputTag const &it)
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 
seed_t get_seed_value (fhicl::ParameterSet const &pset, char const key[]="seed", seed_t const implicit_seed=-1)
 

Static Public Member Functions

static cet::exempt_ptr< Consumernon_module_context ()
 

Protected Member Functions

CurrentProcessingContext const * currentContext () const
 
detail::CachedProducts & cachedProducts ()
 
void validateConsumedProduct (BranchType const bt, ProductInfo const &pi)
 
void prepareForJob (fhicl::ParameterSet const &pset)
 
void showMissingConsumes () const
 

Private Member Functions

void WriteMapTH2 (const art::Event &evt, int slice, const PixelMap &pm)
 Function to extract TH2 from PixelMap and write to TFile. More...
 

Private Attributes

std::string fClusterLabel
 
std::string fPixelMapInput
 
std::string fChooseLabels
 
bool fWriteMapTH2
 
bool interactionTraining = true
 
bool particlesTraining = false
 
TrainingDatafTrain
 
ParticlesTrainingDatafParticlesTrain
 
TTree * fTrainTree
 
art::ServiceHandle< cheat::BackTrackerfBT
 
bool fObeyPreselection
 Check rb::IsFiltered? More...
 
std::vector< std::stringfPreselectionLabels
 
std::string fCAFLabel
 label for the process that made the standard records More...
 
bool fApplyCAFCuts
 should we apply the CAF-level cuts? More...
 
int fCutType
 what cuts to apply (see CAFCutter.h) More...
 
recovalid::CAFCutter fCAFCutter
 the CAFCutter helper class More...
 

Detailed Description

Definition at line 55 of file CVNCosmicEventDump_module.cc.

Member Typedef Documentation

Definition at line 39 of file EDAnalyzer.h.

Definition at line 38 of file EDAnalyzer.h.

Constructor & Destructor Documentation

cvn::CVNCosmicEventDump::CVNCosmicEventDump ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 98 of file CVNCosmicEventDump_module.cc.

References reconfigure().

99  : EDAnalyzer(pset)
100  {
101  this->reconfigure(pset);
102  }
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
void reconfigure(const fhicl::ParameterSet &pset)
cvn::CVNCosmicEventDump::~CVNCosmicEventDump ( )

Definition at line 105 of file CVNCosmicEventDump_module.cc.

106  {
107  }

Member Function Documentation

void cvn::CVNCosmicEventDump::analyze ( const art::Event evt)

Definition at line 148 of file CVNCosmicEventDump_module.cc.

References cheat::BackTracker::allMCTruth(), fApplyCAFCuts, fBT, fCAFCutter, fCAFLabel, fClusterLabel, fCutType, fObeyPreselection, fParticlesTrain, cvn::ParticlesTrainingData::fPMap, cvn::TrainingData::fPMap, fPreselectionLabels, fTrain, fTrainTree, fWriteMapTH2, art::DataViewImpl::getByLabel(), cvn::GetFinalStateProngsType(), cvn::GetFinalStateType(), cvn::GetParentParticleType(), cheat::BackTracker::HaveTruthInfo(), MECModelEnuComparisons::i, interactionTraining, rb::IsFiltered(), cvn::kCosmic, cvn::kCosmic_PT, cvn::kOtherFS, cvn::kOtherFSp, cvn::kUnknownPP, cvn::ParticlesSliceClassify(), particlesTraining, recovalid::CAFCutter::passCuts(), printf(), art::PtrVector< T >::push_back(), cvn::SliceClassify(), cheat::BackTracker::SlicesToMCTruthsTable(), cheat::BackTracker::SliceToOrderedNuIdsByEnergy(), train(), vtxx, vtxy, vtxz, and WriteMapTH2().

149  {
150 
151  // get the slices
153  evt.getByLabel(art::InputTag(fClusterLabel, "cvnmap"), clusterHandle);
154  const std::vector<rb::Cluster> & clusters = *clusterHandle;
156  for(unsigned int i = 0; i < clusterHandle->size(); ++i){
157  slices.push_back(art::Ptr<rb::Cluster>(clusterHandle, i));
158  }
159 
160 
161 // art::FindManyP<PixelMap> fmPixelMap(clusterHandle, evt, art::InputTag("cvnmap", fPixelMapInput));
162  art::FindManyP<PixelMap> fmPixelMap(clusterHandle, evt, "cvnmap");
163  // Get the Standard Records
164  art::FindManyP<caf::StandardRecord> recordFMP(slices, evt, fCAFLabel);
165 
166  std::vector<int> bestNuId;
167  std::vector<cheat::NeutrinoWithIndex> nus;
168  std::vector< std::vector<cheat::NeutrinoEffPur> > sEffPur;
169  if(fBT->HaveTruthInfo()){
170  nus = fBT->allMCTruth();
171  sEffPur = fBT->SlicesToMCTruthsTable(slices);
172  bestNuId = fBT->SliceToOrderedNuIdsByEnergy(nus, sEffPur);
173  }
174 
175  for(size_t iClust = 0; iClust < clusters.size(); ++iClust){
176  if(fObeyPreselection && rb::IsFiltered(evt, clusterHandle, iClust,
177  fPreselectionLabels)) continue;
178  // get record associated with the slice
179  std::vector< art::Ptr<caf::StandardRecord> > records;
180  bool pass = true;
181  // Apply the CAF-level cuts
182  if(fApplyCAFCuts && recordFMP.isValid()){
183  records = recordFMP.at(iClust);
184  if(records.size() > 0) pass = fCAFCutter.passCuts(fCutType, records[0].get());
185  }
186 
187 // if(sEffPur[iClust][bestNuId[iClust]].nSliceHits <= 70) continue;
188  if(!pass) continue;
189  const rb::Cluster& cluster = clusters[iClust];
190  if(!fmPixelMap.isValid()) continue;
191 
192  const std::vector< art::Ptr<PixelMap> > pixelMaps = fmPixelMap.at(iClust);
193  if(pixelMaps.empty()) continue;
194  InteractionType interaction = kCosmic;
195  FinalStateType finalstate = kOtherFS;
196  FinalStateProngsType finalstateprongs = kOtherFSp;
197  ParentParticleType parentparticle = kUnknownPP;
198 
199  ParticlesType particles_type = kCosmic_PT;
200 
201  float nuEnergy = 0;
202  float lepEnergy = 0;
203  double vtxx = std::numeric_limits<double>::lowest();
204  double vtxy = std::numeric_limits<double>::lowest();
205  double vtxz = std::numeric_limits<double>::lowest();
207  if(fBT->HaveTruthInfo()){
208  if(bestNuId[iClust] != -1) {
209 
210  truth = sEffPur[iClust][bestNuId[iClust]].neutrinoInt;
211 
212  interaction = SliceClassify(truth, cluster, nuEnergy, lepEnergy, vtxx, vtxy, vtxz);
213  particles_type = ParticlesSliceClassify(truth, cluster, nuEnergy, lepEnergy, vtxx, vtxy, vtxz);
214  finalstate = GetFinalStateType(truth);
215  finalstateprongs = GetFinalStateProngsType(truth);
216  parentparticle = GetParentParticleType(truth, evt);
217 
218  if (interaction != kCosmic) {
219  printf("\ncluster: %li Particles_type: %i Interaction: %i, nSliceHits %i",
220  iClust, particles_type, interaction, sEffPur[iClust][bestNuId[iClust]].nSliceHits);
221  if(sEffPur[iClust][bestNuId[iClust]].nSliceHits <= 10) {printf(" **** Skipping ***\n\n");}
222  else printf("\n\n");
223 // if(sEffPur[iClust][bestNuId[iClust]].nSliceHits >= 70) continue;
224 // printf("\n it continued with hits = %i \n", sEffPur[iClust][bestNuId[iClust]].nSliceHits);
225  }
226 
227  //If the cluster contains the Neutrino event, but has less than 10 hits from it, cut it out
228  if(sEffPur[iClust][bestNuId[iClust]].nSliceHits <= 10 && interaction != kCosmic) continue;
229  }
230  }
231  else particles_type = kCosmic_PT; // ! Careful This will only work for cosmic data !
232 
233 //if (interaction != 14) {
234 // printf("\ncluster: %li Particles_type: %i Interaction: %i \n", iClust, particles_type, interaction);
235 // if(sEffPur[iClust][bestNuId[iClust]].nSliceHits >= 70) continue;
236 // printf("\n** Saving **");
237 // }
238 
239 
240 
242  TrainingData train(interaction, parentparticle, finalstate, finalstateprongs,
243  particles_type, nuEnergy, lepEnergy,
244  vtxx, vtxy, vtxz, *pixelMaps[0]);
245  if(fWriteMapTH2) WriteMapTH2(evt, (int)iClust, train.fPMap);
246  fTrain = &train;
247  fTrainTree->Fill();
248  }
249 
250  if(particlesTraining){
251  ParticlesTrainingData train(particles_type, nuEnergy, lepEnergy,
252  vtxx, vtxy, vtxz, *pixelMaps[0]);
253  if(fWriteMapTH2) WriteMapTH2(evt, (int)iClust, train.fPMap);
255  fTrainTree->Fill();
256  }
257  } // end loop over slices
258 
259  } // analyze
art::ServiceHandle< cheat::BackTracker > fBT
InteractionType SliceClassify(const art::Ptr< simb::MCTruth > truth, const rb::Cluster &slice, float &nuEnergy, float &lepEnergy, double &vtxx, double &vtxy, double &vtxz)
FinalStateType GetFinalStateType(const art::Ptr< simb::MCTruth > truth)
std::vector< NeutrinoWithIndex > allMCTruth() const
float vtxx
A collection of associated CellHits.
Definition: Cluster.h:47
enum cvn::Interaction InteractionType
std::vector< std::string > fPreselectionLabels
ParticlesType ParticlesSliceClassify(const art::Ptr< simb::MCTruth > truth, const rb::Cluster &slice, float &nuEnergy, float &lepEnergy, double &vtxx, double &vtxy, double &vtxz)
std::vector< std::vector< cheat::NeutrinoEffPur > > SlicesToMCTruthsTable(const std::vector< const rb::Cluster * > &sliceList) const
Given ALL the slices in an event, including the noise slice, returns a vector of vector of structures...
void WriteMapTH2(const art::Event &evt, int slice, const PixelMap &pm)
Function to extract TH2 from PixelMap and write to TFile.
Cosmic ray background.
Something else. Tau? Hopefully we don&#39;t use this.
std::vector< int > SliceToOrderedNuIdsByEnergy(const std::vector< cheat::NeutrinoWithIndex > &nusWithIdx, const std::vector< std::vector< cheat::NeutrinoEffPur >> &slTruthTable) const
bool passCuts(int cut, const caf::StandardRecord *sr)
Definition: CAFCutter.cxx:37
ParticlesTrainingData * fParticlesTrain
ParentParticleType GetParentParticleType(const art::Ptr< simb::MCTruth > truth, const art::Event &evt)
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
Something else. Tau? Hopefully we don&#39;t use this.
printf("%d Experimental points found\n", nlines)
recovalid::CAFCutter fCAFCutter
the CAFCutter helper class
float vtxy
FinalStateProngsType GetFinalStateProngsType(const art::Ptr< simb::MCTruth > truth)
bool IsFiltered(const art::Event &evt, art::Ptr< T > x, const std::vector< std::string > &labels)
Is this Ptr marked "filtered out"?
Definition: FilterList.h:96
enum cvn::FinalState FinalStateType
enum cvn::Particles ParticlesType
std::string fCAFLabel
label for the process that made the standard records
Catch all term, shouldn&#39;t be used.
float vtxz
enum cvn::ParentParticle ParentParticleType
void train()
Definition: train.C:24
bool getByLabel(std::string const &label, std::string const &productInstanceName, Handle< PROD > &result) const
Definition: DataViewImpl.h:344
bool HaveTruthInfo() const
Is this a file with truth info in? (Is BackTracker going to be any use to you?)
Definition: BackTracker.h:133
enum cvn::FinalStateProngs FinalStateProngsType
bool fObeyPreselection
Check rb::IsFiltered?
int fCutType
what cuts to apply (see CAFCutter.h)
bool fApplyCAFCuts
should we apply the CAF-level cuts?
void cvn::CVNCosmicEventDump::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 124 of file CVNCosmicEventDump_module.cc.

References fChooseLabels, fParticlesTrain, fTrain, fTrainTree, interactionTraining, art::TFileDirectory::make(), and particlesTraining.

125  {
126 
128 
129  if(fChooseLabels == "particleType"){
130  particlesTraining = true;
131  interactionTraining = false;
132  }
133 
134  fTrainTree = tfs->make<TTree>("CVNTrainTree", "Training records");
136  fTrainTree->Branch("train", "cvn::TrainingData", &fTrain);
138  fTrainTree->Branch("train", "cvn::ParticlesTrainingData", &fParticlesTrain);
139 
140  }
ParticlesTrainingData * fParticlesTrain
T * make(ARGS...args) const
detail::CachedProducts& art::EventObserverBase::cachedProducts ( )
inlineprotectedinherited

Definition at line 79 of file EventObserverBase.h.

References art::EventObserverBase::selectors_.

80  {
81  return selectors_;
82  }
detail::CachedProducts selectors_
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::consumes ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::consumes ( InputTag const &  it)
inherited

Definition at line 146 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

147 {
148  if (!moduleContext_)
149  return ProductToken<T>::invalid();
150 
151  consumables_[BT].emplace_back(ConsumableType::Product,
152  TypeID{typeid(T)},
153  it.label(),
154  it.instance(),
155  it.process());
156  return ProductToken<T>{it};
157 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::consumesMany ( )
inherited

Definition at line 161 of file Consumer.h.

References T.

162 {
163  if (!moduleContext_)
164  return;
165 
166  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
167 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::consumesView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::consumesView ( InputTag const &  it)
inherited

Definition at line 171 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

172 {
173  if (!moduleContext_)
174  return ViewToken<T>::invalid();
175 
176  consumables_[BT].emplace_back(ConsumableType::ViewElement,
177  TypeID{typeid(T)},
178  it.label(),
179  it.instance(),
180  it.process());
181  return ViewToken<T>{it};
182 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited
base_engine_t& art::EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited
CurrentProcessingContext const* art::EDAnalyzer::currentContext ( ) const
protectedinherited
void cvn::CVNCosmicEventDump::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 143 of file CVNCosmicEventDump_module.cc.

144  {
145  }
seed_t art::EngineCreator::get_seed_value ( fhicl::ParameterSet const &  pset,
char const  key[] = "seed",
seed_t const  implicit_seed = -1 
)
inherited
art::Handle<art::TriggerResults> art::EventObserverBase::getTriggerResults ( Event const &  e) const
inlineinherited

Definition at line 61 of file EventObserverBase.h.

References art::detail::CachedProducts::getOneTriggerResults(), and art::EventObserverBase::selectors_.

62  {
64  }
detail::CachedProducts selectors_
art::Handle< art::TriggerResults > getOneTriggerResults(Event const &) const
Float_t e
Definition: plot.C:35
template<typename T , BranchType = InEvent>
ProductToken<T> art::Consumer::mayConsume ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ProductToken<T> art::Consumer::mayConsume ( InputTag const &  it)
inherited

Definition at line 189 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

190 {
191  if (!moduleContext_)
192  return ProductToken<T>::invalid();
193 
194  consumables_[BT].emplace_back(ConsumableType::Product,
195  TypeID{typeid(T)},
196  it.label(),
197  it.instance(),
198  it.process());
199  return ProductToken<T>{it};
200 }
set< int >::iterator it
static ProductToken< T > invalid()
Definition: ProductToken.h:47
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename T , art::BranchType BT>
void art::Consumer::mayConsumeMany ( )
inherited

Definition at line 204 of file Consumer.h.

References T.

205 {
206  if (!moduleContext_)
207  return;
208 
209  consumables_[BT].emplace_back(ConsumableType::Many, TypeID{typeid(T)});
210 }
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::Consumer::mayConsumeView ( InputTag const &  )
inherited
template<typename T , art::BranchType BT>
art::ViewToken<T> art::Consumer::mayConsumeView ( InputTag const &  it)
inherited

Definition at line 214 of file Consumer.h.

References art::InputTag::instance(), PandAna.reco_validation.prod5_pid_validation::invalid, art::InputTag::label(), art::InputTag::process(), and T.

215 {
216  if (!moduleContext_)
217  return ViewToken<T>::invalid();
218 
219  consumables_[BT].emplace_back(ConsumableType::ViewElement,
220  TypeID{typeid(T)},
221  it.label(),
222  it.instance(),
223  it.process());
224  return ViewToken<T>{it};
225 }
set< int >::iterator it
static ViewToken< Element > invalid()
Definition: ProductToken.h:75
ConsumableProducts consumables_
Definition: Consumer.h:137
double T
Definition: Xdiff_gwt.C:5
bool moduleContext_
Definition: Consumer.h:135
bool art::EventObserverBase::modifiesEvent ( ) const
inlineinherited

Definition at line 25 of file EventObserverBase.h.

26  {
27  return false;
28  }
static cet::exempt_ptr<Consumer> art::Consumer::non_module_context ( )
staticinherited
void art::Consumer::prepareForJob ( fhicl::ParameterSet const &  pset)
protectedinherited
std::string const& art::EventObserverBase::processName ( ) const
inlineinherited
void cvn::CVNCosmicEventDump::reconfigure ( const fhicl::ParameterSet pset)

Definition at line 110 of file CVNCosmicEventDump_module.cc.

References fApplyCAFCuts, fCAFLabel, fChooseLabels, fClusterLabel, fCutType, fObeyPreselection, fPixelMapInput, fPreselectionLabels, fWriteMapTH2, fhicl::ParameterSet::get(), and string.

Referenced by CVNCosmicEventDump().

111  {
112  fClusterLabel = pset.get<std::string> ("ClusterLabel");
113  fPixelMapInput = pset.get<std::string> ("PixelMapInput");
114  fChooseLabels = pset.get<std::string> ("ChooseLabels");
115  fWriteMapTH2 = pset.get<bool> ("WriteMapTH2");
116  fObeyPreselection = pset.get<bool> ("ObeyPreselection");
117  fPreselectionLabels = pset.get< std::vector<std::string> >("PreselectionLabels");
118  fCAFLabel = pset.get< std::string >("CAFLabel");
119  fApplyCAFCuts = pset.get< bool > ("ApplyCAFCuts");
120  fCutType = pset.get< int > ("CutType");
121  }
std::vector< std::string > fPreselectionLabels
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::string fCAFLabel
label for the process that made the standard records
bool fObeyPreselection
Check rb::IsFiltered?
int fCutType
what cuts to apply (see CAFCutter.h)
bool fApplyCAFCuts
should we apply the CAF-level cuts?
enum BeamMode string
void art::EventObserverBase::registerProducts ( MasterProductRegistry ,
ProductDescriptions ,
ModuleDescription const &   
)
inlineinherited

Definition at line 33 of file EventObserverBase.h.

References string.

36  {}
fhicl::ParameterSetID art::EventObserverBase::selectorConfig ( ) const
inlineinherited

Definition at line 56 of file EventObserverBase.h.

References art::EventObserverBase::selector_config_id_.

57  {
58  return selector_config_id_;
59  }
fhicl::ParameterSetID selector_config_id_
void art::Consumer::showMissingConsumes ( ) const
protectedinherited

Referenced by art::RootOutput::endJob().

void art::Consumer::validateConsumedProduct ( BranchType const  bt,
ProductInfo const &  pi 
)
protectedinherited
bool art::EventObserverBase::wantAllEvents ( ) const
inlineinherited

Definition at line 46 of file EventObserverBase.h.

References art::EventObserverBase::wantAllEvents_.

Referenced by art::RootOutput::RootOutput().

47  {
48  return wantAllEvents_;
49  }
bool art::EventObserverBase::wantEvent ( Event const &  e)
inlineinherited

Definition at line 51 of file EventObserverBase.h.

References art::EventObserverBase::selectors_, and art::detail::CachedProducts::wantEvent().

52  {
53  return selectors_.wantEvent(e);
54  }
detail::CachedProducts selectors_
Float_t e
Definition: plot.C:35
bool wantEvent(Event const &)
std::string art::EDAnalyzer::workerType ( ) const
inlineinherited

Definition at line 109 of file EDAnalyzer.h.

References art::EDAnalyzer::currentContext().

110  {
111  return "WorkerT<EDAnalyzer>";
112  }
void cvn::CVNCosmicEventDump::WriteMapTH2 ( const art::Event evt,
int  slice,
const PixelMap pm 
)
private

Function to extract TH2 from PixelMap and write to TFile.

Definition at line 262 of file CVNCosmicEventDump_module.cc.

References DEFINE_ART_MODULE(), art::Event::event(), analysePickle::hist, label, art::TFileDirectory::make(), art::Event::run(), cvn::PixelMap::SingleViewToLabTH2(), cvn::PixelMap::SingleViewToObjTH2(), cvn::PixelMap::SingleViewToTH2(), art::Event::subRun(), art::to_string(), cvn::PixelMap::ToLabTH2(), cvn::PixelMap::ToObjTH2(), and cvn::PixelMap::ToTH2().

Referenced by analyze().

263  {
264  TString mapid = "_r"+std::to_string(evt.run())+"_s"+std::to_string(evt.subRun())+"_e"
265  +std::to_string(evt.event())+"_sl"+std::to_string(slice);
266  TString data = "PixelMap";
267  TString label = "TruthPixelMap";
268  TString object= "ObjectPixelMap";
269  TString time = "TimePixelMap";
270  TH2F* hist = pm.ToTH2( data+mapid );
271  TH2F* histL = pm.ToLabTH2( label+mapid);
272  TH2F* histO = pm.ToObjTH2( object+mapid);
273  TH2F* histX = pm.SingleViewToTH2(0, data+"ViewX"+mapid);
274  TH2F* histY = pm.SingleViewToTH2(1, data+"ViewY"+mapid);
275  TH2F* histXL = pm.SingleViewToLabTH2(0, label+"ViewX"+mapid, false);
276  TH2F* histYL = pm.SingleViewToLabTH2(1, label+"ViewY"+mapid, false);
277  TH2F* histXT = pm.SingleViewToLabTH2(0, time+"ViewX"+mapid, true);
278  TH2F* histYT = pm.SingleViewToLabTH2(1, time+"ViewY"+mapid, true);
279  TH2F* histXO = pm.SingleViewToObjTH2(0, object+"ViewX"+mapid, false);
280  TH2F* histYO = pm.SingleViewToObjTH2(1, object+"ViewY"+mapid, false);
281 
283  TH2F* histWrite = tfs->make<TH2F>(*hist);
284  histWrite->Write();
285  TH2F* histWriteL = tfs->make<TH2F>(*histL);
286 // histWriteL->GetZaxis()->SetRangeUser(0,10);
287  histWriteL->Write();
288  TH2F* histWriteO = tfs->make<TH2F>(*histO);
289  histWriteL->GetZaxis()->SetRangeUser(0,10);
290  histWriteO->Write();
291  TH2F* histWriteX = tfs->make<TH2F>(*histX);
292  histWriteX->Write();
293  TH2F* histWriteY = tfs->make<TH2F>(*histY);
294  histWriteY->Write();
295  TH2F* histWriteXL = tfs->make<TH2F>(*histXL);
296  histWriteXL->Write();
297  TH2F* histWriteYL = tfs->make<TH2F>(*histYL);
298  histWriteYL->Write();
299  TH2F* histWriteXO = tfs->make<TH2F>(*histXO);
300  histWriteXO->Write();
301  TH2F* histWriteYO = tfs->make<TH2F>(*histYO);
302  histWriteYO->Write();
303  TH2F* histWriteXT = tfs->make<TH2F>(*histXT);
304  histWriteXT->Write();
305  TH2F* histWriteYT = tfs->make<TH2F>(*histYT);
306  histWriteYT->Write();
307 
308  delete hist;
309  delete histWrite;
310  delete histL;
311  delete histWriteL;
312  delete histO;
313  delete histXO;
314  delete histYO;
315  delete histWriteO;
316  delete histWriteXO;
317  delete histWriteYO;
318  delete histX;
319  delete histWriteX;
320  delete histY;
321  delete histWriteY;
322  delete histXL;
323  delete histWriteXL;
324  delete histWriteXT;
325  delete histYL;
326  delete histWriteYL;
327  delete histWriteYT;
328 
329  } // WriteMapTH2
SubRunNumber_t subRun() const
Definition: Event.h:72
const char * label
const XML_Char const XML_Char * data
Definition: expat.h:268
EventNumber_t event() const
Definition: Event.h:67
T * make(ARGS...args) const
std::string to_string(ModuleType mt)
Definition: ModuleType.h:32
RunNumber_t run() const
Definition: Event.h:77

Member Data Documentation

bool cvn::CVNCosmicEventDump::fApplyCAFCuts
private

should we apply the CAF-level cuts?

Definition at line 91 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and reconfigure().

art::ServiceHandle<cheat::BackTracker> cvn::CVNCosmicEventDump::fBT
private

Definition at line 81 of file CVNCosmicEventDump_module.cc.

Referenced by analyze().

recovalid::CAFCutter cvn::CVNCosmicEventDump::fCAFCutter
private

the CAFCutter helper class

Definition at line 94 of file CVNCosmicEventDump_module.cc.

Referenced by analyze().

std::string cvn::CVNCosmicEventDump::fCAFLabel
private

label for the process that made the standard records

Definition at line 90 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and reconfigure().

std::string cvn::CVNCosmicEventDump::fChooseLabels
private

Definition at line 71 of file CVNCosmicEventDump_module.cc.

Referenced by beginJob(), and reconfigure().

std::string cvn::CVNCosmicEventDump::fClusterLabel
private

Definition at line 69 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and reconfigure().

int cvn::CVNCosmicEventDump::fCutType
private

what cuts to apply (see CAFCutter.h)

Definition at line 92 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and reconfigure().

bool cvn::CVNCosmicEventDump::fObeyPreselection
private

Check rb::IsFiltered?

Definition at line 84 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and reconfigure().

ParticlesTrainingData* cvn::CVNCosmicEventDump::fParticlesTrain
private

Definition at line 78 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and beginJob().

std::string cvn::CVNCosmicEventDump::fPixelMapInput
private

Definition at line 70 of file CVNCosmicEventDump_module.cc.

Referenced by reconfigure().

std::vector<std::string> cvn::CVNCosmicEventDump::fPreselectionLabels
private

Definition at line 85 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and reconfigure().

TrainingData* cvn::CVNCosmicEventDump::fTrain
private

Definition at line 77 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and beginJob().

TTree* cvn::CVNCosmicEventDump::fTrainTree
private

Definition at line 79 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and beginJob().

bool cvn::CVNCosmicEventDump::fWriteMapTH2
private

Definition at line 72 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and reconfigure().

bool cvn::CVNCosmicEventDump::interactionTraining = true
private

Definition at line 74 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and beginJob().

bool cvn::CVNCosmicEventDump::particlesTraining = false
private

Definition at line 75 of file CVNCosmicEventDump_module.cc.

Referenced by analyze(), and beginJob().


The documentation for this class was generated from the following file: