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

Public Types

using WorkerType = WorkerT< EDAnalyzer >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 CVNEventDump (fhicl::ParameterSet const &pset)
 
 ~CVNEventDump ()
 
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 54 of file CVNEventDump_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::CVNEventDump::CVNEventDump ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 97 of file CVNEventDump_module.cc.

References reconfigure().

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

Definition at line 104 of file CVNEventDump_module.cc.

105  {
106  }

Member Function Documentation

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

Definition at line 147 of file CVNEventDump_module.cc.

References cheat::BackTracker::allMCTruth(), fApplyCAFCuts, fBT, fCAFCutter, fCAFLabel, fClusterLabel, fCutType, fObeyPreselection, fParticlesTrain, fPixelMapInput, 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_PT, cvn::kOther, cvn::kOther_PT, cvn::kOtherFS, cvn::kOtherFSp, cvn::kUnknownPP, cvn::ParticlesSliceClassify(), particlesTraining, recovalid::CAFCutter::passCuts(), art::PtrVector< T >::push_back(), cvn::SliceClassify(), cheat::BackTracker::SlicesToMCTruthsTable(), cheat::BackTracker::SliceToOrderedNuIdsByEnergy(), train(), vtxx, vtxy, vtxz, and WriteMapTH2().

148  {
149 
150  // get the slices
152  evt.getByLabel(fClusterLabel, clusterHandle);
153  const std::vector<rb::Cluster> & clusters = *clusterHandle;
155  for(unsigned int i = 0; i < clusterHandle->size(); ++i){
156  slices.push_back(art::Ptr<rb::Cluster>(clusterHandle, i));
157  }
158 
159  art::FindManyP<PixelMap> fmPixelMap(clusterHandle, evt, fPixelMapInput);
160 
161  // Get the Standard Records
162  art::FindManyP<caf::StandardRecord> recordFMP(slices, evt, fCAFLabel);
163 
164  std::vector<int> bestNuId;
165  std::vector<cheat::NeutrinoWithIndex> nus;
166  std::vector< std::vector<cheat::NeutrinoEffPur> > sEffPur;
167  if(fBT->HaveTruthInfo()){
168  nus = fBT->allMCTruth();
169  sEffPur = fBT->SlicesToMCTruthsTable(slices);
170  bestNuId = fBT->SliceToOrderedNuIdsByEnergy(nus, sEffPur);
171  }
172 
173  for(size_t iClust = 0; iClust < clusters.size(); ++iClust){
174 
175  if(fObeyPreselection && rb::IsFiltered(evt, clusterHandle, iClust,
176  fPreselectionLabels)) continue;
177  // get record associated with the slice
178  std::vector< art::Ptr<caf::StandardRecord> > records;
179  bool pass = true;
180  // Apply the CAF-level cuts
181  if(fApplyCAFCuts && recordFMP.isValid()){
182  records = recordFMP.at(iClust);
183  if(records.size() > 0) pass = fCAFCutter.passCuts(fCutType, records[0].get());
184  }
185 
186  if(!pass) continue;
187 
188  const rb::Cluster& cluster = clusters[iClust];
189  if(!fmPixelMap.isValid()) continue;
190 
191 
192  const std::vector< art::Ptr<PixelMap> > pixelMaps = fmPixelMap.at(iClust);
193 
194  if(pixelMaps.empty()) continue;
195  InteractionType interaction = kOther;
196  FinalStateType finalstate = kOtherFS;
197  FinalStateProngsType finalstateprongs = kOtherFSp;
198  ParentParticleType parentparticle = kUnknownPP;
199 
200  ParticlesType particles_type = kOther_PT;
201 
202  float nuEnergy = 0;
203  float lepEnergy = 0;
204  double vtxx = std::numeric_limits<double>::lowest();
205  double vtxy = std::numeric_limits<double>::lowest();
206  double vtxz = std::numeric_limits<double>::lowest();
208  if(fBT->HaveTruthInfo()){
209  if(bestNuId[iClust] != -1)
210  truth = sEffPur[iClust][bestNuId[iClust]].neutrinoInt;
211 
212  interaction = SliceClassify(truth, cluster, nuEnergy, lepEnergy,
213  vtxx, vtxy, vtxz);
214  particles_type = ParticlesSliceClassify(truth, cluster, nuEnergy, lepEnergy,
215  vtxx, vtxy, vtxz);
216  finalstate = GetFinalStateType(truth);
217  finalstateprongs = GetFinalStateProngsType(truth);
218  parentparticle = GetParentParticleType(truth, evt);
219 
220  }
221  else particles_type = kCosmic_PT; // ! Careful This will only work for cosmic data !
222 
224  TrainingData train(interaction, parentparticle, finalstate, finalstateprongs,
225  particles_type, nuEnergy, lepEnergy,
226  vtxx, vtxy, vtxz, *pixelMaps[0]);
227  if(fWriteMapTH2) WriteMapTH2(evt, (int)iClust, train.fPMap);
228  fTrain = &train;
229  fTrainTree->Fill();
230  }
231 
232  if(particlesTraining){
233  ParticlesTrainingData train(particles_type, nuEnergy, lepEnergy,
234  vtxx, vtxy, vtxz, *pixelMaps[0]);
235  if(fWriteMapTH2) WriteMapTH2(evt, (int)iClust, train.fPMap);
237  fTrainTree->Fill();
238  }
239  } // end loop over slices
240 
241  } // analyze
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)
art::ServiceHandle< cheat::BackTracker > fBT
std::vector< NeutrinoWithIndex > allMCTruth() const
void WriteMapTH2(const art::Event &evt, int slice, const PixelMap &pm)
Function to extract TH2 from PixelMap and write to TFile.
float vtxx
A collection of associated CellHits.
Definition: Cluster.h:47
enum cvn::Interaction InteractionType
bool fObeyPreselection
Check rb::IsFiltered?
ParticlesType ParticlesSliceClassify(const art::Ptr< simb::MCTruth > truth, const rb::Cluster &slice, float &nuEnergy, float &lepEnergy, double &vtxx, double &vtxy, double &vtxz)
ParticlesTrainingData * fParticlesTrain
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...
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
ParentParticleType GetParentParticleType(const art::Ptr< simb::MCTruth > truth, const art::Event &evt)
void push_back(Ptr< U > const &p)
Definition: PtrVector.h:441
bool fApplyCAFCuts
should we apply the CAF-level cuts?
Whatever is left.
Something else. Tau? Hopefully we don&#39;t use this.
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
std::vector< std::string > fPreselectionLabels
enum cvn::Particles ParticlesType
Something else. Tau? Hopefully we don&#39;t use this.
Catch all term, shouldn&#39;t be used.
float vtxz
int fCutType
what cuts to apply (see CAFCutter.h)
recovalid::CAFCutter fCAFCutter
the CAFCutter helper class
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
std::string fCAFLabel
label for the process that made the standard records
void cvn::CVNEventDump::beginJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 123 of file CVNEventDump_module.cc.

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

124  {
125 
127 
128  if(fChooseLabels == "particleType"){
129  particlesTraining = true;
130  interactionTraining = false;
131  }
132 
133  fTrainTree = tfs->make<TTree>("CVNTrainTree", "Training records");
135  fTrainTree->Branch("train", "cvn::TrainingData", &fTrain);
137  fTrainTree->Branch("train", "cvn::ParticlesTrainingData", &fParticlesTrain);
138 
139  }
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::CVNEventDump::endJob ( )
virtual

Reimplemented from art::EDAnalyzer.

Definition at line 142 of file CVNEventDump_module.cc.

143  {
144  }
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::CVNEventDump::reconfigure ( const fhicl::ParameterSet pset)

Definition at line 109 of file CVNEventDump_module.cc.

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

Referenced by CVNEventDump().

110  {
111  fClusterLabel = pset.get<std::string> ("ClusterLabel");
112  fPixelMapInput = pset.get<std::string> ("PixelMapInput");
113  fChooseLabels = pset.get<std::string> ("ChooseLabels");
114  fWriteMapTH2 = pset.get<bool> ("WriteMapTH2");
115  fObeyPreselection = pset.get<bool> ("ObeyPreselection");
116  fPreselectionLabels = pset.get< std::vector<std::string> >("PreselectionLabels");
117  fCAFLabel = pset.get< std::string >("CAFLabel");
118  fApplyCAFCuts = pset.get< bool > ("ApplyCAFCuts");
119  fCutType = pset.get< int > ("CutType");
120  }
bool fObeyPreselection
Check rb::IsFiltered?
bool fApplyCAFCuts
should we apply the CAF-level cuts?
T get(std::string const &key) const
Definition: ParameterSet.h:231
std::vector< std::string > fPreselectionLabels
int fCutType
what cuts to apply (see CAFCutter.h)
std::string fCAFLabel
label for the process that made the standard records
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::CVNEventDump::WriteMapTH2 ( const art::Event evt,
int  slice,
const PixelMap pm 
)
private

Function to extract TH2 from PixelMap and write to TFile.

Definition at line 244 of file CVNEventDump_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().

245  {
246 
247  TString mapid = "_r"+std::to_string(evt.run())+"_s"+std::to_string(evt.subRun())+"_e"
248  +std::to_string(evt.event())+"_sl"+std::to_string(slice);
249  TString data = "PixelMap";
250  TString label = "TruthPixelMap";
251  TString object= "ObjectPixelMap";
252  TString time = "TimePixelMap";
253  TString nuId = "NuIdPixelMap";
254 
255  TH2F* hist = pm.ToTH2( data+mapid );
256  TH2F* histL = pm.ToLabTH2( label+mapid);
257  TH2F* histO = pm.ToObjTH2( object+mapid);
258  TH2F* histX = pm.SingleViewToTH2(0, data+"ViewX"+mapid);
259  TH2F* histY = pm.SingleViewToTH2(1, data+"ViewY"+mapid);
260  TH2F* histXL = pm.SingleViewToLabTH2(0, label+"ViewX"+mapid, false);
261  TH2F* histYL = pm.SingleViewToLabTH2(1, label+"ViewY"+mapid, false);
262  TH2F* histXT = pm.SingleViewToLabTH2(0, time+"ViewX"+mapid, true);
263  TH2F* histYT = pm.SingleViewToLabTH2(1, time+"ViewY"+mapid, true);
264  TH2F* histXO = pm.SingleViewToObjTH2(0, object+"ViewX"+mapid, false);
265  TH2F* histYO = pm.SingleViewToObjTH2(1, object+"ViewY"+mapid, false);
266  TH2F* histXN = pm.SingleViewToObjTH2(0, nuId+"ViewX"+mapid, true);
267  TH2F* histYN = pm.SingleViewToObjTH2(1, nuId+"ViewY"+mapid, true);
268 
270 
271  TH2F* histWrite = tfs->make<TH2F>(*hist);
272  histWrite->Write();
273  TH2F* histWriteL = tfs->make<TH2F>(*histL);
274  histWriteL->GetZaxis()->SetRangeUser(0,10);
275  histWriteL->Write();
276  TH2F* histWriteO = tfs->make<TH2F>(*histO);
277  //histWriteL->GetZaxis()->SetRangeUser(0,10);
278  histWriteO->Write();
279  TH2F* histWriteX = tfs->make<TH2F>(*histX);
280  histWriteX->Write();
281  TH2F* histWriteY = tfs->make<TH2F>(*histY);
282  histWriteY->Write();
283  TH2F* histWriteXL = tfs->make<TH2F>(*histXL);
284  histWriteXL->Write();
285  TH2F* histWriteYL = tfs->make<TH2F>(*histYL);
286  histWriteYL->Write();
287  TH2F* histWriteXO = tfs->make<TH2F>(*histXO);
288  histWriteXO->Write();
289  TH2F* histWriteYO = tfs->make<TH2F>(*histYO);
290  histWriteYO->Write();
291  TH2F* histWriteXT = tfs->make<TH2F>(*histXT);
292  histWriteXT->Write();
293  TH2F* histWriteYT = tfs->make<TH2F>(*histYT);
294  histWriteYT->Write();
295  TH2F* histWriteXN = tfs->make<TH2F>(*histXN);
296  histWriteXN->Write();
297  TH2F* histWriteYN = tfs->make<TH2F>(*histYN);
298  histWriteYN->Write();
299 
300  delete hist;
301  delete histWrite;
302  delete histL;
303  delete histWriteL;
304  delete histO;
305  delete histXO;
306  delete histYO;
307  delete histWriteO;
308  delete histWriteXO;
309  delete histWriteYO;
310  delete histXN;
311  delete histYN;
312  delete histWriteXN;
313  delete histWriteYN;
314  delete histX;
315  delete histWriteX;
316  delete histY;
317  delete histWriteY;
318  delete histXL;
319  delete histWriteXL;
320  delete histWriteXT;
321  delete histYL;
322  delete histWriteYL;
323  delete histWriteYT;
324 
325  } // 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::CVNEventDump::fApplyCAFCuts
private

should we apply the CAF-level cuts?

Definition at line 90 of file CVNEventDump_module.cc.

Referenced by analyze(), and reconfigure().

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

Definition at line 80 of file CVNEventDump_module.cc.

Referenced by analyze().

recovalid::CAFCutter cvn::CVNEventDump::fCAFCutter
private

the CAFCutter helper class

Definition at line 93 of file CVNEventDump_module.cc.

Referenced by analyze().

std::string cvn::CVNEventDump::fCAFLabel
private

label for the process that made the standard records

Definition at line 89 of file CVNEventDump_module.cc.

Referenced by analyze(), and reconfigure().

std::string cvn::CVNEventDump::fChooseLabels
private

Definition at line 70 of file CVNEventDump_module.cc.

Referenced by beginJob(), and reconfigure().

std::string cvn::CVNEventDump::fClusterLabel
private

Definition at line 68 of file CVNEventDump_module.cc.

Referenced by analyze(), and reconfigure().

int cvn::CVNEventDump::fCutType
private

what cuts to apply (see CAFCutter.h)

Definition at line 91 of file CVNEventDump_module.cc.

Referenced by analyze(), and reconfigure().

bool cvn::CVNEventDump::fObeyPreselection
private

Check rb::IsFiltered?

Definition at line 83 of file CVNEventDump_module.cc.

Referenced by analyze(), and reconfigure().

ParticlesTrainingData* cvn::CVNEventDump::fParticlesTrain
private

Definition at line 77 of file CVNEventDump_module.cc.

Referenced by analyze(), and beginJob().

std::string cvn::CVNEventDump::fPixelMapInput
private

Definition at line 69 of file CVNEventDump_module.cc.

Referenced by analyze(), and reconfigure().

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

Definition at line 84 of file CVNEventDump_module.cc.

Referenced by analyze(), and reconfigure().

TrainingData* cvn::CVNEventDump::fTrain
private

Definition at line 76 of file CVNEventDump_module.cc.

Referenced by analyze(), and beginJob().

TTree* cvn::CVNEventDump::fTrainTree
private

Definition at line 78 of file CVNEventDump_module.cc.

Referenced by analyze(), and beginJob().

bool cvn::CVNEventDump::fWriteMapTH2
private

Definition at line 71 of file CVNEventDump_module.cc.

Referenced by analyze(), and reconfigure().

bool cvn::CVNEventDump::interactionTraining = true
private

Definition at line 73 of file CVNEventDump_module.cc.

Referenced by analyze(), and beginJob().

bool cvn::CVNEventDump::particlesTraining = false
private

Definition at line 74 of file CVNEventDump_module.cc.

Referenced by analyze(), and beginJob().


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