1 |
//---------------------------------------------------------------------------------------------------
|
2 |
// $Id: PsCluster.h,v 1.21 2012/04/20 16:06:55 bendavid Exp $
|
3 |
//
|
4 |
// PsCluster
|
5 |
//
|
6 |
// This class holds information of basic reconstructed clusters.
|
7 |
//
|
8 |
// Authors: C.Paus, J.Bendavid, S.Xie
|
9 |
//---------------------------------------------------------------------------------------------------
|
10 |
|
11 |
#ifndef MITANA_DATATREE_PSCLUSTER_H
|
12 |
#define MITANA_DATATREE_PSCLUSTER_H
|
13 |
|
14 |
#include <TMath.h>
|
15 |
#include "MitCommon/DataFormats/interface/Vect3C.h"
|
16 |
#include "MitAna/DataTree/interface/DataObject.h"
|
17 |
|
18 |
namespace mithep
|
19 |
{
|
20 |
class PsCluster : public DataObject
|
21 |
{
|
22 |
public:
|
23 |
PsCluster() :
|
24 |
fEnergy (0),
|
25 |
fNHits (0),
|
26 |
fInsideMustache(kFALSE),
|
27 |
fPsPlane (0)
|
28 |
{}
|
29 |
|
30 |
PsCluster(Double_t e, const ThreeVector &p) :
|
31 |
fEnergy (e),
|
32 |
fPoint (p),
|
33 |
fNHits (0),
|
34 |
fInsideMustache(kFALSE),
|
35 |
fPsPlane (0)
|
36 |
{}
|
37 |
|
38 |
Double_t Energy() const { return fEnergy; }
|
39 |
Double_t Et() const;
|
40 |
Double_t Eta() const { return fPoint.Eta(); }
|
41 |
EObjType ObjType() const { return kPsCluster; }
|
42 |
Double_t Phi() const { return fPoint.Phi(); }
|
43 |
ThreeVectorC Pos() const { return fPoint.V(); }
|
44 |
void Print(Option_t *opt="") const;
|
45 |
Double_t Rho() const { return fPoint.Rho(); }
|
46 |
Int_t NHits() const { return fNHits; }
|
47 |
Bool_t InsideMustache() const { return fInsideMustache; }
|
48 |
UChar_t PsPlane() const { return fPsPlane; }
|
49 |
|
50 |
void SetEnergy(Double_t e) { fEnergy = e; }
|
51 |
void SetXYZ(Double_t x, Double_t y, Double_t z) { fPoint.SetXYZ(x,y,z); }
|
52 |
void SetNHits(Int_t x) { fNHits = x; }
|
53 |
void SetInsideMustache(Bool_t b) { fInsideMustache = b; }
|
54 |
void SetPsPlane(UChar_t i) { fPsPlane = i; }
|
55 |
|
56 |
|
57 |
protected:
|
58 |
|
59 |
Double32_t fEnergy; //[0,0,14]assigned energy
|
60 |
Vect3C fPoint; //centroid Position
|
61 |
|
62 |
Int_t fNHits;
|
63 |
Double32_t fSumRecHitEnergy; //energy from manual rechit sum (bug recovery band aid)
|
64 |
Bool_t fInsideMustache; //is inside mustache profile of parent supercluster
|
65 |
UChar_t fPsPlane; //preshower plane (0 for Ecal clusters)
|
66 |
|
67 |
ClassDef(PsCluster, 1) // Preshower cluster class
|
68 |
};
|
69 |
}
|
70 |
|
71 |
//---------------------------------------------------------------------------------------------------
|
72 |
inline Double_t mithep::PsCluster::Et() const
|
73 |
{
|
74 |
// Return transverse energy.
|
75 |
|
76 |
return fEnergy*fPoint.Rho()/fPoint.V().R();
|
77 |
}
|
78 |
#endif
|