29 #include "art_root_io/TFileService.h" 31 #include "canvas/Persistency/Common/FindManyP.h" 39 #include "TLorentzVector.h" 72 for (
int k=0;
k<120;
k++){
if(apa==
UVPlane[
k]) {
return k; }}
77 for (
int k=0;
k<240;
k++){
if(tpc==
ZPlane[
k]) {
return k; }}
126 119,118,117,59,58,57,
127 113,112,111,53,52,51,
128 107,106,105,47,46,45,
136 116,115,114,56,55,54,
137 110,109,108,50,49,48,
138 104,103,102,44,43,42,
148 239,238,237,236,235,234,119,118,117,116,115,114,
149 227,226,225,224,223,222,107,106,105,104,103,102,
150 215,214,213,212,211,210,95,94,93,92,91,90,
151 203,202,201,200,199,198,83,82,81,80,79,78,
152 191,190,189,188,187,186,71,70,69,68,67,66,
153 179,178,177,176,175,174,59,58,57,56,55,54,
154 167,166,165,164,163,162,47,46,45,44,43,42,
155 155,154,153,152,151,150,35,34,33,32,31,30,
156 143,142,141,140,139,138,23,22,21,20,19,18,
157 131,130,129,128,127,126,11,10,9,8,7,6,
158 233,232,231,230,229,228,113,112,111,110,109,108,
159 221,220,219,218,217,216,101,100,99,98,97,96,
160 209,208,207,206,205,204,89,88,87,86,85,84,
161 197,196,195,194,193,192,77,76,75,74,73,72,
162 185,184,183,182,181,180,65,64,63,62,61,60,
163 173,172,171,170,169,168,53,52,51,50,49,48,
164 161,160,159,158,157,156,41,40,39,38,37,36,
165 149,148,147,146,145,144,29,28,27,26,25,24,
166 137,136,135,134,133,132,17,16,15,14,13,12,
167 125,124,123,122,121,120,5,4,3,2,1,0
186 auto const *fDetProp = lar::providerFrom<detinfo::DetectorPropertiesService>();
187 fNticks = fDetProp->NumberTimeSamples();
211 unsigned int Z0ChMin;
212 unsigned int Z0ChMax;
213 unsigned int Z1ChMin;
214 unsigned int Z1ChMax;
217 std::ofstream outfile;
218 outfile.open(
"msglog.txt");
243 unsigned int minT = 0;
244 unsigned int maxT = 0;
247 unsigned int binT = (maxT-minT);
249 for(
unsigned int i=0;i<
fNofAPA;i++){
261 name <<
"fTimeChanU";
264 title <<
"Time vs Channel(Plane U, APA";
266 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), UChMax - UChMin + 1, UChMin, UChMax, binT, minT, maxT);
270 name <<
"fTimeChanThumbU";
273 title <<
"Time vs Channel(Plane U, APA";
275 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), 32, UChMin, UChMax, 32, minT, maxT);
279 name <<
"fTimeChanV";
282 title <<
"Time vs Channel(Plane V, APA";
284 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), VChMax - VChMin + 1, VChMin, VChMax, binT, minT, maxT);
288 name <<
"fTimeChanThumbV";
291 title <<
"Time vs Channel(Plane V, APA";
293 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), 32, VChMin, VChMax, 32, minT, maxT);
297 name <<
"fTimeChanZ0";
300 title <<
"Time vs Channel(Plane Z0, APA";
302 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), Z0ChMax - Z0ChMin + 1, Z0ChMin, Z0ChMax, binT, minT, maxT);
306 name <<
"fTimeChanThumbZ0";
309 title <<
"Time vs Channel(Plane Z0, APA";
311 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), 32, Z0ChMin, Z0ChMax, 32, minT, maxT);
315 name <<
"fTimeChanZ1";
318 title <<
"Time vs Channel(Plane Z1, APA";
320 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), Z1ChMax - Z1ChMin + 1, Z1ChMin, Z1ChMax, binT, minT, maxT);
324 name <<
"fTimeChanThumbZ1";
327 title <<
"Time vs Channel(Plane Z1, APA";
329 TempHisto = tfs->make<TH2I>(name.str().c_str(),title.str().c_str(), 32, Z1ChMin, Z1ChMax, 32, minT, maxT);
343 fChargeSumU= tfs->make<TH2I>(
"hChargeSumU",
"Charge Sum on U-planes", 6,0.5,6.5,20,0.5,20.5 );
344 fChargeSumV= tfs->make<TH2I>(
"hChargeSumV",
"Charge Sum on V-planes", 6,0.5,6.5,20,0.5,20.5 );
345 fChargeSumZ= tfs->make<TH2I>(
"hChargeSumZ",
"Charge Sum on Z-planes", 12,0.5,12.5,20,0.5,20.5);
346 fChargeSumU->SetStats(0); fChargeSumV->SetStats(0); fChargeSumZ->SetStats(0);
361 unsigned int tpcid, cryoid;
362 std::stringstream thumbnameZ0, thumbnameZ1;
369 std::vector< art::Ptr<raw::RawDigit> > Digits;
373 for(
size_t d = 0;
d < Digits.size();
d++){
383 std::vector<short> uncompressed(digit->
Samples());
387 for(
unsigned int l=0;
l<uncompressed.size();
l++) {
388 if(uncompressed.at(
l)!=0){
396 for(
unsigned int l=0;
l<uncompressed.size();
l++) {
397 if(uncompressed.at(
l)!=0){
405 for(
unsigned int l=0;
l<uncompressed.size();
l++) {
406 if(uncompressed.at(
l)!=0){
414 for(
unsigned int l=0;
l<uncompressed.size();
l++) {
415 if(uncompressed.at(
l)!=0){
432 #endif // RawEVD_Module
unsigned int getTPCindex(unsigned int tpc)
unsigned int getAPAindex(unsigned int apa)
Store parameters for running LArG4.
const ADCvector_t & ADCs() const
Reference to the compressed ADC count vector.
ULong64_t Samples() const
Number of samples in the uncompressed ADC data.
void analyze(const art::Event &evt)
RawEVD(fhicl::ParameterSet const &pset)
Declaration of signal hit object.
ChannelID_t Channel() const
DAQ channel this raw data was read from.
std::vector< TH2I * > fTimeChanU
void beginRun(const art::Run &run)
std::vector< geo::WireID > ChannelToWire(raw::ChannelID_t const channel) const
Returns a list of wires connected to the specified TPC channel.
Definition of basic raw digits.
Planes which measure Z direction.
unsigned int fChansPerAPA
EDAnalyzer(fhicl::ParameterSet const &pset)
unsigned int Ncryostats() const
Returns the number of cryostats in the detector.
std::vector< TH2I * > fTimeChanZ1
unsigned int Nchannels() const
Returns the number of TPC readout channels in the detector.
std::vector< TH2I * > fTimeChanV
std::string fRawDigitLabel
#define DEFINE_ART_MODULE(klass)
Collect all the RawData header files together.
T get(std::string const &key) const
std::vector< TH2I * > fTimeChanThumbZ0
std::vector< TH2I * > fTimeChanThumbZ1
Declaration of cluster object.
art::ServiceHandle< geo::Geometry > fGeom
View_t View(geo::PlaneID const &pid) const
Returns the view (wire orientation) on the channels of specified TPC plane.
Definition of data types for geometry description.
unsigned int NTPC(unsigned int cstat=0) const
Returns the total number of TPCs in the specified cryostat.
std::vector< TH2I * > fTimeChanZ0
raw::Compress_t Compression() const
Compression algorithm used to store the ADC counts.
std::vector< TH2I * > fTimeChanThumbV
object containing MC truth information necessary for making RawDigits and doing back tracking ...
std::vector< TH2I * > fTimeChanThumbU
void reconfigure(fhicl::ParameterSet const &pset)
void fill_ptr_vector(std::vector< Ptr< T >> &ptrs, H const &h)
void Uncompress(const std::vector< short > &adc, std::vector< short > &uncompressed, raw::Compress_t compress)
Uncompresses a raw data buffer.
QTextStream & endl(QTextStream &s)
Event finding and building.
unsigned int UVPlane[120]