| 1 |
mocchiut |
1.1 |
|
| 2 |
|
|
|
| 3 |
|
|
/** |
| 4 |
|
|
* \file CaloDoubleShower.h |
| 5 |
|
|
* \author Emiliano Mocchiutti (2007/08/09) |
| 6 |
|
|
*/ |
| 7 |
|
|
#ifndef calodblsh_h |
| 8 |
|
|
#define calodblsh_h |
| 9 |
|
|
|
| 10 |
|
|
#include <PamLevel2.h> |
| 11 |
|
|
|
| 12 |
|
|
#include <TTree.h> |
| 13 |
|
|
#include <TFriendElement.h> |
| 14 |
|
|
#include <TChain.h> |
| 15 |
|
|
#include <TFile.h> |
| 16 |
|
|
#include <TList.h> |
| 17 |
|
|
#include <TKey.h> |
| 18 |
|
|
#include <TSystemFile.h> |
| 19 |
|
|
#include <TSystemDirectory.h> |
| 20 |
|
|
#include <TSQLServer.h> |
| 21 |
|
|
|
| 22 |
|
|
#include <iostream> |
| 23 |
|
|
// |
| 24 |
|
|
// Declaration of the core fortran routines |
| 25 |
|
|
// |
| 26 |
|
|
#define getdblsh getdblsh_ |
| 27 |
|
|
extern "C" int getdblsh(); |
| 28 |
|
|
|
| 29 |
|
|
using namespace std; |
| 30 |
|
|
|
| 31 |
|
|
struct Calo2sh { |
| 32 |
|
|
Float_t pos; |
| 33 |
|
|
Float_t angol; |
| 34 |
|
|
Float_t dblsq; |
| 35 |
|
|
Float_t dbls; |
| 36 |
|
|
}; |
| 37 |
|
|
|
| 38 |
|
|
/** |
| 39 |
|
|
* |
| 40 |
|
|
* Class to store and calculate variables useful for recognizing double showers in the calorimeter |
| 41 |
|
|
*/ |
| 42 |
|
|
class CaloDoubleShower : public TObject { |
| 43 |
|
|
|
| 44 |
|
|
private: |
| 45 |
|
|
// |
| 46 |
|
|
PamLevel2 *L2; |
| 47 |
|
|
Bool_t debug; |
| 48 |
|
|
// |
| 49 |
mocchiut |
1.3 |
Bool_t usepl18x; |
| 50 |
|
|
// |
| 51 |
mocchiut |
1.1 |
// needed to avoid reprocessing the same event over and over to obtain the variables; |
| 52 |
|
|
// |
| 53 |
|
|
UInt_t OBT; |
| 54 |
|
|
UInt_t PKT; |
| 55 |
|
|
UInt_t atime; |
| 56 |
|
|
UInt_t tr; |
| 57 |
|
|
UInt_t sntr; |
| 58 |
|
|
// |
| 59 |
|
|
Bool_t simulation; ///< True when using simulated data, false by default; |
| 60 |
|
|
CaloLevel0 *event; ///< Pointer to calorimeter level0 structure needed to process the data |
| 61 |
|
|
CaloStrip *cstrip; ///< CaloStrip object needed to easily recover parameter files |
| 62 |
|
|
struct Calo2sh *c2s; ///< Fortran i/o common |
| 63 |
|
|
// |
| 64 |
|
|
Int_t dbls;///< Double shower flag: 0 : NO DOUBLE SHOWER 1 : DOUBLE SHOWER ONLY ACCORDING TO DBLSC 3 : TOO LITTLE BENDING FOR THE CHARGED PARTICLE AND SO NO DOUBLE SHOWER ACCORDING TO DBLSC 10 : DOUBLE SHOWER ONLY ACCORDING TO DUBSC 11 : DOUBLE SHOWER ACCORDING TO DBLSC AND TO DUBSC 13 : CASE 3 + CASE 10 |
| 65 |
|
|
// |
| 66 |
|
|
Float_t qdbls;///< Energy (MIP) on the X view of the secondary shower (one not on the particle trajectory as defined by the tracker) |
| 67 |
|
|
// |
| 68 |
|
|
public: |
| 69 |
|
|
// |
| 70 |
|
|
// |
| 71 |
|
|
Int_t GetDblsFlag(){ Process(); return dbls;}; ///< Retrieve dbls variable |
| 72 |
|
|
Float_t GetDblsQ(){ Process(); return qdbls;}; ///< Retrieve qdbls variable |
| 73 |
|
|
// |
| 74 |
|
|
Bool_t IsDouble(){ Process(); if ( dbls == 11 ) return true; return false;}; ///< True if the double shower has been recognized by both the algorithms |
| 75 |
|
|
// |
| 76 |
|
|
CaloDoubleShower(); |
| 77 |
|
|
CaloDoubleShower(PamLevel2 *L2); |
| 78 |
|
|
~CaloDoubleShower(){ Delete(); }; |
| 79 |
|
|
// |
| 80 |
|
|
void SetDebug(Bool_t d){ debug=d; }; |
| 81 |
|
|
// |
| 82 |
|
|
void Clear(); |
| 83 |
|
|
void Clear(Option_t *option){Clear();}; |
| 84 |
|
|
void Delete(); |
| 85 |
mocchiut |
1.2 |
void Delete(Option_t *option){Delete();}; |
| 86 |
mocchiut |
1.1 |
// |
| 87 |
|
|
void Process(UInt_t tr); ///< Process data for track number tr |
| 88 |
|
|
void Process(); ///< Process data for track number 0 |
| 89 |
|
|
void Print(UInt_t tr); |
| 90 |
|
|
void Print(); |
| 91 |
mocchiut |
1.3 |
// void Print(Option_t *option){Print(0);}; |
| 92 |
|
|
|
| 93 |
|
|
void UsePlane18X(Bool_t use){usepl18x = use;}; |
| 94 |
|
|
// |
| 95 |
mocchiut |
1.1 |
// |
| 96 |
|
|
void LoadMagneticField(); |
| 97 |
|
|
// |
| 98 |
mocchiut |
1.3 |
ClassDef(CaloDoubleShower,2); |
| 99 |
mocchiut |
1.1 |
}; |
| 100 |
|
|
|
| 101 |
|
|
#endif |
| 102 |
|
|
|