Project
Loading...
Searching...
No Matches
AlignableDetectorHMPID.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
16
18//#include "AliHMPIDParam.h"
21#include "Align/Controller.h"
22//#include "AliGeomManager.h"
23//#include "AliESDtrack.h"
24#include "Framework/Logger.h"
25#include <TGeoManager.h>
26
28
29namespace o2
30{
31namespace align
32{
33
34//____________________________________________
36{
37 // default c-tor
39 setDetID(Controller::kHMPID);
40}
41
42//____________________________________________
47
48//____________________________________________
50{
51 // define HMPID volumes
52 //
53 int labDet = getDetLabel();
54 AliGeomManager::ELayerID idHMPID = AliGeomManager::kHMPID;
55 for (int iCh = AliHMPIDParam::kMinCh; iCh <= AliHMPIDParam::kMaxCh; iCh++) {
56 const char* symname = Form("/HMPID/Chamber%i", iCh);
57 if (!gGeoManager->GetAlignableEntry(symname)) {
58 AliErrorF("Did not find alignable %s", symname);
59 continue;
60 }
61 uint16_t vid = AliGeomManager::LayerToVolUID(idHMPID, iCh);
62 int iid = labDet + (1 + iCh) * 10000;
63 AlignableSensorHMPID* sens = new AlignableSensorHMPID(symname, vid, iid);
64 addVolume(sens);
65 } //iCh loop
66 //
67}
68
69//____________________________________________
70bool AlignableDetectorHMPID::AcceptTrack(const AliESDtrack* trc, int trtype) const
71{
72 // test if detector had seed this track
73 if (!CheckFlags(trc, trtype))
74 return false;
75 if (trc->GetNcls(1) < mNPointsSel[trtype])
76 return false;
77 return true;
78}
79
80} // namespace align
81} // namespace o2
ClassImp(o2::align::AlignableDetectorHMPID)
HMPID detector wrapper.
HMPID sensor (chamber)
Base class of alignable volume.
Steering class for the global alignment.
bool AcceptTrack(const AliESDtrack *trc, int trtype) const
int mNPointsSel[utils::NTrackTypes]
virtual void addVolume(AlignableVolume *vol)
static Char_t * getDetNameByDetID(int id)
Definition Controller.h:247
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...